jr-msg

0.1.1 • Public • Published

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
    })

Readme

Keywords

Package Sidebar

Install

npm i jr-msg

Weekly Downloads

1

Version

0.1.1

License

ISC

Unpacked Size

5.43 kB

Total Files

5

Last publish

Collaborators

  • dong-lei