Browse Source

Merge remote-tracking branch 'origin/master' into bugfix

es6
iapyang 4 years ago
parent
commit
120f04ea98
  1. 3
      changelog.md
  2. 44
      demo/js/base/editor/demo.editor.js
  3. 4
      dist/2.0/fineui.css
  4. 4
      dist/2.0/fineui.ie.min.js
  5. 2
      dist/2.0/fineui.ie.min.js.map
  6. 17798
      dist/2.0/fineui.js
  7. 2
      dist/2.0/fineui.js.map
  8. 4
      dist/2.0/fineui.min.css
  9. 4
      dist/2.0/fineui.min.js
  10. 2
      dist/2.0/fineui.min.js.map
  11. 4
      dist/2.0/fineui_without_normalize.css
  12. 4
      dist/2.0/fineui_without_normalize.min.css
  13. 4
      dist/core.css
  14. 17790
      dist/core.js
  15. 2
      dist/core.js.map
  16. 4
      dist/demo.css
  17. 18203
      dist/demo.js
  18. 2
      dist/demo.js.map
  19. 4
      dist/fineui.css
  20. 4
      dist/fineui.ie.min.js
  21. 2
      dist/fineui.ie.min.js.map
  22. 17794
      dist/fineui.js
  23. 2
      dist/fineui.js.map
  24. 4
      dist/fineui.min.css
  25. 4
      dist/fineui.min.js
  26. 2
      dist/fineui.min.js.map
  27. 122
      dist/fineui_without_jquery_polyfill.js
  28. 2
      dist/fineui_without_jquery_polyfill.js.map
  29. 2
      dist/font.css
  30. BIN
      dist/font/iconfont.eot
  31. 3
      dist/font/iconfont.svg
  32. BIN
      dist/font/iconfont.ttf
  33. BIN
      dist/font/iconfont.woff
  34. BIN
      dist/font/iconfont.woff2
  35. 2
      dist/resource.css
  36. 137
      dist/utils.js
  37. 2
      dist/utils.js.map
  38. 4
      dist/utils.min.js
  39. 2
      dist/utils.min.js.map
  40. 2
      package.json
  41. 4
      src/base/single/editor/editor.js
  42. 2
      src/case/editor/editor.shelter.js
  43. 2
      src/case/editor/editor.sign.js
  44. 2
      src/case/editor/editor.state.js
  45. 2
      src/case/editor/editor.state.simple.js
  46. 2
      src/case/trigger/trigger.text.js
  47. 2
      src/case/trigger/trigger.text.small.js
  48. 53
      src/core/inject.js
  49. 17433
      src/core/platform/web/jquery/_jquery.js
  50. 13
      src/core/shortcut.js
  51. 1
      src/less/core/utils/common.less
  52. 5
      src/widget/multitree/trigger/searcher.multi.tree.js

3
changelog.md

@ -1,5 +1,8 @@
# 更新日志
2.0(2020-12)
- 规范了下拉树trigger中显示值的显示顺序
- bi.editor支持传入autocomplete
- [视觉]editor水印间距统一与文本域水印不可选中
- 修复bi.file的url参数拼接问题
- 修复了colorChooser选择透明后, 打开更多选色面板, 直接点保存会选中自动的问题
- bi.file支持限制上传文件数

44
demo/js/base/editor/demo.editor.js

