From 3b9d151e14ea30be613341dea4e6724692a17d92 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 19 Feb 2021 14:15:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E7=85=A7comment=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/colorchooser/colorchooser.js | 6 ++---- src/case/colorchooser/colorchooser.trigger.js | 2 +- src/case/colorchooser/colorchooser.trigger.long.js | 2 +- src/case/combo/icontextvaluecombo/combo.icontextvalue.js | 6 ++---- .../combo/searchtextvaluecombo/combo.searchtextvalue.js | 3 --- .../combo/searchtextvaluecombo/trigger.searchtextvalue.js | 2 +- src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js | 6 ++---- src/case/combo/textvaluecombo/combo.textvalue.js | 4 ++-- src/case/trigger/trigger.icon.text.select.js | 2 +- src/case/trigger/trigger.text.select.js | 2 +- src/widget/dynamicdate/dynamicdate.combo.js | 7 ++++++- src/widget/dynamicdatetime/dynamicdatetime.combo.js | 7 ++++++- src/widget/multiselect/multiselect.combo.js | 6 ++---- src/widget/multiselect/multiselect.combo.nobar.js | 6 ++---- src/widget/multiselect/multiselect.insert.combo.js | 6 ++---- src/widget/multiselect/multiselect.insert.combo.nobar.js | 6 ++---- src/widget/multitree/multi.tree.combo.js | 7 ++----- src/widget/multitree/multi.tree.insert.combo.js | 7 ++----- src/widget/multitree/multi.tree.list.combo.js | 7 ++----- .../multitextvalue.combo.search.js | 6 ++---- src/widget/selecttree/selecttree.combo.js | 4 ++-- src/widget/singleselect/singleselect.combo.js | 6 ++---- src/widget/singleselect/singleselect.insert.combo.js | 6 ++---- .../textvaluedownlistcombo/combo.textvaluedownlist.js | 6 ++---- src/widget/year/combo.year.js | 5 +++-- src/widget/yearmonth/combo.yearmonth.js | 5 +++-- src/widget/yearmonth/trigger.yearmonth.js | 2 +- src/widget/yearquarter/combo.yearquarter.js | 5 +++-- src/widget/yearquarter/trigger.yearquarter.js | 2 +- 29 files changed, 60 insertions(+), 81 deletions(-) diff --git a/src/case/colorchooser/colorchooser.js b/src/case/colorchooser/colorchooser.js index 850333b3c..8454c0fec 100644 --- a/src/case/colorchooser/colorchooser.js +++ b/src/case/colorchooser/colorchooser.js @@ -20,11 +20,9 @@ BI.ColorChooser = BI.inherit(BI.Widget, { }, _init: function () { - BI.ColorChooser.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.ColorChooser.superclass._init.apply(this, arguments); o.value = o.value || ""; this.combo = BI.createWidget({ type: "bi.combo", diff --git a/src/case/colorchooser/colorchooser.trigger.js b/src/case/colorchooser/colorchooser.trigger.js index 3314026de..17dd665da 100644 --- a/src/case/colorchooser/colorchooser.trigger.js +++ b/src/case/colorchooser/colorchooser.trigger.js @@ -11,7 +11,7 @@ BI.ColorChooserTrigger = BI.inherit(BI.Trigger, { var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger", - height: 22 + height: 24 }); }, diff --git a/src/case/colorchooser/colorchooser.trigger.long.js b/src/case/colorchooser/colorchooser.trigger.long.js index e22df7882..238c13f2c 100644 --- a/src/case/colorchooser/colorchooser.trigger.long.js +++ b/src/case/colorchooser/colorchooser.trigger.long.js @@ -11,7 +11,7 @@ BI.LongColorChooserTrigger = BI.inherit(BI.Trigger, { var conf = BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { baseCls: (conf.baseCls || "") + " bi-color-chooser-trigger", - height: 22 + height: 24 }); }, diff --git a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js b/src/case/combo/icontextvaluecombo/combo.icontextvalue.js index b80c4563a..a27660215 100644 --- a/src/case/combo/icontextvaluecombo/combo.icontextvalue.js +++ b/src/case/combo/icontextvaluecombo/combo.icontextvalue.js @@ -17,11 +17,9 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, { }, _init: function () { - BI.IconTextValueCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.IconTextValueCombo.superclass._init.apply(this, arguments); this.trigger = BI.createWidget({ type: "bi.select_icon_text_trigger", cls: "icon-text-value-trigger", diff --git a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js index e39c16c86..aa4402ff5 100644 --- a/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js @@ -10,9 +10,6 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, { items: [], tipType: "", warningTitle: "", - attributes: { - tabIndex: 0 - } }, render: function () { diff --git a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js index 7943ff0f3..8c204fa62 100644 --- a/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js +++ b/src/case/combo/searchtextvaluecombo/trigger.searchtextvalue.js @@ -6,7 +6,7 @@ BI.SearchTextValueTrigger = BI.inherit(BI.Trigger, { props: function () { return { extraCls: "bi-search-text-value-trigger", - height: 22, + height: 24, watermark: BI.i18nText("BI-Basic_Search") }; }, diff --git a/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js b/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js index 2173ca76c..1edffb863 100644 --- a/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js +++ b/src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js @@ -18,11 +18,9 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, { }, _init: function () { - BI.TextValueCheckCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.TextValueCheckCombo.superclass._init.apply(this, arguments); this.trigger = BI.createWidget({ type: "bi.select_text_trigger", cls: "text-value-trigger", diff --git a/src/case/combo/textvaluecombo/combo.textvalue.js b/src/case/combo/textvaluecombo/combo.textvalue.js index 3208f9a40..bbf8ecdd5 100644 --- a/src/case/combo/textvaluecombo/combo.textvalue.js +++ b/src/case/combo/textvaluecombo/combo.textvalue.js @@ -19,9 +19,9 @@ BI.TextValueCombo = BI.inherit(BI.Widget, { }, _init: function () { - this.options.height -= 2; - BI.TextValueCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.height -= 2; + BI.TextValueCombo.superclass._init.apply(this, arguments); this.trigger = BI.createWidget({ type: "bi.select_text_trigger", cls: "text-value-trigger", diff --git a/src/case/trigger/trigger.icon.text.select.js b/src/case/trigger/trigger.icon.text.select.js index f1611f83e..a980b055a 100644 --- a/src/case/trigger/trigger.icon.text.select.js +++ b/src/case/trigger/trigger.icon.text.select.js @@ -6,7 +6,7 @@ BI.SelectIconTextTrigger = BI.inherit(BI.Trigger, { _defaultConfig: function () { return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-select-text-trigger", - height: 22, + height: 24, iconHeight: null, iconWidth: null, iconCls: "" diff --git a/src/case/trigger/trigger.text.select.js b/src/case/trigger/trigger.text.select.js index 8e19fcc11..ee7a2c078 100644 --- a/src/case/trigger/trigger.text.select.js +++ b/src/case/trigger/trigger.text.select.js @@ -10,7 +10,7 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, { _defaultConfig: function () { return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-select-text-trigger", - height: 22 + height: 24 }); }, diff --git a/src/widget/dynamicdate/dynamicdate.combo.js b/src/widget/dynamicdate/dynamicdate.combo.js index 717b86890..b03ed0d9a 100644 --- a/src/widget/dynamicdate/dynamicdate.combo.js +++ b/src/widget/dynamicdate/dynamicdate.combo.js @@ -8,7 +8,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, { props: { baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius", - height: 22, + height: 24, minDate: "1900-01-01", maxDate: "2099-12-31", format: "", @@ -19,6 +19,11 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, { } }, + _init: function () { + var o = this.options; + o.height -= 2; + BI.DynamicDateCombo.superclass._init.apply(this, arguments); + }, render: function () { var self = this, opts = this.options; diff --git a/src/widget/dynamicdatetime/dynamicdatetime.combo.js b/src/widget/dynamicdatetime/dynamicdatetime.combo.js index 350a163c2..66c602fee 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.combo.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.combo.js @@ -8,7 +8,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { props: { baseCls: "bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius", - height: 22, + height: 24, minDate: "1900-01-01", maxDate: "2099-12-31", format: "", @@ -16,6 +16,11 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { supportDynamic: true }, + _init: function () { + var o = this.options; + o.height -= 2; + BI.DynamicDateTimeCombo.superclass._init.apply(this, arguments); + }, render: function () { var self = this, opts = this.options; diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index d7e06f942..039e17b8c 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -20,11 +20,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.MultiSelectCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.MultiSelectCombo.superclass._init.apply(this, arguments); var assertShowValue = function () { if (BI.isKey(self._startValue)) { if (self.storeValue.type === BI.Selection.All) { diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index a6226a966..d1ee954ae 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -19,11 +19,9 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.MultiSelectNoBarCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.MultiSelectNoBarCombo.superclass._init.apply(this, arguments); var assertShowValue = function () { if (BI.isKey(self._startValue)) { if (self.storeValue.type === BI.Selection.All) { diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index d82f60de1..21db8c952 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -20,11 +20,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.MultiSelectInsertCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.MultiSelectInsertCombo.superclass._init.apply(this, arguments); var assertShowValue = function () { if (BI.isKey(self._startValue)) { if(self.storeValue.type === BI.Selection.All) { diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index 91c50c5bb..84216eadd 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -19,11 +19,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this, arguments); var assertShowValue = function () { if (BI.isKey(self._startValue)) { if (self.storeValue.type === BI.Selection.All) { diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index 634216f8c..4717807b2 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -30,12 +30,9 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.MultiTreeCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.MultiTreeCombo.superclass._init.apply(this, arguments); var isInit = false; var want2showCounter = false; diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index a4bb8fede..a998fd473 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -30,12 +30,9 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.MultiTreeInsertCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.MultiTreeInsertCombo.superclass._init.apply(this, arguments); var isInit = false; var want2showCounter = false; diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 29899934b..13e0516d8 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -31,12 +31,9 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.MultiTreeListCombo.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.MultiTreeListCombo.superclass._init.apply(this, arguments); var isInit = false; var want2showCounter = false; diff --git a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js index 777fcf9e3..4410a2132 100644 --- a/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js +++ b/src/widget/searchmultitextvaluecombo/multitextvalue.combo.search.js @@ -14,11 +14,9 @@ BI.SearchMultiTextValueCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.SearchMultiTextValueCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.SearchMultiTextValueCombo.superclass._init.apply(this, arguments); var assertShowValue = function () { BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue)); self._updateAllValue(); diff --git a/src/widget/selecttree/selecttree.combo.js b/src/widget/selecttree/selecttree.combo.js index 89812010a..c22524983 100644 --- a/src/widget/selecttree/selecttree.combo.js +++ b/src/widget/selecttree/selecttree.combo.js @@ -18,9 +18,9 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, { }, _init: function () { - this.options.height -= 2; - BI.SelectTreeCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.height -= 2; + BI.SelectTreeCombo.superclass._init.apply(this, arguments); this.trigger = BI.createWidget({ type: "bi.single_tree_trigger", diff --git a/src/widget/singleselect/singleselect.combo.js b/src/widget/singleselect/singleselect.combo.js index 8ee0860fe..5edcf4422 100644 --- a/src/widget/singleselect/singleselect.combo.js +++ b/src/widget/singleselect/singleselect.combo.js @@ -20,11 +20,9 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.SingleSelectCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.SingleSelectCombo.superclass._init.apply(this, arguments); var assertShowValue = function () { BI.isKey(self._startValue) && (self.storeValue = self._startValue); diff --git a/src/widget/singleselect/singleselect.insert.combo.js b/src/widget/singleselect/singleselect.insert.combo.js index a7b0a68b8..404350b6f 100644 --- a/src/widget/singleselect/singleselect.insert.combo.js +++ b/src/widget/singleselect/singleselect.insert.combo.js @@ -20,11 +20,9 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, { }, _init: function () { - BI.SingleSelectInsertCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.SingleSelectInsertCombo.superclass._init.apply(this, arguments); var assertShowValue = function () { BI.isKey(self._startValue) && (self.storeValue = self._startValue); self.trigger.getSearcher().setState(self.storeValue); diff --git a/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js b/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js index 3a2eea2de..eb7242cde 100644 --- a/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js +++ b/src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js @@ -14,11 +14,9 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, { }, _init: function () { - BI.TextValueDownListCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; - if (o.height) { - this.setHeight(o.height - 2); - } + o.height -= 2; + BI.TextValueDownListCombo.superclass._init.apply(this, arguments); this._createValueMap(); var value; diff --git a/src/widget/year/combo.year.js b/src/widget/year/combo.year.js index 071eca302..7de86c820 100644 --- a/src/widget/year/combo.year.js +++ b/src/widget/year/combo.year.js @@ -5,13 +5,14 @@ BI.DynamicYearCombo = BI.inherit(BI.Widget, { behaviors: {}, minDate: "1900-01-01", // 最小日期 maxDate: "2099-12-31", // 最大日期 - height: 22, + height: 24, supportDynamic: true, }, _init: function () { - BI.DynamicYearCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.height -= 2; + BI.DynamicYearCombo.superclass._init.apply(this, arguments); this.storeValue = o.value; this.trigger = BI.createWidget({ type: "bi.dynamic_year_trigger", diff --git a/src/widget/yearmonth/combo.yearmonth.js b/src/widget/yearmonth/combo.yearmonth.js index b6eaef978..7f2c30a58 100644 --- a/src/widget/yearmonth/combo.yearmonth.js +++ b/src/widget/yearmonth/combo.yearmonth.js @@ -5,13 +5,14 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, { behaviors: {}, minDate: "1900-01-01", // 最小日期 maxDate: "2099-12-31", // 最大日期 - height: 22, + height: 24, supportDynamic: true }, _init: function () { - BI.DynamicYearMonthCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.height -= 2; + BI.DynamicYearMonthCombo.superclass._init.apply(this, arguments); this.storeValue = o.value; this.storeTriggerValue = ""; this.trigger = BI.createWidget({ diff --git a/src/widget/yearmonth/trigger.yearmonth.js b/src/widget/yearmonth/trigger.yearmonth.js index 102b55e37..0266d7aa4 100644 --- a/src/widget/yearmonth/trigger.yearmonth.js +++ b/src/widget/yearmonth/trigger.yearmonth.js @@ -8,7 +8,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, { extraCls: "bi-year-month-trigger", min: "1900-01-01", // 最小日期 max: "2099-12-31", // 最大日期 - height: 22 + height: 24 }, beforeInit: function (callback) { diff --git a/src/widget/yearquarter/combo.yearquarter.js b/src/widget/yearquarter/combo.yearquarter.js index 1bbf3c364..28b0832d0 100644 --- a/src/widget/yearquarter/combo.yearquarter.js +++ b/src/widget/yearquarter/combo.yearquarter.js @@ -5,13 +5,14 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, { behaviors: {}, minDate: "1900-01-01", // 最小日期 maxDate: "2099-12-31", // 最大日期 - height: 22, + height: 24, supportDynamic: true, }, _init: function () { - BI.DynamicYearQuarterCombo.superclass._init.apply(this, arguments); var self = this, o = this.options; + o.height -= 2; + BI.DynamicYearQuarterCombo.superclass._init.apply(this, arguments); this.storeValue = o.value; self.storeTriggerValue = ""; this.trigger = BI.createWidget({ diff --git a/src/widget/yearquarter/trigger.yearquarter.js b/src/widget/yearquarter/trigger.yearquarter.js index cdebb770d..eb807eff2 100644 --- a/src/widget/yearquarter/trigger.yearquarter.js +++ b/src/widget/yearquarter/trigger.yearquarter.js @@ -8,7 +8,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, { extraCls: "bi-year-quarter-trigger", min: "1900-01-01", // 最小日期 max: "2099-12-31", // 最大日期 - height: 22 + height: 24 }, _init: function () {