Home > Web Front-end > JS Tutorial > body text

Vue-cli introduces third-party JS and CSS methods in detail

小云云
Release: 2018-01-24 10:31:44
Original
2785 people have browsed it

This article mainly shares with you a common method for introducing third-party JS and CSS in Vue cli. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor and take a look. I hope it can help everyone.

The first method:

Introduce

js

<script type="text/javascript" src="static/mui.min.js" ></script>
Copy after login

css

<link rel="stylesheet" href="static/mui.min.css" rel="external nofollow" />
Copy after login

directly into index.html The second way is to use the import method to import

js

import mui from '../../../static/mui.min.js'
Copy after login

css

@import "../../common/stylus/mixin";
Copy after login

in a single page. Just write the path when importing.

Related recommendations:

thinkphp how to introduce third-party classes

vue introduces css, pitfalls and solutions encountered by less Method example sharing

Summary of four ways to introduce css

The above is the detailed content of Vue-cli introduces third-party JS and CSS methods in detail. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!