<div id="app">
<p id="age">me:{{me()}}</p></div>new Vue({
el:"#app",
data:{
y:454,
},
methods:{
me(a){ console.log("methods is run",this.y) return this.y;
}
},
beforeUpdate(){ console.log("dom:",document.getElementById("age").innerHTML,this.y)
},
updated(){ console.log("dom:",document.getElementById("age").innerHTML,this.y)
}
}执行顺序是什么?
添加回答
举报
0/150
提交
取消