提交 941ad597 编写于 作者: 无木

fix(drawer): openDrawer is not normal in some cases

修复BasicDrawer在设置其它属性时可能会影响visible状态的问题
上级 d0b6c496
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
defineComponent, defineComponent,
ref, ref,
computed, computed,
watchEffect,
watch, watch,
unref, unref,
nextTick, nextTick,
...@@ -135,9 +134,13 @@ ...@@ -135,9 +134,13 @@
return !!unref(getProps)?.loading; return !!unref(getProps)?.loading;
}); });
watchEffect(() => { watch(
visibleRef.value = props.visible; () => props.visible,
}); (newVal, oldVal) => {
if (newVal != oldVal) visibleRef.value = newVal;
},
{ deep: true }
);
watch( watch(
() => visibleRef.value, () => visibleRef.value,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册