Browse Source

Merging in latest from upstream (VISUAL/fineui:refs/heads/master)

* commit '3dff23f43d416b80f424b30848a43764a78a78ce': (27 commits)
  auto upgrade version to 2.0.20220313163326
  auto upgrade version to 2.0.20220313162253
  icon_button支持gap
  icon_label支持gap
  auto upgrade version to 2.0.20220313160339
  bugfix
  auto upgrade version to 2.0.20220313152230
  bugfix
  auto upgrade version to 2.0.20220313150339
  bugfix
  auto upgrade version to 2.0.20220311145317
  无JIRA任务 bigfix
  auto upgrade version to 2.0.20220311114343
  chore: bugfix
  auto upgrade version to 2.0.20220311111233
  auto upgrade version to 2.0.20220311110307
  chore: bugfix
  jsy图标冲突
  auto upgrade version to 2.0.20220311103338
  chore: bugfix
  ...
es6
Dailer 3 years ago
parent
commit
0a494374c3
  1. 4
      dist/fix/fix.compact.js
  2. BIN
      dist/font/iconfont.eot
  3. 1668
      dist/font/iconfont.svg
  4. BIN
      dist/font/iconfont.ttf
  5. BIN
      dist/font/iconfont.woff
  6. BIN
      dist/font/iconfont.woff2
  7. 2
      package.json
  8. 18
      src/base/single/button/buttons/button.icon.js
  9. 28
      src/base/single/button/listitem/blankiconicontextitem.js
  10. 28
      src/base/single/button/listitem/blankicontexticonitem.js
  11. 30
      src/base/single/button/listitem/blankicontextitem.js
  12. 28
      src/base/single/button/listitem/icontexticonitem.js
  13. 30
      src/base/single/button/listitem/icontextitem.js
  14. 30
      src/base/single/button/listitem/texticonitem.js
  15. 28
      src/base/single/button/node/icontexticonnode.js
  16. 30
      src/base/single/button/node/icontextnode.js
  17. 30
      src/base/single/button/node/texticonnode.js
  18. 18
      src/base/single/label/icon.label.js
  19. 8
      src/case/button/item.multiselect.js
  20. 4
      src/case/button/item.singleselect.icontext.js
  21. 7
      src/case/button/item.singleselect.js
  22. 9
      src/case/button/item.singleselect.radio.js
  23. 5
      src/case/button/node/node.arrow.js
  24. 5
      src/case/button/node/node.plus.js
  25. 8
      src/case/combo/iconcombo/combo.icon.js
  26. 8
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  27. 6
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  28. 8
      src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js
  29. 8
      src/case/combo/textvaluecombo/combo.textvalue.js
  30. 8
      src/case/combo/textvaluecombo/combo.textvaluesmall.js
  31. 5
      src/case/trigger/trigger.text.js
  32. 8
      src/core/3.ob.js
  33. 45
      src/core/4.widget.js
  34. 76
      src/less/lib/font.less

4
dist/fix/fix.compact.js vendored

@ -105,6 +105,10 @@
if (workerMode && this._worker) { if (workerMode && this._worker) {
return; return;
} }
if (this.store) {
pushTarget(this.store);
return true;
}
if (this._store) { if (this._store) {
var store = findStore(this.options.context || this._parent || this.options.element || this._context); var store = findStore(this.options.context || this._parent || this.options.element || this._context);
if (store) { if (store) {

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

1668
dist/font/iconfont.svg vendored

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 471 KiB

After

Width:  |  Height:  |  Size: 607 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

BIN
dist/font/iconfont.woff2 vendored

Binary file not shown.

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "fineui", "name": "fineui",
"version": "2.0.20220310163323", "version": "2.0.20220313163326",
"description": "fineui", "description": "fineui",
"main": "dist/fineui.min.js", "main": "dist/fineui.min.js",
"types": "dist/lib/index.d.ts", "types": "dist/lib/index.d.ts",

18
src/base/single/button/buttons/button.icon.js

@ -8,6 +8,12 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-icon-button horizon-center", _baseCls: (conf._baseCls || "") + " bi-icon-button horizon-center",
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0,
iconWidth: null, iconWidth: null,
iconHeight: null iconHeight: null
}); });
@ -28,6 +34,12 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
BI.createWidget({ BI.createWidget({
type: "bi.default", type: "bi.default",
element: this, element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: [this.icon] items: [this.icon]
}); });
} else { } else {
@ -35,6 +47,12 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.center_adapt", type: "bi.center_adapt",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: [this.icon] items: [this.icon]
}); });
} }

