This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cyber-narrator-cn-ui/src/components/common/Loading.vue

37 lines
544 B
Vue
Raw Normal View History

2022-01-16 23:16:00 +08:00
<template>
<div class="chart__loading" v-show="showLoading">
<i class="el-icon-loading"></i>
</div>
</template>
<script>
export default {
name: 'loading',
props: {
loading: Boolean
},
data () {
return {
showLoading: false
}
},
methods: {
startLoading () {
this.showLoading = true
},
endLoading () {
this.showLoading = false
}
},
watch: {
loading: {
deep: true,
immediate: true,
handler (n) {
this.showLoading = n
}
}
}
}
</script>