diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f26beeb6cc0ec76da27fc16d36f03db07d91377..0cb065f35c2363528c20f2bf54a3cf20f1546879 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 4df5b5751a1a1388a670ef6452511e2f0828cf16..3fcf224b59ff666f8f6a7372790a233a3bdd53ae 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 && ( + + )}