refactor: 拆分 TRAY_ITEMS 配置
This commit is contained in:
19
src/main/tray-items.js
Normal file
19
src/main/tray-items.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @typedef MenuItem
|
||||
* @type {Electron.MenuItem | Electron.MenuItemConstructorOptions}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef TrayItem
|
||||
* @property {string} iconPath
|
||||
* @property {MenuItem[]} menus
|
||||
* @property {string} title
|
||||
* @property {string} tooltip
|
||||
*/
|
||||
|
||||
/**
|
||||
* @desc 托盘项列表
|
||||
* @type {TrayItem[]}
|
||||
*/
|
||||
export const TRAY_ITEMS = [
|
||||
];
|
@@ -2,25 +2,9 @@ import {
|
||||
Tray, Menu, nativeImage,
|
||||
} from 'electron';
|
||||
|
||||
/**
|
||||
* @typedef MenuItem
|
||||
* @type {Electron.MenuItem | Electron.MenuItemConstructorOptions}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef TrayItem
|
||||
* @property {string} iconPath
|
||||
* @property {MenuItem[]} menus
|
||||
* @property {string} title
|
||||
* @property {string} tooltip
|
||||
*/
|
||||
|
||||
/**
|
||||
* @desc 托盘项列表
|
||||
* @type {TrayItem[]}
|
||||
*/
|
||||
const TRAY_ITEMS = [
|
||||
];
|
||||
import {
|
||||
TRAY_ITEMS,
|
||||
} from './tray-items';
|
||||
|
||||
/** 初始化托盘项 */
|
||||
export function initTrayItems() {
|
||||
|
Reference in New Issue
Block a user