28
src/base/single/button/listitem/blankiconicontextitem.js

@ -50,19 +50,21 @@ BI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.text = _ref; ref: function (_ref) {
}, self.text = _ref;
textAlign: "left", },
hgap: o.textHgap, textAlign: "left",
vgap: o.textVgap, hgap: o.textHgap,
lgap: o.textLgap, vgap: o.textVgap,
rgap: o.textRgap, lgap: o.textLgap,
text: o.text, rgap: o.textRgap,
value: o.value, text: o.text,
keyword: o.keyword, value: o.value,
height: o.height keyword: o.keyword,
height: o.height
}
}] }]
}; };
}, },

28
src/base/single/button/listitem/blankicontexticonitem.js

@ -44,19 +44,21 @@ BI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.text = _ref; ref: function (_ref) {
}, self.text = _ref;
textAlign: "left", },
hgap: o.textHgap, textAlign: "left",
vgap: o.textVgap, hgap: o.textHgap,
lgap: o.textLgap, vgap: o.textVgap,
rgap: o.textRgap, lgap: o.textLgap,
text: o.text, rgap: o.textRgap,
value: o.value, text: o.text,
keyword: o.keyword, value: o.value,
height: o.height keyword: o.keyword,
height: o.height
}
}, { }, {
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls2, cls: o.iconCls2,

30
src/base/single/button/listitem/blankicontextitem.js

@ -42,20 +42,22 @@ BI.BlankIconTextItem = BI.inherit(BI.BasicButton, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.text = _ref; ref: function (_ref) {
}, self.text = _ref;
cls: "list-item-text", },
textAlign: "left", cls: "list-item-text",
hgap: o.textHgap, textAlign: "left",
vgap: o.textVgap, hgap: o.textHgap,
lgap: o.textLgap, vgap: o.textVgap,
rgap: o.textRgap, lgap: o.textLgap,
text: o.text, rgap: o.textRgap,
value: o.value, text: o.text,
keyword: o.keyword, value: o.value,
height: o.height keyword: o.keyword,
height: o.height
}
}] }]
}; };
}, },

28
src/base/single/button/listitem/icontexticonitem.js

@ -40,19 +40,21 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.text = _ref; ref: function (_ref) {
}, self.text = _ref;
textAlign: "left", },
hgap: o.textHgap, textAlign: "left",
vgap: o.textVgap, hgap: o.textHgap,
lgap: o.textLgap, vgap: o.textVgap,
rgap: o.textRgap, lgap: o.textLgap,
text: o.text, rgap: o.textRgap,
value: o.value, text: o.text,
keyword: o.keyword, value: o.value,
height: o.height keyword: o.keyword,
height: o.height
}
}, { }, {
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls2, cls: o.iconCls2,

30
src/base/single/button/listitem/icontextitem.js

@ -40,20 +40,22 @@ BI.IconTextItem = BI.inherit(BI.BasicButton, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.text = _ref; ref: function (_ref) {
}, self.text = _ref;
cls: "list-item-text", },
textAlign: "left", cls: "list-item-text",
hgap: o.textHgap, textAlign: "left",
vgap: o.textVgap, hgap: o.textHgap,
lgap: o.textLgap, vgap: o.textVgap,
rgap: o.textRgap, lgap: o.textLgap,
text: o.text, rgap: o.textRgap,
value: o.value, text: o.text,
keyword: o.keyword, value: o.value,
height: o.height keyword: o.keyword,
height: o.height
}
}] }]
}; };
}, },

