Home > Web Front-end > JS Tutorial > How to introduce vuejs locally

How to introduce vuejs locally

青灯夜游
Release: 2023-01-11 09:20:07
Original
8640 people have browsed it

How to introduce vuejs locally: 1. Download the "vue.min.js" file locally from the vue official website; 2. Use the script tag in the HTML document to introduce the downloaded vue file, the syntax is " ".

How to introduce vuejs locally

The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.

Introduce vuejs locally

Go to the official website to download the vue.min.js file locally, the official website download address: https://vuejs.org /js/vue.min.js

Then directly use script to import the local vue.js file.

<script src="./js/vue.min.js"></script>
Copy after login

Add code in HTML document

<body>
	<div id="app">{{aaa}}</div>
</body>
<script>
	new Vue({
		el:&#39;#app&#39;,
		data:{
			aaa:&#39;Hello Vue.js !&#39;
		}})
</script>
Copy after login

Related recommendations: "vue.js Tutorial"

The above is the detailed content of How to introduce vuejs locally. 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