瀏覽代碼

mod:add shellFun

panqiuyao 11 月之前
父節點
當前提交
d4e1678db8
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      electron/controller/utils.js

+ 4 - 1
electron/controller/utils.js

@@ -25,11 +25,14 @@ class UtilsController extends Controller {
    * upload
    */
   async openFileFolder (params) {
-   // const result = await Services.get('example').test('electron');
+    // const result = await Services.get('example').test('electron');
     Log.info(params)
     Log.info(decodeURIComponent(params))
     shell.openPath(params);
   }
+  async shellFun (params) {
+    shell[params.action](params.params)
+  }
 }
 
 UtilsController.toString = () => '[class ExampleController]';