30
src/base/single/button/listitem/texticonitem.js

@ -33,20 +33,22 @@ BI.TextIconItem = BI.inherit(BI.BasicButton, {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
columnSize: ["fill", o.iconWrapperWidth || o.height], columnSize: ["fill", o.iconWrapperWidth || o.height],
items: [{ items: [{
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.text = _ref; ref: function (_ref) {
}, self.text = _ref;
cls: "list-item-text", },
textAlign: "left", cls: "list-item-text",
hgap: o.textHgap, textAlign: "left",
vgap: o.textVgap, hgap: o.textHgap,
lgap: o.textLgap, vgap: o.textVgap,
rgap: o.textRgap, lgap: o.textLgap,
text: o.text, rgap: o.textRgap,
value: o.value, text: o.text,
keyword: o.keyword, value: o.value,
height: o.height keyword: o.keyword,
height: o.height
}
}, { }, {
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls, cls: o.iconCls,

28
src/base/single/button/node/icontexticonnode.js

@ -38,19 +38,21 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.text = _ref; ref: function (_ref) {
}, self.text = _ref;
textAlign: "left", },
hgap: o.textHgap, textAlign: "left",
vgap: o.textVgap, hgap: o.textHgap,
lgap: o.textLgap, vgap: o.textVgap,
rgap: o.textRgap, lgap: o.textLgap,
text: o.text, rgap: o.textRgap,
value: o.value, text: o.text,
keyword: o.keyword, value: o.value,
height: o.height keyword: o.keyword,
height: o.height
}
}, { }, {
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls2, cls: o.iconCls2,

30
src/base/single/button/node/icontextnode.js

@ -37,20 +37,22 @@ BI.IconTextNode = BI.inherit(BI.NodeButton, {
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconHeight: o.iconHeight iconHeight: o.iconHeight
}, { }, {
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.text = _ref; ref: function (_ref) {
}, self.text = _ref;
cls: "list-item-text", },
textAlign: "left", cls: "list-item-text",
hgap: o.textHgap, textAlign: "left",
vgap: o.textVgap, hgap: o.textHgap,
lgap: o.textLgap, vgap: o.textVgap,
rgap: o.textRgap, lgap: o.textLgap,
text: o.text, rgap: o.textRgap,
value: o.value, text: o.text,
keyword: o.keyword, value: o.value,
height: o.height keyword: o.keyword,
height: o.height
}
}] }]
}; };
}, },

30
src/base/single/button/node/texticonnode.js

