diff --git a/frontend/admin/src/components/SchemaPage/components/SchemaTable.vue b/frontend/admin/src/components/SchemaPage/components/SchemaTable.vue
index f2371e79c..991306f3f 100644
--- a/frontend/admin/src/components/SchemaPage/components/SchemaTable.vue
+++ b/frontend/admin/src/components/SchemaPage/components/SchemaTable.vue
@@ -25,19 +25,12 @@
-
+
-
-
- {{ actionItem.label }}
-
+
+
+ {{ actionItem.label }}
@@ -51,7 +44,7 @@
/**
* 通用页面表格(独立组件)
*
- * 基于 el-table 封装:按列定义分发渲染(SchemaTableCell),操作列按行操作配置输出链接按钮。
+ * 基于 el-table 封装:按列定义分发渲染(SchemaTableCell),操作列按行操作配置输出文字链接。
*/
import { computed } from 'vue';
import SchemaTableCell from './SchemaTableCell.vue';
@@ -88,10 +81,10 @@ const props = defineProps({
const emit = defineEmits(['row-action', 'switch-change', 'sort-change', 'selection-change']);
-/** 操作列宽度:按按钮数量与文案长度估算 */
+/** 操作列宽度:按链接文案长度与分隔线数量估算 */
const actionColumnWidth = computed(() => {
const totalChars = props.rowActions.reduce((sum, item) => sum + (item.label || '').length, 0);
- return Math.max(100, totalChars * 15 + 60);
+ return Math.max(100, totalChars * 13 + 20 * props.rowActions.length + 40);
});
/** 超长文本列的气泡配置:通过 popperClass 限定最大宽度(样式见文件底部全局样式块) */
@@ -132,6 +125,15 @@ function isActionVisible(actionItem, row) {
});
}
+/**
+ * 当前行可见的行操作列表(模板按序渲染链接,分隔线插在相邻可见动作之间)
+ * @param {object} row 行数据
+ * @returns {Array}
+ */
+function visibleRowActions(row) {
+ return props.rowActions.filter((item) => isActionVisible(item, row));
+}
+
/** 开关列切换透传 */
function onSwitchChange(payload) {
emit('switch-change', payload);
@@ -154,28 +156,6 @@ function onSortChange({ prop, order }) {
}
-
-