2024.04.28今天我学习了如何使用this.$notify做一个悬浮通知,
官方文档:Element - The world's most popular Vue UI framework
然后我根据官方文档做了修改,效果如下:
增加了可点击查看详情的按钮,代码如下:
const h = this.$createElement
this.$notify({
title: '通知',
duration: 0,
message: h('p', [
h('p', null, 'xxxxxxxx通知'),
h('p', {
style: 'text-align: right;width:280px;dispaly:block;margin-top: 8px;color:#43c39d;cursor: pointer;',
on: {
click: () => {
this.view_more_notice_click();
},
},
}, '查看详情'),
]),
});