修复缓存条件设置时界面可能不会自动刷新的问题

This commit is contained in:
GoEdgeLab
2022-05-05 11:25:23 +08:00
parent 4a5b5d0346
commit f2e5b6c30b
5 changed files with 49 additions and 33 deletions

View File

@@ -98,6 +98,8 @@ Vue.component("http-cache-refs-config-box", {
resp.data.cacheRef.id = that.refs[index].id
Vue.set(that.refs, index, resp.data.cacheRef)
that.change()
that.$refs.cacheRef[index].updateConds(resp.data.cacheRef.conds)
that.$refs.cacheRef[index].notifyChange()
}
})
},
@@ -140,6 +142,8 @@ Vue.component("http-cache-refs-config-box", {
return unit
},
change: function () {
this.$forceUpdate()
// 自动保存
if (this.vCachePolicyId != null && this.vCachePolicyId > 0) { // 缓存策略
Tea.action("/servers/components/cache/updateRefs")