需要使用到vue的全局api $set(item,'newParam','value')方法

group: [ // 对象数组
          { id: '1', name: '任务1' ,disable: false},
          { id: '2', name: '任务2' ,disable: false},
          { id: '3', name: '任务3' ,disable: false},
          { id: '4', name: '任务4' ,disable: false},
          { id: '5', name: '任务5' ,disable: false},
          { id: '6', name: '任务6' ,disable: false},
          { id: '7', name: '任务7' ,disable: false},
          { id: '8', name: '任务8' ,disable: false}
        ],


for(var i=0; i<this.group.length;i++){ // 添加disable属性并设置为false
          this.$set(this.group[i], 'disable', 'false')
        }

 

Logo

前往低代码交流专区

更多推荐