整理した
This commit is contained in:
parent
8a279a4656
commit
cf33e483f7
552 changed files with 360 additions and 1311 deletions
20
src/client/app/desktop/api/input.ts
Normal file
20
src/client/app/desktop/api/input.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import InputDialog from '../views/components/input-dialog.vue';
|
||||
|
||||
export default function(opts) {
|
||||
return new Promise<string>((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();
|
||||
d.$once('done', text => {
|
||||
res(text);
|
||||
});
|
||||
document.body.appendChild(d.$el);
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue