<button @click="dengChu"></button>
async dengChu() {
if (Notification.permission !== 'granted') {
await Notification.requestPermission();
}
if (Notification.permission == 'granted') {
let t = '标题1212'
let shili = new Notification(t, {
body: '这是一个提示消息'
})
shili.addEventListener('click', () => {
console.log('点击了');
})
}
},