Showing
2 changed files
with
30 additions
and
6 deletions
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <a-row> |
| 5 | 5 | <Button @click="handleExcute" type="primary"> 执行测试请求 </Button> |
| 6 | 6 | </a-row> |
| 7 | - <div v-if="isShowTestResult" style="display: flex; justify-content: space-between"> | |
| 7 | + <div v-if="isShowTestResult" class="flex justify-between"> | |
| 8 | 8 | <a-row class="mt-8" type="flex" justify="center" align="middle"> |
| 9 | 9 | <a-col :span="3"> 测试地址 </a-col> |
| 10 | 10 | <a-col :span="21"> |
| ... | ... | @@ -17,10 +17,17 @@ |
| 17 | 17 | </div> |
| 18 | 18 | <div class="mt-8"> |
| 19 | 19 | <a-row type="flex" align="top"> |
| 20 | - <a-col :span="method === '2' ? 11 : 6"> | |
| 20 | + <a-col | |
| 21 | + :span=" | |
| 22 | + method === RequestMethodTypeEnum.WEBSOCKET | |
| 23 | + ? 11 | |
| 24 | + : httpType === RequestHttpTypeEnum.POST | |
| 25 | + ? 4 | |
| 26 | + : 6 | |
| 27 | + " | |
| 28 | + > | |
| 21 | 29 | <p>过滤器函数编写:</p> |
| 22 | 30 | <AceTypeIsJsEditor |
| 23 | - style="" | |
| 24 | 31 | :restData="getRestData" |
| 25 | 32 | @changeAceContent="onHandleAceContent" |
| 26 | 33 | ref="aceTypeIsJsEditorRef" |
| ... | ... | @@ -30,9 +37,22 @@ |
| 30 | 37 | <a-divider type="vertical" class="divider-color" /> |
| 31 | 38 | </a-col> |
| 32 | 39 | <a-col |
| 33 | - :span="method === '2' ? 12 : 17" | |
| 40 | + :span=" | |
| 41 | + method === RequestMethodTypeEnum.WEBSOCKET | |
| 42 | + ? 12 | |
| 43 | + : httpType === RequestHttpTypeEnum.POST | |
| 44 | + ? 19 | |
| 45 | + : 17 | |
| 46 | + " | |
| 34 | 47 | style="position: relative" |
| 35 | - :style="{ left: (method === '2' ? 1.5 : 0) + 'vw' }" | |
| 48 | + :style="{ | |
| 49 | + left: | |
| 50 | + (method === RequestMethodTypeEnum.WEBSOCKET | |
| 51 | + ? 1.5 | |
| 52 | + : httpType === RequestHttpTypeEnum.POST | |
| 53 | + ? -1.5 | |
| 54 | + : 0) + 'vw', | |
| 55 | + }" | |
| 36 | 56 | > |
| 37 | 57 | <a-col> |
| 38 | 58 | <p>接口返回数据(res):</p> |
| ... | ... | @@ -58,7 +78,7 @@ |
| 58 | 78 | import AceTypeIsJsEditor from '../../SimpleRequest/components/aceEditor.vue'; |
| 59 | 79 | import { Tag } from 'ant-design-vue'; |
| 60 | 80 | import { useThrottleFn } from '@vueuse/shared'; |
| 61 | - import { RequestMethodTypeEnum } from '../../../config/enum'; | |
| 81 | + import { RequestMethodTypeEnum, RequestHttpTypeEnum } from '../../../config/enum'; | |
| 62 | 82 | |
| 63 | 83 | const emits = defineEmits(['emitExcute']); |
| 64 | 84 | |
| ... | ... | @@ -69,6 +89,9 @@ |
| 69 | 89 | method: { |
| 70 | 90 | type: String, |
| 71 | 91 | }, |
| 92 | + httpType: { | |
| 93 | + type: String, | |
| 94 | + }, | |
| 72 | 95 | }); |
| 73 | 96 | |
| 74 | 97 | const showTestFlag = ref(false); | ... | ... |