zhang_12370
5 天以前 c6d13e58d85fbaaceb49d4c24401b50143050173
src/components/Table/ETable.vue
@@ -17,8 +17,8 @@
    :row-key="rowKey"
    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">
    <el-table-column v-if="showSelection" type="selection" width="55" align="center" :show-overflow-tooltip="false" />
    <el-table-column v-if="showIndex" label="序号" width="60" align="center" fixed="left" :show-overflow-tooltip="false">
      <template #default="scope">
        {{ getRowIndex(scope.$index) }}
      </template>
@@ -38,7 +38,9 @@
          <el-button v-if="operations.includes('edit')" link type="primary" size="small"
            @click="handleEdit(scope.row)">编辑</el-button>
          <el-button v-if="operations.includes('viewRow')" link type="primary" size="small"
            @click="handleView(scope.row)">查看附件</el-button>
            @click="handleView(scope.row)">查看</el-button>
          <el-button v-if="operations.includes('viewFile')" link type="primary" size="small"
            @click="handleViewFile(scope.row)">查看附件</el-button>
        </slot>
      </template>
    </el-table-column>
@@ -161,7 +163,7 @@
};
// 处理选择变化、编辑、删除和导出操作
const emit = defineEmits(['selection-change', 'edit', 'delete', 'export', 'viewRow'])
const emit = defineEmits(['selection-change', 'edit', 'delete', 'export', 'viewRow', 'viewFile'])
const handleSelectionChange = (selection) => {
  emit('selection-change', selection)
}
@@ -171,6 +173,9 @@
const handleView = (row) => {
  emit('viewRow', row)
}
const handleViewFile = (row) => {
  emit('viewFile', row)
}
const handleDelete = (row) => {
  ElMessageBox.confirm(
    props.deleteConfirmText,