临时
js
async function onFinish(values) {
const title = { "add": "新增", "edit": "编辑", "upgrade": "升级", "copy": "复制" };
props.addTab({
title: `${title[type]}产品配方`,
key: "ProductionLineProcessConfig",
initSetting: {
id: Date.now(),
type: type,
config: "ProductFormula"
},
});
}
js
async function onFinish(values) {
let title = ""
if(type === "add") {
title = "新增"
}else if(type === "edit") {
title = "编辑"
}else if(type === "upgrade") {
title = "升级"
}else if(type === "copy") {
title = "复制"
}else{
title = ""
}
props.addTab({
title: `${title}产品配方`,
key: "ProductionLineProcessConfig",
initSetting: {
id: Date.now(),
type: type,
config: "ProductFormula"
},
});
}