1、toast在main.js中引用
2、在每个页面中使用toast
3、每个页面有一个私有样式scoped,因此类名inexa的层级写在app.vue里
注:toast每调用一次(z-index)层级就会加一,因为默认打开了新窗口,层级会加一
补充知识:vant-ui toast和dialog使用
vant-ui中的toast和dialog使用
toast('提示') dialog({ message: '提示' }) //直接用官网的写法会报未定义
应该这样写
this.$toast('提示')
this.$dialog({ message: '提示' })
以上这篇vant中的toast层级改变操作就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持移动技术网。
您可能感兴趣的文章:
- vue init初始化项目后 npm run dev报错 10% building modules 1/1 modules 0 activeevents
- axios 处理 302 状态码的解决方法
- [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/feature
- react-native 在新版Xcode(10+)中运行出现的问题: node_modules/react-native/third-party/glog-0.3.4 , C compiler cannot create executables
- 使用puppeteer爬取网站并抓出404无效链接
- 【angular2+typeScript+ng-zorro】Carousel 走马灯的左右方向控件实现
- Cannot read property 'tap' of undefined
如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!
网友评论