Vue introduces layui to report error

question: put css and js, of layui in static and also introduce these two css and js, in index.html. These two css and js, are also introduced in main.js using import, but writing layer.msg ("hello") in the mounted function in the build is an error report. The error report is as follows:

clipboard.png

index.html:

clipboard.png

main.js:

clipboard.png

swiperbanner.vue:

clipboard.png

what exactly is the problem? I"ve been looking for it all morning, but I really can"t find out why


the error message is very clear, layer is not defined. It is not possible for you to introduce layer.js before, to use layui.all.js,. In addition, you should not need to introduce layui, in both index.html and main.js. You only need to introduce layui, in index.html. Finally, although I haven't used layui, according to his documentation, this ui library should not be suitable for use with vue.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b33360-2be71.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b33360-2be71.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?