mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-11 00:40:26 +08:00
优化代码
This commit is contained in:
@@ -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"],
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user