mm(){
for(var i=this.snakenode.length-1;i>0;i--){
this.snakenode[i]=this.snakenode[i-1];
};
}
up_start(event){
this.mm();
console.log(this.snakenode);
this.snakenode[0][1]=this.snakenode[0][1]+15;
console.log('向上移动');
}
这两个函数,通过另一个脚本代码调用up_start提示this.mm is not a function.
但是通过当前脚本的生命周期函数调用就可以正常运行,这是为什么呢