|
|
@@ -17,28 +17,30 @@ if(@column.EffectType == "Upload"){
|
|
|
</template>
|
|
|
}
|
|
|
}
|
|
|
- <template #action="{ record }">
|
|
|
- <TableAction
|
|
|
- :actions="[
|
|
|
- {
|
|
|
- icon: 'clarity:note-edit-line',
|
|
|
- label: '编辑',
|
|
|
- onClick: handleEdit.bind(null, record),
|
|
|
- disabled: !hasPermission('@(@Model.ClassName):edit'),
|
|
|
- },
|
|
|
- {
|
|
|
- icon: 'ant-design:delete-outlined',
|
|
|
- color: 'error',
|
|
|
- label: '删除',
|
|
|
- ifShow: hasPermission('@(@Model.ClassName):delete'),
|
|
|
- popConfirm: {
|
|
|
- title: '是否确认删除',
|
|
|
- placement: 'left',
|
|
|
- confirm: handleDelete.bind(null, record),
|
|
|
+ <template #bodyCell="{ column, record }">
|
|
|
+ <template v-if="column.key === 'action'">
|
|
|
+ <TableAction
|
|
|
+ :actions="[
|
|
|
+ {
|
|
|
+ icon: 'clarity:note-edit-line',
|
|
|
+ label: '编辑',
|
|
|
+ onClick: handleEdit.bind(null, record),
|
|
|
+ disabled: !hasPermission('@(@Model.ClassName):edit'),
|
|
|
},
|
|
|
- },
|
|
|
- ]"
|
|
|
- />
|
|
|
+ {
|
|
|
+ icon: 'ant-design:delete-outlined',
|
|
|
+ color: 'error',
|
|
|
+ label: '删除',
|
|
|
+ ifShow: hasPermission('@(@Model.ClassName):delete'),
|
|
|
+ popConfirm: {
|
|
|
+ title: '是否确认删除',
|
|
|
+ placement: 'left',
|
|
|
+ confirm: handleDelete.bind(null, record),
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ]"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</BasicTable>
|
|
|
<@(@Model.ClassName)Modal @@register="registerModal" @@success="handleSuccess" />
|
|
|
@@ -68,8 +70,7 @@ if(@column.EffectType == "Upload"){
|
|
|
const { hasPermission } = usePermission();
|
|
|
const { createMessage } = useMessage();
|
|
|
const [registerModal, { openModal }] = useModal();
|
|
|
-
|
|
|
- const hasPage = hasPermission('@(@Model.ClassName):page');
|
|
|
+ const hasPage = hasPermission('@(@Model.ClassName):page');
|
|
|
const [registerTable, { reload }] = useTable({
|
|
|
title: '@(@Model.BusName)列表',
|
|
|
api: get@(@Model.ClassName)PageList,
|
|
|
@@ -90,7 +91,7 @@ if(@column.EffectType == "Upload"){
|
|
|
width: 160,
|
|
|
title: '操作',
|
|
|
dataIndex: 'action',
|
|
|
- slots: { customRender: 'action' },
|
|
|
+ //slots: { customRender: 'action' },
|
|
|
},
|
|
|
});
|
|
|
|