优化代码

This commit is contained in:
GoEdgeLab
2020-12-23 09:52:31 +08:00
parent 9ccf7d1316
commit 24fb98899e
43 changed files with 111 additions and 479 deletions

View File

@@ -79,6 +79,29 @@ Vue.component("http-cond-url-extension", {
</div>`
})
// 根据URL前缀
Vue.component("http-cond-url-prefix", {
props: ["v-cond"],
data: function () {
let cond = this.vCond
if (cond == null) {
cond = {
isRequest: true,
param: "${requestPath}",
operator: "prefix",
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"],

View File

@@ -5,6 +5,12 @@
"description": "根据URL中的文件路径扩展名进行过滤",
"component": "http-cond-url-extension"
},
{
"type": "url-prefix",
"name": "路径前缀",
"description": "根据URL中的文件路径前缀进行过滤",
"component": "http-cond-url-prefix"
},
{
"type": "mime-type",
"name": "内容MimeType",