diff options
Diffstat (limited to 'src/client/app/init.ts')
| -rw-r--r-- | src/client/app/init.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/app/init.ts b/src/client/app/init.ts index 230d8c3f1e..da7baff4fe 100644 --- a/src/client/app/init.ts +++ b/src/client/app/init.ts @@ -456,6 +456,18 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS], os: MiOS) document.body.appendChild(x.$el); return x; }, + newAsync(vm, props) { + return new Promise((res) => { + vm().then(vm => { + const x = new vm({ + parent: this, + propsData: props + }).$mount(); + document.body.appendChild(x.$el); + res(x); + }); + }); + }, dialog(opts) { const vm = this.new(Dialog, opts); const p: any = new Promise((res) => { |