Browse Source

Pull request #1382: 无JIRA chore: 增加BI.Plugin描述

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '9781752afe11f9cf8b794153d2df6c5ac8939232':
  无JIRA chore: 增加BI.Plugin描述
es6
parent
commit
e2db37249a
  1. 16
      typescript/core/plugin.ts
  2. 2
      typescript/index.ts

16
typescript/core/plugin.ts

@ -0,0 +1,16 @@
import {_Widget} from "./widget";
type configWidgetFn = (options: object) => object
type configObjectFn = (widget: _Widget) => void
export type _config = (widgetFunction: configWidgetFn | configWidgetFn[], objectFunction: configObjectFn | configObjectFn[]) => void
export type _configWidget = (shorcut: string, widgetFunction: configWidgetFn) => void
export type _registerObject = (shorcut: string, objectFunction: configObjectFn) => void
export type _Plugin = {
config: _config;
configWidget: _configWidget;
registerObject: _registerObject;
}

2
typescript/index.ts

@ -33,6 +33,7 @@ import { _RedMarkBehavior } from "./core/behavior/behavior.redmark";
import * as decorator from "./core/decorator/decorator";
import { _func } from "./core/func";
import { _i18n } from "./core/i18n";
import { _Plugin } from "./core/plugin";
import { _OB } from "./core/ob";
import { _Widget, _WidgetStatic } from "./core/widget";
import { _Layout } from "./core/wrapper/layout";
@ -50,6 +51,7 @@ type ClassConstructor<T extends {}> = T & {
export interface BI extends _func, _i18n, _base {
OB: ClassConstructor<_OB>;
Plugin:_Plugin;
Widget: ClassConstructor<_Widget> & _WidgetStatic;
Single: ClassConstructor<_Single>;
BasicButton: ClassConstructor<_BasicButton> & _BasicButtonStatic;

Loading…
Cancel
Save