Browse Source

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

* commit 'fc1f2599856cede93b8df32e35b5a7ed0ef4904d':
  KERNEL-13947 refactor: base的es6化demo
es6
Joker.Wang-王顺 2 years ago
parent
commit
d91cc3713f
  1. 22
      src/base/1.pane.js
  2. 9
      src/base/index.js
  3. 2
      src/core/index.js

22
src/base/1.pane.js

@ -6,21 +6,23 @@
* @extends BI.Widget * @extends BI.Widget
* @abstract * @abstract
*/ */
import { shortcut } from "../core/decorator"; import { Widget, shortcut } from "../core";
@shortcut() @shortcut()
export class Pane extends BI.Widget { export default class Pane extends Widget {
static xtype = "bi.pane"; static xtype = "bi.pane";
static EVENT_LOADED = "EVENT_LOADED"; static EVENT_LOADED = "EVENT_LOADED";
static EVENT_LOADING = "EVENT_LOADING"; static EVENT_LOADING = "EVENT_LOADING";
props = { _defaultConfig() {
_baseCls: "bi-pane", return BI.extend(super._defaultConfig(), {
tipText: BI.i18nText("BI-No_Selected_Item"), _baseCls: "bi-pane",
loadingText: "", tipText: BI.i18nText("BI-No_Selected_Item"),
loadingSize: "small", loadingText: "",
overlap: true, loadingSize: "small",
onLoaded: BI.emptyFn, overlap: true,
onLoaded: BI.emptyFn,
});
} }
_assertTip() { _assertTip() {
@ -129,5 +131,3 @@ export class Pane extends BI.Widget {
this.check(); this.check();
} }
} }
BI.extend(BI, { Pane });

9
src/base/index.js

@ -0,0 +1,9 @@
import Pane from "./1.pane";
BI.extend(BI, {
Pane,
});
export {
Pane,
}

2
src/core/index.js

@ -1,3 +1,4 @@
import { shortcut } from "./decorator";
import OB from "./3.ob"; import OB from "./3.ob";
import Widget from "./4.widget"; import Widget from "./4.widget";
import Action from "./action/action"; import Action from "./action/action";
@ -35,6 +36,7 @@ BI.extend(BI, {
}); });
export { export {
shortcut,
OB, OB,
Widget, Widget,
Action, Action,

Loading…
Cancel
Save