From ec3a176f370e8f8871c33d9238514bf4fc461bec Mon Sep 17 00:00:00 2001 From: "1445654576@qq.com" <1445654576@qq.com> Date: Sat, 4 Dec 2021 12:38:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=8E=A7=E5=88=B6visible=EF=BC=8Cpopover=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=B8=B2=E6=9F=93=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=88#I4L31Q=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/devui-vue/devui/popover/src/popover.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/devui-vue/devui/popover/src/popover.tsx b/packages/devui-vue/devui/popover/src/popover.tsx index 6c365094..017fe7da 100644 --- a/packages/devui-vue/devui/popover/src/popover.tsx +++ b/packages/devui-vue/devui/popover/src/popover.tsx @@ -1,4 +1,4 @@ -import { defineComponent, toRefs, ref, CSSProperties, reactive } from 'vue' +import { defineComponent, toRefs, ref, CSSProperties, reactive, watch } from 'vue' import debounce from './debounce'; import clickoutsideDirective from '../../shared/devui-directive/clickoutside' import './popover.scss' @@ -104,6 +104,10 @@ export default defineComponent({ const hiddenContext = () => { visible.value = false } popMaxWidth.value && (style.maxWidth = `${popMaxWidth.value}px`) + watch(() => props.visible, (newVal) => { + visible.value = newVal; + }) + return () => { return (