VUE第一天

v-clock  闪动问题 
v-test 会替换标签的内容  --------- {{}}  不替换
v-html 简析标签
v-bind: 绑定属性指令 属性值就当成了变量 简写 : 可以写合法的表达式 单向绑定
v-model  双向绑定 实现同步到VM  注意 :只能运用到表单中

v-on: v-on:click="方法" -- 简写 @  methods:{
                            方法:function(){
                            }
                           }
                            
()=>{this.}  内部的this和外部的this 一致 


v-for 循环 数组  对象数组  对象  (迭代数字 count in 10 从1开始)    v-for="(item, index) in items"
      key  只能用string/number,用v-bind     :key="index" 
      
      
v-if  每次删除创建dom
v-show  每次display:none


事件修饰符
@click.stop  阻止父元素事件触发 阻止冒泡
@click.prevent 阻止默认行为
@click.capture  捕获触发
@click.self  只有点击当前元素触发
@click.once  只触发一次

绑定class 4种  3元模式
:class="['aaa','bbb']"  aaa 是style
:class="['aaa',{'bbb':data}]" 
:class="{aaa:true}" 

绑定style   :style="{ 'color' : item.type == navIndexChild ? '#3E84E9' : '#333333' }"
:style="{color:'red'}" 
:style="data" 
:style="[data1,data2]" 

VUE第一天