From a9288234976b42e311e1f7777ed69750189ca39f Mon Sep 17 00:00:00 2001 From: RogerWork Date: Tue, 6 Aug 2024 16:59:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8F=8D=E5=A4=8D=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E6=97=B6=EF=BC=8C=E6=B8=85=E9=99=A4=E4=B8=8A=E6=AC=A1?= =?UTF-8?q?=E7=9A=84=E7=BB=93=E6=9E=9C=EF=BC=8C=E6=98=BE=E7=A4=BA=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ec_api/TabArea.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/ec_api/TabArea.vue b/src/components/ec_api/TabArea.vue index e6568b4..a90de5f 100644 --- a/src/components/ec_api/TabArea.vue +++ b/src/components/ec_api/TabArea.vue @@ -196,6 +196,12 @@ function handle_request_url() { // 发送api请求 function send_request() { + if (UserApiData.value.api[activeTab.value].format === 'json'){ + UserApiData.value.api[activeTab.value].response = '{"root": "root"}' + } + if (UserApiData.value.api[activeTab.value].format === 'html' || UserApiData.value.api[activeTab.value].format === 'xml'){ + UserApiData.value.api[activeTab.value].response = '' + } const data = handle_request_data() ec_api_send_request(data).then(res => { if (res.format === 'json') { @@ -351,7 +357,7 @@ const ace_options = { + theme="chrome" :options="ace_options" class="vue-ace-editor" :wrap="true" style="width: 1200px"/>