Browse Source

无JIRA 抽象类就不用shortcut了

es6
zsmj 2 years ago
parent
commit
a867349e98
  1. 14
      packages/fineui/src/component/allvaluechooser/abstract.allvaluechooser.js

14
packages/fineui/src/component/allvaluechooser/abstract.allvaluechooser.js

@ -1,5 +1,4 @@
import { import {
shortcut,
Widget, Widget,
extend, extend,
emptyFn, emptyFn,
@ -17,7 +16,6 @@ import {
} from "@/core"; } from "@/core";
import { MultiSelectCombo } from "@/widget"; import { MultiSelectCombo } from "@/widget";
@shortcut()
export class AbstractAllValueChooser extends Widget { export class AbstractAllValueChooser extends Widget {
_const = { perPage: 100 }; _const = { perPage: 100 };
@ -42,12 +40,12 @@ export class AbstractAllValueChooser extends Widget {
// 需要考虑到value也可能是数字 // 需要考虑到value也可能是数字
if (item.value === v || `${item.value}` === v) { if (item.value === v || `${item.value}` === v) {
text = item.text; text = item.text;
return true; return true;
} }
}); });
} }
return text; return text;
} }
@ -56,7 +54,7 @@ export class AbstractAllValueChooser extends Widget {
for (let i = (times - 1) * this._const.perPage; items[i] && i < times * this._const.perPage; i++) { for (let i = (times - 1) * this._const.perPage; items[i] && i < times * this._const.perPage; i++) {
res.push(items[i]); res.push(items[i]);
} }
return res; return res;
} }
@ -99,12 +97,12 @@ export class AbstractAllValueChooser extends Widget {
callback({ callback({
items: resultItems, items: resultItems,
}); });
return; return;
} }
if (options.type === MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({ count: resultItems.length }); callback({ count: resultItems.length });
return; return;
} }
callback({ callback({
@ -126,7 +124,7 @@ export class AbstractAllValueChooser extends Widget {
}; };
} }
} }
return value; return value;
} }
} }

Loading…
Cancel
Save