mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-06 14:33:11 +08:00
fix: 修复 Drawer 和 Modal 组件的 isClosed 状态初始化逻辑
This commit is contained in:
@@ -63,7 +63,7 @@ watch(() => props.modelValue, (newValue) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const hasOpened = ref(false)
|
const hasOpened = ref(false)
|
||||||
const isClosed = ref(true)
|
const isClosed = ref(!props.modelValue)
|
||||||
|
|
||||||
watch(isOpen, (val) => {
|
watch(isOpen, (val) => {
|
||||||
emits('update:modelValue', val)
|
emits('update:modelValue', val)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ watch(() => props.modelValue, (newValue) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const hasOpened = ref(false)
|
const hasOpened = ref(false)
|
||||||
const isClosed = ref(true)
|
const isClosed = ref(!props.modelValue)
|
||||||
|
|
||||||
watch(isOpen, (val) => {
|
watch(isOpen, (val) => {
|
||||||
emits('update:modelValue', val)
|
emits('update:modelValue', val)
|
||||||
|
|||||||
Reference in New Issue
Block a user