Browse Source

Pull request #3383: update

Merge in VISUAL/fineui from ~DAILER/fineui:es6 to es6

* commit '41262e9a4a451dd124139ce670f4c09ada0d7ebf':
  update
es6
Dailer-刘荣歆 2 years ago
parent
commit
016978795d
  1. 30
      src/case/list/list.select.js

30
src/case/list/list.select.js

@ -1,16 +1,32 @@
/* eslint-disable no-mixed-spaces-and-tabs */ /* eslint-disable no-mixed-spaces-and-tabs */
import { shortcut, Widget, extend, emptyFn, Controller, createWidget, Events, isNotNull, isEmptyString, isEmptyArray, Direction, get, LogicFactory, each, pixFormat } from "@/core"; import {
shortcut,
Widget,
extend,
emptyFn,
Controller,
createWidget,
Events,
isNotNull,
isEmptyString,
isEmptyArray,
Direction,
get,
LogicFactory,
each,
pixFormat
} from "@/core";
import { ButtonGroup } from "@/base"; import { ButtonGroup } from "@/base";
import { MultiSelectBar } from "../toolbar/toolbar.multiselect";
import { ListPane } from "../layer/pane.list";
@shortcut() @shortcut()
export class SelectList extends Widget { export class SelectList extends Widget {
static xtype = "bi.select_list"; static xtype = "bi.select_list";
static EVENT_CHANGE = "EVENT_CHANGE"; static EVENT_CHANGE = "EVENT_CHANGE";
_defaultConfig() { _defaultConfig() {
return extend(super._defaultConfig(...arguments), { return extend(super._defaultConfig(...arguments), {
baseCls: "bi-select-list", baseCls: "bi-select-list",
@ -23,11 +39,11 @@ export class SelectList extends Widget {
hasNext: emptyFn, hasNext: emptyFn,
onLoaded: emptyFn, onLoaded: emptyFn,
toolbar: { toolbar: {
type: "bi.multi_select_bar", type: MultiSelectBar.xtype,
iconWrapperWidth: 36, iconWrapperWidth: 36,
}, },
el: { el: {
type: "bi.list_pane", type: ListPane.xtype,
}, },
}); });
} }
@ -49,7 +65,7 @@ export class SelectList extends Widget {
}); });
this.list = createWidget(o.el, { this.list = createWidget(o.el, {
type: "bi.list_pane", type: ListPane.xtype,
items: o.items, items: o.items,
itemsCreator(op, callback) { itemsCreator(op, callback) {
op.times === 1 && this.toolbar.setVisible(false); op.times === 1 && this.toolbar.setVisible(false);

Loading…
Cancel
Save