From a863f62383247ecedee850fc1a621725a7ff452e Mon Sep 17 00:00:00 2001 From: ShineKOT <1917095344@qq.com> Date: Fri, 18 Oct 2024 15:08:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8C=89=E9=92=AE=E7=BB=84?= =?UTF-8?q?=E5=92=8C=E5=85=B3=E7=B3=BB=E5=88=86=E9=A1=B5=E4=B8=8A=E6=96=B9?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=88=97=E8=A1=A8popover=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ src/common/button-list/button-list.tsx | 8 ++++---- src/control/drtab/drtab.scss | 9 +++++---- src/control/drtab/drtab.tsx | 24 +++++++++++++++--------- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f26beeb6..0cb065f35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ## [Unreleased] +### Change + +- 优化按钮组和关系分页上方下拉列表 popover 关闭模式 + ## [0.0.28] - 2024-10-18 ### Added diff --git a/src/common/button-list/button-list.tsx b/src/common/button-list/button-list.tsx index 4df5b5751..3fcf224b5 100644 --- a/src/common/button-list/button-list.tsx +++ b/src/common/button-list/button-list.tsx @@ -69,12 +69,12 @@ export const IBizButtonList = defineComponent({ }; /** - * 打开 Popover + * 改变Popover显示 * @param e */ - const openPopover = (e: MouseEvent) => { + const onChangePopover = (e: MouseEvent) => { e.stopPropagation(); - showPopover.value = true; + showPopover.value = !showPopover.value; }; const details = computed(() => { @@ -167,7 +167,7 @@ export const IBizButtonList = defineComponent({ reference: (): VNode => { const { caption, sysImage, showCaption } = props.model; return ( - + {sysImage && ( { + const activeTab = computed(() => { return c.state.drTabPages.find(tab => tab.tag === c.state.activeName); }); @@ -63,12 +63,12 @@ export const DRTabControl = defineComponent({ }; /** - * 打开Popover + * 打开/关闭 Popover * @param e */ - const openPopover = (e: MouseEvent) => { + const onChangePopover = (e: MouseEvent) => { e.stopPropagation(); - showPopover.value = true; + showPopover.value = !showPopover.value; }; onUnmounted(() => { @@ -98,7 +98,7 @@ export const DRTabControl = defineComponent({ > {tab.sysImage && }
- {tab.caption} + {tab.caption} {tab.counterId && ( { return ( - - {referenceTab.value?.sysImage && ( + + {activeTab.value?.sysImage && ( )} - {referenceTab.value?.caption} + {activeTab.value?.caption} + {activeTab.value?.counterId && ( + + )} -- Gitee