diff --git a/bi.lessconfig.json b/bi.lessconfig.json
index 563eaed07..7de7350ae 100644
--- a/bi.lessconfig.json
+++ b/bi.lessconfig.json
@@ -38,5 +38,7 @@
"@color-bi-color-toast-normal": "#2C60DB",
"@color-bi-color-toast-text": "#000A19",
"@color-bi-text-header-background": "rgba(9, 30, 64, 0.9)",
- "@color-bi-text-header-background-theme-dark": "rgba(255, 255, 255, 0.9)"
+ "@color-bi-text-header-background-theme-dark": "rgba(255, 255, 255, 0.9)",
+ "@font-down-triangle": "e70b",
+ "@font-date": "e733"
}
\ No newline at end of file
diff --git a/demo/js/base/button/demo.button.js b/demo/js/base/button/demo.button.js
index 420a47d77..651d98e4a 100644
--- a/demo/js/base/button/demo.button.js
+++ b/demo/js/base/button/demo.button.js
@@ -376,6 +376,11 @@ Demo.Button = BI.inherit(BI.Widget, {
this.loaded();
}, 5 * 1000);
},
+ }, {
+ type: "bi.button",
+ text: "文字偏左的按钮",
+ textAlign: "left",
+ width: 200,
}];
return {
diff --git a/dist/font/iconfont.eot b/dist/font/iconfont.eot
index 3ddfa6999..9bf132980 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 68df1b9b5..d2d51982b 100644
--- a/dist/font/iconfont.svg
+++ b/dist/font/iconfont.svg
@@ -14,7 +14,41 @@
/>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -28,33 +62,27 @@
-
+
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
+
@@ -70,7 +98,7 @@
-
+
@@ -130,8 +158,6 @@
-
-
@@ -258,12 +284,8 @@
-
-
-
-
@@ -288,12 +310,6 @@
-
-
-
-
-
-
@@ -316,8 +332,6 @@
-
-
@@ -374,12 +388,6 @@
-
-
-
-
-
-
@@ -388,10 +396,6 @@
-
-
-
-
@@ -410,16 +414,8 @@
-
-
-
-
-
-
-
-
@@ -436,52 +432,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -598,11 +556,11 @@
-
+
-
+
@@ -742,7 +700,7 @@
-
+
@@ -882,9 +840,9 @@
-
+
-
+
@@ -892,13 +850,13 @@
-
+
-
+
@@ -912,7 +870,7 @@
-
+
@@ -972,11 +930,11 @@
-
+
-
+
@@ -994,11 +952,11 @@
-
+
-
+
@@ -1020,37 +978,37 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1062,73 +1020,71 @@
-
+
-
+
-
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1504,7 +1460,7 @@
-
+
@@ -1518,7 +1474,7 @@
-
+
@@ -1668,15 +1624,15 @@
-
+
-
+
-
+
@@ -1718,7 +1674,7 @@
-
+
@@ -1734,7 +1690,7 @@
-
+
@@ -1912,7 +1868,7 @@
-
+
diff --git a/dist/font/iconfont.ttf b/dist/font/iconfont.ttf
index 3a9bb3bd3..75f0d4f57 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 f3503d465..92c2c1a53 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 d88ebfa68..0ef218ef3 100644
Binary files a/dist/font/iconfont.woff2 and b/dist/font/iconfont.woff2 differ
diff --git a/package.json b/package.json
index 9e7bb1d7f..5adececaa 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "fineui",
- "version": "2.0.20220822112610",
+ "version": "2.0.20220826171804",
"description": "fineui",
"main": "dist/fineui_without_conflict.min.js",
"types": "dist/lib/index.d.ts",
diff --git a/plugins/webpack-fui-worker-plugin/empty.js b/plugins/webpack-fui-worker-plugin/empty.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/plugins/webpack-fui-worker-plugin/worker-loader.js b/plugins/webpack-fui-worker-plugin/worker-loader.js
index dd47d0b70..23be31927 100644
--- a/plugins/webpack-fui-worker-plugin/worker-loader.js
+++ b/plugins/webpack-fui-worker-plugin/worker-loader.js
@@ -6,6 +6,7 @@ const webpack = require('webpack');
const loaderUtils = require('loader-utils');
const SingleEntryPlugin = require('webpack/lib/SingleEntryPlugin');
const { WorkerLoaderName, FileNamePrefix } = require('./constants');
+const { resolve } = require('path');
// 正常 loader 处理逻辑
function loader() {
@@ -67,6 +68,22 @@ function loader() {
entryOnly: true,
}).apply(childCompiler);
+ // 去除源码中的less css引用
+ const regExp = /\.(css|less)$/;
+
+ new webpack.NormalModuleReplacementPlugin(
+ regExp,
+ result => {
+ if (regExp.test(result.request)) {
+ result.request = resolve(__dirname, './empty.js');
+ }
+
+ if (regExp.test(result.resource)) {
+ result.resource = resolve(__dirname, './empty.js');
+ }
+ },
+ ).apply(childCompiler);
+
const subCache = `subcache ${__dirname} ${workerEntry}`;
childCompiler.hooks.compilation.tap(WorkerLoaderName, compilation => {
if (compilation.cache) {
@@ -98,16 +115,18 @@ function loader() {
null,
// 插入代码的转译和压缩由主构建配置的 babel/ts loader 处理, 不需要 worker-worker 来处理
// 添加 @ts-nocheck 避免 ts-check 报错
+ // 修复export const 下 const不会被转译的问题
`// @ts-nocheck
const blob = new Blob([${JSON.stringify(compilation.assets[entry].source())}]);
- export const workerUrl = window.URL.createObjectURL(blob);
+ const workerUrl = window.URL.createObjectURL(blob);
+ export default workerUrl;
`
)
: callback(
null,
`// @ts-nocheck
const servicePath = __webpack_public_path__ + ${JSON.stringify(entry)};
- export const workerUrl = servicePath;
+ export default servicePath;
`
)
});
diff --git a/src/base/0.base.js b/src/base/0.base.js
index a8aa11a21..1100c0709 100644
--- a/src/base/0.base.js
+++ b/src/base/0.base.js
@@ -1,11 +1,9 @@
-BI.prepares.push(function () {
- BI.Resizers = new BI.ResizeController();
- BI.Layers = new BI.LayerController();
- BI.Maskers = new BI.MaskersController();
- BI.Bubbles = new BI.BubblesController();
- BI.Tooltips = new BI.TooltipsController();
- BI.Popovers = new BI.PopoverController();
- BI.Drawers = new BI.DrawerController();
- BI.Broadcasts = new BI.BroadcastController();
- BI.StyleLoaders = new BI.StyleLoaderManager();
-});
+BI.Resizers = new BI.ResizeController();
+BI.Layers = new BI.LayerController();
+BI.Maskers = new BI.MaskersController();
+BI.Bubbles = new BI.BubblesController();
+BI.Tooltips = new BI.TooltipsController();
+BI.Popovers = new BI.PopoverController();
+BI.Drawers = new BI.DrawerController();
+BI.Broadcasts = new BI.BroadcastController();
+BI.StyleLoaders = new BI.StyleLoaderManager();
diff --git a/src/base/list/virtualgrouplist.js b/src/base/list/virtualgrouplist.js
index def972327..a1836ba94 100644
--- a/src/base/list/virtualgrouplist.js
+++ b/src/base/list/virtualgrouplist.js
@@ -102,6 +102,7 @@ BI.VirtualGroupList = BI.inherit(BI.Widget, {
this.renderedIndex = cnt;
cnt++;
index += o.blockSize;
+ lastHeight = this.renderedIndex === -1 ? 0 : getElementHeight();
}
},
diff --git a/src/base/list/virtuallist.js b/src/base/list/virtuallist.js
index 89a79ed4f..2715008cb 100644
--- a/src/base/list/virtuallist.js
+++ b/src/base/list/virtuallist.js
@@ -85,6 +85,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this.renderedIndex = cnt;
cnt++;
index += o.blockSize;
+ lastHeight = getElementHeight();
}
},
diff --git a/src/base/single/button/buttons/button.js b/src/base/single/button/buttons/button.js
index 11762c86d..94b590f84 100644
--- a/src/base/single/button/buttons/button.js
+++ b/src/base/single/button/buttons/button.js
@@ -141,6 +141,7 @@
// bi.center_adapt 作用:让 hgap 不影响 iconGap。
BI.createWidget({
type: "bi.center_adapt",
+ horizontalAlign: o.textAlign,
element: this,
hgap: o.hgap,
vgap: o.vgap,
@@ -161,7 +162,7 @@
});
if (o.minWidth > 0) {
- this.element.css({"min-width": o.minWidth / BI.pixRatio + BI.pixUnit});
+ this.element.css({ "min-width": o.minWidth / BI.pixRatio + BI.pixUnit });
}
},
diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js
index 867756a7c..290970141 100644
--- a/src/base/single/input/file.js
+++ b/src/base/single/input/file.js
@@ -116,8 +116,7 @@
return;
}
- for (var
- xhr = new XMLHttpRequest,
+ for (var xhr = new XMLHttpRequest,
upload = xhr.upload || {
addEventListener: function (event, callback) {
this["on" + event] = callback;
@@ -129,6 +128,7 @@
) {
upload.addEventListener(
split[i].substring(2),
+ // eslint-disable-next-line no-loop-func
(function (event) {
return function (rpe) {
if (isFunction(handler[event])) {
diff --git a/src/case/combo/iconcombo/combo.icon.js b/src/case/combo/iconcombo/combo.icon.js
index 8cb821a1e..6c0f45c51 100644
--- a/src/case/combo/iconcombo/combo.icon.js
+++ b/src/case/combo/iconcombo/combo.icon.js
@@ -21,7 +21,8 @@ BI.IconCombo = BI.inherit(BI.Widget, {
adjustYOffset: 0,
offsetStyle: "left",
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
- isShowDown: true
+ isShowDown: true,
+ hideWhenAnotherComboOpen: false
});
},
@@ -71,6 +72,7 @@ BI.IconCombo = BI.inherit(BI.Widget, {
adjustYOffset: o.adjustYOffset,
offsetStyle: o.offsetStyle,
el: this.trigger,
+ hideWhenAnotherComboOpen: o.hideWhenAnotherComboOpen,
popup: {
el: this.popup,
maxWidth: o.maxWidth,
diff --git a/src/core/plugin.js b/src/core/6.plugin.js
similarity index 100%
rename from src/core/plugin.js
rename to src/core/6.plugin.js
diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js
index 9c4ba840c..6a955a27e 100644
--- a/src/core/platform/web/config.js
+++ b/src/core/platform/web/config.js
@@ -1,5 +1,5 @@
// 工程配置
-BI.prepares.push(function () {
+!(function () {
// 注册布局
// adapt类布局优先级规则
// 1、支持flex的浏览器下使用flex布局
@@ -39,16 +39,16 @@ BI.prepares.push(function () {
// return BI.extend({}, ob, {type: "bi.table_adapt"});
// }
if (supportFlex) {
- return BI.extend({}, ob, {type: "bi.flex_horizontal"});
+ return BI.extend({}, ob, { type: "bi.flex_horizontal" });
}
return BI.extend({
scrollx: true
- }, ob, {type: "bi.inline"});
+ }, ob, { type: "bi.inline" });
});
BI.Plugin.configWidget("bi.vertical", function (ob) {
if (ob.horizontalAlign === BI.HorizontalAlign.Left || ob.horizontalAlign === BI.HorizontalAlign.Right) {
if (isSupportFlex()) {
- return BI.extend({}, ob, {type: "bi.flex_vertical"});
+ return BI.extend({}, ob, { type: "bi.flex_vertical" });
}
return BI.extend({}, ob, {
horizontalAlign: BI.HorizontalAlign.Stretch,
@@ -88,14 +88,14 @@ BI.prepares.push(function () {
if ((ob.scrollable !== true && ob.scrollx !== true) || ob.horizontalAlign === BI.HorizontalAlign.Stretch) {
return BI.extend({
verticalAlign: BI.VerticalAlign.Top
- }, ob, {type: "bi.horizontal_float_fill"});
+ }, ob, { type: "bi.horizontal_float_fill" });
}
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch
- }, ob, {type: "bi.table_adapt"});
+ }, ob, { type: "bi.table_adapt" });
}
if (BI.Providers.getProvider("bi.provider.system").getResponsiveMode()) {
- return BI.extend({}, ob, {type: "bi.responsive_inline"});
+ return BI.extend({}, ob, { type: "bi.responsive_inline" });
}
return ob;
});
@@ -104,9 +104,9 @@ BI.prepares.push(function () {
// var isAdapt = !ob.horizontalAlign || ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch;
// if (!isAdapt || justOneItem) {
if (supportFlex) {
- return BI.extend({}, ob, {type: "bi.flex_center_adapt"});
+ return BI.extend({}, ob, { type: "bi.flex_center_adapt" });
}
- return BI.extend({}, ob, {type: "bi.inline_center_adapt"});
+ return BI.extend({}, ob, { type: "bi.inline_center_adapt" });
// }
// return ob;
});
@@ -115,9 +115,9 @@ BI.prepares.push(function () {
// var isAdapt = ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch;
// if (!isAdapt || justOneItem) {
if (supportFlex) {
- return BI.extend({}, ob, {type: "bi.flex_vertical_center_adapt"});
+ return BI.extend({}, ob, { type: "bi.flex_vertical_center_adapt" });
}
- return BI.extend({}, ob, {type: "bi.inline_vertical_adapt"});
+ return BI.extend({}, ob, { type: "bi.inline_vertical_adapt" });
// }
// return ob;
});
@@ -126,7 +126,7 @@ BI.prepares.push(function () {
var isAdapt = !ob.horizontalAlign || ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch;
var verticalAlignTop = !ob.verticalAlign || ob.verticalAlign === BI.VerticalAlign.TOP;
if (verticalAlignTop && justOneItem) {
- return BI.extend({}, ob, {type: "bi.horizontal_auto"});
+ return BI.extend({}, ob, { type: "bi.horizontal_auto" });
}
var supportFlex = isSupportFlex();
// 在横向自适应场景下我们需要使用table的自适应撑出滚动条的特性(flex处理不了这种情况)
@@ -134,24 +134,24 @@ BI.prepares.push(function () {
if (isAdapt) {
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Center
- }, ob, {type: "bi.table_adapt"});
+ }, ob, { type: "bi.table_adapt" });
}
if (supportFlex) {
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Center,
scrollx: false
- }, ob, {type: "bi.flex_horizontal"});
+ }, ob, { type: "bi.flex_horizontal" });
}
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Center
- }, ob, {type: "bi.table_adapt"});
+ }, ob, { type: "bi.table_adapt" });
});
BI.Plugin.configWidget("bi.horizontal_float", function (ob) {
if (isSupportFlex()) {
- return BI.extend({}, ob, {type: "bi.flex_horizontal_adapt"});
+ return BI.extend({}, ob, { type: "bi.flex_horizontal_adapt" });
}
if (ob.items && ob.items.length <= 1) {
- return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});
+ return BI.extend({}, ob, { type: "bi.inline_horizontal_adapt" });
}
return ob;
});
@@ -162,16 +162,16 @@ BI.prepares.push(function () {
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
scrollx: false
- }, ob, {type: "bi.flex_horizontal"});
+ }, ob, { type: "bi.flex_horizontal" });
}
if ((ob.horizontalAlign && ob.horizontalAlign !== BI.HorizontalAlign.Stretch) || (ob.scrollable === true || ob.scrollx === true)) {
// 宽度不受限,要用table布局
return BI.extend({
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch
- }, ob, {type: "bi.table_adapt"});
+ }, ob, { type: "bi.table_adapt" });
}
- return BI.extend({}, ob, {type: "bi.horizontal_float_fill"});
+ return BI.extend({}, ob, { type: "bi.horizontal_float_fill" });
});
BI.Plugin.configWidget("bi.vertical_fill", function (ob) {
if (isSupportFlex()) {
@@ -179,7 +179,7 @@ BI.prepares.push(function () {
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Stretch,
scrolly: false
- }, ob, {type: "bi.flex_vertical"});
+ }, ob, { type: "bi.flex_vertical" });
}
if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {
// 有滚动条,降级到table布局处理
@@ -204,18 +204,18 @@ BI.prepares.push(function () {
}
if (hasAuto) {
// 有自动高的时候
- return BI.extend({}, ob, {type: "bi.vtape_auto"});
+ return BI.extend({}, ob, { type: "bi.vtape_auto" });
}
- return BI.extend({}, ob, {type: "bi.vtape"});
+ return BI.extend({}, ob, { type: "bi.vtape" });
});
BI.Plugin.configWidget("bi.horizontal_sticky", function (ob) {
if (!isSupportSticky) {
- return BI.extend({ scrollx: true }, ob, {type: "bi.horizontal_fill"});
+ return BI.extend({ scrollx: true }, ob, { type: "bi.horizontal_fill" });
}
});
BI.Plugin.configWidget("bi.vertical_sticky", function (ob) {
if (!isSupportSticky) {
- return BI.extend({ scrolly: true }, ob, {type: "bi.vertical_fill"});
+ return BI.extend({ scrolly: true }, ob, { type: "bi.vertical_fill" });
}
});
@@ -223,7 +223,7 @@ BI.prepares.push(function () {
if (isSupportFlex()) {
// IE下其实也是可以使用flex布局的,只要排除掉出现滚动条的情况
// if (!BI.isIE() || (ob.scrollable !== true && ob.scrolly !== true)) {
- return BI.extend({}, ob, {type: "bi.flex_left_right_vertical_adapt"});
+ return BI.extend({}, ob, { type: "bi.flex_left_right_vertical_adapt" });
// }
}
return ob;
@@ -232,40 +232,40 @@ BI.prepares.push(function () {
if (ob.scrollable === true || ob.scrollx !== false) {
if (ob.hgap > 0 || ob.lgap > 0 || ob.rgap > 0) {
if (BI.Providers.getProvider("bi.provider.system").getResponsiveMode()) {
- return BI.extend({}, ob, {type: "bi.responsive_flex_scrollable_horizontal"});
+ return BI.extend({}, ob, { type: "bi.responsive_flex_scrollable_horizontal" });
}
- return BI.extend({}, ob, {type: "bi.flex_scrollable_horizontal"});
+ return BI.extend({}, ob, { type: "bi.flex_scrollable_horizontal" });
}
}
if (BI.Providers.getProvider("bi.provider.system").getResponsiveMode()) {
- return BI.extend({}, ob, {type: "bi.responsive_flex_horizontal"});
+ return BI.extend({}, ob, { type: "bi.responsive_flex_horizontal" });
}
});
BI.Plugin.configWidget("bi.flex_vertical", function (ob) {
if (ob.scrollable === true || ob.scrollx === true) {
if (ob.hgap > 0 || ob.lgap > 0 || ob.rgap > 0) {
- return BI.extend({}, ob, {type: "bi.flex_scrollable_vertical"});
+ return BI.extend({}, ob, { type: "bi.flex_scrollable_vertical" });
}
}
});
BI.Plugin.configWidget("bi.table", function (ob) {
if (!isSupportGrid()) {
- return BI.extend({}, ob, {type: "bi.td"});
+ return BI.extend({}, ob, { type: "bi.td" });
}
return ob;
});
BI.Plugin.configWidget("bi.radio", function (ob) {
if (BI.isIE() && BI.getIEVersion() <= 9) {
- return BI.extend({}, ob, {type: "bi.image_radio"});
+ return BI.extend({}, ob, { type: "bi.image_radio" });
}
return ob;
});
BI.Plugin.configWidget("bi.checkbox", function (ob) {
if (BI.isIE() && BI.getIEVersion() <= 9) {
- return BI.extend({}, ob, {type: "bi.image_checkbox"});
+ return BI.extend({}, ob, { type: "bi.image_checkbox" });
}
return ob;
});
@@ -274,6 +274,6 @@ BI.prepares.push(function () {
if (BI.isIE() && BI.getIEVersion() < 9) {
return ob;
}
- return BI.extend({}, ob, {type: "bi.half_button"});
+ return BI.extend({}, ob, { type: "bi.half_button" });
});
-});
+}());
diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less
index c4a8b6097..4591f64ec 100644
--- a/src/less/base/tree/ztree.less
+++ b/src/less/base/tree/ztree.less
@@ -79,22 +79,20 @@
vertical-align: top;
display: inline-block;
- .tree-node-text {
- &:not(.disabled) {
- &:hover {
- .background-color(@color-bi-background-highlight, 10%);
- }
+ &:not(.disabled) {
+ &:hover {
+ .background-color(@color-bi-background-highlight, 10%);
+ }
- &:active {
- color: @color-bi-text-highlight;
- .background-color(@color-bi-background-highlight, 15%);
- }
+ &:active {
+ color: @color-bi-text-highlight;
+ .background-color(@color-bi-background-highlight, 15%);
}
}
}
.ztree.solid li a {
- height: 32px;
+ height: 30px;
}
.ztree li a.curSelectedNode {
@@ -145,22 +143,17 @@
}
.ztree.solid li span {
- line-height: 32px;
+ line-height: 30px;
}
.ztree li span.icon {
display: inline-block;
- vertical-align: top;
text-align: center;
- width: 24px;
- height: 24px;
- line-height: 24px;
-}
-
-.ztree li span.icon {
- width: 32px;
- height: 32px;
- line-height: 32px;
+ width: 16px;
+ height: 16px;
+ line-height: 16px;
+ padding: 0 2px;
+ vertical-align: middle;
}
.ztree li span.button {
@@ -289,8 +282,8 @@
}
.ztree.solid li span.button.switch {
- width: 32px;
- height: 32px
+ width: 30px;
+ height: 30px
}
.ztree li span.button.switch.noline_open {
diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js
index 9f5a4afcb..e748ee1c5 100644
--- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js
+++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js
@@ -13,7 +13,6 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
defaultText: "",
itemsCreator: BI.emptyFn,
items: [],
- value: "",
allowEdit: false,
allowSearchValue: false,
allowInsertValue: false,
@@ -289,4 +288,4 @@ BI.MultiLayerSelectTreeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerSelectTreeCombo.EVENT_STOP = "EVENT_STOP";
BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.MultiLayerSelectTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
-BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);
\ No newline at end of file
+BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);
diff --git a/src/widget/multilayerselecttree/multilayerselecttree.trigger.js b/src/widget/multilayerselecttree/multilayerselecttree.trigger.js
index c094bac9e..08f9f9a9e 100644
--- a/src/widget/multilayerselecttree/multilayerselecttree.trigger.js
+++ b/src/widget/multilayerselecttree/multilayerselecttree.trigger.js
@@ -42,7 +42,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
self.editor = this;
},
defaultText: o.defaultText,
- text: this._digest(o.value),
+ text: BI.isKey(o.value) ? this._digest(o.value) : o.text,
value: o.value,
height: o.height,
tipText: "",
diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js
index f6a8d2718..364f1e008 100644
--- a/src/widget/multilayersingletree/multilayersingletree.combo.js
+++ b/src/widget/multilayersingletree/multilayersingletree.combo.js
@@ -16,7 +16,6 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
defaultText: "",
itemsCreator: BI.emptyFn,
items: [],
- value: "",
allowEdit: false,
allowSearchValue: false,
allowInsertValue: false,
@@ -263,4 +262,4 @@ BI.MultiLayerSingleTreeCombo.EVENT_FOCUS = "EVENT_FOCUS";
BI.MultiLayerSingleTreeCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.MultiLayerSingleTreeCombo.EVENT_STOP = "EVENT_STOP";
BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
-BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);
\ No newline at end of file
+BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);
diff --git a/src/widget/multilayersingletree/multilayersingletree.trigger.js b/src/widget/multilayersingletree/multilayersingletree.trigger.js
index 1ede397e2..b4f5c8dd9 100644
--- a/src/widget/multilayersingletree/multilayersingletree.trigger.js
+++ b/src/widget/multilayersingletree/multilayersingletree.trigger.js
@@ -42,7 +42,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {
self.editor = this;
},
defaultText: o.defaultText,
- text: this._digest(o.value),
+ text: BI.isKey(o.value) ? this._digest(o.value) : o.text,
value: o.value,
height: o.height,
tipText: "",
diff --git a/src/widget/multiselect/multiselect.loader.nobar.js b/src/widget/multiselect/multiselect.loader.nobar.js
index 6d9852a35..d865b6d6b 100644
--- a/src/widget/multiselect/multiselect.loader.nobar.js
+++ b/src/widget/multiselect/multiselect.loader.nobar.js
@@ -18,7 +18,8 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn,
itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
- onLoaded: BI.emptyFn
+ onLoaded: BI.emptyFn,
+ itemFormatter: BI.emptyFn,
});
},
diff --git a/src/widget/singleselect/trigger/searcher.singleselect.js b/src/widget/singleselect/trigger/searcher.singleselect.js
index aa5ece93b..a5674b8f1 100644
--- a/src/widget/singleselect/trigger/searcher.singleselect.js
+++ b/src/widget/singleselect/trigger/searcher.singleselect.js
@@ -125,9 +125,10 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, {
setState: function (v) {
var o = this.options;
- if (BI.isNull(v)) {
+ if (BI.isUndefined(v)) {
this.editor.setState(BI.Selection.None);
} else {
+ v = v || "";
this.editor.setState(o.valueFormatter(v + "") || (v + ""));
}
},