...
Code Block | ||
---|---|---|
| ||
if (record.age > 25) { // 年龄大于 25 岁的不显示此按钮 return {visible: false}; } return {visible: true} |
激活规则(返回值:{disabled:true/false}
当前按钮是否可用,可以自定义,举例:
Code Block | ||
---|---|---|
| ||
if (record.sex === 'M') { // 性别为 M 的此按钮不可用
return {disabled: false};
}
return {disabled: true}
|