Vue.js learning portal: Introduction and Installation

What Vue.js that?

VUE (pronunciation / vjuː /, similar to the view) is a progressive frame for constructing user interfaces. The other frame difference is large, Vue is designed to be applied from the bottom up layer by layer. Vue core library focus only on the view layer, is not only easy to use but also easy to integrate third-party libraries or existing project.

Explain in detail the contents visible: a word Vue understand the core (and then make a note after reading this piece of content)

Environment to build

1. Download nodejs (http://nodejs.cn);

  • node -v View terminal installed successfully

  • npm -v View npm version installed successfully

2. Installation vue command: npm install vue; vue mounted scaffolding:npm install --global vue-cli

  • Scaffolding vue ( vue-CLI ) may be used to quickly build large single-page application.

Use vue-cli to build a single-page application

 //1、全局安装Vue-Cli
  npm install -g vue-cli
 //2、进入创建项目目录下
 //3、创建使用webpack模板的Vue单页应用,Enter后根据提示完成项目的创建
  vue init webpack projectname
 //4、进入项目目录下
  cd projectname
 //5、下载项目引用的包
  npm install
 //6、运行项目
  npm run dev

After the implementation of the above command, type in the browser http://localhost:8080/interface appears vue is to create success

Use the Vue

How to use the vue in the project; vue.js can be downloaded by reference documents; forms can also be introduced by cdn

1. Download the file vue.js

 //在html中引入vue的包文件
<script type="text/javascript" src="包文件地址/vue.js"></script>

Novice best introduction vue.js prompted, vue.min.js is a compressed version

2. cdn form

<script  src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>

Reference personal note: front-end framework vue study notes: environmental structures

reference

Guess you like

Origin www.cnblogs.com/songyan/p/12162747.html