Skip to content

Commit

Permalink
fix: testcase pages show badge question
Browse files Browse the repository at this point in the history
  • Loading branch information
SamYSF committed May 28, 2024
1 parent 92d517f commit 61935ea
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions console/atest-ui/src/views/TestCase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,9 @@ const duplicateTestCase = () => {
<el-tabs v-model="requestActiveTab">
<el-tab-pane name="query" v-if="props.kindName !== 'tRPC' && props.kindName !== 'gRPC'">
<template #label>
<el-badge :value="testCaseWithSuite.data.request.query.length - 1"
:hidden="testCaseWithSuite.data.request.query.length === 1" class="item">Query</el-badge>
<el-badge v-if="testCaseWithSuite.data.request.query.length > 1"
:value="testCaseWithSuite.data.request.query.length - 1" class="item">Query</el-badge>
<el-badge v-else class="item">Query</el-badge>
</template>
<el-table :data="testCaseWithSuite.data.request.query" style="width: 100%">
<el-table-column label="Key" width="180">
Expand All @@ -601,8 +602,9 @@ const duplicateTestCase = () => {

<el-tab-pane name="header">
<template #label>
<el-badge :value="testCaseWithSuite.data.request.header.length - 1"
:hidden="testCaseWithSuite.data.request.header.length === 1" class="item">Header</el-badge>
<el-badge v-if="testCaseWithSuite.data.request.header.length > 1"
:value="testCaseWithSuite.data.request.header.length - 1" class="item">Header</el-badge>
<el-badge v-else class="item">Header</el-badge>
</template>
<el-table :data="testCaseWithSuite.data.request.header" style="width: 100%">
<el-table-column label="Key" width="180">
Expand Down Expand Up @@ -632,8 +634,9 @@ const duplicateTestCase = () => {

<el-tab-pane name="cookie">
<template #label>
<el-badge :value="testCaseWithSuite.data.request.cookie.length - 1"
:hidden="testCaseWithSuite.data.request.cookie.length === 1" class="item">Cookie</el-badge>
<el-badge v-if="testCaseWithSuite.data.request.cookie.length > 1"
:value="testCaseWithSuite.data.request.cookie.length - 1" class="item">Cookie</el-badge>
<el-badge v-else class="item">Cookie</el-badge>
</template>
<el-table :data="testCaseWithSuite.data.request.cookie" style="width: 100%">
<el-table-column label="Key">
Expand Down

0 comments on commit 61935ea

Please sign in to comment.