update 基本完成混料订单
This commit is contained in:
@@ -90,8 +90,9 @@ export default {
|
||||
// 检查可用状态
|
||||
let shouldDisabled = false;
|
||||
if ("enable" in opt && typeof opt.enable === "function") {
|
||||
shouldDisabled = opt.enable(this.injectData);
|
||||
shouldDisabled = !opt.enable(this.injectData);
|
||||
}
|
||||
console.log('should disabled', shouldDisabled)
|
||||
btns.push(
|
||||
h(
|
||||
"el-button",
|
||||
@@ -102,7 +103,7 @@ export default {
|
||||
title: opt.label ?? opt.name,
|
||||
disabled: shouldDisabled,
|
||||
},
|
||||
style: { color: opt.color || this.colors[opt.name] || "#0b58ff" },
|
||||
style: { color: !shouldDisabled && (opt.color || this.colors[opt.name] || "#0b58ff") },
|
||||
on: { click: this.emit.bind(null, opt) },
|
||||
},
|
||||
opt.icon ? (opt.showText ? this.text[opt.name] ?? opt.label : "") : opt.label ?? this.text[opt.name]
|
||||
|
||||
Reference in New Issue
Block a user