controller
ee-core:v2.0.3
# 介绍
控制器模块
# 使用方法
const { Controller } = require('ee-core');
class ExampleController extends Controller {
......
}
# 第三方使用
- 创建controller文件
在项目根目录创建 ./electron/controller/example.js 文件,controller示例代码 (opens new window)
- 前端调用
const { ipcRenderer: ipc } = (window.require && window.require('electron')) || window.electron || {};
ipc.invoke('controller.example.hello', {}).then(res => {
//
})
ipc.send('controller.example.hello', {});
# API列表
# BaseContextClass
提供一个基础类,目前有app、config、service 三个属性
上次更新: 2025/03/27, 02:12:08