Home  >  Article  >  Web Front-end  >  How to use script to introduce vue.js

How to use script to introduce vue.js

coldplay.xixi
coldplay.xixiOriginal
2020-11-11 14:51:195423browse

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.

How to use script to introduce vue.js

【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!

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