mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
756 B
756 B
不可关闭
通知可以不能被关闭
<n-button @click="notify('info')">
不能关闭
</n-button>
export default {
methods: {
notify (type) {
this.$NNotification.open({
title: `你能关掉我吗?`,
duration: 2000,
closable: false,
onAfterHide: () => {
this.$NNotification.open({
title: `哈哈哈哈!`,
duration: 2000,
closable: false,
onAfterHide: () => {
this.$NNotification.open({
title: `你不能`,
duration: 2000,
closable: false,
})
}
})
}
})
}
}
}
.n-button {
margin: 0 12px 8px 0;
}