缓存条件类型增加“URL通配符”

This commit is contained in:
刘祥超
2023-06-16 11:34:39 +08:00
parent 8cf37dd37c
commit 97abc6aeb9
3 changed files with 43 additions and 1 deletions

View File

@@ -438,6 +438,38 @@ Vue.component("http-cond-url-not-regexp", {
</div>`
})
// URL通配符
Vue.component("http-cond-url-wildcard-match", {
props: ["v-cond"],
mounted: function () {
this.$refs.valueInput.focus()
},
data: function () {
let cond = {
isRequest: true,
param: "${requestPath}",
operator: "wildcard match",
value: "",
isCaseInsensitive: false
}
if (this.vCond != null && typeof this.vCond.value == "string") {
cond.value = this.vCond.value
}
return {
cond: cond
}
},
methods: {
changeCaseInsensitive: function (isCaseInsensitive) {
this.cond.isCaseInsensitive = isCaseInsensitive
}
},
template: `<div>
<input type="hidden" name="condJSON" :value="JSON.stringify(cond)"/>
<input type="text" v-model="cond.value" ref="valueInput"/>
<p class="comment">匹配URL的通配符用星号<code-label>*</code-label>)表示任意字符,比如(<code-label>/images/*.png</code-label>、<code-label>/static/*</code-label>,不需要带域名。</p>
</div>`
})
// User-Agent正则匹配
Vue.component("http-cond-user-agent-regexp", {