mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-05 14:20:25 +08:00
优化缓存条件设置交互
This commit is contained in:
@@ -35,17 +35,12 @@ Vue.component("http-cache-refs-config-box", {
|
||||
addRef: function (isReverse) {
|
||||
window.UPDATING_CACHE_REF = null
|
||||
|
||||
let width = window.innerWidth
|
||||
if (width > 1024) {
|
||||
width = 1024
|
||||
}
|
||||
let height = window.innerHeight
|
||||
if (height > 500) {
|
||||
height = 500
|
||||
}
|
||||
let that = this
|
||||
teaweb.popup("/servers/server/settings/cache/createPopup?isReverse=" + (isReverse ? 1 : 0), {
|
||||
width: width + "px",
|
||||
height: height + "px",
|
||||
callback: function (resp) {
|
||||
let newRef = resp.data.cacheRef
|
||||
@@ -82,17 +77,12 @@ Vue.component("http-cache-refs-config-box", {
|
||||
updateRef: function (index, cacheRef) {
|
||||
window.UPDATING_CACHE_REF = cacheRef
|
||||
|
||||
let width = window.innerWidth
|
||||
if (width > 1024) {
|
||||
width = 1024
|
||||
}
|
||||
let height = window.innerHeight
|
||||
if (height > 500) {
|
||||
height = 500
|
||||
}
|
||||
let that = this
|
||||
teaweb.popup("/servers/server/settings/cache/createPopup", {
|
||||
width: width + "px",
|
||||
height: height + "px",
|
||||
callback: function (resp) {
|
||||
resp.data.cacheRef.id = that.refs[index].id
|
||||
@@ -220,7 +210,7 @@ Vue.component("http-cache-refs-config-box", {
|
||||
</table>
|
||||
<p class="comment" v-if="refs.length > 1">所有条件匹配顺序为从上到下,可以拖动左侧的<i class="icon bars"></i>排序。服务设置的优先级比全局缓存策略设置的优先级要高。</p>
|
||||
|
||||
<button class="ui button tiny" @click.prevent="addRef(false)" type="button">+添加缓存设置</button> <a href="" @click.prevent="addRef(true)">+添加不缓存设置</a>
|
||||
<button class="ui button tiny" @click.prevent="addRef(false)" type="button">+添加缓存条件</button> <a href="" @click.prevent="addRef(true)">+添加不缓存条件</a>
|
||||
</div>
|
||||
<div class="margin"></div>
|
||||
</div>`
|
||||
|
||||
Reference in New Issue
Block a user