blob: 313d552e3ace9cccdae7f0e40df7ef2fbddba47b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
export function selectDriveFolder($root: any, multiple) {
return new Promise((res, rej) => {
import('../components/drive-window.vue').then(m => m.default).then(dialog => {
const w = $root.new(dialog, {
type: 'folder',
multiple
});
w.$once('selected', folders => {
res(multiple ? folders : (folders.length === 0 ? null : folders[0]));
});
});
});
}
|