问题
如下代码删除对象中的某个属性,vue中for渲染不更新
let newSearchCondition = this.searchCondition
delete newSearchCondition[index]
this.searchCondition = newSearchCondition
解决方法
只需在最后加上this.$forceUpdate()
使它强制更新即可,亲测有效
let newSearchCondition = this.searchCondition
delete newSearchCondition[index]
this.searchCondition = newSearchCondition
// 强制更新
this.$forceUpdate()