diff --git a/web/public/js/components.js b/web/public/js/components.js index e75ff901..6a0ec3f8 100755 --- a/web/public/js/components.js +++ b/web/public/js/components.js @@ -2450,7 +2450,7 @@ Vue.component("http-firewall-actions-view", { }) Vue.component("http-request-scripts-config-box", { - props: ["vRequestScriptsConfig"], + props: ["vRequestScriptsConfig", "v-is-location"], data: function () { let config = this.vRequestScriptsConfig if (config == null) { @@ -2476,12 +2476,12 @@ Vue.component("http-request-scripts-config-box", {

请求初始化

在请求刚初始化时调用,此时自定义Header等尚未生效。

- +

准备发送请求

在准备执行请求或者转发请求之前调用,此时自定义Header、源站等已准备好。

- +
` @@ -7493,6 +7493,9 @@ Vue.component("http-location-labels", { Websocket + + 请求脚本 +
PAGE [状态码{{page.status[0]}}] -> {{page.url}}
@@ -7512,7 +7515,7 @@ Vue.component("http-location-labels", { Vue.component("http-location-labels-label", { props: ["v-class", "v-href"], - template: `` + template: `` }) Vue.component("http-gzip-box", { @@ -10002,7 +10005,7 @@ Vue.component("server-group-selector", { }) Vue.component("script-group-config-box", { - props: ["v-group"], + props: ["v-group", "v-is-location"], data: function () { let group = this.vGroup if (group == null) { @@ -10036,7 +10039,12 @@ Vue.component("script-group-config-box", { } }, template: `
- + + +
+
+ +
` }) @@ -12525,7 +12533,7 @@ Vue.component("node-role-name", { let sourceCodeBoxIndex = 0 Vue.component("source-code-box", { - props: ["name", "type", "id", "read-only", "width", "height"], + props: ["name", "type", "id", "read-only", "width", "height", "focus"], mounted: function () { let readOnly = this.readOnly if (typeof readOnly != "boolean") { @@ -12577,6 +12585,10 @@ Vue.component("source-code-box", { }) boxEditor.setValue(value) + if (this.focus) { + boxEditor.focus() + } + let width = this.width let height = this.height if (width != null && height != null) { @@ -12588,6 +12600,11 @@ Vue.component("source-code-box", { } boxEditor.setSize(width, height) } + } else if (height != null) { + height = parseInt(height) + if (!isNaN(height)) { + boxEditor.setSize("100%", height) + } } let info = CodeMirror.findModeByMIME(this.type) diff --git a/web/public/js/components/server/http-location-labels.js b/web/public/js/components/server/http-location-labels.js index df5be011..953bb0fa 100644 --- a/web/public/js/components/server/http-location-labels.js +++ b/web/public/js/components/server/http-location-labels.js @@ -68,6 +68,9 @@ Vue.component("http-location-labels", { Websocket + + 请求脚本 +
PAGE [状态码{{page.status[0]}}] -> {{page.url}}
@@ -87,5 +90,5 @@ Vue.component("http-location-labels", { Vue.component("http-location-labels-label", { props: ["v-class", "v-href"], - template: `` + template: `` }) \ No newline at end of file