缓存条件增加多个匹配方式/优化缓存设置界面

This commit is contained in:
刘祥超
2021-05-12 15:07:30 +08:00
parent 1d992b0e97
commit 2af5e059eb
7 changed files with 87 additions and 11 deletions

View File

@@ -102,6 +102,53 @@ Vue.component("http-cond-url-prefix", {
</div>`
})
// URL精准匹配
Vue.component("http-cond-url-eq", {
props: ["v-cond"],
data: function () {
let cond = this.vCond
if (cond == null) {
cond = {
isRequest: true,
param: "${requestPath}",
operator: "eq",
value: ""
}
}
return {
cond: cond
}
},
template: `<div>
<input type="hidden" name="condJSON" :value="JSON.stringify(cond)"/>
<input type="text" v-model="cond.value"/>
</div>`
})
// URL正则匹配
Vue.component("http-cond-url-regexp", {
props: ["v-cond"],
data: function () {
let cond = this.vCond
if (cond == null) {
cond = {
isRequest: true,
param: "${requestPath}",
operator: "regexp",
value: ""
}
}
return {
cond: cond
}
},
template: `<div>
<input type="hidden" name="condJSON" :value="JSON.stringify(cond)"/>
<input type="text" v-model="cond.value"/>
</div>`
})
// 根据MimeType
Vue.component("http-cond-mime-type", {
props: ["v-cond"],