fix(接口调试): 组件显隐切换问题解决

This commit is contained in:
baiqi 2024-02-27 14:05:02 +08:00 committed by 刘瑞斌
parent 53226e689e
commit 856285c082
3 changed files with 66 additions and 65 deletions

View File

@ -9,7 +9,6 @@ export default mergeConfig(
mode: 'production', mode: 'production',
plugins: [configCompressPlugin('gzip'), configVisualizerPlugin(), configImageminPlugin()], plugins: [configCompressPlugin('gzip'), configVisualizerPlugin(), configImageminPlugin()],
build: { build: {
minify: false, // TODO:临时关闭,排查问题
rollupOptions: { rollupOptions: {
output: { output: {
manualChunks: { manualChunks: {

View File

@ -9,6 +9,7 @@
"dev": "vite --config ./config/vite.config.dev.ts", "dev": "vite --config ./config/vite.config.dev.ts",
"build": "vue-tsc --noEmit && vite build --config ./config/vite.config.prod.ts", "build": "vue-tsc --noEmit && vite build --config ./config/vite.config.prod.ts",
"build:local": "vue-tsc --noEmit && vite build --config ./config/vite.config.prod.ts --mode development", "build:local": "vue-tsc --noEmit && vite build --config ./config/vite.config.prod.ts --mode development",
"build:localProd": "vue-tsc --noEmit && vite build --config ./config/vite.config.prod.ts --mode prod",
"report": "cross-env REPORT=true npm run build", "report": "cross-env REPORT=true npm run build",
"preview": "npm run build && vite preview --host", "preview": "npm run build && vite preview --host",
"type:check": "vue-tsc --noEmit --skipLibCheck", "type:check": "vue-tsc --noEmit --skipLibCheck",
@ -71,7 +72,7 @@
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"sortablejs": "^1.15.0", "sortablejs": "^1.15.0",
"tippy.js": "^6.3.7", "tippy.js": "^6.3.7",
"vue": "^3.4.15", "vue": "^3.4.20",
"vue-dompurify-html": "^4.1.4", "vue-dompurify-html": "^4.1.4",
"vue-draggable-plus": "^0.3.5", "vue-draggable-plus": "^0.3.5",
"vue-echarts": "^6.6.1", "vue-echarts": "^6.6.1",

View File

@ -130,11 +130,8 @@
/> />
</div> </div>
<div class="tab-pane-container"> <div class="tab-pane-container">
<a-spin <div v-show="requestVModel.activeTab === RequestComposition.PLUGIN">
v-if="requestVModel.activeTab === RequestComposition.PLUGIN" <a-spin :loading="pluginLoading" class="min-h-[100px] w-full">
:loading="pluginLoading"
class="min-h-[100px] w-full"
>
<MsFormCreate <MsFormCreate
v-model:api="fApi" v-model:api="fApi"
:rule="currentPluginScript" :rule="currentPluginScript"
@ -142,58 +139,62 @@
@change="handlePluginFormChange" @change="handlePluginFormChange"
/> />
</a-spin> </a-spin>
</div>
<div v-show="requestVModel.activeTab === RequestComposition.HEADER">
<debugHeader <debugHeader
v-if="requestVModel.activeTab === RequestComposition.HEADER" v-show="requestVModel.activeTab === RequestComposition.HEADER"
v-model:params="requestVModel.headers" v-model:params="requestVModel.headers"
:layout="activeLayout" :layout="activeLayout"
:second-box-height="secondBoxHeight" :second-box-height="secondBoxHeight"
@change="handleActiveDebugChange" @change="handleActiveDebugChange"
/> />
</div>
<div v-show="requestVModel.activeTab === RequestComposition.BODY">
<debugBody <debugBody
v-else-if="requestVModel.activeTab === RequestComposition.BODY"
v-model:params="requestVModel.body" v-model:params="requestVModel.body"
:layout="activeLayout" :layout="activeLayout"
:second-box-height="secondBoxHeight" :second-box-height="secondBoxHeight"
:upload-temp-file-api="props.uploadTempFileApi" :upload-temp-file-api="props.uploadTempFileApi"
@change="handleActiveDebugChange" @change="handleActiveDebugChange"
/> />
</div>
<div v-show="requestVModel.activeTab === RequestComposition.QUERY">
<debugQuery <debugQuery
v-else-if="requestVModel.activeTab === RequestComposition.QUERY"
v-model:params="requestVModel.query" v-model:params="requestVModel.query"
:layout="activeLayout" :layout="activeLayout"
:second-box-height="secondBoxHeight" :second-box-height="secondBoxHeight"
@change="handleActiveDebugChange" @change="handleActiveDebugChange"
/> />
</div>
<div v-show="requestVModel.activeTab === RequestComposition.REST">
<debugRest <debugRest
v-else-if="requestVModel.activeTab === RequestComposition.REST"
v-model:params="requestVModel.rest" v-model:params="requestVModel.rest"
:layout="activeLayout" :layout="activeLayout"
:second-box-height="secondBoxHeight" :second-box-height="secondBoxHeight"
@change="handleActiveDebugChange" @change="handleActiveDebugChange"
/> />
</div>
<div v-show="requestVModel.activeTab === RequestComposition.PRECONDITION">
<precondition <precondition
v-else-if="requestVModel.activeTab === RequestComposition.PRECONDITION"
v-model:config="requestVModel.children[0].preProcessorConfig" v-model:config="requestVModel.children[0].preProcessorConfig"
@change="handleActiveDebugChange" @change="handleActiveDebugChange"
/> />
</div>
<div v-show="requestVModel.activeTab === RequestComposition.POST_CONDITION">
<postcondition <postcondition
v-else-if="requestVModel.activeTab === RequestComposition.POST_CONDITION"
v-model:config="requestVModel.children[0].postProcessorConfig" v-model:config="requestVModel.children[0].postProcessorConfig"
:response="requestVModel.response.requestResults[0]?.responseResult.body" :response="requestVModel.response.requestResults[0]?.responseResult.body"
:layout="activeLayout" :layout="activeLayout"
:second-box-height="secondBoxHeight" :second-box-height="secondBoxHeight"
@change="handleActiveDebugChange" @change="handleActiveDebugChange"
/> />
<debugAuth </div>
v-else-if="requestVModel.activeTab === RequestComposition.AUTH" <div v-show="requestVModel.activeTab === RequestComposition.AUTH">
v-model:params="requestVModel.authConfig" <debugAuth v-model:params="requestVModel.authConfig" @change="handleActiveDebugChange" />
@change="handleActiveDebugChange" </div>
/> <div v-show="requestVModel.activeTab === RequestComposition.SETTING">
<debugSetting <debugSetting v-model:params="requestVModel.otherConfig" @change="handleActiveDebugChange" />
v-else-if="requestVModel.activeTab === RequestComposition.SETTING" </div>
v-model:params="requestVModel.otherConfig"
@change="handleActiveDebugChange"
/>
</div> </div>
</div> </div>
</template> </template>