@@ -14,7 +14,8 @@ const { t } = useI18n()
14
14
const props = defineProps ({
15
15
name: String ,
16
16
suite: String ,
17
- store: String
17
+ store: String ,
18
+ kindName: String ,
18
19
})
19
20
const emit = defineEmits ([' updated' ])
20
21
@@ -357,7 +358,7 @@ watch(currentCodeGenerator, () => {
357
358
})
358
359
359
360
const options = GetHTTPMethods ()
360
- const activeName = ref (' second ' )
361
+ const activeName = ref (' body ' )
361
362
362
363
function bodyFiledExpectChange() {
363
364
const data = testCaseWithSuite .value .data .response .bodyFieldsExpect
@@ -411,7 +412,7 @@ function formChange() {
411
412
}
412
413
}
413
414
414
- const bodyType = ref (1 )
415
+ const bodyType = ref (5 )
415
416
function bodyTypeChange(e : number ) {
416
417
let contentType = " "
417
418
switch (e ) {
@@ -491,6 +492,7 @@ const queryPupularHeaders = (queryString: string, cb: (arg: any) => void) => {
491
492
<el-button type =" primary" @click =" openCodeDialog" >{{ t('button.generateCode') }}</el-button >
492
493
</div >
493
494
<el-select
495
+ v-if =" props.kindName !== 'tRPC' && props.kindName !== 'gRPC'"
494
496
v-model =" testCaseWithSuite.data.request.method"
495
497
class =" m-2"
496
498
placeholder =" Method"
@@ -528,7 +530,7 @@ const queryPupularHeaders = (queryString: string, cb: (arg: any) => void) => {
528
530
529
531
<el-main >
530
532
<el-tabs v-model =" activeName" class =" demo-tabs" >
531
- <el-tab-pane label =" Query" name =" query" >
533
+ <el-tab-pane label =" Query" name =" query" v-if = " props.kindName !== 'tRPC' && props.kindName !== 'gRPC' " >
532
534
<el-table :data =" testCaseWithSuite.data.request.query" style =" width : 100% " >
533
535
<el-table-column label =" Key" width =" 180" >
534
536
<template #default =" scope " >
@@ -549,7 +551,7 @@ const queryPupularHeaders = (queryString: string, cb: (arg: any) => void) => {
549
551
</el-table >
550
552
</el-tab-pane >
551
553
552
- <el-tab-pane label =" Headers" name =" second" >
554
+ <el-tab-pane label =" Headers" name =" second" v-if = " props.kindName !== 'tRPC' && props.kindName !== 'gRPC' " >
553
555
<el-table :data =" testCaseWithSuite.data.request.header" style =" width : 100% " >
554
556
<el-table-column label =" Key" width =" 180" >
555
557
<template #default =" scope " >
@@ -571,7 +573,7 @@ const queryPupularHeaders = (queryString: string, cb: (arg: any) => void) => {
571
573
</el-table >
572
574
</el-tab-pane >
573
575
574
- <el-tab-pane label =" Body" name =" third " >
576
+ <el-tab-pane label =" Body" name =" body " >
575
577
<el-radio-group v-model =" bodyType" @change =" bodyTypeChange" >
576
578
<el-radio :label =" 1" >none</el-radio >
577
579
<el-radio :label =" 2" >form-data</el-radio >
@@ -604,7 +606,7 @@ const queryPupularHeaders = (queryString: string, cb: (arg: any) => void) => {
604
606
</el-table >
605
607
</el-tab-pane >
606
608
607
- <el-tab-pane label =" Expected" name =" expected" >
609
+ <el-tab-pane label =" Expected" name =" expected" v-if = " props.kindName !== 'tRPC' && props.kindName !== 'gRPC' " >
608
610
<el-row :gutter =" 20" >
609
611
<span
610
612
class =" ml-3 w-50 text-gray-600 inline-flex items-center"
@@ -626,7 +628,7 @@ const queryPupularHeaders = (queryString: string, cb: (arg: any) => void) => {
626
628
/>
627
629
</el-tab-pane >
628
630
629
- <el-tab-pane label =" Expected Headers" name =" expected-headers" >
631
+ <el-tab-pane label =" Expected Headers" name =" expected-headers" v-if = " props.kindName !== 'tRPC' && props.kindName !== 'gRPC' " >
630
632
<el-table :data =" testCaseWithSuite.data.response.header" style =" width : 100% " >
631
633
<el-table-column label =" Key" width =" 180" >
632
634
<template #default =" scope " >
@@ -647,7 +649,7 @@ const queryPupularHeaders = (queryString: string, cb: (arg: any) => void) => {
647
649
</el-table >
648
650
</el-tab-pane >
649
651
650
- <el-tab-pane label =" BodyFiledExpect" name =" fourth" >
652
+ <el-tab-pane label =" BodyFiledExpect" name =" fourth" v-if = " props.kindName !== 'tRPC' && props.kindName !== 'gRPC' " >
651
653
<el-table :data =" testCaseWithSuite.data.response.bodyFieldsExpect" style =" width : 100% " >
652
654
<el-table-column label =" Key" width =" 180" >
653
655
<template #default =" scope " >
@@ -670,13 +672,13 @@ const queryPupularHeaders = (queryString: string, cb: (arg: any) => void) => {
670
672
</el-table >
671
673
</el-tab-pane >
672
674
673
- <el-tab-pane label =" Verify" name =" fifth" >
675
+ <el-tab-pane label =" Verify" name =" fifth" v-if = " props.kindName !== 'tRPC' && props.kindName !== 'gRPC' " >
674
676
<div v-for =" verify in testCaseWithSuite.data.response.verify" :key =" verify" >
675
677
<el-input :value =" verify" />
676
678
</div >
677
679
</el-tab-pane >
678
680
679
- <el-tab-pane label =" Schema" name =" schema" >
681
+ <el-tab-pane label =" Schema" name =" schema" v-if = " props.kindName !== 'tRPC' && props.kindName !== 'gRPC' " >
680
682
<el-input
681
683
v-model =" testCaseWithSuite.data.response.schema"
682
684
:autosize =" { minRows: 4, maxRows: 20 }"
0 commit comments