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
nezha-nezha-fronted/nezha-fronted/src/components/common/loading.vue
2021-12-02 21:46:07 +08:00

34 lines
489 B
Vue

<template>
<div v-show="showLoading" class="el-loading-mask">
<div class="el-loading-spinner">
</div>
</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 (n) {
this.showLoading = n
}
}
}
</script>