2018-02-18 03:35:18 +00:00
|
|
|
import MkChooseFolderFromDriveWindow from '../views/components/choose-folder-from-drive-window.vue';
|
2018-02-17 09:14:23 +00:00
|
|
|
|
2018-02-18 03:35:18 +00:00
|
|
|
export default function(opts) {
|
2018-02-17 09:14:23 +00:00
|
|
|
return new Promise((res, rej) => {
|
|
|
|
const o = opts || {};
|
|
|
|
const w = new MkChooseFolderFromDriveWindow({
|
|
|
|
propsData: {
|
2018-02-18 03:35:18 +00:00
|
|
|
title: o.title,
|
|
|
|
initFolder: o.currentFolder
|
2018-02-17 09:14:23 +00:00
|
|
|
}
|
|
|
|
}).$mount();
|
|
|
|
w.$once('selected', folder => {
|
|
|
|
res(folder);
|
|
|
|
});
|
|
|
|
document.body.appendChild(w.$el);
|
|
|
|
});
|
|
|
|
}
|