const app = new Vue({
el:"#app",
data:{
message:"hello"
},
methods:{
add:function(){
}
}
});
v-for:
v-on:
v-bind:动态绑定(v-bind:src、v-bind:href),简写":"
v-html:
v-pre:展示原始
v-once:
v-text:不灵活
v-cloak:斗篷(Vue加载之前设置斗篷,Vue加载后移除斗篷)
v-bind动态绑定class:
·对象语法:class='{类名:boolean}'
·数组语法
v-bind动态绑定style:
·对象语法
·数组语法
计算属性:
computed:{
// 一般不实现,计算属性为只读属性
set:function(){
},
get:function(){
return this.namw1+this.name2
}
}