0.1.1 • Published 2 years ago

jr-msg v0.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

jr-msg

插件介绍

这是一个vue2封装的toast插件, pc和mobile都可以用

install

npm install jr-msg

使用

全局引入

在man.js中引入

    import jrMsg from 'jr-msg'
    Vue.use(jrMsg.$msg)
    //在组件中调用:
    this.$msg({
        time: 3000, //显示时间
        content: '我的包', //提示内容, 字符串
        hasClose: false,  //是否有关闭按钮
        type: 'info',  //info warning success error 同element ui的样式
        client: 'pc',  //pc端;  'mobile' 移动端
        direction: 'bottom' //出现位置 left right top bottom
    })

局部引入

在组件中引入

    import jrMsg from 'jr-msg'
    jrMsg.msg({
        time: 3000, //显示时间
        content: '我的包', //提示内容, 字符串
        hasClose: false,  //是否有关闭按钮
        type: 'info',  //info warning success error 同element ui的样式
        client: 'pc',  //pc端;  'mobile' 移动端
        direction: 'bottom' //出现位置 left right top bottom
    })
0.1.1

2 years ago

0.1.0

2 years ago