use global define to touch context

This commit is contained in:
pengfei.zhou
2019-07-17 16:04:45 +08:00
parent 9cd607e822
commit 86b048b3b4
4 changed files with 34 additions and 3 deletions

View File

@@ -1,4 +1,14 @@
import { View } from "./view";
import { } from '../runtime/global'
export function Registor<T extends { new(...args: any[]): {} }>(constructor: T) {
const ret = class extends constructor {
context = context
}
context.registor(new ret)
return ret
}
export abstract class Page {
onCreate(): void { }