const notification = {
title: '基本通知',
body: '短消息部分'
}
// 创建通知并保存
const myNotification = new window.Notification(notification.title, notification)
myNotification.onclick = () => {
console.log('通知被点击')
}
这样直接使用似乎没什么用,也没有找到win8、win10具体的使用方法,求教
node-notifier, 推荐主进程用