Home > Article > Web Front-end > How to use script to introduce vue.js
How to use script to introduce vue.js: 1. Use the [3f1c4e4b6b16bbbd69b2ee476dc4f83a] tag to directly introduce the local [vue.js] file; 2. Use the [3f1c4e4b6b16bbbd69b2ee476dc4f83a] tag to introduce the online [vue. js] file.
【Recommended related articles: vue.js】
Use script to introduce vue. js method:
1. Use the 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag to directly introduce the local vue.js file
First use it directly on the official website of Vue.js Download the vue.js file to the local
Download address: https://vuejs.org/js/vue.min.js
Then use the 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag to introduce the local vue.js document.
<script src="本地vue.js文件路径"></script>
2. Use the 3f1c4e4b6b16bbbd69b2ee476dc4f83a tag to introduce the online vue.js file
We can import the online vue by writing a URL in the src attribute of the script .js files.
The following are two relatively stable CDNs recommended in foreign countries. I have not found which one is better in China. At present, it is recommended to download them locally.
Staticfile CDN (domestic): https://cdn.staticfile.org/vue/2.2.2/vue.min.js
unpkg: https://unpkg.com/vue/dist/vue.js, will remain consistent with the latest version released by npm.
cdnjs : https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.8/vue.min.js
Staticfile CDN (domestic)
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
unpkg (recommended)
<script src="https://unpkg.com/vue/dist/vue.js"></script>
cdnjs
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.8/vue.min.js"></script>
Related free learning recommendations: JavaScript (video)
The above is the detailed content of How to use script to introduce vue.js. For more information, please follow other related articles on the PHP Chinese website!