优化添加缓存条件和不缓存条件交互

This commit is contained in:
GoEdgeLab
2023-12-28 15:50:19 +08:00
parent 941a6d0d28
commit 46e36344b6

View File

@@ -79,7 +79,17 @@ Vue.component("http-cache-refs-config-box", {
that.refs.push(newRef) that.refs.push(newRef)
} }
that.change() // move to bottom
var afterChangeCallback = function () {
setTimeout(function () {
let rightBox = document.querySelector(".right-box")
if (rightBox != null) {
rightBox.scrollTo(0, isReverse ? 0 : 100000)
}
}, 100)
}
that.change(afterChangeCallback)
} }
}) })
}, },
@@ -140,7 +150,7 @@ Vue.component("http-cache-refs-config-box", {
} }
return unit return unit
}, },
change: function () { change: function (callback) {
this.$forceUpdate() this.$forceUpdate()
// 自动保存 // 自动保存
@@ -159,7 +169,11 @@ Vue.component("http-cache-refs-config-box", {
}) })
.success(function (resp) { .success(function (resp) {
if (resp.data.isUpdated) { if (resp.data.isUpdated) {
teaweb.successToast("保存成功") teaweb.successToast("保存成功", null, function () {
if (typeof callback == "function") {
callback()
}
})
} }
}) })
.post() .post()