更新ダイアログをHTMLで描画
This commit is contained in:
parent
46d7cee639
commit
50bd1d9a5d
6 changed files with 199 additions and 7 deletions
|
|
@ -1,5 +1,18 @@
|
|||
export default function(opts) {
|
||||
import OS from '../../mios';
|
||||
import Dialog from '../views/components/dialog.vue';
|
||||
|
||||
export default (os: OS) => opts => {
|
||||
return new Promise<string>((res, rej) => {
|
||||
alert('dialog not implemented yet');
|
||||
const o = opts || {};
|
||||
const d = os.new(Dialog, {
|
||||
title: o.title,
|
||||
text: o.text,
|
||||
modal: o.modal,
|
||||
buttons: o.actions
|
||||
});
|
||||
d.$once('clicked', id => {
|
||||
res(id);
|
||||
});
|
||||
document.body.appendChild(d.$el);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue