diff --git a/web/public/js/components/server/http-cond-definitions.js b/web/public/js/components/server/http-cond-definitions.js index 9a21c6bf..f4f07f1a 100644 --- a/web/public/js/components/server/http-cond-definitions.js +++ b/web/public/js/components/server/http-cond-definitions.js @@ -54,11 +54,18 @@ Vue.component("http-cond-url-extension", { if (this.addingExt.length == 0) { return } - if (this.addingExt[0] != ".") { - this.addingExt = "." + this.addingExt - } - this.addingExt = this.addingExt.replace(/\s+/g, "").toLowerCase() - this.extensions.push(this.addingExt) + + let that = this + this.addingExt.split(/[,;,;|]/).forEach(function (ext) { + ext = ext.trim() + if (ext.length > 0) { + if (ext[0] != ".") { + ext = "." + ext + } + ext = ext.replace(/\s+/g, "").toLowerCase() + that.extensions.push(ext) + } + }) // 清除状态 this.cancelAdding() @@ -70,12 +77,12 @@ Vue.component("http-cond-url-extension", { template: `