Talking about Vue 1

1. What is Vue

Maybe many friends already know it, but I'm still verbose. Vue is a progressive framework for building user interfaces. It is the easiest and easiest framework among the three front-end frameworks.

2. Why learn Vue

As I said above, this is the simplest front-end framework, which is more friendly to novices. It is recommended that novice players start with Vue first. The simplest means that the learning cost is relatively low, and the size of Vue is smaller than the other two frameworks. Vue compresses 20kb, React compresses about 34kb, and Angular compresses about 60Kb. The core response update mechanism of Vue means that when our data is updated, the view will automatically refresh.

3. How to create a Vue project

3.1, download nodejs

Insert picture description here
Check whether the nodejs installation is successful


In order to improve our download speed, execute the following command npm config set registry https://registry.npm.taobao.orgor you can usenpm install cnpm
Insert picture description here

3.2, build a vue project environment and create a vue project

3.2.1 Install vue-cli globally (scaffolding)

npm install vue-cli -g, Of course, if you download cnpm, just use this command cnpm install vue-cli -g
Insert picture description here

3.2.2 Enter the project directory you want to create

Use vue create '项目名称'or vue init webpack '项目名称'(webpack create a new project based on the template)
Insert picture description here
to create a successful project so far, you want to project up and running, we have to rely on the installation, use npm installor cnpm installinstall dependencies
Insert picture description here
can be used after installation depend on npm run devthe successful operation of the project to run an open interface effects as
Insert picture description here
far A Vue project is created and run. Please move here to learn Vue. This blog type does not record the basic knowledge of Vue.

Interview questions:
1. What
are the shortcomings of Vue does not support IE8 and lower browsers.
2. Explain the mvvm mode.
m: Model data model layer
v: View view layer
vm: try model layer // core

Guess you like

Origin blog.csdn.net/weixin_43889562/article/details/108556528