生成代码 配置detail 忽略detail的处理
This commit is contained in:
@ -434,7 +434,7 @@ export function buildListCode(model: GeneratorConfig): string {
|
||||
});
|
||||
let btnEvent = `{`;
|
||||
model.listConfig.buttonConfigs
|
||||
.filter((x) => x.isUse && x.isDefault)
|
||||
.filter((x) => x.isUse && x.isDefault && x.code != 'detail')
|
||||
.forEach((x) => {
|
||||
btnEvent += `${x.code} : handle${upperFirst(x.code)},`;
|
||||
});
|
||||
@ -451,6 +451,11 @@ export function buildListCode(model: GeneratorConfig): string {
|
||||
buttonConfigs.push(item);
|
||||
return;
|
||||
}
|
||||
if (item.code === 'detail') {
|
||||
//detail按钮 只作为权限处理
|
||||
buttonConfigs.splice(index, 1);
|
||||
return;
|
||||
}
|
||||
});
|
||||
const hasAddButton = hasButton(buttonConfigs, 'add');
|
||||
const hasEditButton = hasButton(buttonConfigs, 'edit');
|
||||
|
||||
Reference in New Issue
Block a user