Browse Source

KERNEL-14316 fix: 过一遍 Demo,把控制台报错,全部解决掉

es6
Treecat 2 years ago
parent
commit
4a5ffb6398
  1. 1
      packages/demo/src/demo/widget/multiselect/demo.multi_select_combo.js
  2. 4
      packages/demo/src/demo/widget/multiselect/demo.multi_select_list.js
  3. 6
      packages/demo/src/demo/widget/singleselct/demo.single_select_combo.js
  4. 3
      packages/fineui/package.json
  5. 7
      packages/fineui/src/base/combination/bubble.js
  6. 3
      packages/fineui/src/case/ztree/parttree.js
  7. 3
      packages/fineui/src/core/controller/controller.bubbles.js
  8. 3
      packages/fineui/src/core/controller/controller.resizer.js
  9. 9
      packages/fineui/src/widget/multiselect/loader.js

1
packages/demo/src/demo/widget/multiselect/demo.multi_select_combo.js

@ -17,6 +17,7 @@ import {
@shortcut()
export class MultiSelectComboDemo extends Widget {
static xtype = "demo.multi_select_combo";
static EVENT_CONFIRM = "EVENT_CONFIRM";
props = { baseCls: "demo-multi-select-combo" };

4
packages/demo/src/demo/widget/multiselect/demo.multi_select_list.js

@ -76,8 +76,8 @@ export class MultiSelectListDemo extends Widget {
});
if (options.selectedValues) {
// 过滤
const filter = makeObject(options.selectedValues, true);
items = filter(items, (i, ob) => !filter[ob.value]);
const filterItems = makeObject(options.selectedValues, true);
items = filter(items, (i, ob) => !filterItems[ob.value]);
}
if (options.type == MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({

6
packages/demo/src/demo/widget/singleselct/demo.single_select_combo.js

@ -1,6 +1,6 @@
import { CONSTANTS } from "@/config/constant";
import { SingleSelectCombo, AbsoluteLayout, Button, shortcut, Widget, Func, createWidget, bind, each, makeObject } from "@fui/core"
import { SingleSelectCombo, AbsoluteLayout, Button, shortcut, Widget, Func, createWidget, bind, each, makeObject, filter, delay } from "@fui/core"
@shortcut()
@ -56,8 +56,8 @@ export class SingleSelectComboDemo extends Widget {
});
if (options.selectedValues) {
// 过滤
const filter = makeObject(options.selectedValues, true);
items = filter(items, (i, ob) => !filter[ob.value]);
const filterItems = makeObject(options.selectedValues, true);
items = filter(items, (i, ob) => !filterItems[ob.value]);
}
if (options.type == SingleSelectCombo.REQ_GET_ALL_DATA) {
callback({

3
packages/fineui/package.json

@ -7,8 +7,9 @@
"types": "dist/type/index.d.ts",
"sideEffects": [
"dist/es/core/*.js",
"dist/es/polyfill/**/*.js",
"dist/es/core/element/**/*.js",
"dist/es/core/platform/**/*.js",
"dist/es/polyfill/**/*.js",
"dist/es/case/ztree/jquery.ztree.core-3.5.js",
"dist/es/case/ztree/jquery.ztree.excheck-3.5.js"
],

7
packages/fineui/src/base/combination/bubble.js

@ -19,8 +19,9 @@ import {
emptyFn,
LogicFactory,
EVENT_RESPONSE_TIME,
EVENT_BLUR
EVENT_BLUR,
} from "@/core";
import { createPopper } from "@popperjs/core";
@shortcut()
export class Bubble extends Widget {
@ -427,7 +428,7 @@ export class Bubble extends Widget {
options: {
offset: () => [adjustXOffset, (showArrow ? 12 : 0) + (adjustYOffset + adjustLength)],
},
}
},
];
if (this.options.showArrow) {
modifiers.push({
@ -438,7 +439,7 @@ export class Bubble extends Widget {
},
});
}
this.popper = BI.Popper.createPopper(this.combo.element[0], this.popupView.element[0], {
this.popper = createPopper(this.combo.element[0], this.popupView.element[0], {
placement,
strategy: "fixed",
modifiers,

3
packages/fineui/src/case/ztree/parttree.js

@ -65,7 +65,8 @@ export class PartTree extends Asynctree {
}),
function (res) {
self.options.paras.selectedValues = res;
this.seMethos(...args);
// 看起来应该是 self
self.seMethos(...args);
}
);
} else {

3
packages/fineui/src/core/controller/controller.bubbles.js

@ -7,6 +7,7 @@
import { Controller } from "./0.controller";
import { isNotNull, each } from "../2.base";
import { createWidget } from "../5.inject";
import { createPopper } from "@popperjs/core";
export class BubblesController extends Controller {
init() {
@ -57,7 +58,7 @@ export class BubblesController extends Controller {
if (this.storePoppers[name]) {
this.storePoppers[name].destroy();
}
this.storePoppers[name] = BI.Popper.createPopper(context.element[0], bubble.element[0], {
this.storePoppers[name] = createPopper(context.element[0], bubble.element[0], {
placement: ({
left: "top-start",
center: "top",

3
packages/fineui/src/core/controller/controller.resizer.js

@ -7,6 +7,7 @@ import { Controller } from "./0.controller";
import { isNull, each, debounce, isNotNull, isFunction } from "../2.base";
import { Widget } from "../4.widget";
import { _global } from "../0.foundation";
import { Layout } from "../wrapper/layout";
import $ from "jquery";
export class ResizeController extends Controller {
@ -32,7 +33,7 @@ export class ResizeController extends Controller {
return;
}
if (resizer instanceof BI.Layout) {
if (resizer instanceof Layout) {
resizer.resize();
return;

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

@ -16,7 +16,8 @@ import {
isFunction,
makeObject,
isArray,
each
each,
Element
} from "@/core";
@shortcut()
@ -117,7 +118,7 @@ export class MultiSelectInnerLoader extends Widget {
});
const renderEngine = Widget._renderEngine;
Widget.registerRenderEngine(BI.Element.renderEngine);
Widget.registerRenderEngine(Element.renderEngine);
this.cachGroup = createWidget(o.el, {
type: ButtonGroup.xtype,
root: true,
@ -192,7 +193,7 @@ export class MultiSelectInnerLoader extends Widget {
}
}
const renderEngine = Widget._renderEngine;
Widget.registerRenderEngine(BI.Element.renderEngine);
Widget.registerRenderEngine(Element.renderEngine);
this.cachGroup.addItems(...arguments);
Widget.registerRenderEngine(renderEngine);
this.button_group.addItems(...arguments);
@ -238,7 +239,7 @@ export class MultiSelectInnerLoader extends Widget {
this.cachItems = items.slice(firstItemsCount);
}
const renderEngine = Widget._renderEngine;
Widget.registerRenderEngine(BI.Element.renderEngine);
Widget.registerRenderEngine(Element.renderEngine);
this.cachGroup.populate.call(this.cachGroup, items, keyword);
Widget.registerRenderEngine(renderEngine);
this.button_group.populate.call(this.button_group, items.slice(0, firstItemsCount), keyword);

Loading…
Cancel
Save