【问题标题】:How to add custom menu icon in menubar on macOS with electron?如何使用电子在 macOS 的菜单栏中添加自定义菜单图标?
【发布时间】:2019-05-31 17:38:57
【问题描述】:

我想用电子(nodejs)在mac的菜单栏中添加自定义菜单。 这怎么能在电子中完成?

举个例子:

【问题讨论】:

    标签: macos electron


    【解决方案1】:

    我想你正在寻找Tray API

    【讨论】:

    • 正在查看:tray = new Tray('/path/to/my/icon') 。那是什么类型的文件?
    • 通常是.png 文件
    猜你喜欢
    • 2016-10-13
    • 2020-02-03
    • 2023-02-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-15
    • 1970-01-01
    • 2022-08-14
    相关资源
    最近更新 更多