Home>Article>Web Front-end> How vue-cli introduces layui

How vue-cli introduces layui

coldplay.xixi
coldplay.xixi Original
2020-11-11 16:53:06 2853browse

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!

Statement:
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