diff --git a/changelog.md b/changelog.md index ebfefcf1e..566e578cb 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ - 修改了下拉树展开图标模糊的问题 - 修复了下拉树搜索高亮字符与正常字符间存在间距的问题 - 复选下拉系列的计数器从trigger中拆分, 作为独立的部分 +- 增加BI.createElement方法 2.0(2019-09) - [视觉]popover弹出框增加圆角 diff --git a/dist/2.0/fineui.css b/dist/2.0/fineui.css index 35255b91a..8f43bebe4 100644 --- a/dist/2.0/fineui.css +++ b/dist/2.0/fineui.css @@ -2273,7 +2273,10 @@ textarea { .ztree.hack li ul.line { background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; +} +.bi-theme-dark .ztree.hack li ul.line { background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; } .bi-theme-dark .ztree.hack li ul.line { @@ -4959,7 +4962,10 @@ textarea::-webkit-scrollbar-corner { .ztree.hack li ul.line { background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; +} +.bi-theme-dark .ztree.hack li ul.line { background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; } .bi-theme-dark .ztree.hack li ul.line { diff --git a/dist/2.0/fineui.ie.js b/dist/2.0/fineui.ie.js index de3d4b944..31620c92b 100644 --- a/dist/2.0/fineui.ie.js +++ b/dist/2.0/fineui.ie.js @@ -12248,6 +12248,11 @@ if (!_global.BI) { throw new Error("无法根据item创建组件"); }; + BI.createElement = function () { + var widget = BI.createWidget.apply(this, arguments); + return widget.element; + }; + })();!(function () { /* CryptoJS v3.1.2 @@ -87357,7 +87362,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var text = v; if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } @@ -88742,7 +88747,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { // 把value都换成字符串 - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/dist/2.0/fineui.js b/dist/2.0/fineui.js index 0499976ee..4338b61f5 100644 --- a/dist/2.0/fineui.js +++ b/dist/2.0/fineui.js @@ -12248,6 +12248,11 @@ if (!_global.BI) { throw new Error("无法根据item创建组件"); }; + BI.createElement = function () { + var widget = BI.createWidget.apply(this, arguments); + return widget.element; + }; + })();!(function () { /* CryptoJS v3.1.2 @@ -87761,7 +87766,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var text = v; if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } @@ -89146,7 +89151,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { // 把value都换成字符串 - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/dist/base.css b/dist/base.css index 657161da6..5e172fcbe 100644 --- a/dist/base.css +++ b/dist/base.css @@ -63,7 +63,10 @@ .ztree.hack li ul.line { background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; +} +.bi-theme-dark .ztree.hack li ul.line { background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; } .bi-theme-dark .ztree.hack li ul.line { diff --git a/dist/bundle.css b/dist/bundle.css index 35255b91a..8f43bebe4 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -2273,7 +2273,10 @@ textarea { .ztree.hack li ul.line { background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; +} +.bi-theme-dark .ztree.hack li ul.line { background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; } .bi-theme-dark .ztree.hack li ul.line { @@ -4959,7 +4962,10 @@ textarea::-webkit-scrollbar-corner { .ztree.hack li ul.line { background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; +} +.bi-theme-dark .ztree.hack li ul.line { background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; } .bi-theme-dark .ztree.hack li ul.line { diff --git a/dist/bundle.ie.js b/dist/bundle.ie.js index de3d4b944..31620c92b 100644 --- a/dist/bundle.ie.js +++ b/dist/bundle.ie.js @@ -12248,6 +12248,11 @@ if (!_global.BI) { throw new Error("无法根据item创建组件"); }; + BI.createElement = function () { + var widget = BI.createWidget.apply(this, arguments); + return widget.element; + }; + })();!(function () { /* CryptoJS v3.1.2 @@ -87357,7 +87362,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var text = v; if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } @@ -88742,7 +88747,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { // 把value都换成字符串 - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/dist/bundle.js b/dist/bundle.js index 0499976ee..4338b61f5 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -12248,6 +12248,11 @@ if (!_global.BI) { throw new Error("无法根据item创建组件"); }; + BI.createElement = function () { + var widget = BI.createWidget.apply(this, arguments); + return widget.element; + }; + })();!(function () { /* CryptoJS v3.1.2 @@ -87761,7 +87766,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var text = v; if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } @@ -89146,7 +89151,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { // 把value都换成字符串 - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/dist/core.js b/dist/core.js index eaabfb40f..af0fec677 100644 --- a/dist/core.js +++ b/dist/core.js @@ -12248,6 +12248,11 @@ if (!_global.BI) { throw new Error("无法根据item创建组件"); }; + BI.createElement = function () { + var widget = BI.createWidget.apply(this, arguments); + return widget.element; + }; + })();!(function () { /* CryptoJS v3.1.2 diff --git a/dist/fineui.css b/dist/fineui.css index c27020a26..0552a99f9 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -2273,7 +2273,10 @@ textarea { .ztree.hack li ul.line { background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; +} +.bi-theme-dark .ztree.hack li ul.line { background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; } .bi-theme-dark .ztree.hack li ul.line { @@ -4959,7 +4962,10 @@ textarea::-webkit-scrollbar-corner { .ztree.hack li ul.line { background: url('resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; +} +.bi-theme-dark .ztree.hack li ul.line { background: url('resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; } .bi-theme-dark .ztree.hack li ul.line { diff --git a/dist/fineui.ie.js b/dist/fineui.ie.js index 4c7aa208c..59ee3e741 100644 --- a/dist/fineui.ie.js +++ b/dist/fineui.ie.js @@ -12493,6 +12493,11 @@ if (!_global.BI) { throw new Error("无法根据item创建组件"); }; + BI.createElement = function () { + var widget = BI.createWidget.apply(this, arguments); + return widget.element; + }; + })();!(function () { /* CryptoJS v3.1.2 @@ -87602,7 +87607,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var text = v; if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } @@ -88987,7 +88992,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { // 把value都换成字符串 - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/dist/fineui.js b/dist/fineui.js index e6ff6075f..af19b0e7d 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -12493,6 +12493,11 @@ if (!_global.BI) { throw new Error("无法根据item创建组件"); }; + BI.createElement = function () { + var widget = BI.createWidget.apply(this, arguments); + return widget.element; + }; + })();!(function () { /* CryptoJS v3.1.2 @@ -88006,7 +88011,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var text = v; if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } @@ -89391,7 +89396,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { // 把value都换成字符串 - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/dist/fineui_without_jquery_polyfill.js b/dist/fineui_without_jquery_polyfill.js index cb4748713..171e69a14 100644 --- a/dist/fineui_without_jquery_polyfill.js +++ b/dist/fineui_without_jquery_polyfill.js @@ -12248,6 +12248,11 @@ if (!_global.BI) { throw new Error("无法根据item创建组件"); }; + BI.createElement = function () { + var widget = BI.createWidget.apply(this, arguments); + return widget.element; + }; + })();!(function () { /* CryptoJS v3.1.2 @@ -70298,7 +70303,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var text = v; if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } @@ -71683,7 +71688,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { // 把value都换成字符串 - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/dist/resource.css b/dist/resource.css index 681c9c90b..1de549273 100644 --- a/dist/resource.css +++ b/dist/resource.css @@ -133,7 +133,10 @@ textarea::-webkit-scrollbar-corner { .ztree.hack li ul.line { background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; +} +.bi-theme-dark .ztree.hack li ul.line { background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; } .bi-theme-dark .ztree.hack li ul.line { diff --git a/dist/widget.js b/dist/widget.js index 75a2abcb1..aa335fab6 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -25511,7 +25511,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var text = v; if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } @@ -26896,7 +26896,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { // 把value都换成字符串 - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/public/css/background.css b/public/css/background.css index e777caf73..26861a1fb 100644 --- a/public/css/background.css +++ b/public/css/background.css @@ -42,8 +42,8 @@ .ztree.hack li ul.line { background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { - background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; } .bi-theme-dark .ztree.hack li ul.line { background: url('http://fine-design-storage.oss-cn-shanghai.aliyuncs.com/fineui/2.0/images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; diff --git a/src/component/treevaluechooser/abstract.treevaluechooser.js b/src/component/treevaluechooser/abstract.treevaluechooser.js index 98c232b96..4f2c389f5 100644 --- a/src/component/treevaluechooser/abstract.treevaluechooser.js +++ b/src/component/treevaluechooser/abstract.treevaluechooser.js @@ -16,7 +16,7 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var text = v; if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/src/component/valuechooser/abstract.valuechooser.js b/src/component/valuechooser/abstract.valuechooser.js index ff199e76a..ac4b08ae5 100644 --- a/src/component/valuechooser/abstract.valuechooser.js +++ b/src/component/valuechooser/abstract.valuechooser.js @@ -25,7 +25,7 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, { if (BI.isNotNull(this.items)) { BI.some(this.items, function (i, item) { // 把value都换成字符串 - if (item.value + "" === v) { + if (item.value === v || item.value + "" === v) { text = item.text; return true; } diff --git a/src/core/shortcut.js b/src/core/shortcut.js index 4e7df4ea7..66e303216 100644 --- a/src/core/shortcut.js +++ b/src/core/shortcut.js @@ -69,4 +69,9 @@ throw new Error("无法根据item创建组件"); }; + BI.createElement = function () { + var widget = BI.createWidget.apply(this, arguments); + return widget.element; + }; + })(); \ No newline at end of file diff --git a/src/css/base/colorchooser/colorpicker/editor.css b/src/css/base/colorchooser/colorpicker/editor.css index 0efa18d06..5d3a17106 100644 --- a/src/css/base/colorchooser/colorpicker/editor.css +++ b/src/css/base/colorchooser/colorpicker/editor.css @@ -42,8 +42,8 @@ .ztree.hack li ul.line { background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { - background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; } .bi-theme-dark .ztree.hack li ul.line { background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; diff --git a/src/css/resource/background.css b/src/css/resource/background.css index 3bb602150..0bb6cd64a 100644 --- a/src/css/resource/background.css +++ b/src/css/resource/background.css @@ -42,8 +42,8 @@ .ztree.hack li ul.line { background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { - background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; } .bi-theme-dark .ztree.hack li ul.line { background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; diff --git a/src/less/resource/background.less b/src/less/resource/background.less index 56c7a5963..2a122eee5 100644 --- a/src/less/resource/background.less +++ b/src/less/resource/background.less @@ -61,7 +61,9 @@ .bi-theme-dark { .ztree li ul.line { - .imagePath(@icon-tree-vertical-line-1-theme-dark, 0, 1px, repeat-y); + &:before { + border-left: 1px dashed #606479; + } } .ztree.hack li ul.line { .imagePath(@icon-tree-vertical-line-1-theme-dark, 0, 1px, repeat-y); diff --git a/ui/css/background.css b/ui/css/background.css index 430b0e1b0..0747b9182 100644 --- a/ui/css/background.css +++ b/ui/css/background.css @@ -42,8 +42,8 @@ .ztree.hack li ul.line { background: url('resources?path=/com/fr/web/ui/images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0; } -.bi-theme-dark .ztree li ul.line { - background: url('resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0; +.bi-theme-dark .ztree li ul.line:before { + border-left: 1px dashed #606479; } .bi-theme-dark .ztree.hack li ul.line { background: url('resources?path=/com/fr/web/ui/images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0;