new Vue({
el: '#app',
data: {
test:111,
},
methods: {
test1:function(){
alert(this.test)
},
test2:function(){
alert("this is test2")
alert(this.test) //test3调用时弹出undefined
},
test3:function(){
this.$options.methods.test2();
}
}
})
Vue method中的方法互相调用
猜你喜欢
转载自blog.csdn.net/EscapePlan/article/details/104815043
今日推荐
周排行