验证码: 看不清楚,换一张 查询 注册会员,免验证
  • {{ basic.site_slogan }}
  • 打开微信扫一扫,
    您还可以在这里找到我们哟

    关注我们

Vue提示框组件vue-notification如何使用

阅读:1110 来源:乙速云 作者:代码code

Vue提示框组件vue-notification如何使用

先看下演示效果:

Vue提示框组件vue-notification如何使用

安装方法:
通过 npm install vue-notification 就能使用了。

导入方法:

import Notifications from 'vue-notification';

Vue.use(Notifications);

引用方法:

this.$notify({
  type: 'success',
  title: '提示:',
  text: '参数保存成功!'
});

并且需要在 App.vue 里加入
其中 duration 参数为持续时间。
position 参数为提示位置,前面的值为纵向的顶部 top 和底部 bottom,后面的值为横向的左 left、中 center、右 right
觉得 top 太靠上的话,
可以加个 css 调整下位置。

/* 设置提示框显示位置 */
.vue-notification-group{
  top: 10% !important;
}

更多参数:

Vue提示框组件vue-notification如何使用

分享到:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: hlamps#outlook.com (#换成@)。
相关文章
{{ v.title }}
{{ v.description||(cleanHtml(v.content)).substr(0,100)+'···' }}
你可能感兴趣
推荐阅读 更多>