diff --git a/dist/fix/fix.js b/dist/fix/fix.js
index 9a106ae7a..e87c7e51a 100644
--- a/dist/fix/fix.js
+++ b/dist/fix/fix.js
@@ -919,23 +919,27 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return m;
} : parsePath(exp);
var v = getter.call(model, model);
- var _dep = new Dep();
- if (isGlobal) {
- (v.__ob__._scopeDeps || (v.__ob__._scopeDeps = [])).push(_dep);
- } else {
- (v.__ob__._deps || (v.__ob__._deps = [])).push(_dep);
+
+ if (v.__ob__) {
+ var _dep = new Dep();
+ if (isGlobal) {
+ (v.__ob__._scopeDeps || (v.__ob__._scopeDeps = [])).push(_dep);
+ } else {
+ (v.__ob__._deps || (v.__ob__._deps = [])).push(_dep);
+ }
+ var _w = new Watcher(model, function () {
+ _dep.depend();
+ return NaN;
+ }, function (newValue, oldValue, attrs) {
+ callback(i, newValue, oldValue, BI._.extend({ index: i }, attrs));
+ }, options);
+ watchers.push(function unwatchFn() {
+ _w.teardown();
+ v.__ob__._scopeDeps && remove(v.__ob__._scopeDeps, _dep);
+ v.__ob__._deps && remove(v.__ob__._deps, _dep);
+ });
}
- var _w = new Watcher(model, function () {
- _dep.depend();
- return NaN;
- }, function (newValue, oldValue, attrs) {
- callback(i, newValue, oldValue, BI._.extend({ index: i }, attrs));
- }, options);
- watchers.push(function unwatchFn() {
- _w.teardown();
- v.__ob__._scopeDeps && remove(v.__ob__._scopeDeps, _dep);
- v.__ob__._deps && remove(v.__ob__._deps, _dep);
- });
+
return;
}
// **.a.**的情况,场景:a.b.c, 如果用b.**监听, a被重新赋值b上的_scopeDes就不存在了
@@ -943,6 +947,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
//先获取到能获取到的对象
var _paths = exp.split(".");
var _currentModel = model[_paths[1]];
+
+ if (!_currentModel.__ob__) {
+ return;
+ }
+
exp = _paths[1] + ".**";
//补全路径
var _parent = _currentModel.__ob__.parent,
@@ -993,6 +1002,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}
currentModel = model[paths[_i]];
}
+
+ if (!currentModel.__ob__) {
+ return;
+ }
+
exp = exp.substr(exp.indexOf("*"));
//补全路径
var parent = currentModel.__ob__.parent,
diff --git a/dist/font/iconfont.eot b/dist/font/iconfont.eot
index 0748c3d45..224ca0343 100644
Binary files a/dist/font/iconfont.eot and b/dist/font/iconfont.eot differ
diff --git a/dist/font/iconfont.svg b/dist/font/iconfont.svg
index dc1ea8d93..268b5cb8d 100644
--- a/dist/font/iconfont.svg
+++ b/dist/font/iconfont.svg
@@ -14,6 +14,44 @@
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -70,17 +108,17 @@
-
+
-
+
-
+
-
+
-
+
@@ -148,7 +186,7 @@
-
+
@@ -260,7 +298,7 @@
-
+
@@ -780,7 +818,7 @@
-
+
diff --git a/dist/font/iconfont.ttf b/dist/font/iconfont.ttf
index fb2d0fa00..743021ccc 100644
Binary files a/dist/font/iconfont.ttf and b/dist/font/iconfont.ttf differ
diff --git a/dist/font/iconfont.woff b/dist/font/iconfont.woff
index a2217989b..ada633840 100644
Binary files a/dist/font/iconfont.woff and b/dist/font/iconfont.woff differ
diff --git a/dist/font/iconfont.woff2 b/dist/font/iconfont.woff2
index adb8a1a22..2a5f9019d 100644
Binary files a/dist/font/iconfont.woff2 and b/dist/font/iconfont.woff2 differ
diff --git a/package.json b/package.json
index 917ab54db..650135d75 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "fineui",
- "version": "2.0.20230413101426",
+ "version": "2.0.20230518101454",
"description": "fineui",
"main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts",
diff --git a/src/base/combination/searcher.js b/src/base/combination/searcher.js
index 2b13548b3..45d19488c 100644
--- a/src/base/combination/searcher.js
+++ b/src/base/combination/searcher.js
@@ -39,6 +39,8 @@ BI.Searcher = BI.inherit(BI.Widget, {
masker: { // masker层
offset: {},
},
+
+ simple: false,
});
},
@@ -47,6 +49,7 @@ BI.Searcher = BI.inherit(BI.Widget, {
this.editor = BI.createWidget(o.el, {
type: "bi.search_editor",
+ simple: o.simple,
});
BI.createWidget({
diff --git a/src/case/combo/textvaluecombo/combo.textvaluesmall.js b/src/case/combo/textvaluecombo/combo.textvaluesmall.js
index 155b124ce..96678c736 100644
--- a/src/case/combo/textvaluecombo/combo.textvaluesmall.js
+++ b/src/case/combo/textvaluecombo/combo.textvaluesmall.js
@@ -28,6 +28,7 @@ BI.SmallTextValueCombo = BI.inherit(BI.Widget, {
type: "bi.small_select_text_trigger",
...o.el
},
+ items: o.items,
text: o.text,
value: o.value,
defaultText: o.defaultText,
diff --git a/src/case/combo/textvaluecombo/popup.textvalue.js b/src/case/combo/textvaluecombo/popup.textvalue.js
index aed1b0979..9d3e3d004 100644
--- a/src/case/combo/textvaluecombo/popup.textvalue.js
+++ b/src/case/combo/textvaluecombo/popup.textvalue.js
@@ -1,4 +1,4 @@
-BI.TextValueComboPopup = BI.inherit(BI.Pane, {
+BI.TextValueComboPopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-text-icon-popup",
@@ -15,17 +15,20 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
vgap: 5,
items: [
{
- type: "bi.button_group",
+ type: "bi.list_pane",
ref: (_ref) => {
this.popup = _ref;
},
items: this._formatItems(o.items),
- chooseType: o.chooseType,
- layouts: [
- {
- type: "bi.vertical"
- }
- ],
+ el: {
+ type: "bi.button_group",
+ chooseType: o.chooseType,
+ layouts: [
+ {
+ type: "bi.vertical"
+ }
+ ],
+ },
value: o.value,
listeners: [
{
@@ -131,12 +134,6 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
};
},
- beforeMount: function () {
- if (this.options.chooseType !== BI.ButtonGroup.CHOOSE_TYPE_MULTI) {
- this.check();
- }
- },
-
_formatItems: function (items) {
var o = this.options;
return BI.map(items, function (i, item) {
@@ -150,7 +147,6 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
- BI.TextValueComboPopup.superclass.populate.apply(this, arguments);
this.popup.populate(this._formatItems(items));
},
diff --git a/src/widget/intervalslider/intervalslider.js b/src/widget/intervalslider/intervalslider.js
index 59b1e1676..6c70c33a3 100644
--- a/src/widget/intervalslider/intervalslider.js
+++ b/src/widget/intervalslider/intervalslider.js
@@ -103,7 +103,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
var oldValueTwo = self.valueTwo;
var v = BI.parseFloat(this.getValue());
self.valueTwo = v;
- var percent = self._getPercentByValue(v);
+ var percent = self._getPercentByValue(v, true);
var significantPercent = BI.parseFloat(percent.toFixed(1));
self._setSliderTwoPosition(significantPercent);
self._setBlueTrack();
@@ -381,7 +381,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
_setBlueTrack: function () {
var percentOne = this._getPercentByValue(this.labelOne.getValue());
- var percentTwo = this._getPercentByValue(this.labelTwo.getValue());
+ var percentTwo = this._getPercentByValue(this.labelTwo.getValue(), true);
if (percentOne <= percentTwo) {
this._setBlueTrackLeft(percentOne);
this._setBlueTrackWidth(percentTwo - percentOne);
@@ -435,7 +435,11 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
},
- _getPercentByValue: function (v) {
+ _getPercentByValue: function (v, isLast) {
+ if (this.max === this.min) {
+ return isLast ? 100 : 0;
+ }
+
return (v - this.min) * 100 / (this.max - this.min);
},
@@ -545,7 +549,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, {
if ((BI.isNumeric(this.valueOne) || BI.isNotEmptyString(this.valueOne)) && (BI.isNumeric(this.valueTwo) || BI.isNotEmptyString(this.valueTwo))) {
this.labelOne.setValue(o.digit === false ? this.valueOne : BI.parseFloat(this.valueOne).toFixed(o.digit));
this.labelTwo.setValue(o.digit === false ? this.valueTwo : BI.parseFloat(this.valueTwo).toFixed(o.digit));
- this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo));
+ this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo, true));
} else {
this.labelOne.setValue(this.min);
this.labelTwo.setValue(this.max);
diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js
index 8b6e8785f..4c7da6df9 100644
--- a/src/widget/multiselectlist/multiselectlist.insert.js
+++ b/src/widget/multiselectlist/multiselectlist.insert.js
@@ -9,6 +9,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
valueFormatter: BI.emptyFn,
searcherHeight: BI.SIZE_CONSANTS.TRIGGER_HEIGHT,
itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
+ simple: false,
});
},
_init: function () {
@@ -70,6 +71,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
el: {
type: "bi.search_editor",
watermark: BI.i18nText("BI-Basic_Search_And_Patch_Paste"),
+ simple: o.simple,
},
ref: function (ref) {
self.editor = ref;
diff --git a/src/widget/multiselecttree/multiselecttree.js b/src/widget/multiselecttree/multiselecttree.js
index 959c6593b..ef77287d9 100644
--- a/src/widget/multiselecttree/multiselecttree.js
+++ b/src/widget/multiselecttree/multiselecttree.js
@@ -9,7 +9,8 @@ BI.MultiSelectTree = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-tree",
- itemsCreator: BI.emptyFn
+ itemsCreator: BI.emptyFn,
+ simple: false,
});
},
@@ -51,6 +52,7 @@ BI.MultiSelectTree = BI.inherit(BI.Single, {
type: "bi.searcher",
isAutoSearch: false,
isAutoSync: false,
+ simple: o.simple,
onSearch: function (op, callback) {
callback({
keyword: self.searcher.getKeyword()
diff --git a/src/widget/singleselect/singleselectlist.insert.js b/src/widget/singleselect/singleselectlist.insert.js
index cd32a22e8..def836349 100644
--- a/src/widget/singleselect/singleselectlist.insert.js
+++ b/src/widget/singleselect/singleselectlist.insert.js
@@ -12,6 +12,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
itemWrapper: BI.emptyFn,
valueFormatter: BI.emptyFn,
searcherHeight: 24,
+ simple: false,
});
},
_init: function () {
@@ -70,6 +71,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, {
el: {
type: "bi.search_editor",
watermark: BI.i18nText("BI-Basic_Search_And_Patch_Paste"),
+ simple: o.simple,
},
ref: function (ref) {
self.editor = ref;
diff --git a/src/widget/timeinterval/dateinterval.js b/src/widget/timeinterval/dateinterval.js
index 2da77de8b..98e27e3ce 100644
--- a/src/widget/timeinterval/dateinterval.js
+++ b/src/widget/timeinterval/dateinterval.js
@@ -17,6 +17,7 @@ BI.DateInterval = BI.inherit(BI.Single, {
maxDate: "2099-12-31",
height: 24,
supportDynamic: true,
+ simple: false,
});
},
diff --git a/src/widget/yearmonthinterval/yearmonthinterval.js b/src/widget/yearmonthinterval/yearmonthinterval.js
index 814123f67..2bec1d88d 100644
--- a/src/widget/yearmonthinterval/yearmonthinterval.js
+++ b/src/widget/yearmonthinterval/yearmonthinterval.js
@@ -11,7 +11,8 @@ BI.YearMonthInterval = BI.inherit(BI.Single, {
minDate: "1900-01-01",
maxDate: "2099-12-31",
supportDynamic: true,
- height: 24
+ height: 24,
+ simple: false,
},
render: function () {
@@ -45,6 +46,7 @@ BI.YearMonthInterval = BI.inherit(BI.Single, {
var self = this, o = this.options;
var combo = BI.createWidget({
type: "bi.dynamic_year_month_combo",
+ simple: o.simple,
supportDynamic: o.supportDynamic,
height: o.height,
minDate: o.minDate,