1.把layui对应的包放在static文件夹下,所以就直接放在了static下
2.在index.html中直接引入layui.js和layui.css
3.在vue组件中的created勾子函数中写入如下代码
created(){ const _this = this; layui.use(['layer'],function(){ _this.layer = layui.layer, this.layer.msg('hello'); }) }
1.把layui对应的包放在static文件夹下,所以就直接放在了static下
2.在index.html中直接引入layui.js和layui.css
3.在vue组件中的created勾子函数中写入如下代码
created(){ const _this = this; layui.use(['layer'],function(){ _this.layer = layui.layer, this.layer.msg('hello'); }) }
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。