方法一:
new Vue({
el: '#app',
data: {
test:111,
},
methods: {
test1:function(){
alert(this.test)
},
test2:function(){
alert("this is test2")
},
test3:function(){
this.$options.methods.test2();
}
}
})
方法二:
methods: {
test1:function(){
alert(this.test)
},
test2:function(){
alert("this is test2")
},
test3:function(){
this.test2();
}
}