@ -1,6 +1,6 @@
Demo.Editor = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-editor"
baseCls: "demo-editor",
},
render: function () {
var editor1 = BI.createWidget({
@ -9,7 +9,7 @@ Demo.Editor = BI.inherit(BI.Widget, {
watermark: "报错信息显示在控件上方",
errorText: "字段不可重名!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
width: 200,
height: 24
height: 24,
});
editor1.on(BI.Editor.EVENT_ENTER, function () {
editor1.blur();
@ -24,11 +24,12 @@ Demo.Editor = BI.inherit(BI.Widget, {
if (v == "a") {
return false;
}
return true;
},
allowBlank: true,
width: 200,
height: 24
height: 24,
});
var editor3 = BI.createWidget({
type: "bi.editor",
@ -40,6 +41,7 @@ Demo.Editor = BI.inherit(BI.Widget, {
if (v == "a") {
return false;
}
return true;
},
quitChecker: function (v) {
@ -47,7 +49,17 @@ Demo.Editor = BI.inherit(BI.Widget, {
},
allowBlank: true,
width: 300,
height: 24
height: 24,
});
var editor4 = BI.createWidget({
type: "bi.editor",
cls: "bi-border",
inputType: "password",
autocomplete: "new-password",
watermark: "请输入密码",
allowBlank: true,
width: 300,
height: 24,
});
BI.createWidget({
type: "bi.absolute",
@ -55,15 +67,19 @@ Demo.Editor = BI.inherit(BI.Widget, {
items: [{
el: editor1,
left: 0,
top: 0
top: 0,
}, {
el: editor2,
left: 250,
top: 30
top: 30,
}, {
el: editor3,
left: 500,
top: 60
top: 60,
}, {
el: editor4,
left: 700,
top: 60,
}, {
el: {
type: "bi.button",
@ -73,10 +89,10 @@ Demo.Editor = BI.inherit(BI.Widget, {
editor2.setEnable(false);
editor3.setEnable(false);
},
height: 30
height: 30,
},
left: 100,
bottom: 60
bottom: 60,
}, {
el: {
type: "bi.button",
@ -86,12 +102,12 @@ Demo.Editor = BI.inherit(BI.Widget, {
editor2.setEnable(true);
editor3.setEnable(true);
},
height: 30
height: 30,
},
left: 200,
bottom: 60
}]
bottom: 60,
}],
});
}
},
});
BI.shortcut("demo.editor", Demo.Editor);
BI.shortcut("demo.editor", Demo.Editor);

4
dist/2.0/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

17798
dist/2.0/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/2.0/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/2.0/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.css vendored

File diff suppressed because one or more lines are too long

4
dist/2.0/fineui_without_normalize.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/core.css vendored

File diff suppressed because one or more lines are too long

17790
dist/core.js vendored

File diff suppressed because it is too large Load Diff

2
dist/core.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/demo.css vendored

File diff suppressed because one or more lines are too long

18203
dist/demo.js vendored

File diff suppressed because it is too large Load Diff

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.ie.min.js.map vendored

File diff suppressed because one or more lines are too long

17794
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

4
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/fineui.min.js.map vendored

File diff suppressed because one or more lines are too long

122
dist/fineui_without_jquery_polyfill.js vendored

@ -1,4 +1,4 @@
/*! time: 2020-12-4 10:11:16 */
/*! time: 2020-12-9 14:00:24 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,7 +82,7 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1265);
/******/ return __webpack_require__(__webpack_require__.s = 1264);
/******/ })
/************************************************************************/
/******/ ([
@ -8670,7 +8670,7 @@ _.extend(BI, {
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
if (opt && opt.immediate) {
if (BI.initialized) {
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
}
@ -8688,17 +8688,29 @@ _.extend(BI, {
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
for (var i = 0; i < queue.length; i++) {
if (constantInjection[type]) {
constantInjection[type] = queue[i](constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
queue[i](providers[type]);
continue;
}
BI.Plugin.configWidget(type, queue[i]);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({fn: configFn, args: opt});
};
BI.Configs = BI.Configs || {
getConfigs: function () {
return configFunctions;
},
getConfig: function (type) {
return configFunctions[type];
},
configFunctions[type].push(configFn);
};
var actions = {};
@ -8755,16 +8767,7 @@ _.extend(BI, {
BI.Constants = BI.Constants || {
getConstant: function (type) {
var instance = constantInjection[type];
BI.each(configFunctions[type], function (i, cf) {
var res = cf.fn(instance);
if (res) {
instance = res;
}
});
constantInjection[type] = instance;
configFunctions[type] && (configFunctions[type] = null);
return instance;
return constantInjection[type];
}
};
@ -8853,17 +8856,9 @@ _.extend(BI, {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
var instance = providers[type];
BI.each(configFunctions[type], function (i, cf) {
if (providerInstance[type]) {
delete providerInstance[type];
}
cf.fn(instance);
});
if (!providerInstance[type]) {
providerInstance[type] = new (providers[type].$get())(config);
}
configFunctions[type] && (configFunctions[type] = null);
return providerInstance[type];
}
};
@ -10302,17 +10297,6 @@ BI.Req = {
return widget;
};
function configWidget (type) {
var configFunctions = BI.Configs.getConfig(type);
if (configFunctions) {
BI.each(configFunctions, function (i, cf) {
BI.Plugin.configWidget(type, cf.fn, cf.args);
});
var configs = BI.Configs.getConfigs();
configs[type] && (configs[type] = null);
}
}
BI.createWidget = BI.createWidget || function (item, options, context, lazy) {
// 先把准备环境准备好
BI.init();
@ -10334,7 +10318,6 @@ BI.Req = {
}
if (item.type || options.type) {
el = BI.extend({}, options, item);
configWidget(el.type);
w = BI.Plugin.getWidget(el.type, el);
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
@ -10346,7 +10329,6 @@ BI.Req = {
}
if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
configWidget(el.type);
w = BI.Plugin.getWidget(el.type, el);
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
@ -25820,9 +25802,11 @@ BI.Editor = BI.inherit(BI.Single, {
_init: function () {
BI.Editor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
// 密码输入框设置autocomplete="new-password"的情况下Firefox和chrome不会自动填充密码
var autocomplete = o.autocomplete ? " autocomplete=" + o.autocomplete : "";
this.editor = this.addWidget(BI.createWidget({
type: "bi.input",
element: "<input type='" + o.inputType + "'/>",
element: "<input type='" + o.inputType + "'" + autocomplete + " />",
root: true,
value: o.value,
watermark: o.watermark,
@ -32795,7 +32779,7 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
tipType: o.tipType,
textAlign: o.textAlign,
height: o.height,
hgap: o.hgap
hgap: o.hgap + 2
});
BI.createWidget({
type: "bi.absolute",
@ -33077,7 +33061,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
tipType: o.tipType,
textAlign: o.textAlign,
height: o.height,
hgap: o.hgap,
hgap: o.hgap + 2,
handler: function () {
self._showInput();
self.editor.focus();
@ -33357,7 +33341,7 @@ BI.StateEditor = BI.inherit(BI.Widget, {
textAlign: "left",
height: o.height,
text: o.text,
hgap: o.hgap,
hgap: o.hgap + 2,
handler: function () {
self._showInput();
self.editor.focus();
@ -33673,7 +33657,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
textAlign: "left",
text: o.text,
height: o.height,
hgap: o.hgap,
hgap: o.hgap + 2,
handler: function () {
self._showInput();
self.editor.focus();
@ -36840,7 +36824,7 @@ BI.shortcut("bi.select_icon_text_trigger", BI.SelectIconTextTrigger);
*/
BI.TextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
hgap: 6
},
_defaultConfig: function () {
@ -37065,7 +37049,7 @@ BI.shortcut("bi.small_select_text_trigger", BI.SmallSelectTextTrigger);
*/
BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
hgap: 6
},
_defaultConfig: function () {
@ -54340,9 +54324,10 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
function getChildrenNode (ob) {
var text = "";
var index = 0, size = BI.size(ob);
BI.each(ob, function (name, children) {
var names = BI.Func.getSortedResult(BI.keys(ob));
BI.each(names, function (idx, name) {
index++;
var childNodes = getChildrenNode(children);
var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") {
count++;
@ -67021,8 +67006,7 @@ exports.Model = Model;
/* 739 */,
/* 740 */,
/* 741 */,
/* 742 */,
/* 743 */
/* 742 */
/***/ (function(module, exports) {
;(function () {
@ -67185,17 +67169,17 @@ exports.Model = Model;
/***/ }),
/* 743 */,
/* 744 */,
/* 745 */,
/* 746 */,
/* 747 */
/* 746 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Fix"] = __webpack_require__(748);
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["Fix"] = __webpack_require__(747);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(13)))
/***/ }),
/* 748 */
/* 747 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(setImmediate) {function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@ -68675,8 +68659,8 @@ exports.Model = Model;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(52).setImmediate))
/***/ }),
/* 749 */,
/* 750 */
/* 748 */,
/* 749 */
/***/ (function(module, exports) {
;(function () {
@ -68972,6 +68956,7 @@ exports.Model = Model;
/***/ }),
/* 750 */,
/* 751 */,
/* 752 */,
/* 753 */,
@ -69188,13 +69173,13 @@ exports.Model = Model;
/* 964 */,
/* 965 */,
/* 966 */,
/* 967 */,
/* 968 */
/* 967 */
/***/ (function(module, exports) {
/***/ }),
/* 968 */,
/* 969 */,
/* 970 */,
/* 971 */,
@ -69490,8 +69475,7 @@ exports.Model = Model;
/* 1261 */,
/* 1262 */,
/* 1263 */,
/* 1264 */,
/* 1265 */
/* 1264 */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(101);
@ -69595,7 +69579,7 @@ __webpack_require__(371);
__webpack_require__(131);
__webpack_require__(132);
__webpack_require__(133);
__webpack_require__(747);
__webpack_require__(746);
__webpack_require__(372);
__webpack_require__(373);
__webpack_require__(374);
@ -69971,9 +69955,9 @@ __webpack_require__(685);
__webpack_require__(686);
__webpack_require__(687);
__webpack_require__(688);
__webpack_require__(750);
__webpack_require__(743);
__webpack_require__(968);
__webpack_require__(749);
__webpack_require__(742);
__webpack_require__(967);
module.exports = __webpack_require__(689);

2
dist/fineui_without_jquery_polyfill.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/font.css vendored

File diff suppressed because one or more lines are too long

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

3
dist/font/iconfont.svg vendored

@ -20,6 +20,9 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="chaolianjie" unicode="&#59448;" d="M837.184 420.8a224 224 0 0 1-307.84 325.248l-8.96-8.448-135.68-135.744a32 32 0 0 1 40.768-48.96l4.48 3.712 135.68 135.744a160 160 0 0 0 233.536-218.624l-7.232-7.68-135.744-135.68a32 32 0 0 1 40.832-49.024l4.48 3.712 135.68 135.744zM610.944 194.56a32 32 0 0 1-40.832 48.96l-4.48-3.712-135.68-135.744A160 160 0 0 0 196.48 322.56l7.168 7.68 135.744 135.744a32 32 0 0 1-40.832 48.96l-4.416-3.648-135.744-135.808a224 224 0 0 1 307.84-325.248l8.96 8.512 135.68 135.68z m22.592 294.144a32 32 0 1 1-45.248 45.248L362.048 307.712a32 32 0 1 1 45.248-45.248l226.24 226.24z" horiz-adv-x="1024" />
<glyph glyph-name="wenjianshujuji" unicode="&#59447;" d="M640.128 832L896 575.872V-32a32 32 0 0 0-32-32h-704a32 32 0 0 0-32 32v832a32 32 0 0 0 32 32h480.128zM576 768H192v-768h640V512h-192a64 64 0 0 0-64 64V768z m196.672-359.68a32 32 0 0 0 3.136-40.832l-3.776-4.416-210.752-204.8a32 32 0 0 0-40.512-3.392l-4.416 3.712-106.24 106.176-114.432-106.944a32 32 0 0 0-40.896-2.304l-4.288 3.84a32 32 0 0 0-2.304 40.96l3.84 4.288 137.024 128a32 32 0 0 0 39.616 3.2l4.864-3.968 105.728-105.728 188.16 182.848a32 32 0 0 0 45.248-0.64zM640 741.568V576h165.376L640 741.568z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 365 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
dist/resource.css vendored

File diff suppressed because one or more lines are too long

137
dist/utils.js vendored

@ -1,4 +1,4 @@
/*! time: 2020-12-4 10:11:16 */
/*! time: 2020-12-9 14:00:24 */
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
@ -82,7 +82,7 @@
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 1090);
/******/ return __webpack_require__(__webpack_require__.s = 1089);
/******/ })
/************************************************************************/
/******/ ({
@ -4238,6 +4238,45 @@ if (!_global.BI) {
});
}());
/***/ }),
/***/ 1089:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(101);
__webpack_require__(102);
__webpack_require__(130);
__webpack_require__(123);
__webpack_require__(126);
__webpack_require__(127);
__webpack_require__(124);
__webpack_require__(125);
__webpack_require__(105);
__webpack_require__(107);
__webpack_require__(122);
__webpack_require__(129);
__webpack_require__(128);
__webpack_require__(108);
__webpack_require__(109);
__webpack_require__(110);
__webpack_require__(111);
__webpack_require__(112);
__webpack_require__(113);
__webpack_require__(114);
__webpack_require__(115);
__webpack_require__(116);
__webpack_require__(117);
__webpack_require__(118);
__webpack_require__(119);
__webpack_require__(120);
__webpack_require__(121);
__webpack_require__(950);
__webpack_require__(1090);
__webpack_require__(131);
__webpack_require__(132);
module.exports = __webpack_require__(133);
/***/ }),
/***/ 109:
@ -4310,45 +4349,6 @@ if (!_global.BI) {
/***/ }),
/***/ 1090:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(101);
__webpack_require__(102);
__webpack_require__(130);
__webpack_require__(123);
__webpack_require__(126);
__webpack_require__(127);
__webpack_require__(124);
__webpack_require__(125);
__webpack_require__(105);
__webpack_require__(107);
__webpack_require__(122);
__webpack_require__(129);
__webpack_require__(128);
__webpack_require__(108);
__webpack_require__(109);
__webpack_require__(110);
__webpack_require__(111);
__webpack_require__(112);
__webpack_require__(113);
__webpack_require__(114);
__webpack_require__(115);
__webpack_require__(116);
__webpack_require__(117);
__webpack_require__(118);
__webpack_require__(119);
__webpack_require__(120);
__webpack_require__(121);
__webpack_require__(951);
__webpack_require__(1091);
__webpack_require__(131);
__webpack_require__(132);
module.exports = __webpack_require__(133);
/***/ }),
/***/ 1091:
/***/ (function(module, exports) {
/**
@ -8403,7 +8403,7 @@ _.extend(BI, {
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
if (opt && opt.immediate) {
if (BI.initialized) {
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
}
@ -8421,17 +8421,29 @@ _.extend(BI, {
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
for (var i = 0; i < queue.length; i++) {
if (constantInjection[type]) {
constantInjection[type] = queue[i](constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
queue[i](providers[type]);
continue;
}
BI.Plugin.configWidget(type, queue[i]);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({fn: configFn, args: opt});
};
BI.Configs = BI.Configs || {
getConfigs: function () {
return configFunctions;
},
getConfig: function (type) {
return configFunctions[type];
},
configFunctions[type].push(configFn);
};
var actions = {};
@ -8488,16 +8500,7 @@ _.extend(BI, {
BI.Constants = BI.Constants || {
getConstant: function (type) {
var instance = constantInjection[type];
BI.each(configFunctions[type], function (i, cf) {
var res = cf.fn(instance);
if (res) {
instance = res;
}
});
constantInjection[type] = instance;
configFunctions[type] && (configFunctions[type] = null);
return instance;
return constantInjection[type];
}
};
@ -8586,17 +8589,9 @@ _.extend(BI, {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
var instance = providers[type];
BI.each(configFunctions[type], function (i, cf) {
if (providerInstance[type]) {
delete providerInstance[type];
}
cf.fn(instance);
});
if (!providerInstance[type]) {
providerInstance[type] = new (providers[type].$get())(config);
}
configFunctions[type] && (configFunctions[type] = null);
return providerInstance[type];
}
};
@ -9177,7 +9172,7 @@ process.umask = function () {
/***/ }),
/***/ 951:
/***/ 950:
/***/ (function(module, exports) {
BI.i18n = {

2
dist/utils.js.map vendored

File diff suppressed because one or more lines are too long

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/utils.min.js.map vendored

File diff suppressed because one or more lines are too long

2
package.json

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

4
src/base/single/editor/editor.js

@ -29,9 +29,11 @@ BI.Editor = BI.inherit(BI.Single, {
_init: function () {
BI.Editor.superclass._init.apply(this, arguments);
var self = this, o = this.options;
// 密码输入框设置autocomplete="new-password"的情况下Firefox和chrome不会自动填充密码
var autocomplete = o.autocomplete ? " autocomplete=" + o.autocomplete : "";
this.editor = this.addWidget(BI.createWidget({
type: "bi.input",
element: "<input type='" + o.inputType + "'/>",
element: "<input type='" + o.inputType + "'" + autocomplete + " />",
root: true,
value: o.value,
watermark: o.watermark,

2
src/case/editor/editor.shelter.js

@ -52,7 +52,7 @@ BI.ShelterEditor = BI.inherit(BI.Widget, {
tipType: o.tipType,
textAlign: o.textAlign,
height: o.height,
hgap: o.hgap
hgap: o.hgap + 2
});
BI.createWidget({
type: "bi.absolute",

2
src/case/editor/editor.sign.js

@ -52,7 +52,7 @@ BI.SignEditor = BI.inherit(BI.Widget, {
tipType: o.tipType,
textAlign: o.textAlign,
height: o.height,
hgap: o.hgap,
hgap: o.hgap + 2,
handler: function () {
self._showInput();
self.editor.focus();

2
src/case/editor/editor.state.js

@ -51,7 +51,7 @@ BI.StateEditor = BI.inherit(BI.Widget, {
textAlign: "left",
height: o.height,
text: o.text,
hgap: o.hgap,
hgap: o.hgap + 2,
handler: function () {
self._showInput();
self.editor.focus();

2
src/case/editor/editor.state.simple.js

@ -51,7 +51,7 @@ BI.SimpleStateEditor = BI.inherit(BI.Widget, {
textAlign: "left",
text: o.text,
height: o.height,
hgap: o.hgap,
hgap: o.hgap + 2,
handler: function () {
self._showInput();
self.editor.focus();

2
src/case/trigger/trigger.text.js

@ -7,7 +7,7 @@
*/
BI.TextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
hgap: 6
},
_defaultConfig: function () {

2
src/case/trigger/trigger.text.small.js

@ -6,7 +6,7 @@
*/
BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4
hgap: 6
},
_defaultConfig: function () {

53
src/core/inject.js

@ -49,7 +49,7 @@
var configFunctions = {};
BI.config = BI.config || function (type, configFn, opt) {
if (opt && opt.immediate) {
if (BI.initialized) {
if (constantInjection[type]) {
return (constantInjection[type] = configFn(constantInjection[type]));
}
@ -67,17 +67,29 @@
}
if (!configFunctions[type]) {
configFunctions[type] = [];
BI.prepares.push(function () {
var queue = configFunctions[type];
for (var i = 0; i < queue.length; i++) {
if (constantInjection[type]) {
constantInjection[type] = queue[i](constantInjection[type]);
continue;
}
if (providerInjection[type]) {
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
if (providerInstance[type]) {
delete providerInstance[type];
}
queue[i](providers[type]);
continue;
}
BI.Plugin.configWidget(type, queue[i]);
}
configFunctions[type] = null;
});
}
configFunctions[type].push({fn: configFn, args: opt});
};
BI.Configs = BI.Configs || {
getConfigs: function () {
return configFunctions;
},
getConfig: function (type) {
return configFunctions[type];
},
configFunctions[type].push(configFn);
};
var actions = {};
@ -134,16 +146,7 @@
BI.Constants = BI.Constants || {
getConstant: function (type) {
var instance = constantInjection[type];
BI.each(configFunctions[type], function (i, cf) {
var res = cf.fn(instance);
if (res) {
instance = res;
}
});
constantInjection[type] = instance;
configFunctions[type] && (configFunctions[type] = null);
return instance;
return constantInjection[type];
}
};
@ -232,17 +235,9 @@
if (!providers[type]) {
providers[type] = new providerInjection[type]();
}
var instance = providers[type];
BI.each(configFunctions[type], function (i, cf) {
if (providerInstance[type]) {
delete providerInstance[type];
}
cf.fn(instance);
});
if (!providerInstance[type]) {
providerInstance[type] = new (providers[type].$get())(config);
}
configFunctions[type] && (configFunctions[type] = null);
return providerInstance[type];
}
};

17433
src/core/platform/web/jquery/_jquery.js vendored

File diff suppressed because it is too large Load Diff

13
src/core/shortcut.js

@ -32,17 +32,6 @@
return widget;
};
function configWidget (type) {
var configFunctions = BI.Configs.getConfig(type);
if (configFunctions) {
BI.each(configFunctions, function (i, cf) {
BI.Plugin.configWidget(type, cf.fn, cf.args);
});
var configs = BI.Configs.getConfigs();
configs[type] && (configs[type] = null);
}
}
BI.createWidget = BI.createWidget || function (item, options, context, lazy) {
// 先把准备环境准备好
BI.init();
@ -64,7 +53,6 @@
}
if (item.type || options.type) {
el = BI.extend({}, options, item);
configWidget(el.type);
w = BI.Plugin.getWidget(el.type, el);
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
@ -76,7 +64,6 @@
}
if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
configWidget(el.type);
w = BI.Plugin.getWidget(el.type, el);
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,

1
src/less/core/utils/common.less

@ -427,6 +427,7 @@ textarea {
.bi-water-mark {
color: @font-color-tips;
cursor: text;
.user-select-disable();
& .bi-input {
color: @font-color-tips;
}

5
src/widget/multitree/trigger/searcher.multi.tree.js

@ -150,9 +150,10 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, {
function getChildrenNode (ob) {
var text = "";
var index = 0, size = BI.size(ob);
BI.each(ob, function (name, children) {
var names = BI.Func.getSortedResult(BI.keys(ob));
BI.each(names, function (idx, name) {
index++;
var childNodes = getChildrenNode(children);
var childNodes = getChildrenNode(ob[name]);
text += (o.valueFormatter(name + "") || name) + (childNodes === "" ? "" : (":" + childNodes)) + (index === size ? "" : ",");
if (childNodes === "") {
count++;

Loading…
Cancel
Save