wip
This commit is contained in:
parent
ea37ff3b61
commit
bf3ed2a1f0
2 changed files with 23 additions and 9 deletions
|
|
@ -1,13 +1,12 @@
|
|||
import * as os from '@/os';
|
||||
|
||||
export function selectDriveFile(multiple) {
|
||||
return new Promise((res, rej) => {
|
||||
import('@/components/drive-window.vue').then(dialog => {
|
||||
const w = $root.new(dialog, {
|
||||
type: 'file',
|
||||
multiple
|
||||
});
|
||||
w.$once('selected', files => {
|
||||
res(multiple ? files : files[0]);
|
||||
});
|
||||
return new Promise(async (res, rej) => {
|
||||
os.modal(await import('@/components/drive-window.vue'), {
|
||||
type: 'file',
|
||||
multiple
|
||||
}).then(files => {
|
||||
res(multiple ? files : files[0]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue