mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-02 01:40:25 +08:00
优化缓存配置界面
This commit is contained in:
@@ -16,7 +16,8 @@ Vue.component("http-cache-config-box", {
|
|||||||
cacheConfig.cacheRefs = []
|
cacheConfig.cacheRefs = []
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
cacheConfig: cacheConfig
|
cacheConfig: cacheConfig,
|
||||||
|
moreOptionsVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -32,6 +33,9 @@ Vue.component("http-cache-config-box", {
|
|||||||
result += String.fromCharCode(parseInt(s.substring(i, i + 1)) + ((Math.random() < 0.5) ? "a" : "A").charCodeAt(0))
|
result += String.fromCharCode(parseInt(s.substring(i, i + 1)) + ((Math.random() < 0.5) ? "a" : "A").charCodeAt(0))
|
||||||
}
|
}
|
||||||
this.cacheConfig.purgeKey = result
|
this.cacheConfig.purgeKey = result
|
||||||
|
},
|
||||||
|
showMoreOptions: function () {
|
||||||
|
this.moreOptionsVisible = !this.moreOptionsVisible
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
template: `<div>
|
template: `<div>
|
||||||
@@ -59,6 +63,13 @@ Vue.component("http-cache-config-box", {
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tbody v-show="isOn()">
|
<tbody v-show="isOn()">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<a href="" @click.prevent="showMoreOptions"><span v-if="moreOptionsVisible">收起选项</span><span v-else>更多选项</span><i class="icon angle" :class="{up: moreOptionsVisible, down:!moreOptionsVisible}"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
<tbody v-show="isOn() && moreOptionsVisible">
|
||||||
<tr>
|
<tr>
|
||||||
<td>自动添加X-Cache Header</td>
|
<td>自动添加X-Cache Header</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user