update operationComponent

This commit is contained in:
lb
2023-03-14 16:30:05 +08:00
parent 183335f9fe
commit f9ad79f6bc
3 changed files with 70 additions and 73 deletions

View File

@@ -31,7 +31,7 @@ export default function () {
fixed: "right",
width: 160,
subcomponent: TableOperaionComponent,
options: ['add', 'edit']
options: ['add', { name: 'edit', enable: injectRow => { return 'task' in injectRow && injectRow.task === 'Manual'} }] // 只有 injectRow.task 为手动时,才允许编辑
},
];

View File

@@ -26,20 +26,6 @@ export default {
return this.$route.params.id || "";
},
},
// urls: {
// type: Object,
// required: true,
// default: () => ({
// /** 列表 url **/ list: null,
// /** 分页 url **/ page: null,
// /** 编辑保存 url **/ edit: null,
// /** 删除条目 url **/ delete: null,
// /** 详情 url **/ detail: null,
// /** 导出 url **/ export: null,
// /** 导入 url **/ import: null,
// /** 其他 url **/ other: null,
// }),
// },
data() {
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
return {