$set的用法
2018-08-08 本文已影响13人
码字与律动
1、点击取消按钮,重复赋值,因为使用push,会出现重复数据,使用$set解决。
let index = 0
for (var key in this.data) {
this.$set(this.radioButtonList, index, key)
index += 1
// this.radioButtonList.push(key)
}
this.radioButtonList.sort()