标签: javascript vue.js
我有几个名为icon1Loading,icon2Loading等的本地数据变量。如何动态调用变量以更改其值?
icon1Loading
icon2Loading
data(){ return { icon1Loading: false, icon2Loading: false } } changeLoadingState(iconNumber){ this.icon${iconNumber}Loading = true }