element $notify 悬浮通知使用详解

 更新时间:2020年06月12日 15:09:33   作者:敲代码无敌小奶龙  
这篇文章主要介绍了element $notify 悬浮通知使用详解,主要讲解如何使用this.$notify做一个悬浮通知,本文通过示例代码给大家介绍的非常详细,感兴趣的朋友一起看看吧

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();
            },
          },
        }, '查看详情'),
      ]),
    });

到此这篇关于element $notify 悬浮通知使用的文章就介绍到这了,更多相关element $notify 悬浮通知内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

相关文章

最新评论