diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue index 655ed35aad..a58c0ce709 100644 --- a/frontend/src/components/pure/ms-table/base-table.vue +++ b/frontend/src/components/pure/ms-table/base-table.vue @@ -203,7 +203,7 @@ :name="item.slotName" v-bind="{ record, rowIndex, column, dataIndex: item.dataIndex, columnConfig: item }" > - {{ record[item.dataIndex as string] || (attrs.emptyDataShowLine ? '-' : '') }} + {{ getDisplayValue(record[item.dataIndex as string]) }} @@ -374,6 +374,15 @@ const isEnter = ref(false); const { rowKey }: Partial> = attrs; + + // 显示值 (不处理0) + function getDisplayValue(value: any) { + if (value === '' || value === null || value === undefined || Number.isNaN(value)) { + return attrs.emptyDataShowLine ? '-' : ''; + } + return value; + } + // 第一行表格合并 const currentSpanMethod = ({ rowIndex, diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue index 3ffc298c6b..2cfb5bc610 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue @@ -63,7 +63,7 @@ {{ t('caseManagement.caseReview.allCases') }}
({{ allCount }})
+ + + + + @@ -51,6 +58,7 @@ import { useRoute } from 'vue-router'; import { useVModel } from '@vueuse/core'; + import MsButton from '@/components/pure/ms-button/index.vue'; import MsIcon from '@/components/pure/ms-icon-font/index.vue'; import MsTree from '@/components/business/ms-tree/index.vue'; import type { MsTreeNodeData } from '@/components/business/ms-tree/types'; @@ -63,7 +71,6 @@ const props = defineProps<{ modulesCount?: Record; // 模块数量统计对象 - isExpandAll?: boolean; // 是否展开所有节点 selectedKeys: string[]; // 选中的节点 key }>(); const emit = defineEmits<{ @@ -85,14 +92,10 @@ const activeFolder = ref('all'); const allCount = ref(0); - const isExpandAll = ref(props.isExpandAll); - - watch( - () => props.isExpandAll, - (val) => { - isExpandAll.value = val; - } - ); + const isExpandAll = ref(false); + function expandHandler() { + isExpandAll.value = !isExpandAll.value; + } function getFolderClass(id: string) { return activeFolder.value === id ? 'folder-text folder-text--active' : 'folder-text'; diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/executeSubmit.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/executeSubmit.vue index 297b62e010..d46a5838ff 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/executeSubmit.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/detail/executeSubmit.vue @@ -1,12 +1,6 @@