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刪除。