这是一个vue2封装的toast插件, pc和mobile都可以用
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
})