vue

1.vue的含义是什么?

Vue(发音为/vjuː/,类似于视图)是用于构建用户界面的渐进式框架。与其他单片框架不同,Vue是从头开始设计的,可逐步采用。核心库仅侧重于视图层,易于获取并与其他库或现有项目集成。另一方面,当与现代工具和支持库结合使用时,Vue完全能够为复杂的单页应用程序提供动力。

2.引入的两种方法:

script引入
git的安装,在Git Bash Here里面输入($ npm install vue);

3.js的三种框架:

①vue ②angular ③react

get安装指令:

npm空格 install安装 vue

4.用vue输入hello vue

eg:

  
       
           
           Document 
      
      
           
{{msg}}
会显示:hello vue
vue_第1张图片
5141b74f543a4c01ab757fb9b7b5d976.jpeg

5.vue里面v-for的使用例子:

 
      
               
                Title
       
       
              
{{msg}} {{num}} {{arr}} {{obj}}
  • {{val}}
  • {{val}}
  • {{index}}=={{val}}
  • {{index}}=={{val}}
  • {{val.num}}--{{val.pname}}--{{val.price}}

屏幕显示:

Hello Vue 
12
 [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ] 
{ "name": "jack", "age": 18 }
1
2
3
4
5
6
7
8
9
jack
18
0==1
1==2
2==3
3==4
4==5
5==6
6==7
7==8
8==9
name==jack
age==18
1--香蕉--3
2--苹果--4
3--西瓜--0.3

6.vue中table的使用:

 
      
            
            Title