diff --git a/package.json b/package.json index 13ede08ac..3fdb3b623 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20211107204304", + "version": "2.0.20211109100152", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", diff --git a/src/base/1.pane.js b/src/base/1.pane.js index 5bbecf5da..630d7cddb 100644 --- a/src/base/1.pane.js +++ b/src/base/1.pane.js @@ -150,3 +150,5 @@ BI.Pane = BI.inherit(BI.Widget, { }); BI.Pane.EVENT_LOADED = "EVENT_LOADED"; BI.Pane.EVENT_LOADING = "EVENT_LOADING"; + +BI.shortcut("bi.pane", BI.Pane); diff --git a/src/base/single/button/button.basic.js b/src/base/single/button/button.basic.js index 4a5d68a0c..de0ec5ebe 100644 --- a/src/base/single/button/button.basic.js +++ b/src/base/single/button/button.basic.js @@ -10,6 +10,7 @@ BI.BasicButton = BI.inherit(BI.Single, { var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""), + // el: {} // 可以通过el来创建button元素 value: "", stopEvent: false, stopPropagation: false, @@ -26,6 +27,7 @@ BI.BasicButton = BI.inherit(BI.Single, { bubble: null }); }, + _init: function () { BI.BasicButton.superclass._init.apply(this, arguments); var opts = this.options; @@ -44,6 +46,11 @@ BI.BasicButton = BI.inherit(BI.Single, { } }, + // 默认render方法 + render: function () { + return this.options.el; + }, + _createShadow: function () { var self = this, o = this.options; diff --git a/src/core/wrapper/layout.js b/src/core/wrapper/layout.js index bc48cd3f4..04ffa4fa4 100644 --- a/src/core/wrapper/layout.js +++ b/src/core/wrapper/layout.js @@ -241,7 +241,7 @@ BI.Layout = BI.inherit(BI.Widget, { // 需要有个地方临时存一下新建的组件,否则如果直接使用newIndex的话,newIndex位置的元素可能会被用到 this._children[this._getChildName(newIndex) + "-temp"] = w; var nextSibling = del.element.next(); - if (nextSibling) { + if (nextSibling.length > 0) { BI.Widget._renderEngine.createElement(nextSibling).before(w.element); } else { w.element.appendTo(this._getWrapper()); diff --git a/typescript/base/single/button/listitem/icontextitem.ts b/typescript/base/single/button/listitem/icontextitem.ts index cde508fe8..5e3f3d6e9 100644 --- a/typescript/base/single/button/listitem/icontextitem.ts +++ b/typescript/base/single/button/listitem/icontextitem.ts @@ -10,6 +10,7 @@ export declare class IconTextItem extends BasicButton { dynamic: boolean; }; iconWrapperWidth?: number; + iconCls?: string; iconHeight?: number; iconWidth?: number; textHgap?: number;