From 7d86ad53c162248503f839fbfcd947aabafccba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joker=2EWang-=E7=8E=8B=E9=A1=BA?= Date: Wed, 11 Jan 2023 14:44:54 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-14069=20refactor:=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/layer/pane.list.js | 193 ------------------------------------ 1 file changed, 193 deletions(-) diff --git a/src/case/layer/pane.list.js b/src/case/layer/pane.list.js index 21d9ebeb7..69d6f4df1 100644 --- a/src/case/layer/pane.list.js +++ b/src/case/layer/pane.list.js @@ -202,197 +202,4 @@ export class ListPane extends Pane { return this.button_group.getNodeByValue(value); } } -// BI.ListPane = BI.inherit(BI.Pane, { -// _defaultConfig: function () { -// var conf = BI.ListPane.superclass._defaultConfig.apply(this, arguments); -// return BI.extend(conf, { -// baseCls: (conf.baseCls || "") + " bi-list-pane", -// logic: { -// dynamic: true -// }, -// lgap: 0, -// rgap: 0, -// tgap: 0, -// bgap: 0, -// vgap: 0, -// hgap: 0, -// items: [], -// itemsCreator: BI.emptyFn, -// hasNext: BI.emptyFn, -// onLoaded: BI.emptyFn, -// el: { -// type: "bi.button_group" -// } -// }); -// }, -// _init: function () { -// BI.ListPane.superclass._init.apply(this, arguments); -// var self = this, o = this.options; - -// this.button_group = BI.createWidget(o.el, { -// type: "bi.button_group", -// chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE, -// behaviors: {}, -// items: o.items, -// value: o.value, -// itemsCreator: function (op, calback) { -// if (op.times === 1) { -// self.empty(); -// BI.nextTick(function () { -// self.loading(); -// }); -// } -// o.itemsCreator(op, function () { -// calback.apply(self, arguments); -// o.items = BI.concat(o.items, BI.get(arguments, [0], [])); -// if (op.times === 1) { -// o.items = BI.get(arguments, [0], []); -// BI.nextTick(function () { -// self.loaded(); -// // callback可能在loading之前执行, check保证显示正确 -// self.check(); -// }); -// } -// }); -// }, -// hasNext: o.hasNext, -// layouts: [{ -// type: "bi.vertical" -// }] -// }); - -// this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) { -// self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); -// if (type === BI.Events.CLICK) { -// self.fireEvent(BI.ListPane.EVENT_CHANGE, value, obj); -// } -// }); -// this.check(); - -// BI.createWidget(BI.extend({ -// element: this -// }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({ -// scrolly: true, -// lgap: o.lgap, -// rgap: o.rgap, -// tgap: o.tgap, -// bgap: o.bgap, -// vgap: o.vgap, -// hgap: o.hgap -// }, o.logic, { -// items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group) -// })))); -// }, - -// hasPrev: function () { -// return this.button_group.hasPrev && this.button_group.hasPrev(); -// }, - -// hasNext: function () { -// return this.button_group.hasNext && this.button_group.hasNext(); -// }, - -// prependItems: function (items) { -// this.options.items = items.concat(this.options.items); -// this.button_group.prependItems.apply(this.button_group, arguments); -// this.check(); -// }, - -// addItems: function (items) { -// this.options.items = this.options.items.concat(items); -// this.button_group.addItems.apply(this.button_group, arguments); -// this.check(); -// }, - -// removeItemAt: function (indexes) { -// indexes = BI.isNull(indexes) ? [] : indexes; -// BI.removeAt(this.options.items, indexes); -// this.button_group.removeItemAt.apply(this.button_group, arguments); -// this.check(); -// }, - -// populate: function (items) { -// var self = this, o = this.options; -// if (arguments.length === 0 && (BI.isFunction(this.button_group.attr("itemsCreator")))) {// 接管loader的populate方法 -// this.button_group.attr("itemsCreator").apply(this, [{ times: 1 }, function () { -// if (arguments.length === 0) { -// throw new Error("参数不能为空"); -// } -// self.populate.apply(self, arguments); -// }]); -// return; -// } - -// var context = BI.get(arguments, [2], {}); -// var tipText = context.tipText || ''; -// if (BI.isNotEmptyString(tipText)) { -// BI.ListPane.superclass.populate.apply(this, []); -// this.setTipText(tipText); -// } else { -// BI.ListPane.superclass.populate.apply(this, arguments); -// this.button_group.populate.apply(this.button_group, arguments); -// BI.isEmptyArray(BI.get(arguments, [0], [])) && this.setTipText(o.tipText); -// } -// }, - -// empty: function () { -// this.button_group.empty(); -// }, - -// setNotSelectedValue: function () { -// this.button_group.setNotSelectedValue.apply(this.button_group, arguments); -// }, - -// getNotSelectedValue: function () { -// return this.button_group.getNotSelectedValue(); -// }, - -// setValue: function () { -// this.button_group.setValue.apply(this.button_group, arguments); -// }, - -// setAllSelected: function (v) { -// if (this.button_group.setAllSelected) { -// this.button_group.setAllSelected(v); -// } else { -// BI.each(this.getAllButtons(), function (i, btn) { -// (btn.setSelected || btn.setAllSelected).apply(btn, [v]); -// }); -// } -// }, - -// getValue: function () { -// return this.button_group.getValue.apply(this.button_group, arguments); -// }, - -// getAllButtons: function () { -// return this.button_group.getAllButtons(); -// }, - -// getAllLeaves: function () { -// return this.button_group.getAllLeaves(); -// }, - -// getSelectedButtons: function () { -// return this.button_group.getSelectedButtons(); -// }, - -// getNotSelectedButtons: function () { -// return this.button_group.getNotSelectedButtons(); -// }, - -// getIndexByValue: function (value) { -// return this.button_group.getIndexByValue(value); -// }, - -// getNodeById: function (id) { -// return this.button_group.getNodeById(id); -// }, - -// getNodeByValue: function (value) { -// return this.button_group.getNodeByValue(value); -// } -// }); -// BI.ListPane.EVENT_CHANGE = "EVENT_CHANGE"; -// BI.shortcut("bi.list_pane", BI.ListPane);