@ -29,20 +29,22 @@ BI.TextIconNode = BI.inherit(BI.NodeButton, {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
columnSize: ["fill", o.iconWrapperWidth || o.height], columnSize: ["fill", o.iconWrapperWidth || o.height],
items: [{ items: [{
type: "bi.label", el: {
ref: function (_ref) { type: "bi.label",
self.text = _ref; ref: function (_ref) {
}, self.text = _ref;
cls: "list-item-text", },
textAlign: "left", cls: "list-item-text",
hgap: o.textHgap, textAlign: "left",
vgap: o.textVgap, hgap: o.textHgap,
lgap: o.textLgap, vgap: o.textVgap,
rgap: o.textRgap, lgap: o.textLgap,
text: o.text, rgap: o.textRgap,
value: o.value, text: o.text,
keyword: o.keyword, value: o.value,
height: o.height keyword: o.keyword,
height: o.height
}
}, { }, {
type: "bi.icon_label", type: "bi.icon_label",
cls: o.iconCls, cls: o.iconCls,

18
src/base/single/label/icon.label.js

@ -7,6 +7,12 @@ BI.IconLabel = BI.inherit(BI.Single, {
props: { props: {
baseCls: "bi-icon-label horizon-center", baseCls: "bi-icon-label horizon-center",
hgap: 0,
vgap: 0,
tgap: 0,
bgap: 0,
lgap: 0,
rgap: 0,
iconWidth: null, iconWidth: null,
iconHeight: null, iconHeight: null,
lineHeight: null, lineHeight: null,
@ -27,6 +33,12 @@ BI.IconLabel = BI.inherit(BI.Single, {
BI.createWidget({ BI.createWidget({
type: "bi.default", type: "bi.default",
element: this, element: this,
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: [this.icon] items: [this.icon]
}); });
} else { } else {
@ -34,6 +46,12 @@ BI.IconLabel = BI.inherit(BI.Single, {
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.center_adapt", type: "bi.center_adapt",
hgap: o.hgap,
vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: [this.icon] items: [this.icon]
}); });
} }

8
src/case/button/item.multiselect.js

@ -17,7 +17,8 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
iconWrapperWidth: 26, iconWrapperWidth: 26,
textHgap: 0, textHgap: 0,
textLgap: 0, textLgap: 0,
textRgap: 0 textRgap: 0,
textVgap: 0,
}); });
}, },
@ -48,9 +49,10 @@ BI.MultiSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
textHeight: o.height, textHeight: o.height,
height: o.height, height: o.height,
hgap: o.hgap, hgap: o.textHgap,
rgap: o.rgap, rgap: o.textRgap,
lgap: o.textLgap, lgap: o.textLgap,
vgap: o.textVgap,
text: o.text, text: o.text,
keyword: o.keyword, keyword: o.keyword,
value: o.value, value: o.value,

4
src/case/button/item.singleselect.icontext.js

@ -28,6 +28,10 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
height: o.height, height: o.height,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
textHgap: o.textHgap,
textVgap: o.textVgap,
textLgap: o.textLgap,
textRgap: o.textRgap,
text: o.text, text: o.text,
keyword: o.keyword, keyword: o.keyword,
value: o.value, value: o.value,

7
src/case/button/item.singleselect.js

@ -5,7 +5,7 @@ BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
attributes: { attributes: {
tabIndex: 1 tabIndex: 1
}, },
hgap: 10, textHgap: 10,
height: 24, height: 24,
textAlign: "left" textAlign: "left"
}); });
@ -20,7 +20,10 @@ BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
textHeight: o.height, textHeight: o.height,
height: o.height, height: o.height,
hgap: o.hgap, hgap: o.hgap || o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text, text: o.text,
keyword: o.keyword, keyword: o.keyword,
value: o.value, value: o.value,

9
src/case/button/item.singleselect.radio.js

@ -15,8 +15,8 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
}, },
height: 24, height: 24,
iconWrapperWidth: 16, iconWrapperWidth: 16,
hgap: 10, textHgap: 10,
textHgap: 0, textVgap: 0,
textLgap: 0, textLgap: 0,
textRgap: 0 textRgap: 0
}); });
@ -46,9 +46,10 @@ BI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
textHeight: o.height, textHeight: o.height,
height: o.height, height: o.height,
hgap: o.hgap, hgap: o.hgap || o.textHgap,
rgap: o.textRgap, vgap: o.textVgap,
lgap: o.textLgap, lgap: o.textLgap,
rgap: o.textRgap,
text: o.text, text: o.text,
keyword: o.keyword, keyword: o.keyword,
value: o.value, value: o.value,

5
src/case/button/node/node.arrow.js

