vue生命周期
- beforeCreat
- created
- beforeMount
- mounted
- beforeDestroy
- destroyed
- beforeUpdate
- updated
模板语法
- v-html
- v-text
计算属性 方法 侦听器
var vm = new Vue({
el: "#app",
data: {
firstName: 'zhao',
lastName: 'gary',
fullName:'gary zhao',
age: 28
},
watch:{
firstName: function () {'' +
console.log('计算了一次')
this.fullName = this.firstName +' '+ this.lastName
},
lastName: function () {
console.log('计算了一次')
this