style(table): 为 sub-actions 类名添加 tmagic-table 命名空间并迁移样式到主题文件

This commit is contained in:
roymondchen 2026-07-07 19:45:38 +08:00
parent 605f07c8fe
commit de7a4f73ad
2 changed files with 21 additions and 23 deletions

View File

@ -16,7 +16,7 @@
:placement="action.subActionConfig?.placement || 'bottom'" :placement="action.subActionConfig?.placement || 'bottom'"
:width="action.subActionConfig?.popoverWidth" :width="action.subActionConfig?.popoverWidth"
:popper-class="action.subActionConfig?.popoverClass" :popper-class="action.subActionConfig?.popoverClass"
:destroy-on-close="action.subActionConfig?.popoverDestroyOnClose" :destroy-on-close="action.subActionConfig?.popoverDestroyOnClose ?? true"
> >
<template #reference> <template #reference>
<TMagicButton <TMagicButton
@ -29,7 +29,7 @@
@click.stop="togglePopover" @click.stop="togglePopover"
></TMagicButton> ></TMagicButton>
</template> </template>
<div class="sub-actions"> <div class="tmagic-table-sub-actions">
<template v-for="(subAction, subIndex) in action.subActionConfig?.items" :key="subIndex"> <template v-for="(subAction, subIndex) in action.subActionConfig?.items" :key="subIndex">
<ActionPopconfirm <ActionPopconfirm
v-if="subAction.popconfirm" v-if="subAction.popconfirm"
@ -175,24 +175,3 @@ defineExpose({
cancel, cancel,
}); });
</script> </script>
<style lang="scss">
.sub-actions {
display: flex;
flex-direction: column;
gap: 4px;
align-items: flex-start;
.sub-action-btn {
width: 100%;
}
.tmagic-design-button + .tmagic-design-button {
margin-left: 0;
}
.tmagic-design-button {
justify-content: flex-start;
}
}
</style>

View File

@ -13,3 +13,22 @@
color: #999; color: #999;
} }
} }
.tmagic-table-sub-actions {
display: flex;
flex-direction: column;
gap: 4px;
align-items: flex-start;
.sub-action-btn {
width: 100%;
}
.tmagic-design-button + .tmagic-design-button {
margin-left: 0;
}
.tmagic-design-button {
justify-content: flex-start;
}
}