@ -41,7 +41,10 @@ BI.ArrowNode = BI.inherit(BI.NodeButton, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
textHeight: o.height, textHeight: o.height,
height: o.height, height: o.height,
hgap: o.hgap, hgap: o.hgap || o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
py: o.py, py: o.py,

5
src/case/button/node/node.plus.js

@ -46,7 +46,10 @@ BI.PlusGroupNode = BI.inherit(BI.NodeButton, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
textHeight: o.height, textHeight: o.height,
height: o.height, height: o.height,
hgap: o.hgap, hgap: o.hgap || o.textHgap,
vgap: o.textVgap,
lgap: o.textLgap,
rgap: o.textRgap,
text: o.text, text: o.text,
value: o.value, value: o.value,
keyword: o.keyword, keyword: o.keyword,

8
src/case/combo/iconcombo/combo.icon.js

@ -25,8 +25,14 @@ BI.IconCombo = BI.inherit(BI.Widget, {
}, },
_init: function () { _init: function () {
BI.IconCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) {
self.setValue(newValue);
}) : o.value;
o.items = BI.isFunction(o.items) ? this.__watch(o.items, function (context, newValue) {
self.populate(newValue);
}) : o.items;
BI.IconCombo.superclass._init.apply(this, arguments);
this.trigger = BI.createWidget(o.el, { this.trigger = BI.createWidget(o.el, {
type: "bi.icon_combo_trigger", type: "bi.icon_combo_trigger",
iconCls: o.iconCls, iconCls: o.iconCls,

8
src/case/combo/icontextvaluecombo/combo.icontextvalue.js

@ -15,8 +15,14 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2); BI.isNumeric(o.width) && (o.width -= 2);
BI.isNumeric(o.height) && (o.height -= 2);
o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) {
self.setValue(newValue);
}) : o.value;
o.items = BI.isFunction(o.items) ? this.__watch(o.items, function (context, newValue) {
self.populate(newValue);
}) : o.items;
BI.IconTextValueCombo.superclass._init.apply(this, arguments); BI.IconTextValueCombo.superclass._init.apply(this, arguments);
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.select_icon_text_trigger", type: "bi.select_icon_text_trigger",

6
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -15,6 +15,12 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) {
self.setValue(newValue);
}) : o.value;
o.items = BI.isFunction(o.items) ? this.__watch(o.items, function (context, newValue) {
self.populate(newValue);
}) : o.items;
return { return {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{

8
src/case/combo/textvaluecheckcombo/combo.textvaluecheck.js

@ -16,8 +16,14 @@ BI.TextValueCheckCombo = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2); BI.isNumeric(o.width) && (o.width -= 2);
BI.isNumeric(o.height) && (o.height -= 2);
o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) {
self.setValue(newValue);
}) : o.value;
o.items = BI.isFunction(o.items) ? this.__watch(o.items, function (context, newValue) {
self.populate(newValue);
}) : o.items;
BI.TextValueCheckCombo.superclass._init.apply(this, arguments); BI.TextValueCheckCombo.superclass._init.apply(this, arguments);
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.select_text_trigger", type: "bi.select_text_trigger",

8
src/case/combo/textvaluecombo/combo.textvalue.js

@ -17,8 +17,14 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
_init: function () { _init: function () {
var self = this, o = this.options; var self = this, o = this.options;
o.height -= 2;
BI.isNumeric(o.width) && (o.width -= 2); BI.isNumeric(o.width) && (o.width -= 2);
BI.isNumeric(o.height) && (o.height -= 2);
o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) {
self.setValue(newValue);
}) : o.value;
o.items = BI.isFunction(o.items) ? this.__watch(o.items, function (context, newValue) {
self.populate(newValue);
}) : o.items;
BI.TextValueCombo.superclass._init.apply(this, arguments); BI.TextValueCombo.superclass._init.apply(this, arguments);
this.trigger = BI.createWidget({ this.trigger = BI.createWidget({
type: "bi.select_text_trigger", type: "bi.select_text_trigger",

8
src/case/combo/textvaluecombo/combo.textvaluesmall.js

@ -16,8 +16,14 @@ BI.SmallTextValueCombo = BI.inherit(BI.Widget, {
}, },
_init: function () { _init: function () {
BI.SmallTextValueCombo.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
o.value = BI.isFunction(o.value) ? this.__watch(o.value, function (context, newValue) {
self.setValue(newValue);
}) : o.value;
o.items = BI.isFunction(o.items) ? this.__watch(o.items, function (context, newValue) {
self.populate(newValue);
}) : o.items;
BI.SmallTextValueCombo.superclass._init.apply(this, arguments);
this.trigger = BI.createWidget(o.el, { this.trigger = BI.createWidget(o.el, {
type: "bi.small_select_text_trigger", type: "bi.small_select_text_trigger",
items: o.items, items: o.items,

5
src/case/trigger/trigger.text.js

@ -44,10 +44,11 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.htape", type: "bi.horizontal_fill",
items: [ items: [
{ {
el: this.text el: this.text,
width: "fill"
}, { }, {
el: this.trigerButton, el: this.trigerButton,
width: o.triggerWidth || o.height width: o.triggerWidth || o.height

8
src/core/3.ob.js

@ -51,9 +51,11 @@
if (BI.isFunction(this.props)) { if (BI.isFunction(this.props)) {
props = this.props(config); props = this.props(config);
} }
var defaultProps = this._defaultConfig(config); var defaultProps = extend(this._defaultConfig(config), props);
var modifiedDefaultProps = (config && config.type && BI.OB.configFunctions[config.type + ".props"]) ? BI.OB.configFunctions[config.type + ".props"](config, defaultProps) : null; var modifiedDefaultProps = (config && config.type && BI.OB.configFunctions[config.type + ".props"]) ? BI.reduce(BI.OB.configFunctions[config.type + ".props"], function (value, conf, index) {
this.options = extend(defaultProps, props, modifiedDefaultProps, config); return extend(conf, value.fn(defaultProps, config, value.opt));
}, {}) : null;
this.options = extend(defaultProps, modifiedDefaultProps, config);
}, },
_init: function () { _init: function () {

45
src/core/4.widget.js

@ -147,7 +147,10 @@
self.__async = true; self.__async = true;
var beforeRenderResult = (self.options.beforeRender || self.beforeRender).call(self, render); var beforeRenderResult = (self.options.beforeRender || self.beforeRender).call(self, render);
if (beforeRenderResult instanceof Promise) { if (beforeRenderResult instanceof Promise) {
beforeRenderResult.then(render); beforeRenderResult.then(render).catch(function (e) {
_global.console && console.error(e);
render();
});
} }
} else { } else {
self._render(); self._render();
@ -159,7 +162,10 @@
this.__asking = true; this.__asking = true;
var beforeInitResult = (this.options.beforeInit || this.beforeInit).call(this, init); var beforeInitResult = (this.options.beforeInit || this.beforeInit).call(this, init);
if (beforeInitResult instanceof Promise) { if (beforeInitResult instanceof Promise) {
beforeInitResult.then(init); beforeInitResult.then(init).catch(function (e) {
_global.console && console.error(e);
init();
});
} }
} else { } else {
init(); init();
@ -291,10 +297,15 @@
}, },
_initVisual: function () { _initVisual: function () {
var o = this.options; var self = this, o = this.options;
if (o.invisible) { if (o.invisible) {
// 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性 var invisible = BI.isFunction(o.invisible) ? this.__watch(o.invisible, function (context, newValue) {
this.element.css("display", "none"); self.setVisible(!newValue);
}) : o.invisible;
if (invisible) {
// 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性
this.element.css("display", "none");
}
} }
}, },
@ -302,10 +313,20 @@
var self = this, o = this.options; var self = this, o = this.options;
if (o.disabled || o.invalid) { if (o.disabled || o.invalid) {
if (this.options.disabled) { if (this.options.disabled) {
this.setEnable(false); var disabled = BI.isFunction(o.disabled) ? this.__watch(o.disabled, function (context, newValue) {
self.setEnable(!newValue);
}) : o.disabled;
if (disabled) {
this.setEnable(false);
}
} }
if (this.options.invalid) { if (this.options.invalid) {
this.setValid(false); var invalid = BI.isFunction(o.invalid) ? this.__watch(o.invalid, function (context, newValue) {
self.setEnable(!newValue);
}) : o.invalid;
if (invalid) {
this.setValid(false);
}
} }
} }
if (o.effect) { if (o.effect) {
@ -750,12 +771,20 @@
// } // }
// this._isMounted = false; // this._isMounted = false;
// this.purgeListeners(); // this.purgeListeners();
// 去掉组件绑定的watcher
BI.each(this._watchers, function (i, unwatches) {
unwatches = BI.isArray(unwatches) ? unwatches : [unwatches];
BI.each(unwatches, function (j, unwatch) {
unwatch();
});
});
this._watchers && (this._watchers = []);
this.__d(); this.__d();
this.element.empty(); this.element.empty();
this.element.unbind(); this.element.unbind();
this._initCurrent(); this._initCurrent();
this._init(); this._init();
this._mount();
// this._initRef(); // this._initRef();
}, },

76
src/less/lib/font.less

@ -1,57 +1,57 @@
//字体库 //字体库
@font-cross: "e6d0"; @font-cross: "e1ab";
@font-circle-close: "e6d5"; @font-circle-close: "e1a9";
@font-search: "e6dc"; @font-search: "e1c3";
@font-date: "e733"; @font-date: "e1d3";
@font-time: "e6b1"; @font-time: "e1ae";
@font-change: "e72f"; @font-change: "e1cd";
@font-dot: "e762"; @font-dot: "e1aa";
@font-plus: "e75b"; @font-plus: "e1a0";
@font-minus: "e75a"; @font-minus: "e19e";
@font-right-triangle: "e70c"; @font-right-triangle: "e1bd";
@font-copy: "e6bd"; @font-copy: "e1ad";
@font-check-mark: "e6cf"; @font-check-mark: "e1b0";
@font-arrow-left: "e70d"; @font-arrow-left: "e1bc";
@font-arrow-right: "e70c"; @font-arrow-right: "e1bd";
@font-up-triangle: "e70a"; @font-up-triangle: "e1c6";
@font-down-triangle: "e70b"; @font-down-triangle: "e1c9";
@font-solid-left: "e6d9"; @font-solid-left: "e1c4";
@font-solid-right: "e6d8"; @font-solid-right: "e1a5";
@font-solid-top: "e6d6"; @font-solid-top: "e1ac";
@font-solid-bottom: "e6d7"; @font-solid-bottom: "e1c0";
@font-trigger-triangle: "e64e"; @font-trigger-triangle: "e1d5";
@font-less: "e75e"; @font-less: "e1d1";
@font-less-equal: "e761"; @font-less-equal: "e1d2";
@font-bold: "e697"; @font-bold: "e19b";
@font-italic: "e69d"; @font-italic: "e199";
@font-underline: "e69c"; @font-underline: "e1d6";
@font-color: "e698"; @font-color: "e198";
@font-background: "e699"; @font-background: "e19a";
@font-color-underline: "e69a"; @font-color-underline: "e19c";
@font-align-left: "e6ca"; @font-align-left: "e1a7";
@font-align-center: "e6bf"; @font-align-center: "e1a2";
@font-align-right: "e6c8"; @font-align-right: "e1af";
@font-tip-error: "e757"; @font-tip-error: "e1da";
@font-tip-success: "e756"; @font-tip-success: "e1db";
@font-tip-warning: "e755"; @font-tip-warning: "e1d7";
@font-tip-message: "e74b"; @font-tip-message: "e1d9";
@font-key: "e740"; @font-key: "e1d0";
@font-add: "e6dd"; @font-add: "e1c7";

Loading…
Cancel
Save