mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-17 16:24:16 +08:00
插件支持调用 onShow onHide
This commit is contained in:
@@ -39,6 +39,12 @@ window.rubick = {
|
||||
openPlugin(plugin) {
|
||||
ipcSendSync('loadPlugin', plugin);
|
||||
},
|
||||
onShow(cb) {
|
||||
typeof cb === 'function' && (window.rubick.hooks.onShow = cb);
|
||||
},
|
||||
onHide(cb) {
|
||||
typeof cb === 'function' && (window.rubick.hooks.onHide = cb);
|
||||
},
|
||||
// 窗口交互
|
||||
hideMainWindow() {
|
||||
ipcSendSync('hideMainWindow');
|
||||
|
||||
Reference in New Issue
Block a user