From c8025c2f6d5ba52649ebe043fa44ff8d8768f411 Mon Sep 17 00:00:00 2001 From: zhang_12370 <z2864490065@outlook.com> Date: 星期三, 25 六月 2025 11:37:31 +0800 Subject: [PATCH] 开发通用查看单条数据的详情页面 优化基础模块 优化生产加工数据匹配渲染问题 --- src/components/Table/ETable.vue | 19 ++++++------------- 1 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/components/Table/ETable.vue b/src/components/Table/ETable.vue index ca9c483..e3b317e 100644 --- a/src/components/Table/ETable.vue +++ b/src/components/Table/ETable.vue @@ -2,7 +2,7 @@ v-loading="loading" :data="tableData" :border="border" - :show-selection="showSelection" + :show-selection="showSelection" :max-height="maxHeight" :header-cell-style="{ background: '#EBEEF5', color: '#3D3D3D' }" @selection-change="handleSelectionChange" @@ -15,7 +15,7 @@ :show-overflow-tooltip="showOverflowTooltip" ref="tableRef" :row-key="rowKey" - style="width: 100%" + style="width: 100%;" > <el-table-column v-if="showSelection" type="selection" width="55" align="center" /> <el-table-column v-if="showIndex" label="搴忓彿" width="60" align="center" fixed="left"> @@ -32,20 +32,13 @@ </el-table-column> </template> <!-- 鎿嶄綔鍒� --> - <el-table-column v-if="showOperations" :label="operationsLabel" :width="operationsWidth" fixed="right" align="center"> + <el-table-column v-if="showOperations" :label="operationsLabel" :width="operationsWidth" :show-overflow-tooltip="false" fixed="right" align="center"> <template #default="scope"> <slot name="operations" :row="scope.row"> <el-button v-if="operations.includes('edit')" link type="primary" size="small" @click="handleEdit(scope.row)">缂栬緫</el-button> - <el-button v-if="operations.includes('viewFile')" link type="primary" size="small" + <el-button v-if="operations.includes('viewRow')" link type="primary" size="small" @click="handleView(scope.row)">鏌ョ湅闄勪欢</el-button> - <!-- <el-button--> - <!-- v-if="operations.includes('delete')"--> - <!-- link--> - <!-- type="danger"--> - <!-- size="small"--> - <!-- @click="handleDelete(scope.row)"--> - <!-- >鍒犻櫎</el-button>--> </slot> </template> </el-table-column> @@ -168,7 +161,7 @@ }; // 澶勭悊閫夋嫨鍙樺寲銆佺紪杈戙�佸垹闄ゅ拰瀵煎嚭鎿嶄綔 -const emit = defineEmits(['selection-change', 'edit', 'delete', 'export']) +const emit = defineEmits(['selection-change', 'edit', 'delete', 'export', 'viewRow']) const handleSelectionChange = (selection) => { emit('selection-change', selection) } @@ -176,7 +169,7 @@ emit('edit', row) } const handleView = (row) => { - emit('viewFile', row) + emit('viewRow', row) } const handleDelete = (row) => { ElMessageBox.confirm( -- Gitblit v1.9.3