From d0a07403e2c870937b69dc9a1107c2bb1f9bef0c Mon Sep 17 00:00:00 2001 From: iapyang Date: Fri, 19 Jun 2020 10:16:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=8F=90=E4=BE=9Bprovider=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E7=9A=84=E8=A3=85=E9=A5=B0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/decorator/decorator.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/typescript/core/decorator/decorator.ts b/typescript/core/decorator/decorator.ts index f00024e18..d55a2bc00 100644 --- a/typescript/core/decorator/decorator.ts +++ b/typescript/core/decorator/decorator.ts @@ -9,6 +9,15 @@ export function shortcut() { }; } +/** + * 注册provider + */ +export function provider() { + return function decorator(Target: Constructor & {xtype: string}): void { + BI.provider(Target.xtype, Target); + }; +} + /** * 注册model */