答案是不可以的,重名會報錯
<div id="chongming">
{{testname}}
<button v-on:click='dianji'>點選</button>
</div>
new Vue({
el:'#chongming',
data:{
testname:'這是轉換資訊你知道麼?'
},
methods:{
testname:function(){
console.log(123);
},
dianji:function(){
this.testname = this.testname.split('').reverse().join('');
this.testname();
}
}
});
