data(){
return{
a:null,
b:null,
c:null
}
},
created:{
this.xx('a'),
this.xx('b'),
this.xx('c'),
},
methods:{
xx(arg){
这里的arg分别会传来'a','b','c'
我在这里怎么可以变成
this.a="值"
this.b="值"
this.c="值"
}
}
直接在
方法中给对应的属性赋值就可以了,
或者这样写