mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-24 02:08:08 +08:00
选择目录功能
This commit is contained in:
@@ -196,6 +196,21 @@ class ExampleController extends BaseController {
|
||||
}
|
||||
this.sendSuccess(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择文件夹目录
|
||||
*/
|
||||
async selectFileDir() {
|
||||
const { service } = this;
|
||||
|
||||
const data = {
|
||||
dir: ''
|
||||
};
|
||||
const dir = await service.example.selectDir();
|
||||
data.dir = dir;
|
||||
|
||||
this.sendSuccess(data);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ExampleController;
|
||||
|
||||
Reference in New Issue
Block a user