This commit is contained in:
哆啦好梦
2023-05-11 18:18:41 +08:00
parent 465ea1e851
commit 0e454ce70b
10 changed files with 345 additions and 284 deletions

View File

@@ -1,6 +1,8 @@
'use strict';
const { Controller } = require('ee-core');
const { dialog } = require('electron');
const _ = require('lodash');
/**
* 特效 - 功能demo
@@ -12,6 +14,20 @@ class EffectController extends Controller {
super(ctx);
}
/**
* 选择文件
*/
selectFile () {
const filePaths = dialog.showOpenDialogSync({
properties: ['openFile']
});
if (_.isEmpty(filePaths)) {
return null
}
return filePaths[0];
}
}
EffectController.toString = () => '[class EffectController]';