From f2fcc6961521e3a4c1b61c1fdfa04c4f0455ad1d Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 18 Feb 2022 16:27:03 +0800 Subject: [PATCH 01/12] =?UTF-8?q?BI-101288=20fix:=20node=20type=E4=B8=8D?= =?UTF-8?q?=E5=85=81=E8=AE=B8=E8=87=AA=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/ztree/0.treeview.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/case/ztree/0.treeview.js b/src/case/ztree/0.treeview.js index aa0c502a4..7968c6c29 100644 --- a/src/case/ztree/0.treeview.js +++ b/src/case/ztree/0.treeview.js @@ -358,14 +358,15 @@ BI.TreeView = BI.inherit(BI.Pane, { n.title = n.text; } var text = BI.createWidget(BI.extend({ - type: "bi.text", cls: "tree-node-text", css: { display: "inline" }, whiteSpace: "nowrap", root: true - }, n)); + }, n, { + type: "bi.text" + })); var fragment = BI.Widget._renderEngine.createElement("
"); fragment.append(text.element[0]); n.text = fragment.html(); From 7632caa2cb85e4b82a021a37d4d826740d6bcddb Mon Sep 17 00:00:00 2001 From: data Date: Fri, 18 Feb 2022 16:43:07 +0800 Subject: [PATCH 02/12] auto upgrade version to 2.0.20220218164258 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a727f140b..36f8b61c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220217230329", + "version": "2.0.20220218164258", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From 9bbd430e073804d7a27f0ee40bedf2ef6569a5b6 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 18 Feb 2022 16:50:17 +0800 Subject: [PATCH 03/12] =?UTF-8?q?BI-101293=20fix:=20popover=E7=9A=84header?= =?UTF-8?q?=E4=B8=8D=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/layer/layer.popover.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/base/layer/layer.popover.js b/src/base/layer/layer.popover.js index 646758527..9109a9a4e 100644 --- a/src/base/layer/layer.popover.js +++ b/src/base/layer/layer.popover.js @@ -75,6 +75,8 @@ BI.Popover = BI.inherit(BI.Widget, { title: o.header, textAlign: "left" }, + top: 0, + bottom: 0, left: BI.SIZE_CONSANTS.H_GAP_SIZE, right: o.closable ? 0 : BI.SIZE_CONSANTS.H_GAP_SIZE }] From 0c60ad358e28e924f471e2bc5fc3205fedfc3e5c Mon Sep 17 00:00:00 2001 From: data Date: Fri, 18 Feb 2022 17:03:50 +0800 Subject: [PATCH 04/12] auto upgrade version to 2.0.20220218170340 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 36f8b61c3..a8295767b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220218164258", + "version": "2.0.20220218170340", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From 86673a107fbd6662a511df6f5f085ea846e50f3d Mon Sep 17 00:00:00 2001 From: "Cauchy.Ke" Date: Mon, 21 Feb 2022 16:20:14 +0800 Subject: [PATCH 05/12] =?UTF-8?q?DEC-22402=20fix:=E3=80=90=E5=86=92?= =?UTF-8?q?=E7=83=9F=E3=80=91=E4=B8=8B=E6=8B=89=E6=A0=91=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=9C=AA=E6=A0=87=E9=BB=84=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/ztree/0.treeview.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/case/ztree/0.treeview.js b/src/case/ztree/0.treeview.js index 7968c6c29..e41fc893b 100644 --- a/src/case/ztree/0.treeview.js +++ b/src/case/ztree/0.treeview.js @@ -363,7 +363,8 @@ BI.TreeView = BI.inherit(BI.Pane, { display: "inline" }, whiteSpace: "nowrap", - root: true + root: true, + keyword: o.paras.keyword }, n, { type: "bi.text" })); From f0a6a2448e19bdf237895528567aaabe091bb385 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 21 Feb 2022 16:26:31 +0800 Subject: [PATCH 06/12] =?UTF-8?q?feature:=20=E6=94=AF=E6=8C=81warningTitle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/ztree/0.treeview.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/case/ztree/0.treeview.js b/src/case/ztree/0.treeview.js index 7968c6c29..9f6695e2f 100644 --- a/src/case/ztree/0.treeview.js +++ b/src/case/ztree/0.treeview.js @@ -357,6 +357,9 @@ BI.TreeView = BI.inherit(BI.Pane, { if (BI.isNull(n.title)) { n.title = n.text; } + if (n.disabled) { + n.title = n.warningTitle || n.title; + } var text = BI.createWidget(BI.extend({ cls: "tree-node-text", css: { From 01bcc6fb73dee79b6f4b48adfeb2cda1cc23f32b Mon Sep 17 00:00:00 2001 From: data Date: Mon, 21 Feb 2022 16:53:16 +0800 Subject: [PATCH 07/12] auto upgrade version to 2.0.20220221165305 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a8295767b..68de4c38f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220218170340", + "version": "2.0.20220221165305", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From 12198d5def84bd3bbbd8d7cff330b79f3b0cda82 Mon Sep 17 00:00:00 2001 From: Claire <1119518763@qq.com> Date: Mon, 21 Feb 2022 21:04:21 +0800 Subject: [PATCH 08/12] =?UTF-8?q?BI-95364=20feat:=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/form/form.field.js | 26 ++++++++++++++++---------- src/component/form/form.js | 4 +++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/component/form/form.field.js b/src/component/form/form.field.js index ab7e98ffc..e6c11a924 100644 --- a/src/component/form/form.field.js +++ b/src/component/form/form.field.js @@ -3,13 +3,16 @@ * @version 2.0 * Created by windy on 2022/1/11 */ -BI.FormField = BI.inherit(BI.Widget, { + BI.FormField = BI.inherit(BI.Widget, { props: { baseCls: "bi-form-field", label: "", el: {}, - validate: BI.emptyFn + labelAlign: "right", // 文字默认右对齐 + validate: function () { + return true; + } // 默认返回true }, render: function () { @@ -24,7 +27,7 @@ BI.FormField = BI.inherit(BI.Widget, { o.el.ref && o.el.ref.call(this, _ref); }, height: o.el.height || 28, - listeners: [{ + listeners: BI.concat(o.el.listeners, [{ eventName: "EVENT_CHANGE", action: function () { self.fireEvent("EVENT_CHANGE"); @@ -32,9 +35,9 @@ BI.FormField = BI.inherit(BI.Widget, { }, { eventName: "EVENT_CONFIRM", action: function () { - self.fireEvent("EVENT_CHANGE"); + self.fireEvent("EVENT_CONFIRM"); } - }] + }]) }), left: 0, bottom: 0, @@ -60,11 +63,14 @@ BI.FormField = BI.inherit(BI.Widget, { type: "bi.vertical_adapt", columnSize: ["auto", "fill"], verticalAlign: BI.VerticalAlign.Stretch, - hgap: 5, items: BI.isKey(o.label) ? [{ - type: "bi.label", - text: o.label + ":", - width: o.labelWidth + el: { + type: "bi.label", + textAlign: o.labelAlign, + text: o.label, + width: o.labelWidth, + rgap: 20 // 表单文字与右侧输入间距均为20px + } }, field] : [field] }; }, @@ -77,7 +83,7 @@ BI.FormField = BI.inherit(BI.Widget, { var isValid = this.validateWithNoTip(); !isValid && this.error.setText(this.options.tip(this.field.getValue(), this.field)); this.error.setVisible(!isValid); - this.element[isValid ? "removeClass" : "addClass"]("error"); + this.field.element[isValid ? "removeClass" : "addClass"]("bi-error"); return isValid; }, diff --git a/src/component/form/form.js b/src/component/form/form.js index 12d1a651b..87cd64236 100644 --- a/src/component/form/form.js +++ b/src/component/form/form.js @@ -3,10 +3,11 @@ * @version 2.0 * Created by windy on 2022/1/11 */ -BI.Form = BI.inherit(BI.Widget, { + BI.Form = BI.inherit(BI.Widget, { props: { baseCls: "bi-form", + labelAlign: "right", layout: { type: "bi.vertical", vgap: 20 @@ -40,6 +41,7 @@ BI.Form = BI.inherit(BI.Widget, { return { type: "bi.form_field", height: item.el.height || 28, + labelAlign: o.labelAlign, labelWidth: o.labelWidth, el: item.el, label: item.label, From 773885f24bf71924c5916ca75070d6c26c466500 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 22 Feb 2022 10:37:05 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20virtual?= =?UTF-8?q?group=20items=E7=9A=84context=E4=B8=A2=E5=A4=B1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/combination/group.virtual.js | 4 +++- src/core/wrapper/layout.js | 32 ++++++++++++++++----------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/base/combination/group.virtual.js b/src/base/combination/group.virtual.js index ed21ba209..ab9b20c07 100644 --- a/src/base/combination/group.virtual.js +++ b/src/base/combination/group.virtual.js @@ -109,7 +109,9 @@ BI.VirtualGroup = BI.inherit(BI.Widget, { if (!this.layouts) { this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items))); } else { - this.layouts.populate(items); + this.layouts.populate(items, { + context: this + }); } } }); diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index 4c94198ff..f4f32cfdd 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -492,7 +492,7 @@ BI.Layout = BI.inherit(BI.Widget, { } }, - updateChildren: function (oldCh, newCh) { + updateChildren: function (oldCh, newCh, context) { var self = this; var oldStartIdx = 0, newStartIdx = 0; var oldEndIdx = oldCh.length - 1; @@ -546,7 +546,7 @@ BI.Layout = BI.inherit(BI.Widget, { } else { var sameOldVnode = findOldVnode(oldCh, newStartVnode, oldStartIdx, oldEndIdx); if (BI.isNull(sameOldVnode[0])) { // 不存在就把新的放到左边 - var node = addNode(newStartVnode, newStartIdx); + var node = addNode(newStartVnode, newStartIdx, context); insertBefore(node, oldStartVnode); } else { // 如果新节点在旧节点区间中存在就复用一下 var sameOldIndex = sameOldVnode[1]; @@ -561,7 +561,7 @@ BI.Layout = BI.inherit(BI.Widget, { } if (oldStartIdx > oldEndIdx) { before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1]; - addVnodes(before, newCh, newStartIdx, newEndIdx); + addVnodes(before, newCh, newStartIdx, newEndIdx, context); } else if (newStartIdx > newEndIdx) { removeVnodes(oldCh, oldStartIdx, oldEndIdx); } @@ -586,15 +586,15 @@ BI.Layout = BI.inherit(BI.Widget, { } } - function addNode (vnode, index) { + function addNode (vnode, index, context) { var opt = self._getOptions(vnode); var key = opt.key == null ? index : opt.key; - return children[key] = self._newElement(index, vnode); + return children[key] = self._newElement(index, vnode, context); } - function addVnodes (before, vnodes, startIdx, endIdx) { + function addVnodes (before, vnodes, startIdx, endIdx, context) { for (; startIdx <= endIdx; ++startIdx) { - var node = addNode(vnodes[startIdx], startIdx); + var node = addNode(vnodes[startIdx], startIdx, context); insertBefore(node, before, false, startIdx); } } @@ -662,16 +662,18 @@ BI.Layout = BI.inherit(BI.Widget, { update: function (opt) { var o = this.options; var items = opt.items || []; + var context = opt.context; var oldItems = o.items; this.options.items = items; - return this.updateChildren(oldItems, items); + return this.updateChildren(oldItems, items, context); }, - stroke: function (items) { + stroke: function (items, options) { + options = options || {}; var self = this; BI.each(items, function (i, item) { if (item) { - self._addElement(i, item); + self._addElement(i, item, options.context); } }); }, @@ -702,14 +704,18 @@ BI.Layout = BI.inherit(BI.Widget, { this.options.items = []; }, - populate: function (items) { + populate: function (items, options) { items = items || []; + options = options || {}; if (this._isMounted) { - this.update({items: items}); + this.update({ + items: items, + context: options.context + }); return; } this.options.items = items; - this.stroke(items); + this.stroke(items, options); }, resize: function () { From 4ca4d49b46f8b1ad9c0a027a2ba972cf1d0b9ef4 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 22 Feb 2022 11:10:31 +0800 Subject: [PATCH 10/12] revert --- src/widget/singleslider/singleslider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/singleslider/singleslider.js b/src/widget/singleslider/singleslider.js index f0fa756b2..ea51dbace 100644 --- a/src/widget/singleslider/singleslider.js +++ b/src/widget/singleslider/singleslider.js @@ -127,7 +127,7 @@ BI.SingleSlider = BI.inherit(BI.Single, { width: "100%" }, { el: { - type: "bi.vertical_adapt", + type: "bi.vertical", items: [{ type: "bi.horizontal_auto", items: [this.label] From 9c85491659845bce99799601f81a41f8314e7164 Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Feb 2022 11:33:03 +0800 Subject: [PATCH 11/12] auto upgrade version to 2.0.20220222113250 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68de4c38f..cac5aebc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220221165305", + "version": "2.0.20220222113250", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", From cd85e106771413d62062c0829eb4159c4415e80f Mon Sep 17 00:00:00 2001 From: data Date: Tue, 22 Feb 2022 14:32:50 +0800 Subject: [PATCH 12/12] auto upgrade version to 2.0.20220222143230 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cac5aebc9..5cb32aad7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220222113250", + "version": "2.0.20220222143230", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts",