Browse Source

Pull request #3286: KERNEL-13947 refactor: base的es6化demo

Merge in VISUAL/fineui from ~ZHENFEI.LI/fineui:es6 to es6

* commit '8c8fd18c6cefe604fc6d780eaa46cec1e91f0dc0':
  KERNEL-13947 refactor: base的es6化demo
es6
Zhenfei.Li-李振飞 2 years ago
parent
commit
fc1f259985
  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
* @abstract
*/
import { shortcut } from "../core/decorator";
import { Widget, shortcut } from "../core";
@shortcut()
export class Pane extends BI.Widget {
export default class Pane extends Widget {
static xtype = "bi.pane";
static EVENT_LOADED = "EVENT_LOADED";
static EVENT_LOADING = "EVENT_LOADING";
props = {
_baseCls: "bi-pane",
tipText: BI.i18nText("BI-No_Selected_Item"),
loadingText: "",
loadingSize: "small",
overlap: true,
onLoaded: BI.emptyFn,
_defaultConfig() {
return BI.extend(super._defaultConfig(), {
_baseCls: "bi-pane",
tipText: BI.i18nText("BI-No_Selected_Item"),
loadingText: "",
loadingSize: "small",
overlap: true,
onLoaded: BI.emptyFn,
});
}
_assertTip() {
@ -129,5 +131,3 @@ export class Pane extends BI.Widget {
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 Widget from "./4.widget";
import Action from "./action/action";
@ -35,6 +36,7 @@ BI.extend(BI, {
});
export {
shortcut,
OB,
Widget,
Action,

Loading…
Cancel
Save