Browse Source

KERNEL-14316 chore: 合并代码提交

es6
Treecat 1 year ago
parent
commit
80d2e4ed31
  1. 2
      packages/fineui/src/base/combination/group.combo.js
  2. 2
      packages/fineui/src/base/combination/loader.js
  3. 2
      packages/fineui/src/base/combination/searcher.js
  4. 4
      packages/fineui/src/base/pager/pager.js
  5. 6
      packages/fineui/src/base/single/input/input.js
  6. 2
      packages/fineui/src/case/layer/pane.list.js
  7. 2
      packages/fineui/src/core/2.base.js
  8. 6
      packages/fineui/src/core/4.widget.js
  9. 34
      packages/fineui/src/core/5.inject.js
  10. 4
      packages/fineui/src/core/6.plugin.js
  11. 2
      packages/fineui/src/core/controller/controller.layer.js
  12. 2
      packages/fineui/src/core/listener/listener.show.js
  13. 2
      packages/fineui/src/core/utils/dom.js
  14. 4
      packages/fineui/src/core/wrapper/layout/adapt/absolute.leftrightvertical.js
  15. 6
      packages/fineui/src/core/wrapper/layout/adapt/adapt.leftrightvertical.js
  16. 2
      packages/fineui/src/core/wrapper/layout/fill/float.fill.horizontal.js
  17. 2
      packages/fineui/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js
  18. 4
      packages/fineui/src/core/wrapper/layout/float/float.absolute.leftrightvertical.js
  19. 2
      packages/fineui/src/core/wrapper/layout/layout.border.js
  20. 6
      packages/fineui/src/core/wrapper/layout/layout.card.js
  21. 4
      packages/fineui/src/core/wrapper/layout/layout.division.js
  22. 2
      packages/fineui/src/core/wrapper/layout/layout.grid.js
  23. 4
      packages/fineui/src/core/wrapper/layout/layout.tape.js
  24. 4
      packages/fineui/src/core/wrapper/layout/layout.window.js
  25. 2
      packages/fineui/src/core/wrapper/layout/middle/middle.center.js
  26. 2
      packages/fineui/src/core/wrapper/layout/middle/middle.float.center.js
  27. 2
      packages/fineui/src/core/wrapper/layout/middle/middle.horizontal.js
  28. 2
      packages/fineui/src/core/wrapper/layout/middle/middle.vertical.js
  29. 2
      packages/fineui/src/widget/multiselect/loader.js
  30. 2
      packages/fineui/webpack/webpack.prod.js

2
packages/fineui/src/base/combination/group.combo.js

