当调用test2时:
methods = {
test(age){
console.log('test', age);
},
test2(){
console.log(this.methods);
this.methods.test('222');
console.log('test2')
}
};
结果:
{test: f, test2: f}
test 222
test2