代码拉取完成,页面将自动刷新
同步操作将从 horsejs/HorseJs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
目前一个应用程序仅允许注册一个托盘图标
let menu = [{ name: "test1" }, { name: "测试测试" }, { name: "测试测试" }];
let exePath = await horse.path.getPath({ name: "exePath" });
let iconPath = horse.path.dirName(exePath.data) + "\\icon.ico"; //todo
let result = await horse.tray.create({
iconPath,
tip: "这是图标提示",
menu,
menuClick: (index) => {
console.log(`你点击了第${index}个菜单`);
},
leftButtonDown: () => {
console.log("托盘图标事件");
},
});
let result = await horse.tray.destroy();
如果你创建托盘图标时设置了 tip,那么更换托盘图标时,也应该提供 tip,不然原先设置的 tip 将会小时
let exePath = await horse.path.getPath({ name: "exePath" });
let iconPath = horse.path.dirName(exePath.data) + "\\icon2.ico"; //todo
let tip = `这是图标提示`;
let result = await horse.tray.resetIcon({ iconPath, tip });
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。