fix(form,table): groupList分界线、空状态、actions只存在一个

TAPD: --story=134235103
This commit is contained in:
manmanyu 2026-07-27 06:52:18 +00:00 committed by roymondchen
parent 596d86f2ab
commit dec4ebfa20
3 changed files with 47 additions and 1 deletions

View File

@ -38,3 +38,14 @@
margin-bottom: 16px;
}
}
/** 最外层的groupList需要每个item需要增加空白区域界限时增加outer-gorup_list可以实现 */
.m-container-group-list {
&.outer-gorup_list {
> .m-fields-group-list {
> .m-fields-group-list-item {
margin-bottom: 10px;
}
}
}
}

View File

@ -92,4 +92,15 @@
text-align: left;
}
}
.m-fields-group-list {
.el-table__empty-block {
.el-table__empty-text {
width: 100%;
background-color: rgba(0, 0, 0, 0.03);
margin-top: 8px;
border-radius: 4px;
}
}
}
}

View File

@ -17,6 +17,7 @@
:width="action.subActionConfig?.popoverWidth"
:popper-class="action.subActionConfig?.popoverClass"
:destroy-on-close="action.subActionConfig?.popoverDestroyOnClose ?? true"
@clickoutside="popoverVisible = false"
>
<template #reference>
<TMagicButton
@ -84,8 +85,15 @@
>
</template>
<script lang="ts" setup>
<script lang="ts">
import { ref } from 'vue';
// sub-actions
const activePopoverId = ref<symbol | null>(null);
</script>
<script lang="ts" setup>
import { watch } from 'vue';
import { ArrowDown, ArrowRight } from '@element-plus/icons-vue';
import { cloneDeep } from 'lodash-es';
@ -117,7 +125,23 @@ const props = withDefaults(
},
);
const popoverId = Symbol('sub-actions-popover');
const popoverVisible = ref(false);
watch(popoverVisible, (visible) => {
if (visible) {
activePopoverId.value = popoverId;
} else if (activePopoverId.value === popoverId) {
activePopoverId.value = null;
}
});
watch(activePopoverId, (id) => {
if (id !== popoverId && popoverVisible.value) {
popoverVisible.value = false;
}
});
const togglePopover = () => {
popoverVisible.value = !popoverVisible.value;
};