From fa1a85f682302c3629326198b3cb5ecf738d3cd7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 27 May 2018 18:12:39 +0900 Subject: Fix bug --- src/client/app/desktop/api/input.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/client/app/desktop/api/input.ts') diff --git a/src/client/app/desktop/api/input.ts b/src/client/app/desktop/api/input.ts index ce26a8112f..bd7bfa0129 100644 --- a/src/client/app/desktop/api/input.ts +++ b/src/client/app/desktop/api/input.ts @@ -1,20 +1,19 @@ +import OS from '../../mios'; import InputDialog from '../views/components/input-dialog.vue'; -export default function(opts) { +export default (os: OS) => opts => { return new Promise((res, rej) => { const o = opts || {}; - const d = new InputDialog({ - propsData: { - title: o.title, - placeholder: o.placeholder, - default: o.default, - type: o.type || 'text', - allowEmpty: o.allowEmpty - } - }).$mount(); + const d = os.new(InputDialog, { + title: o.title, + placeholder: o.placeholder, + default: o.default, + type: o.type || 'text', + allowEmpty: o.allowEmpty + }); d.$once('done', text => { res(text); }); document.body.appendChild(d.$el); }); -} +}; -- cgit v1.2.3-freya