From e251e23011f613205c288b0d90d7be16843b9875 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 14 Aug 2018 17:33:40 +0800 Subject: [PATCH] update --- src/css/base/single/button/item.css | 1 - .../single/button/item.singleselectradio.less | 7 -- .../search/singleselect.search.loader.js | 2 +- src/widget/singleselect/singleselect.item.js | 67 ------------------- .../singleselect/singleselect.loader.js | 2 +- 5 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 src/less/base/single/button/item.singleselectradio.less delete mode 100644 src/widget/singleselect/singleselect.item.js diff --git a/src/css/base/single/button/item.css b/src/css/base/single/button/item.css index 7711adc00..cfdcbf689 100644 --- a/src/css/base/single/button/item.css +++ b/src/css/base/single/button/item.css @@ -4,4 +4,3 @@ color: #3685f2; } - diff --git a/src/less/base/single/button/item.singleselectradio.less b/src/less/base/single/button/item.singleselectradio.less deleted file mode 100644 index 89a3eef64..000000000 --- a/src/less/base/single/button/item.singleselectradio.less +++ /dev/null @@ -1,7 +0,0 @@ -@import "../../../index"; - -.bi-single-select-radio-item{ - //& .list-item-text{ - // max-width: 189px; - //} -} \ No newline at end of file diff --git a/src/widget/singleselect/search/singleselect.search.loader.js b/src/widget/singleselect/search/singleselect.search.loader.js index 69d6dcd44..55915a869 100644 --- a/src/widget/singleselect/search/singleselect.search.loader.js +++ b/src/widget/singleselect/search/singleselect.search.loader.js @@ -82,7 +82,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, { _createItems: function (items) { return BI.createItems(items, { - type: "bi.single_select_combo.item", + type: "bi.single_select_item", logic: { dynamic: false }, diff --git a/src/widget/singleselect/singleselect.item.js b/src/widget/singleselect/singleselect.item.js deleted file mode 100644 index 01d3b9a2a..000000000 --- a/src/widget/singleselect/singleselect.item.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * guy - * 单选框item - * @type {*|void|Object} - */ -BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, { - _defaultConfig: function () { - return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { - extraCls: "bi-single-select-radio-item", - logic: { - dynamic: false - }, - height: 24 - }); - }, - _init: function () { - BI.SingleSelectComboItem.superclass._init.apply(this, arguments); - var self = this, o = this.options; - this.radio = BI.createWidget({ - type: "bi.radio" - }); - this.text = BI.createWidget({ - type: "bi.label", - cls: "list-item-text", - textAlign: "left", - whiteSpace: "nowrap", - textHeight: o.height, - height: o.height, - hgap: o.hgap, - text: o.text, - keyword: o.keyword, - value: o.value, - py: o.py - }); - - BI.createWidget(BI.extend({ - element: this - }, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { - items: BI.LogicFactory.createLogicItemsByDirection("left", { - type: "bi.center_adapt", - items: [this.radio], - width: 26 - }, this.text) - })))); - }, - - doRedMark: function () { - this.text.doRedMark.apply(this.text, arguments); - }, - - unRedMark: function () { - this.text.unRedMark.apply(this.text, arguments); - }, - - doClick: function () { - BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments); - this.radio.setSelected(this.isSelected()); - }, - - setSelected: function (v) { - BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments); - this.radio.setSelected(v); - - } -}); - -BI.shortcut("bi.single_select_combo.item", BI.SingleSelectComboItem); \ No newline at end of file diff --git a/src/widget/singleselect/singleselect.loader.js b/src/widget/singleselect/singleselect.loader.js index 128726675..3ca7040e4 100644 --- a/src/widget/singleselect/singleselect.loader.js +++ b/src/widget/singleselect/singleselect.loader.js @@ -103,7 +103,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, { _createItems: function (items) { return BI.createItems(items, { - type: "bi.single_select_combo.item", + type: "bi.single_select_item", logic: this.options.logic, cls: "bi-list-item-active", height: 24,