Home > Web Front-end > Vue.js > How vue-cli introduces layui

How vue-cli introduces layui

coldplay.xixi
Release: 2020-11-17 16:32:57
Original
2958 people have browsed it

How to introduce layui in vue-cli: first download layui; then put the file in the static folder; finally, introduce js and css according to the correct path in [main.js] or in [index. html] file.

How vue-cli introduces layui

【Recommended related articles: vue.js

How to introduce layui in vue-cli:

1. Download layui (provided by the official website)

2. Place the file In the static folder

3. Introduce js and css according to the correct path in main.js or reference it in the index.html file (note the path)

4. Static folder and The difference between the /src/assets folder

The static resources in the static file will not be processed by webpack during packaging, but will be copied directly to the target file. The content in this folder must be referenced using absolute paths;

The static resources in the src/assets file will be processed by webpack when packaging, and the templates and css in all *.vue files will be parsed by the URLs of vue-html-loader and css-loader to query the resources;

This is determined by build.assetspublicpath and build.assetssubdirectory in the config/index.js file

How vue-cli introduces layui

The above is the detailed content of How vue-cli introduces layui. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template