Browse Source

Pull request #3298: KERNEL-14001 refactor: inject的es6化

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

* commit '3e98c47b71f2b1bb53482963134cb3af19055df2':
  KERNEL-14001 refactor: inject的es6化
es6
Zhenfei.Li-李振飞 2 years ago
parent
commit
5a768a5fae
  1. 19
      src/base/1.pane.js
  2. 12
      src/core/3.ob.js
  3. 53
      src/core/4.widget.js
  4. 316
      src/core/5.inject.js
  5. 3
      src/core/decorator.js
  6. 6
      src/core/index.js

19
src/base/1.pane.js

@ -6,7 +6,8 @@
* @extends BI.Widget
* @abstract
*/
import { Widget, shortcut, isNotEmptyString, extend, isNull, isEmpty } from "../core";
import { Widget, shortcut, isNotEmptyString, extend, isNull, isEmpty, createWidget, Providers } from "../core";
import { Layers } from "./0.base";
@shortcut()
export default class Pane extends Widget {
@ -27,7 +28,7 @@ export default class Pane extends Widget {
_assertTip() {
if (!this._tipText) {
BI.createWidget({
createWidget({
type: "bi.absolute_center_adapt",
element: this,
items: [{
@ -45,7 +46,7 @@ export default class Pane extends Widget {
loading() {
const o = this.options;
const loadingAnimation = BI.createWidget(BI.Providers.getProvider("bi.provider.system").getLoading({
const loadingAnimation = createWidget(Providers.getProvider("bi.provider.system").getLoading({
loadingSize: o.loadingSize,
context: this,
}));
@ -53,18 +54,18 @@ export default class Pane extends Widget {
// loading的异步情况下由loaded后对面板的populate的时机决定
this.setTipVisible(false);
if (o.overlap === true) {
if (!BI.Layers.has(this.getName() + "-loading")) {
BI.createWidget({
if (!Layers.has(this.getName() + "-loading")) {
createWidget({
type: "bi.center_adapt",
cls: "loading-container",
items: this._getLoadingTipItems(loadingAnimation),
element: BI.Layers.make(this.getName() + "-loading", this),
element: Layers.make(this.getName() + "-loading", this),
});
}
BI.Layers.show(this.getName() + "-loading");
Layers.show(this.getName() + "-loading");
} else if (isNull(this._loading)) {
loadingAnimation.element.css("zIndex", 1);
BI.createWidget({
createWidget({
type: "bi.center_adapt",
element: this,
cls: "loading-container",
@ -101,7 +102,7 @@ export default class Pane extends Widget {
}
loaded() {
BI.Layers.remove(this.getName() + "-loading");
Layers.remove(this.getName() + "-loading");
this._loading && this._loading.destroy();
this.options.onLoaded();
this.fireEvent(Pane.EVENT_LOADED);

12
src/core/3.ob.js

@ -1,6 +1,6 @@
import { isFunction, isArray, isObject, isArguments, reduce, bind } from "./2.base";
import { isFunction, isArray, isObject, isArguments, reduce, bind, extend } from "./2.base";
function extend() {
function obExtend() {
let target = arguments[0] || {}, length = arguments.length, i = 1, name, copy;
for (; i < length; i++) {
// Only deal with non-null/undefined values
@ -52,11 +52,11 @@ export default class OB {
if (isFunction(this.props)) {
props = this.props(config);
}
const defaultProps = extend(this._defaultConfig(config), props);
const defaultProps = obExtend(this._defaultConfig(config), props);
const modifiedDefaultProps = (config && config.type && OB.configFunctions[config.type + ".props"]) ? reduce(OB.configFunctions[config.type + ".props"], function (value, conf, index) {
return extend(conf, value.fn(defaultProps, config, value.opt));
return obExtend(conf, value.fn(defaultProps, config, value.opt));
}, {}) : null;
this.options = extend(defaultProps, modifiedDefaultProps, config);
this.options = obExtend(defaultProps, modifiedDefaultProps, config);
}
_init() {
@ -216,4 +216,4 @@ export default class OB {
}
}
BI.extend(BI, { OB });
extend(BI, { OB });

53
src/core/4.widget.js

@ -8,6 +8,7 @@
import { isFunction, isArray, each, extend, isPlainObject, isNull, uniqueId, isWidget, isWidthOrHeight, isKey, remove, any, isNotNull } from "./2.base";
import OB from "./3.ob";
import { Providers, _lazyCreateWidget } from "./5.inject";
const cancelAnimationFrame =
_global.cancelAnimationFrame ||
@ -360,7 +361,7 @@ export default class Widget extends OB {
_initElement() {
this.__isMounting = true;
// 当开启worker模式时,可以通过$render来实现另一种效果
const workerMode = BI.Providers.getProvider("bi.provider.system").getWorkerMode();
const workerMode = Providers.getProvider("bi.provider.system").getWorkerMode();
const render = isFunction(this.options.render) ? this.options.render : (workerMode ? (this.$render || this.render) : this.render);
let els = render && render.call(this);
els = this.options.configRender ? this.options.configRender.call(this, els) : els;
@ -372,7 +373,7 @@ export default class Widget extends OB {
if (isArray(els)) {
each(els, (i, el) => {
if (el) {
BI._lazyCreateWidget(el, {
_lazyCreateWidget(el, {
element: this
});
}
@ -840,9 +841,6 @@ export default class Widget extends OB {
}
};
extend(BI, { Widget });
let context = null, current = null;
const contextStack = [], currentStack = [];
@ -875,7 +873,7 @@ function popTarget() {
Widget.current = current = currentStack.pop();
}
BI.useStore = function (_store) {
export function useStore(_store) {
if (current && current.store) {
return current.store;
}
@ -908,9 +906,9 @@ BI.useStore = function (_store) {
};
return current.$storeDelegate = delegate;
}
};
}
BI.useContext = function (inject) {
export function useContext(inject) {
// 通过组件找最近的store
const vm = Widget.findStore(Widget.current || Widget.context);
if (vm) {
@ -934,9 +932,9 @@ BI.useContext = function (inject) {
}
}
return vm;
};
}
BI.watch = function (vm, watch, handler) {
export function watch(vm, watch, handler) {
// 必须要保证组件当前环境存在
if (Widget.current) {
if (vm instanceof BI.Model) {
@ -970,9 +968,9 @@ BI.watch = function (vm, watch, handler) {
Widget.current.$watchDelayCallbacks || (Widget.current.$watchDelayCallbacks = []);
Widget.current.$watchDelayCallbacks.push([watch, handler]);
}
};
}
BI.onBeforeMount = function (beforeMount) {
export function onBeforeMount(beforeMount) {
if (current) {
if (current.__isMounting) {
beforeMount();
@ -985,8 +983,9 @@ BI.onBeforeMount = function (beforeMount) {
}
current.beforeMount.push(beforeMount);
}
};
BI.onMounted = function (mounted) {
}
export function onMounted(mounted) {
if (current) {
if (current._isMounted && !this.__async) {
mounted();
@ -1000,7 +999,8 @@ BI.onMounted = function (mounted) {
current.mounted.push(mounted);
}
};
BI.onBeforeUnmount = function (beforeDestroy) {
export function onBeforeUnmount(beforeDestroy) {
if (current) {
if (!current.beforeDestroy) {
current.beforeDestroy = [];
@ -1009,8 +1009,9 @@ BI.onBeforeUnmount = function (beforeDestroy) {
}
current.beforeDestroy.push(beforeDestroy);
}
};
BI.onUnmounted = function (destroyed) {
}
export function onUnmounted(destroyed) {
if (current) {
if (!current.destroyed) {
current.destroyed = [];
@ -1019,7 +1020,7 @@ BI.onUnmounted = function (destroyed) {
}
current.destroyed.push(destroyed);
}
};
}
Widget.registerRenderEngine = function (engine) {
Widget._renderEngine = engine;
@ -1043,7 +1044,7 @@ Widget.registerRenderEngine({
}
});
BI.mount = function (widget, container, predicate, hydrate) {
export function mount(widget, container, predicate, hydrate) {
if (hydrate === true) {
// 将widget的element元素都挂载好,并建立相互关系
widget.element.data("__widgets", [widget]);
@ -1077,4 +1078,16 @@ BI.mount = function (widget, container, predicate, hydrate) {
Widget._renderEngine.createElement(container).append(widget.element);
}
return widget._mount(true, false, false, predicate);
};
}
extend(BI, {
Widget,
useStore,
useContext,
watch,
onBeforeMount,
onMounted,
onBeforeUnmount,
onUnmounted,
mount,
});

316
src/core/5.inject.js

@ -1,5 +1,8 @@
(function () {
var moduleInjection = {}, moduleInjectionMap = {
import { isFunction, isNull, isNotNull, isArray, each, isWidget, extend, init, isEmpty, remove } from "./2.base";
import OB from "./3.ob";
import Widget from "./4.widget"
let moduleInjection = {}, moduleInjectionMap = {
components: {},
constants: {},
stores: {},
@ -7,16 +10,17 @@
models: {},
providers: {}
};
BI.module = BI.module || function (xtype, cls) {
export function module(xtype, cls) {
if (moduleInjection[xtype] != null) {
_global.console && console.error("module: [" + xtype + "] 已经注册过了");
} else {
if (BI.isFunction(cls)) {
if (isFunction(cls)) {
cls = cls();
}
for (var k in moduleInjectionMap) {
for (const k in moduleInjectionMap) {
if (cls[k]) {
for (var key in cls[k]) {
for (const key in cls[k]) {
if (!moduleInjectionMap[k]) {
continue;
}
@ -33,112 +37,103 @@
moduleInjection[xtype] = cls;
}
return function () {
return BI.Modules.getModule(xtype);
};
};
return () => Modules.getModule(xtype);
}
BI.module = BI.module || module;
var constantInjection = {};
BI.constant = BI.constant || function (xtype, cls) {
let constantInjection = {};
export function constant(xtype, cls) {
if (constantInjection[xtype] != null) {
_global.console && console.error("constant: [" + xtype + "]已经注册过了");
} else {
constantInjection[xtype] = cls;
}
return function () {
return BI.Constants.getConstant(xtype);
};
};
return () => Constants.getConstant(xtype);
}
BI.constant = BI.constant || constant;
var modelInjection = {};
BI.model = BI.model || function (xtype, cls) {
let modelInjection = {};
export function model(xtype, cls) {
if (modelInjection[xtype] != null) {
_global.console && console.error("model: [" + xtype + "] 已经注册过了");
} else {
modelInjection[xtype] = cls;
}
return function (config) {
return BI.Models.getModel(xtype, config);
};
};
return (config) => Models.getModel(xtype, config);
}
BI.model = BI.model || model;
var storeInjection = {};
BI.store = BI.store || function (xtype, cls) {
let storeInjection = {};
export function store(xtype, cls) {
if (storeInjection[xtype] != null) {
_global.console && console.error("store: [" + xtype + "] 已经注册过了");
} else {
storeInjection[xtype] = cls;
}
return function (config) {
return BI.Stores.getStore(xtype, config);
};
};
return (config) => Stores.getStore(xtype, config);
}
BI.store = BI.store || store;
var serviceInjection = {};
BI.service = BI.service || function (xtype, cls) {
let serviceInjection = {};
export function service(xtype, cls) {
if (serviceInjection[xtype] != null) {
_global.console && console.error("service: [" + xtype + "] 已经注册过了");
}
serviceInjection[xtype] = cls;
return function (config) {
return BI.Services.getService(xtype, config);
};
};
return (config) => Services.getService(xtype, config);
}
BI.service = BI.service || service;
var providerInjection = {};
BI.provider = BI.provider || function (xtype, cls) {
let providerInjection = {};
export function provider(xtype, cls) {
if (providerInjection[xtype] != null) {
_global.console && console.error("provider: [" + xtype + "] 已经注册过了");
} else {
providerInjection[xtype] = cls;
}
return function (config) {
return BI.Providers.getProvider(xtype, config);
};
};
return (config) => Providers.getProvider(xtype, config);
}
BI.provider = BI.provider || provider;
var configFunctions = BI.OB.configFunctions = {};
var runConfigFunction = function (type, configFn) {
let configFunctions = OB.configFunctions = {};
const runConfigFunction = function (type, configFn) {
if (!type || !configFunctions[type]) {
return false;
}
var queue = [];
let queue = [];
if (configFn) {
queue = configFunctions[type].filter(function (conf) {
return conf.fn === configFn;
});
configFunctions[type] = configFunctions[type].filter(function (conf) {
return conf.fn !== configFn;
});
queue = configFunctions[type].filter((conf) => conf.fn === configFn);
configFunctions[type] = configFunctions[type].filter((conf) => conf.fn !== configFn);
} else {
queue = configFunctions[type];
delete configFunctions[type];
}
var dependencies = BI.Providers.getProvider("bi.provider.system").getDependencies();
var modules = moduleInjectionMap.components[type]
const dependencies = Providers.getProvider("bi.provider.system").getDependencies();
const modules = moduleInjectionMap.components[type]
|| moduleInjectionMap.constants[type]
|| moduleInjectionMap.services[type]
|| moduleInjectionMap.stores[type]
|| moduleInjectionMap.models[type]
|| moduleInjectionMap.providers[type];
for (var i = 0; i < queue.length; i++) {
var conf = queue[i];
var version = conf.opt.version;
var fn = conf.fn;
for (let i = 0; i < queue.length; i++) {
const conf = queue[i];
const version = conf.opt.version;
const fn = conf.fn;
if (modules && version) {
var findVersion = false;
for (var j = 0; j < modules.length; j++) {
var module = modules[j];
let findVersion = false;
let module;
for (let j = 0; j < modules.length; j++) {
module = modules[j];
if (module && dependencies[module.moduleId] && module.version === version) {
var minVersion = dependencies[module.moduleId].minVersion,
const minVersion = dependencies[module.moduleId].minVersion,
maxVersion = dependencies[module.moduleId].maxVersion;
if (minVersion && (moduleInjection[module.moduleId].version || version) < minVersion) {
findVersion = true;
@ -172,8 +167,9 @@
BI.Plugin.configWidget(type, fn, conf.opt);
}
};
BI.config = BI.config || function (type, configFn, opt) {
if (BI.isFunction(type)) {
export function config(type, configFn, opt) {
if (isFunction(type)) {
opt = configFn;
configFn = type;
type = "bi.provider.system";
@ -203,39 +199,38 @@
if (opt.immediately) {
return runConfigFunction(type, configFn);
}
};
}
BI.config = BI.config || config;
BI.getReference = BI.getReference || function (type, fn) {
export function getReference(type, fn) {
return BI.Plugin.registerObject(type, fn);
};
}
BI.getReference = BI.getReference || getReference;
var actions = {};
var globalAction = [];
BI.action = BI.action || function (type, actionFn) {
if (BI.isFunction(type)) {
let actions = {};
let globalAction = [];
export function action(type, actionFn) {
if (isFunction(type)) {
globalAction.push(type);
return function () {
BI.remove(globalAction, function (idx) {
return globalAction.indexOf(actionFn) === idx;
});
return () => {
remove(globalAction, (idx) => globalAction.indexOf(actionFn) === idx);
};
}
if (!actions[type]) {
actions[type] = [];
}
actions[type].push(actionFn);
return function () {
BI.remove(actions[type], function (idx) {
return actions[type].indexOf(actionFn) === idx;
});
return () => {
remove(actions[type], (idx) => actions[type].indexOf(actionFn) === idx);
if (actions[type].length === 0) {
delete actions[type];
}
};
};
}
BI.action = BI.action || action;
var points = {};
BI.point = BI.point || function (type, action, pointFn, after) {
let points = {};
export function point(type, action, pointFn, after) {
if (!points[type]) {
points[type] = {};
}
@ -246,9 +241,10 @@
points[type][action][after ? "after" : "before"] = [];
}
points[type][action][after ? "after" : "before"].push(pointFn);
};
}
BI.point = BI.point || point;
BI.Modules = BI.Modules || {
export const Modules = {
getModule: function (type) {
if (!moduleInjection[type]) {
_global.console && console.error("module: [" + type + "] 未定义");
@ -258,28 +254,30 @@
getAllModules: function () {
return moduleInjection;
}
};
}
BI.Modules = BI.Modules || Modules;
BI.Constants = BI.Constants || {
export const Constants = {
getConstant: function (type) {
if (BI.isNull(constantInjection[type])) {
if (isNull(constantInjection[type])) {
_global.console && console.error("constant: [" + type + "] 未定义");
}
runConfigFunction(type);
return BI.isFunction(constantInjection[type]) ? constantInjection[type]() : constantInjection[type];
return isFunction(constantInjection[type]) ? constantInjection[type]() : constantInjection[type];
}
};
}
BI.Constants = BI.Constants || Constants;
var callPoint = function (inst, types) {
types = BI.isArray(types) ? types : [types];
BI.each(types, function (idx, type) {
const callPoint = function (inst, types) {
types = isArray(types) ? types : [types];
each(types, (idx, type) => {
if (points[type]) {
for (var action in points[type]) {
var bfns = points[type][action].before;
for (const action in points[type]) {
let bfns = points[type][action].before;
if (bfns) {
BI.aspect.before(inst, action, function (bfns) {
return function () {
for (var i = 0, len = bfns.length; i < len; i++) {
for (let i = 0, len = bfns.length; i < len; i++) {
try {
bfns[i].apply(inst, arguments);
} catch (e) {
@ -289,11 +287,11 @@
};
}(bfns));
}
var afns = points[type][action].after;
let afns = points[type][action].after;
if (afns) {
BI.aspect.after(inst, action, function (afns) {
return function () {
for (var i = 0, len = afns.length; i < len; i++) {
for (let i = 0, len = afns.length; i < len; i++) {
try {
afns[i].apply(inst, arguments);
} catch (e) {
@ -308,7 +306,7 @@
});
};
BI.Models = BI.Models || {
export const Models = {
getModel: function (type, config) {
if (!modelInjection[type]) {
_global.console && console.error("model: [" + type + "] 未定义");
@ -320,11 +318,11 @@
callPoint(inst, type);
return inst;
}
};
var stores = {};
}
BI.Models = BI.Models || Models;
BI.Stores = BI.Stores || {
let stores = {};
export const Stores = {
getStore: function (type, config) {
if (!storeInjection[type]) {
_global.console && console.error("store: [" + type + "] 未定义");
@ -332,19 +330,19 @@
if (stores[type]) {
return stores[type];
}
var inst = stores[type] = new storeInjection[type](config);
const inst = stores[type] = new storeInjection[type](config);
inst._constructor && inst._constructor(config, function () {
delete stores[type];
});
callPoint(inst, type);
return inst;
}
};
var services = {};
}
BI.Stores = BI.Stores || Stores;
BI.Services = BI.Services || {
getService: function (type, config) {
let services = {};
export const Services = {
getService: (type, config) => {
if (!serviceInjection[type]) {
_global.console && console.error("service: [" + type + "] 未定义");
}
@ -355,13 +353,13 @@
callPoint(services[type], type);
return services[type];
}
};
}
BI.Services = BI.Services || Services;
var providers = {},
let providers = {},
providerInstance = {};
BI.Providers = BI.Providers || {
getProvider: function (type, config) {
export const Providers = {
getProvider: (type, config) => {
if (!providerInjection[type]) {
_global.console && console.error("provider: [" + type + "] 未定义");
}
@ -374,11 +372,12 @@
}
return providerInstance[type];
}
};
}
BI.Providers = BI.Providers || Providers;
BI.Actions = BI.Actions || {
export const Actions = {
runAction: function (type, event, config) {
BI.each(actions[type], function (i, act) {
each(actions[type], (i, act) => {
try {
act(event, config);
} catch (e) {
@ -388,7 +387,7 @@
},
runGlobalAction: function () {
var args = [].slice.call(arguments);
BI.each(globalAction, function (i, act) {
each(globalAction, (i, act) => {
try {
act.apply(null, args);
} catch (e) {
@ -396,10 +395,11 @@
}
});
}
};
}
BI.Actions = BI.Actions || Actions;
var kv = {};
BI.shortcut = BI.component = BI.shortcut || function (xtype, cls) {
let kv = {};
export function shortcut(xtype, cls) {
if (kv[xtype] != null) {
_global.console && console.error("组件: [" + xtype + "] 已经注册过了");
}
@ -407,21 +407,22 @@
cls["xtype"] = xtype;
}
kv[xtype] = cls;
};
}
BI.shortcut = BI.component = BI.shortcut || shortcut;
// 根据配置属性生成widget
var createWidget = function (config, context, lazy) {
var cls = BI.isFunction(config.type) ? config.type : kv[config.type];
const createRealWidget = function (config, context, lazy) {
const cls = isFunction(config.type) ? config.type : kv[config.type];
if (!cls) {
throw new Error("组件: [" + config.type + "] 未定义");
}
var pushed = false;
var widget = new cls();
widget._context = BI.Widget.context || context;
if (!BI.Widget.context && context) {
let pushed = false;
const widget = new cls();
widget._context = Widget.context || context;
if (!Widget.context && context) {
pushed = true;
BI.Widget.pushContext(context);
Widget.pushContext(context);
}
callPoint(widget, config.type);
widget._initProps(config);
@ -430,13 +431,13 @@
// if (!lazy || config.element || config.root) {
widget._lazyConstructor();
// }
pushed && BI.Widget.popContext();
pushed && Widget.popContext();
return widget;
};
BI.createWidget = BI.createWidget || function (item, options, context, lazy) {
export function createWidget(item, options, context, lazy) {
item || (item = {});
if (BI.isWidget(options)) {
if (isWidget(options)) {
context = options;
options = {};
} else {
@ -445,9 +446,9 @@
var el, w;
if (item.type || options.type) {
el = BI.extend({}, options, item);
el = extend({}, options, item);
} else if (item.el && (item.el.type || options.type)) {
el = BI.extend({}, options, item.el);
el = extend({}, options, item.el);
}
if (el) {
@ -456,14 +457,14 @@
}
// 先把准备环境准备好
BI.init();
init();
if (BI.isEmpty(item) && BI.isEmpty(options)) {
return BI.createWidget({
if (isEmpty(item) && isEmpty(options)) {
return createWidget({
type: "bi.layout"
});
}
if (BI.isWidget(item)) {
if (isWidget(item)) {
return item;
}
if (el) {
@ -471,56 +472,59 @@
var wType = (w.type && w.type.xtype) || w.type;
if (wType === elType) {
if (BI.Plugin.hasObject(elType)) {
if (!w.listeners || BI.isArray(w.listeners)) {
if (!w.listeners || isArray(w.listeners)) {
w.listeners = (w.listeners || []).concat([{
eventName: BI.Events.MOUNT,
action: function () {
action: () => {
BI.Plugin.getObject(elType, this);
}
}]);
} else {
w.listeners[BI.Events.MOUNT] = [
function () {
() => {
BI.Plugin.getObject(elType, this);
}
].concat(w.listeners[BI.Events.MOUNT] || []);
}
}
return createWidget(w, context, lazy);
return createRealWidget(w, context, lazy);
}
return BI.createWidget(w, options, context, lazy);
return createWidget(w, options, context, lazy);
}
if (BI.isWidget(item.el)) {
if (isWidget(item.el)) {
return item.el;
}
throw new Error("组件:无法根据item创建组件", item);
};
}
BI.createWidget = BI.createWidget || createWidget;
BI._lazyCreateWidget = BI._lazyCreateWidget || function (item, options, context) {
return BI.createWidget(item, options, context, true);
};
export function _lazyCreateWidget (item, options, context) {
return createWidget(item, options, context, true);
}
BI._lazyCreateWidget = BI._lazyCreateWidget || _lazyCreateWidget;
BI.createElement = BI.createElement || function () {
var widget = BI.createWidget.apply(this, arguments);
export function createElement() {
const widget = createWidget.apply(this, arguments);
return widget.element;
};
}
BI.createElement = BI.createElement || createElement;
BI.getResource = BI.getResource || function (type, config) {
if (BI.isNotNull(constantInjection[type])) {
return BI.Constants.getConstant(type);
export function getResource(type, config) {
if (isNotNull(constantInjection[type])) {
return Constants.getConstant(type);
}
if (modelInjection[type]) {
return BI.Models.getModel(type, config);
return Models.getModel(type, config);
}
if (storeInjection[type]) {
return BI.Stores.getStore(type, config);
return Stores.getStore(type, config);
}
if (serviceInjection[type]) {
return BI.Services.getService(type, config);
return Services.getService(type, config);
}
if (providerInjection[type]) {
return BI.Providers.getProvider(type, config);
return Providers.getProvider(type, config);
}
throw new Error("未知类型: [" + type + "] 未定义");
};
})();
}
BI.getResource = BI.getResource || getResource;

3
src/core/decorator.js

@ -1,8 +1,9 @@
/**
* 注册widget
*/
import { shortcut as biShortcut } from "./5.inject";
export function shortcut() {
return function decorator(Target) {
BI.shortcut(Target.xtype, Target);
biShortcut(Target.xtype, Target);
};
}

6
src/core/index.js

@ -37,6 +37,10 @@ BI.extend(BI, {
StyleLoaderManager,
});
export * from './2.base';
export * from './4.widget';
export * from './5.inject';
export {
shortcut,
OB,
@ -57,5 +61,3 @@ export {
TooltipsController,
StyleLoaderManager,
}
export * from './2.base';
Loading…
Cancel
Save