用JS控制
// 获取全部可选值的数组
const allOptions = this.options.items.map(item => item.value);
// 设置最大可选数量(比总数少1)
const maxSelect = allOptions.length - 1;
contentPane.on("afterParamWidgetEdit", (paramName, widget, value) => {
if (paramName === "yourParamName") {
const selected = value.split(',').filter(Boolean);
if (selected.length === allOptions.length) {
// 禁止全选:自动取消最后一个选中项
const newVal = selected.slice(0, maxSelect).join(',');
widget.setValue(newVal);
_g().showMessageDialog("禁止全选操作!", "警告");
}
}
});