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下一页