Skip to content

Commit d1baa53

Browse files
authored
Merge pull request #81 from zkwolf/zk-antd-pro
fix: close popover modal, the loadding logo show and disappear
2 parents ccf19c2 + a88d583 commit d1baa53

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/components/tools/HeaderNotice.vue

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
22
<a-popover
3+
v-model="visible"
34
trigger="click"
45
placement="bottomRight"
56
:autoAdjustOverflow="true"
@@ -50,19 +51,21 @@ export default {
5051
name: 'HeaderNotice',
5152
data () {
5253
return {
53-
loadding: false
54+
loadding: false,
55+
visible: false
5456
}
5557
},
5658
methods: {
5759
fetchNotice () {
58-
if (this.loadding) {
60+
if (!this.visible) {
61+
this.loadding = true
62+
setTimeout(() => {
63+
this.loadding = false
64+
}, 2000)
65+
} else {
5966
this.loadding = false
60-
return
6167
}
62-
this.loadding = true
63-
setTimeout(() => {
64-
this.loadding = false
65-
}, 2000)
68+
this.visible = !this.visible
6669
}
6770
}
6871
}
@@ -82,4 +85,4 @@ export default {
8285
vertical-align: initial;
8386
}
8487
}
85-
</style>
88+
</style>

0 commit comments

Comments
 (0)