我正在开发一个NodeJS/Electron/Angular应用程序,并且我正在使用node-notifier模块。一切正常,但在我的通知消息的底部,我有一个不适当的"toast“字符串。只有当我使用"icon“属性时才会发生这种情况。我应该怎么做才能删除那个字符串呢?提前谢谢。
const notifier = SystemJS._nodeRequire('node-notifier');
notifier.notify({
title: 'Example of a notification',
message: 'Message of the notification',
icon: `${APP_ROOTDIR}/shared/assets/images/new-notification-icon.png`,
timout: 5}, () => { });PS :我的操作系统是Windows 10,这是通知的屏幕截图:

发布于 2017-05-08 20:41:06
尝试下面的代码,如果这对你有效,那么它对我也适用。默认超时时间为5秒。
const notifier = require('node-notifier');
notifier.notify({
'title': 'My notification',
'message': 'Hello, there!',
'icon': '/home/xxx/Desktop/icon.jpg'
});下面是输出:

https://stackoverflow.com/questions/43794057
复制相似问题