1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-17 16:18:27 +09:00
cherrypick/src/client/app/mobile/api/choose-drive-folder.ts
2018-03-29 20:32:18 +09:00

18 lines
374 B
TypeScript

import Chooser from '../views/components/drive-folder-chooser.vue';
export default function(opts) {
return new Promise((res, rej) => {
const o = opts || {};
const w = new Chooser({
propsData: {
title: o.title,
initFolder: o.currentFolder
}
}).$mount();
w.$once('selected', folder => {
res(folder);
});
document.body.appendChild(w.$el);
});
}