Skip to content

Commit 460a838

Browse files
fix: 🐛 修复 Curtain 幕帘组件 close 事件触发2次的问题
Closes: #894
1 parent 7dce564 commit 460a838

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ watch(
8585
8686
watch(modelValue, (newVal) => {
8787
emit('update:modelValue', newVal)
88+
if (!newVal) {
89+
emit('close')
90+
}
8891
})
8992
9093
const imgSucc = ref<boolean>(true)
@@ -125,7 +128,6 @@ function afterleave() {
125128
126129
function close() {
127130
modelValue.value = false
128-
emit('close')
129131
}
130132
131133
function clickModal() {

0 commit comments

Comments
 (0)