From f4ce5f812a15bd0dac784e7983b2ff23a2759de4 Mon Sep 17 00:00:00 2001 From: chenlong Date: Tue, 30 Jul 2024 15:22:55 +0800 Subject: [PATCH] . --- Admin/View/Document/view_api_info.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Admin/View/Document/view_api_info.php b/Admin/View/Document/view_api_info.php index 065ead9..68d9d04 100644 --- a/Admin/View/Document/view_api_info.php +++ b/Admin/View/Document/view_api_info.php @@ -65,7 +65,7 @@ $apiInfo = El::double('el-card')->setAttr('v-if', 'currentApiInfo')->append( El::double('iframe')->setAttr("src", TP::route()->to([DocumentController::class, 'requestCode'])), ), El::double('el-tab-pane')->setAttr('label', '响应')->setAttr('name', 'Response')->append( - El::fromCode('
'), + El::fromCode('
'), El::fromCode('
'), ), ) @@ -90,7 +90,7 @@ $vue->addMethod('apiShowType', JsFunc::anonymous(['name'])->code( }))"), ), JsIf::when("name === 'Response' && this.responseEditor === null")->then( - JsCode::raw("this.responseEditor = new JSONEditor(document.getElementById('ResponseJson'), this.jsonEditorInitOptions('code', (value) => {}))"), + JsCode::raw("this.\$nextTick(() => this.responseEditor = new JSONEditor(document.getElementById('ResponseJson'), this.jsonEditorInitOptions('code', (value) => {})))"), ), JsCode::raw('this.$nextTick(() => { this.apiFormEditor && this.apiFormEditor.set(this.apiFormData); @@ -131,7 +131,8 @@ $vue->addMethod('sendRequest', JsFunc::anonymous()->code( } } }; - this.showApiInfo = "Response"; + this.showApiInfo = "Response"; + this.apiShowType(this.showApiInfo); request.call(this.currentApiInfo.url, this.currentApiInfo.method, this.apiFormData); JS) ));