vue 中this.后面加一个变量
用this[变量名]
<view :data-value="yzt" @tap="yizuotu($event,'yizuotu')">易做图</view>
yizuotu(e,t){
this[t]=e.currentTarget.dataset.value;
}
用this[变量名]
<view :data-value="yzt" @tap="yizuotu($event,'yizuotu')">易做图</view>
yizuotu(e,t){
this[t]=e.currentTarget.dataset.value;
}