From c611698aac2afb5a94caf71239e92f3f5d9b12d3 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Mon, 7 Sep 2026 19:15:18 +0800 Subject: [PATCH] fix: truncate long client warehouse fields --- src/components.d.ts | 1 + src/components/common/SingleLineText.vue | 25 +++++++++++++++++++ .../views/businessIdentifiers.test.mjs | 2 ++ .../views/WarehouseServiceView.vue | 3 ++- 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/components/common/SingleLineText.vue diff --git a/src/components.d.ts b/src/components.d.ts index 723bdea..eb92a23 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -54,6 +54,7 @@ declare module 'vue' { QueryToolbar: typeof import('./components/common/QueryToolbar.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + SingleLineText: typeof import('./components/common/SingleLineText.vue')['default'] WorkspaceTabs: typeof import('./components/WorkspaceTabs.vue')['default'] } export interface GlobalDirectives { diff --git a/src/components/common/SingleLineText.vue b/src/components/common/SingleLineText.vue new file mode 100644 index 0000000..e61591e --- /dev/null +++ b/src/components/common/SingleLineText.vue @@ -0,0 +1,25 @@ + + + + + {{ value == null || value === '' ? emptyText : value }} + + + + diff --git a/src/modules/first-leg/views/businessIdentifiers.test.mjs b/src/modules/first-leg/views/businessIdentifiers.test.mjs index 300481a..38acd77 100644 --- a/src/modules/first-leg/views/businessIdentifiers.test.mjs +++ b/src/modules/first-leg/views/businessIdentifiers.test.mjs @@ -34,5 +34,7 @@ test('keeps overseas warehouse operations first and renders readable list values assert.match(overseas, /function statusLabel\(value: string\)/) assert.match(overseas, /function deliveryMethodLabel\(value: string\)/) assert.match(overseas, /function formatDateTime\(value: string\)/) + assert.match(overseas, /import SingleLineText from '@\/components\/common\/SingleLineText\.vue'/) + assert.match(overseas, /]*>.*?查看<\/button><\/td>) { 查询重置 - {{ column }}查看{{ row[String(index)] }}{{ config.emptyText }} + {{ column }}查看{{ config.emptyText }} 共 {{ submittedRows.length }} 条上一页1下一页