mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
初始化模板
This commit is contained in:
20
src/main.js
Normal file
20
src/main.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// 运行在 Electron 主进程 下的插件入口
|
||||
|
||||
|
||||
// 加载插件时触发
|
||||
function onLoad(plugin, liteloader) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 创建窗口时触发
|
||||
function onBrowserWindowCreated(window, plugin) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 这两个函数都是可选的
|
||||
module.exports = {
|
||||
onLoad,
|
||||
onBrowserWindowCreated
|
||||
}
|
8
src/preload.js
Normal file
8
src/preload.js
Normal file
@@ -0,0 +1,8 @@
|
||||
// Electron 主进程 与 渲染进程 交互的桥梁
|
||||
const { contextBridge } = require("electron");
|
||||
|
||||
|
||||
// 在window对象下导出只读对象
|
||||
contextBridge.exposeInMainWorld("plugin_template", {
|
||||
|
||||
});
|
20
src/renderer.js
Normal file
20
src/renderer.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// 运行在 Electron 渲染进程 下的页面脚本
|
||||
|
||||
|
||||
// 页面加载完成时触发
|
||||
function onLoad() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 打开设置界面时触发
|
||||
function onConfigView(view) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 这两个函数都是可选的
|
||||
export {
|
||||
onLoad,
|
||||
onConfigView
|
||||
}
|
Reference in New Issue
Block a user