bug修复

This commit is contained in:
zoujiandong
2023-07-18 14:00:50 +08:00
parent 6c9a63af16
commit c8fb03a569
3 changed files with 11 additions and 14 deletions
+5 -5
View File
@@ -7,11 +7,11 @@ export default {
loading: null,
// 每当这个插件被添加到应用程序中时,如果它是一个对象,就会调用 install 方法。如果它是一个 function,则函数本身将被调用。在这两种情况下——它都会收到两个参数:由 Vue 的 createApp 生成的 app 对象和用户传入的选项。
install(app) {
// if (this.loading) {
// // 防止多次载入
// app.config.globalProperties.$loading = this.loading
// return
// }
if (this.loading) {
// 防止多次载入
app.config.globalProperties.$loading = this.loading
return
}
// 创建Loading实例,用于挂载
let instance = createApp(Loading)
// 创建div元素装载Loading对象
-3
View File
@@ -19,9 +19,7 @@
</template>
<script setup>
//import {Spin } from '@arco-design/web-vue';
import { ref } from 'vue'
const loading = ref(false)
const show = () => {
loading.value = true
@@ -29,7 +27,6 @@ const loading = ref(false)
const hide = () => {
loading.value = false
}
defineExpose({
show,
hide