diff --git a/code/fms/fms-vue/src/components/fms-table/FmsTable.vue b/code/fms/fms-vue/src/components/fms-table/FmsTable.vue index 92e64b3d..9a35b00b 100644 --- a/code/fms/fms-vue/src/components/fms-table/FmsTable.vue +++ b/code/fms/fms-vue/src/components/fms-table/FmsTable.vue @@ -12,7 +12,7 @@ const props = defineProps({ virtual: { type: Boolean, default: true }, virtualX: { type: Boolean, default: true }, colResizable: { type: Boolean, default: true }, - bordered: { type: [Boolean, String], default: true }, + bordered: { type: [Boolean, String], default: false }, noDataFull: { type: Boolean, default: true }, showOverflow: { type: Boolean, default: true }, columns: { type: Array, default: () => [] }, @@ -44,7 +44,6 @@ const tableRef = ref(null); const slots = useSlots(); const appStore = useAppStore(); const tableTheme = computed(() => props.theme ?? (appStore.isDark ? "dark" : "light")); -const containerHeight = ref(0); // Tab 面板从隐藏恢复时,等到容器拥有有效尺寸再刷新虚拟滚动布局。 // RAF 将同一帧内的多次 ResizeObserver 通知合并,避免重复重排。 @@ -59,7 +58,6 @@ const { resume: refreshLayout } = useRafFn( useResizeObserver(rootRef, ([entry]) => { const { width, height } = entry.contentRect; - containerHeight.value = Math.floor(height); if (width > 0 && height > 0) refreshLayout(); }); @@ -250,7 +248,10 @@ function onColumnsUpdate(columns) { const real = (columns || []) .filter( (c) => - !isSelectionColumn(c) && c.type !== "seq" && c.type !== "dragRow" && c.dataIndex !== "", + !isSelectionColumn(c) && + c.type !== "seq" && + c.type !== "dragRow" && + c.dataIndex !== "", ) .map((col) => { const original = originalByKey.get(String(col.key ?? col.dataIndex ?? "")); @@ -266,19 +267,14 @@ function handleRowOrderChange(sourceIndex, targetIndex) { } // 行高同时作为 CSS 变量与 StkTable 的 row-height / header-row-height -const rowHeight = 34; -const headerRowHeight = 40; -const hasBottomGap = computed(() => { - if (!props.dataSource.length || containerHeight.value <= 0) return false; - const bodyHeight = Math.max(containerHeight.value - headerRowHeight, 0); - return props.dataSource.length * rowHeight < bodyHeight - 1; -}); +const rowHeight = 28; +const headerRowHeight = 30; const customVars = computed(() => { return { "--header-row-height": `${headerRowHeight}px`, "--row-height": `${rowHeight}px`, "--footer-row-height": "36px", - "--th-bgc": "var(--background)", + "--th-bgc": "#f5f5f8", "--tf-bgc": "var(--background)", }; }); @@ -526,16 +522,10 @@ defineExpose({