@ -74,7 +74,7 @@ export class ComboGroup extends Widget {
} = this.options; } = this.options;
const children = items; const children = items;
if (isEmpty(children)) { if (isEmpty(children)) {
throw new Error("ComboGroup构造错误"); throw new Error("ComboGroup create items error");
} }
each(children, (i, ch) => { each(children, (i, ch) => {
const son = formatEL(ch).el.children; const son = formatEL(ch).el.children;

2
packages/fineui/src/base/combination/loader.js

@ -255,7 +255,7 @@ export class Loader extends Widget {
{ times: 1 }, { times: 1 },
(...args) => { (...args) => {
if (args.length === 0) { if (args.length === 0) {
throw new Error("参数不能为空"); throw new Error("Parameter cannot be empty");
} }
this.populate(...args); this.populate(...args);
o.onLoaded(); o.onLoaded();

2
packages/fineui/src/base/combination/searcher.js

@ -278,7 +278,7 @@ export class Searcher extends Widget {
this.editor.blur(); this.editor.blur();
} catch (e) { } catch (e) {
if (!this.editor.blur) { if (!this.editor.blur) {
throw new Error("editor没有实现blur方法"); throw new Error("The editor does not implement the blur method");
} }
} finally { } finally {
this.editor.setValue(""); this.editor.setValue("");

4
packages/fineui/src/base/pager/pager.js

@ -54,8 +54,8 @@ export class Pager extends Widget {
jump: emptyFn, // 分页的回调函数 jump: emptyFn, // 分页的回调函数
first: false, // 是否显示首页 first: false, // 是否显示首页
last: false, // 是否显示尾页 last: false, // 是否显示尾页
prev: "上一页", prev: BI.i18nText("BI-Previous_Page"),
next: "下一页", next: BI.i18nText("BI-Next_Page"),
firstPage: 1, firstPage: 1,
lastPage: () => lastPage: () =>

6
packages/fineui/src/base/single/input/input.js

@ -289,7 +289,7 @@ export class Input extends Single {
focus() { focus() {
if (!this.element.is(":visible")) { if (!this.element.is(":visible")) {
throw new Error("input输入框在不可见下不能focus"); throw new Error("input cannot be focus when it's invisible");
} }
if (!this._isEditing === true) { if (!this._isEditing === true) {
this.element.focus(); this.element.focus();
@ -299,7 +299,7 @@ export class Input extends Single {
blur() { blur() {
if (!this.element.is(":visible")) { if (!this.element.is(":visible")) {
throw new Error("input输入框在不可见下不能blur"); throw new Error("input cannot be blur when it's invisible");
} }
if (this._isEditing === true) { if (this._isEditing === true) {
this.element.blur(); this.element.blur();
@ -309,7 +309,7 @@ export class Input extends Single {
selectAll() { selectAll() {
if (!this.element.is(":visible")) { if (!this.element.is(":visible")) {
throw new Error("input输入框在不可见下不能select"); throw new Error("input cannot be select when it's invisible");
} }
this.element.select(); this.element.select();
this._isEditing = true; this._isEditing = true;

2
packages/fineui/src/case/layer/pane.list.js

@ -165,7 +165,7 @@ export class ListPane extends Pane {
{ times: 1 }, { times: 1 },
(...args) => { (...args) => {
if (args.length === 0) { if (args.length === 0) {
throw new Error("参数不能为空"); throw new Error("Parameter cannot be empty");
} }
this.populate(...args); this.populate(...args);
} }

2
packages/fineui/src/core/2.base.js

@ -93,7 +93,7 @@ export function isWidget(widget) {
export function createWidgets(items, options, context) { export function createWidgets(items, options, context) {
if (!isArray(items)) { if (!isArray(items)) {
throw new Error("items必须是数组", items); throw new Error("items must be array", items);
} }
if (isWidget(options)) { if (isWidget(options)) {
context = options; context = options;

6
packages/fineui/src/core/4.widget.js

@ -158,7 +158,7 @@ export class Widget extends OB {
if (initCallbackCalled === true) { if (initCallbackCalled === true) {
_global.console && _global.console &&
console.error( console.error(
"组件: 请检查beforeInit内部的写法,callback只能执行一次" "widget: please check the beforeInit method. The callback can only be executed once"
); );
return; return;
@ -170,7 +170,7 @@ export class Widget extends OB {
if (renderCallbackCalled === true) { if (renderCallbackCalled === true) {
_global.console && _global.console &&
console.error( console.error(
"组件: 请检查beforeRender内部的写法,callback只能执行一次" "widget: please check the beforeRender method. The callback can only be executed once"
); );
return; return;
@ -698,7 +698,7 @@ export class Widget extends OB {
} }
name = name || widget.getName() || uniqueId("widget"); name = name || widget.getName() || uniqueId("widget");
if (this._children[name]) { if (this._children[name]) {
throw new Error("组件:组件名已存在,不能进行添加"); throw new Error("widget: widget name already exists, cannot be added");
} }
widget._setParent && widget._setParent(this); widget._setParent && widget._setParent(this);
widget.on(Events.DESTROY, function () { widget.on(Events.DESTROY, function () {

34
packages/fineui/src/core/5.inject.js

@ -18,7 +18,7 @@ const moduleInjection = {}, moduleInjectionMap = {
export function module(xtype, cls) { export function module(xtype, cls) {
if (isNotNull(moduleInjection[xtype])) { if (isNotNull(moduleInjection[xtype])) {
_global.console && console.error(`module: [${xtype}] 已经注册过了`); _global.console && console.error(`module: [${xtype}] already registered`);
} else { } else {
if (isFunction(cls)) { if (isFunction(cls)) {
cls = cls(); cls = cls();
@ -48,7 +48,7 @@ export function module(xtype, cls) {
const constantInjection = {}; const constantInjection = {};
export function constant(xtype, cls) { export function constant(xtype, cls) {
if (isNotNull(constantInjection[xtype])) { if (isNotNull(constantInjection[xtype])) {
_global.console && console.error(`constant: [${xtype}]已经注册过了`); _global.console && console.error(`constant: [${xtype}]already registered`);
} else { } else {
constantInjection[xtype] = cls; constantInjection[xtype] = cls;
} }
@ -59,7 +59,7 @@ export function constant(xtype, cls) {
const modelInjection = {}; const modelInjection = {};
export function model(xtype, cls) { export function model(xtype, cls) {
if (isNotNull(modelInjection[xtype])) { if (isNotNull(modelInjection[xtype])) {
_global.console && console.error(`model: [${xtype}] 已经注册过了`); _global.console && console.error(`model: [${xtype}] already registered`);
} else { } else {
modelInjection[xtype] = cls; modelInjection[xtype] = cls;
} }
@ -70,7 +70,7 @@ export function model(xtype, cls) {
const storeInjection = {}; const storeInjection = {};
export function store(xtype, cls) { export function store(xtype, cls) {
if (isNotNull(storeInjection[xtype])) { if (isNotNull(storeInjection[xtype])) {
_global.console && console.error(`store: [${xtype}] 已经注册过了`); _global.console && console.error(`store: [${xtype}] already registered`);
} else { } else {
storeInjection[xtype] = cls; storeInjection[xtype] = cls;
} }
@ -81,7 +81,7 @@ export function store(xtype, cls) {
const serviceInjection = {}; const serviceInjection = {};
export function service(xtype, cls) { export function service(xtype, cls) {
if ((serviceInjection[xtype])) { if ((serviceInjection[xtype])) {
_global.console && console.error(`service: [${xtype}] 已经注册过了`); _global.console && console.error(`service: [${xtype}] already registered`);
} }
serviceInjection[xtype] = cls; serviceInjection[xtype] = cls;
@ -92,7 +92,7 @@ export function service(xtype, cls) {
const providerInjection = {}; const providerInjection = {};
export function provider(xtype, cls) { export function provider(xtype, cls) {
if ((providerInjection[xtype])) { if ((providerInjection[xtype])) {
_global.console && console.error(`provider: [${xtype}] 已经注册过了`); _global.console && console.error(`provider: [${xtype}] already registered`);
} else { } else {
providerInjection[xtype] = cls; providerInjection[xtype] = cls;
} }
@ -145,7 +145,7 @@ const runConfigFunction = (type, configFn) => {
} }
} }
if (findVersion === true) { if (findVersion === true) {
_global.console && console.error(`moduleId: [${module.moduleId}] 接口: [${type}] 接口版本: [${version}] 已过期,版本要求为:`, dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]); _global.console && console.error(`moduleId: [${module.moduleId}] interface: [${type}] version: [${version}] has expired. The version requirement is: `, dependencies[module.moduleId], "=>", moduleInjection[module.moduleId]);
continue; continue;
} }
} }
@ -245,7 +245,7 @@ export function point(type, action, pointFn, after) {
export const Modules = { export const Modules = {
getModule (type) { getModule (type) {
if (!moduleInjection[type]) { if (!moduleInjection[type]) {
_global.console && console.error(`module: [${type}] 未定义`); _global.console && console.error(`module: [${type}] undefined`);
} }
return moduleInjection[type]; return moduleInjection[type];
@ -258,7 +258,7 @@ export const Modules = {
export const Constants = { export const Constants = {
getConstant (type) { getConstant (type) {
if (isNull(constantInjection[type])) { if (isNull(constantInjection[type])) {
_global.console && console.error(`constant: [${type}] 未定义`); _global.console && console.error(`constant: [${type}] undefined`);
} }
runConfigFunction(type); runConfigFunction(type);
@ -307,7 +307,7 @@ function callPoint(inst, types) {
export const Models = { export const Models = {
getModel (type, config) { getModel (type, config) {
if (!modelInjection[type]) { if (!modelInjection[type]) {
_global.console && console.error(`model: [${type}] 未定义`); _global.console && console.error(`model: [${type}] undefined`);
} }
runConfigFunction(type); runConfigFunction(type);
const inst = new modelInjection[type](config); const inst = new modelInjection[type](config);
@ -323,7 +323,7 @@ const stores = {};
export const Stores = { export const Stores = {
getStore (type, config) { getStore (type, config) {
if (!storeInjection[type]) { if (!storeInjection[type]) {
_global.console && console.error(`store: [${type}] 未定义`); _global.console && console.error(`store: [${type}] undefined`);
} }
if (stores[type]) { if (stores[type]) {
return stores[type]; return stores[type];
@ -342,7 +342,7 @@ const services = {};
export const Services = { export const Services = {
getService: (type, config) => { getService: (type, config) => {
if (!serviceInjection[type]) { if (!serviceInjection[type]) {
_global.console && console.error(`service: [${type}] 未定义`); _global.console && console.error(`service: [${type}] undefined`);
} }
if (services[type]) { if (services[type]) {
return services[type]; return services[type];
@ -359,7 +359,7 @@ const providers = {},
export const Providers = { export const Providers = {
getProvider: (type, config) => { getProvider: (type, config) => {
if (!providerInjection[type]) { if (!providerInjection[type]) {
_global.console && console.error(`provider: [${type}] 未定义`); _global.console && console.error(`provider: [${type}] undefined`);
} }
runConfigFunction(type); runConfigFunction(type);
if (!providers[type]) { if (!providers[type]) {
@ -398,7 +398,7 @@ export const Actions = {
const kv = {}; const kv = {};
export function shortcut(xtype, cls) { export function shortcut(xtype, cls) {
if (isNotNull(kv[xtype])) { if (isNotNull(kv[xtype])) {
_global.console && console.error(`组件: [${xtype}] 已经注册过了`); _global.console && console.error(`widget: [${xtype}] already registered`);
} }
if (cls) { if (cls) {
cls.xtype = xtype; cls.xtype = xtype;
@ -413,7 +413,7 @@ const createRealWidget = (config, context, lazy) => {
const Cls = isFunction(config.type) ? config.type : kv[config.type]; const Cls = isFunction(config.type) ? config.type : kv[config.type];
if (!Cls) { if (!Cls) {
throw new Error(`组件: [${config.type}] 未定义`); throw new Error(`widget: [${config.type}] undefined`);
} }
let pushed = false; let pushed = false;
const widget = new Cls(); const widget = new Cls();
@ -495,7 +495,7 @@ export function createWidget(item, options, context, lazy) {
if (isWidget(item.el)) { if (isWidget(item.el)) {
return item.el; return item.el;
} }
throw new Error("组件:无法根据item创建组件", item); throw new Error("widget: Unable to create widget from item ", item);
} }
export function _lazyCreateWidget (item, options, context) { export function _lazyCreateWidget (item, options, context) {
@ -524,5 +524,5 @@ export function getResource(type, config) {
if (providerInjection[type]) { if (providerInjection[type]) {
return Providers.getProvider(type, config); return Providers.getProvider(type, config);
} }
throw new Error(`未知类型: [${type}] 未定义`); throw new Error("unknown type: [" + type + "] undefined");
} }

4
packages/fineui/src/core/6.plugin.js

@ -76,7 +76,7 @@ export const Plugin = {
_WidgetsPlugin[type] = []; _WidgetsPlugin[type] = [];
} }
if (_WidgetsPlugin[type].length > 0) { if (_WidgetsPlugin[type].length > 0) {
console.log("组件已经注册过了!"); console.log("widget already registered!");
} }
_WidgetsPlugin[type].push(fn); _WidgetsPlugin[type].push(fn);
}, },
@ -116,7 +116,7 @@ export const Plugin = {
_ObjectPlugin[type] = []; _ObjectPlugin[type] = [];
} }
if (_ObjectPlugin[type].length > 0) { if (_ObjectPlugin[type].length > 0) {
console.log("对象已经注册过了!"); console.log("object already registered!");
} }
_ObjectPlugin[type].push(fn); _ObjectPlugin[type].push(fn);
}, },

2
packages/fineui/src/core/controller/controller.layer.js

@ -154,7 +154,7 @@ export class LayerController extends Controller {
add(name, layer, layout) { add(name, layer, layout) {
if (this.has(name)) { if (this.has(name)) {
throw new Error("不能创建同名的Layer"); throw new Error("can not create Layers with the same name");
} }
layout.setVisible(false); layout.setVisible(false);
this.layerManager[name] = layer; this.layerManager[name] = layer;

2
packages/fineui/src/core/listener/listener.show.js

@ -30,7 +30,7 @@ export class ShowListener extends OB {
v = v || eventObj.getValue(); v = v || eventObj.getValue();
v = isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v; v = isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v;
if (isNull(v)) { if (isNull(v)) {
throw new Error("不能为null"); throw new Error("canot be null");
} }
const cardName = cardNameCreator(v); const cardName = cardNameCreator(v);
if (!cardLayout.isCardExisted(cardName)) { if (!cardLayout.isCardExisted(cardName)) {

2
packages/fineui/src/core/utils/dom.js

@ -19,7 +19,7 @@ export function patchProps(fromElement, toElement) {
}); });
const fromChildren = fromElement.children(), toChildren = toElement.children(); const fromChildren = fromElement.children(), toChildren = toElement.children();
if (fromChildren.length !== toChildren.length) { if (fromChildren.length !== toChildren.length) {
throw new Error("不匹配"); throw new Error("don't match");
} }
each(fromChildren, (i, child) => { each(fromChildren, (i, child) => {
patchProps($(child), $(toChildren[i])); patchProps($(child), $(toChildren[i]));

4
packages/fineui/src/core/wrapper/layout/adapt/absolute.leftrightvertical.js

@ -111,7 +111,7 @@ export class AbsoluteLeftRightVerticalAdaptLayout extends Layout {
addItem() { addItem() {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {
@ -166,7 +166,7 @@ export class AbsoluteRightVerticalAdaptLayout extends Layout {
addItem () { addItem () {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate (items) { populate (items) {

6
packages/fineui/src/core/wrapper/layout/adapt/adapt.leftrightvertical.js

@ -117,7 +117,7 @@ export class LeftRightVerticalAdaptLayout extends Layout {
addItem() { addItem() {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {
@ -176,7 +176,7 @@ export class LeftVerticalAdaptLayout extends Layout {
addItem() { addItem() {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {
@ -234,7 +234,7 @@ export class RightVerticalAdaptLayout extends Layout {
addItem() { addItem() {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(...args) { populate(...args) {

2
packages/fineui/src/core/wrapper/layout/fill/float.fill.horizontal.js

@ -35,7 +35,7 @@ export class FloatHorizontalFillLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
stroke(items) { stroke(items) {

2
packages/fineui/src/core/wrapper/layout/flex/flex.leftrightvertical.center.js

@ -105,7 +105,7 @@ export class FlexLeftRightVerticalAdaptLayout extends Layout {
addItem() { addItem() {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {

4
packages/fineui/src/core/wrapper/layout/float/float.absolute.leftrightvertical.js

@ -128,7 +128,7 @@ export class FloatAbsoluteLeftRightVerticalAdaptLayout extends Layout {
addItem() { addItem() {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {
@ -198,7 +198,7 @@ export class FloatAbsoluteRightVerticalAdaptLayout extends Layout {
addItem() { addItem() {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {

2
packages/fineui/src/core/wrapper/layout/layout.border.js

@ -31,7 +31,7 @@ export class BorderLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
stroke(regions) { stroke(regions) {

6
packages/fineui/src/core/wrapper/layout/layout.card.js

@ -88,7 +88,7 @@ export class CardLayout extends Layout {
getCardByName(cardName) { getCardByName(cardName) {
if (!this.isCardExisted(cardName)) { if (!this.isCardExisted(cardName)) {
throw new Error("cardName不存在", cardName); throw new Error("cardName not exist", cardName);
} }
return this._children[this._getChildName(cardName)]; return this._children[this._getChildName(cardName)];
@ -104,7 +104,7 @@ export class CardLayout extends Layout {
deleteCardByName(cardName) { deleteCardByName(cardName) {
if (!this.isCardExisted(cardName)) { if (!this.isCardExisted(cardName)) {
throw new Error("cardName不存在", cardName); throw new Error("cardName not exist", cardName);
} }
const child = this._children[this._getChildName(cardName)]; const child = this._children[this._getChildName(cardName)];
@ -114,7 +114,7 @@ export class CardLayout extends Layout {
addCardByName(cardName, cardItem) { addCardByName(cardName, cardItem) {
if (this.isCardExisted(cardName)) { if (this.isCardExisted(cardName)) {
throw new Error("cardName 已存在", cardName); throw new Error("cardName already exist", cardName);
} }
const widget = _lazyCreateWidget(cardItem, this); const widget = _lazyCreateWidget(cardItem, this);
widget.element.css({ widget.element.css({

4
packages/fineui/src/core/wrapper/layout/layout.division.js

@ -34,7 +34,7 @@ export class DivisionLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
stroke(items) { stroke(items) {
@ -88,7 +88,7 @@ export class DivisionLayout extends Layout {
for (let j = 0; j < columns; j++) { for (let j = 0; j < columns; j++) {
let w; let w;
if (!map[i][j]) { if (!map[i][j]) {
throw new Error(`item(${i}${j}) 必须`, map); throw new Error(`item(${i}${j}) must exist`, map);
} }
if (!this.hasWidget(this._getChildName(`${i}_${j}`))) { if (!this.hasWidget(this._getChildName(`${i}_${j}`))) {
w = _lazyCreateWidget(map[i][j]); w = _lazyCreateWidget(map[i][j]);

2
packages/fineui/src/core/wrapper/layout/layout.grid.js

@ -28,7 +28,7 @@ export class GridLayout extends Layout {
addItem() { addItem() {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
stroke(items) { stroke(items) {

4
packages/fineui/src/core/wrapper/layout/layout.tape.js

@ -39,7 +39,7 @@ export class HTapeLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
stroke(items) { stroke(items) {
@ -168,7 +168,7 @@ export class VTapeLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
stroke(items) { stroke(items) {

4
packages/fineui/src/core/wrapper/layout/layout.window.js

@ -41,7 +41,7 @@ export class WindowLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
stroke(items) { stroke(items) {
@ -80,7 +80,7 @@ export class WindowLayout extends Layout {
for (let i = 0; i < o.rows; i++) { for (let i = 0; i < o.rows; i++) {
for (let j = 0; j < o.columns; j++) { for (let j = 0; j < o.columns; j++) {
if (!o.items[i][j]) { if (!o.items[i][j]) {
throw new Error("构造错误", o.items); throw new Error("create items error", o.items);
} }
if (!this.hasWidget(this._getChildName(`${i}_${j}`))) { if (!this.hasWidget(this._getChildName(`${i}_${j}`))) {
const w = _lazyCreateWidget(o.items[i][j]); const w = _lazyCreateWidget(o.items[i][j]);

2
packages/fineui/src/core/wrapper/layout/middle/middle.center.js

@ -71,7 +71,7 @@ export class CenterLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {

2
packages/fineui/src/core/wrapper/layout/middle/middle.float.center.js

@ -71,7 +71,7 @@ export class FloatCenterLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {

2
packages/fineui/src/core/wrapper/layout/middle/middle.horizontal.js

@ -70,7 +70,7 @@ export class HorizontalCenterLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {

2
packages/fineui/src/core/wrapper/layout/middle/middle.vertical.js

@ -70,7 +70,7 @@ export class VerticalCenterLayout extends Layout {
addItem(item) { addItem(item) {
// do nothing // do nothing
throw new Error("不能添加子组件"); throw new Error("Cannot add subwidget");
} }
populate(items) { populate(items) {

2
packages/fineui/src/widget/multiselect/loader.js

@ -207,7 +207,7 @@ export class MultiSelectInnerLoader extends Widget {
{ times: 1 }, { times: 1 },
function (items, keyword) { function (items, keyword) {
if (arguments.length === 0) { if (arguments.length === 0) {
throw new Error("参数不能为空"); throw new Error("object already registered");
} }
self.populate(...arguments); self.populate(...arguments);
o.onLoaded(); o.onLoaded();

2
packages/fineui/webpack/webpack.prod.js

@ -41,7 +41,7 @@ module.exports = merge(common, {
}, },
}), }),
new webpack.BannerPlugin({ new webpack.BannerPlugin({
banner: `time: ${new Date().toLocaleString()}; branch: ${git( banner: `time: ${new Date().toLocaleString("en-US")}; branch: ${git(
"name-rev --name-only HEAD" "name-rev --name-only HEAD"
)} commit: ${git("rev-parse HEAD")}`, )} commit: ${git("rev-parse HEAD")}`,
}), }),

Loading…
Cancel
Save