Update init.ts

This commit is contained in:
syuilo 2018-12-03 20:26:46 +09:00
parent 53a0f3c794
commit c222b9ae94
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69

View File

@ -458,8 +458,8 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void,
return x; return x;
}, },
dialog(opts) { dialog(opts) {
return new Promise((res) => {
const vm = this.new(Dialog, opts); const vm = this.new(Dialog, opts);
return new Promise((res) => {
vm.$once('ok', result => res({ canceled: false, result })); vm.$once('ok', result => res({ canceled: false, result }));
vm.$once('cancel', () => res({ canceled: true })); vm.$once('cancel', () => res({ canceled: true }));
}); });