|
|
|
@ -71,10 +71,12 @@ export class SelectList extends Widget {
|
|
|
|
|
itemsCreator: (op, callback) => { |
|
|
|
|
op.times === 1 && this.toolbar.setVisible(false); |
|
|
|
|
o.itemsCreator(op, (items, keywords, context, ...args) => { |
|
|
|
|
callback(items, keywords, context, ...args); |
|
|
|
|
const tipText = get(context, "tipText", ""); |
|
|
|
|
const isEmptyTipText = isEmptyString(tipText); |
|
|
|
|
// tipText 和 items 本身就是互斥的
|
|
|
|
|
callback(isEmptyTipText ? items : [], keywords, context, ...args); |
|
|
|
|
if (op.times === 1) { |
|
|
|
|
const tipText = get(context, "tipText", ""); |
|
|
|
|
const visible = isEmptyString(tipText) && items && items.length > 0; |
|
|
|
|
const visible = isEmptyTipText && items && items.length > 0; |
|
|
|
|
this.toolbar.setVisible(visible); |
|
|
|
|
this.toolbar.setEnable(this.isEnabled() && visible); |
|
|
|
|
} |
|
|
|
|