From 0d7864672241244c2308a35ee594b9fa1a82c2eb Mon Sep 17 00:00:00 2001 From: ulleo Date: Fri, 23 Jan 2026 17:57:58 +0800 Subject: [PATCH] feat: improve long text display in table chart --- frontend/src/i18n/en.json | 3 +++ frontend/src/i18n/ko-KR.json | 3 +++ frontend/src/i18n/zh-CN.json | 3 +++ frontend/src/views/chat/component/charts/Table.ts | 10 +++++++--- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index d35d5151..ea56de13 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -681,6 +681,9 @@ "line": "Line", "pie": "Pie" }, + "sort_asc": "Ascending", + "sort_desc": "Descending", + "sort_none": "No Sort", "show_sql": "View SQL", "export_to": "Export As", "excel": "Excel", diff --git a/frontend/src/i18n/ko-KR.json b/frontend/src/i18n/ko-KR.json index 3b6f5e78..ef9b4b8a 100644 --- a/frontend/src/i18n/ko-KR.json +++ b/frontend/src/i18n/ko-KR.json @@ -681,6 +681,9 @@ "line": "선 차트", "pie": "원형 차트" }, + "sort_asc": "오름차순", + "sort_desc": "내림차순", + "sort_none": "정렬 안 함", "show_sql": "SQL 보기", "export_to": "다음으로 내보내기", "excel": "Excel", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 63a888b5..875ffa24 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -681,6 +681,9 @@ "line": "折线图", "pie": "饼图" }, + "sort_asc": "升序", + "sort_desc": "降序", + "sort_none": "不排序", "show_sql": "查看SQL", "export_to": "导出为", "excel": "Excel", diff --git a/frontend/src/views/chat/component/charts/Table.ts b/frontend/src/views/chat/component/charts/Table.ts index 873e3ac4..b26f8e3b 100644 --- a/frontend/src/views/chat/component/charts/Table.ts +++ b/frontend/src/views/chat/component/charts/Table.ts @@ -118,9 +118,13 @@ export class Table extends BaseChart { container.style.minWidth = '100px' const menuItems = [ - { label: '降序', method: 'desc' as SortMethod, icon: 'el-icon-sort-down' }, - { label: '升序', method: 'asc' as SortMethod, icon: 'el-icon-sort-up' }, - { label: '不排序', method: 'none' as SortMethod, icon: 'el-icon-close' }, + { + label: t('chat.sort_desc'), + method: 'desc' as SortMethod, + icon: 'el-icon-sort-down', + }, + { label: t('chat.sort_asc'), method: 'asc' as SortMethod, icon: 'el-icon-sort-up' }, + { label: t('chat.sort_none'), method: 'none' as SortMethod, icon: 'el-icon-close' }, ] menuItems.forEach((item) => {