From 77b9840f2565bc433fe16e9a065ac196cc67b814 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Sat, 24 Aug 2024 11:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- packages/components.ts | 12 +++--- packages/locale/lang/en-US.ts | 23 +++++++++-- packages/locale/lang/es-ES.ts | 23 +++++++++-- packages/locale/lang/hu-HU.ts | 23 ++++++++++- packages/locale/lang/ja-JP.ts | 21 +++++++++- packages/locale/lang/ko-KR.ts | 19 ++++++++- packages/locale/lang/pt-BR.ts | 19 ++++++++- packages/locale/lang/ru-RU.ts | 19 ++++++++- packages/locale/lang/vi-VN.ts | 19 ++++++++- packages/locale/lang/zh-CN.ts | 19 ++++++++- packages/locale/lang/zh-TC.ts | 73 +++++++++++++++++++++-------------- packages/table/src/table.ts | 62 +++++++++++++---------------- 13 files changed, 248 insertions(+), 86 deletions(-) diff --git a/package.json b/package.json index 2bda6899f4..16b9716772 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "style": "lib/style.css", "typings": "types/index.d.ts", "dependencies": { - "vxe-pc-ui": "^4.1.2" + "vxe-pc-ui": "^4.1.4" }, "devDependencies": { "@types/resize-observer-browser": "^0.1.11", diff --git a/packages/components.ts b/packages/components.ts index 0535940244..e06a167189 100644 --- a/packages/components.ts +++ b/packages/components.ts @@ -26,14 +26,12 @@ export function install (app: App, options?: VxeGlobalConfig) { } // 保留兼容老版本 +if (!VxeUI.hasLanguage('zh-CN')) { + const defaultLanguage = 'zh-CN' + VxeUI.setI18n(defaultLanguage, zhCN) + VxeUI.setLanguage(defaultLanguage) +} VxeUI.setTheme('light') -setTimeout(() => { - if (!VxeUI.hasLanguage('zh-CN')) { - const defaultLanguage = 'zh-CN' - VxeUI.setI18n(defaultLanguage, zhCN) - VxeUI.setLanguage(defaultLanguage) - } -}) export * from './ui' diff --git a/packages/locale/lang/en-US.ts b/packages/locale/lang/en-US.ts index 14cf2732a1..e7948703cf 100644 --- a/packages/locale/lang/en-US.ts +++ b/packages/locale/lang/en-US.ts @@ -10,6 +10,7 @@ export default { text: 'Loading...' }, error: { + downErr: 'Download failed.', groupFixed: 'If you use group headers, the freeze columns must be set by group.', groupMouseRange: 'Grouping headers and "{0}" cannot be used at the same time, which may cause errors.', groupTag: 'Grouping column header should use "{0}" instead of "{1}", which may cause errors.', @@ -34,7 +35,8 @@ export default { noTree: 'The tree structure does not support "{0}".', notProp: 'Unsupported parameters "{0}"', checkProp: 'The checkbox may stall when the amount of data is too large, it is recommended to set the parameter "{0}" to increase the rendering speed ', - coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error', + coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error.', + uniField: 'The field "{0}" is repeatedly defined, which may cause an error.', delFunc: 'The function "{0}" is deprecated, please use "{1}".', delProp: 'The property "{0}" is deprecated, please use "{1}".', delEvent: 'The event "{0}" is deprecated, please use "{1}"', @@ -84,6 +86,7 @@ export default { }, pager: { goto: 'Go to', + gotoTitle: 'Number', pagesize: '{0}/page', total: 'Total {0} record', pageClassifier: '', @@ -315,6 +318,10 @@ export default { defFormTitle: 'Unnamed form', widgetPropTab: 'Field property', widgetFormTab: 'Form property', + error: { + wdFormUni: 'Only one control of this type is allowed to be added to the form.', + wdSubUni: 'Only one control of this type is allowed to be added to a sub table.' + }, styleSetting: { btn: 'Style setting', title: 'Form style setting', @@ -340,6 +347,8 @@ export default { base: 'Base control', layout: 'Layout control', system: 'System control', + module: 'Module control', + chart: 'Chart control', advanced: 'Advanced control' }, copyTitle: 'Copy_{0}', @@ -422,11 +431,19 @@ export default { } }, listDesign: { - fieldSettingTab: 'Field setting', - listSettingTab: 'List setting', + fieldSettingTab: 'Field', + listSettingTab: 'Parameter', + searchTitle: 'Search', + listTitle: 'List', + searchField: 'Search field', + listField: 'List field', activeBtn: { ActionButtonUpdate: 'Edit', ActionButtonDelete: 'Delete' + }, + search: { + addBtn: 'Edit', + emptyText: 'No filter condition is configured.' } }, text: { diff --git a/packages/locale/lang/es-ES.ts b/packages/locale/lang/es-ES.ts index 4bee6a39ad..16b6f08e56 100644 --- a/packages/locale/lang/es-ES.ts +++ b/packages/locale/lang/es-ES.ts @@ -10,6 +10,7 @@ export default { text: 'Cargando...' }, error: { + downErr: 'Download failed.', groupFixed: 'If you use group headers, the freeze columns must be set by group.', groupMouseRange: 'Los encabezados de agrupación y "{0}" no pueden ser utilizados al mismo tiempo, lo que puede causar errores.', groupTag: 'El encabezado de columna de agrupación debería utilizar "{0}" en lugar de "{1}", lo que puede causar errores.', @@ -34,7 +35,8 @@ export default { noTree: 'La estructura de árbol no soporta "{0}".', notProp: 'Parámetros no compatibles "{0}"', checkProp: 'La casilla de verificación puede detenerse cuando la cantidad de datos es demasiado grande, se recomienda establecer el parámetro "{0}" para aumentar la velocidad de representación', - coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error', + coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error.', + uniField: 'The field "{0}" is repeatedly defined, which may cause an error.', delFunc: 'La función "{0}" está en desuso, por favor use "{1}".', delProp: 'La propiedad "{0}" está en desuso, por favor use "{1}".', delEvent: 'El evento "{0}" está en desuso, por favor use "{1}"', @@ -84,6 +86,7 @@ export default { }, pager: { goto: 'Ir a', + gotoTitle: 'Number', pagesize: '{0}/página', total: 'Total {0} registro', pageClassifier: '', @@ -315,6 +318,10 @@ export default { defFormTitle: 'Unnamed form', widgetPropTab: 'Field property', widgetFormTab: 'Form property', + error: { + wdFormUni: '该类型的控件在表单中只允许添加一个', + wdSubUni: '该类型的控件在子表中只允许添加一个' + }, styleSetting: { btn: 'Style setting', title: 'Form style setting', @@ -340,6 +347,8 @@ export default { base: 'Base control', layout: 'Layout control', system: 'System control', + module: 'Module control', + chart: 'Chart control', advanced: 'Advanced control' }, copyTitle: 'Copy_{0}', @@ -422,11 +431,19 @@ export default { } }, listDesign: { - fieldSettingTab: 'Field setting', - listSettingTab: 'List setting', + fieldSettingTab: 'Field', + listSettingTab: 'Parameter', + searchTitle: 'Search', + listTitle: 'List', + searchField: 'Search field', + listField: 'List field', activeBtn: { ActionButtonUpdate: 'Edit', ActionButtonDelete: 'Delete' + }, + search: { + addBtn: 'Edit', + emptyText: 'No filter condition is configured.' } }, text: { diff --git a/packages/locale/lang/hu-HU.ts b/packages/locale/lang/hu-HU.ts index 44177bf409..b7bd1aa558 100644 --- a/packages/locale/lang/hu-HU.ts +++ b/packages/locale/lang/hu-HU.ts @@ -10,6 +10,7 @@ export default { text: '加载中...' }, error: { + downErr: '下载失败', groupFixed: '如果使用分组表头,冻结列必须按组设置', groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误', groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误', @@ -35,6 +36,7 @@ export default { notProp: '不支持的参数 "{0}"', checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度', coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误', + uniField: '字段名 "{0}" 重复定义,这可能会出现错误', delFunc: '方法 "{0}" 已废弃,请使用 "{1}"', delProp: '参数 "{0}" 已废弃,请使用 "{1}"', delEvent: '事件 "{0}" 已废弃,请使用 "{1}"', @@ -83,6 +85,7 @@ export default { }, pager: { goto: '前往', + gotoTitle: '页数', pagesize: '{0}条/页', total: '共 {0} 条记录', pageClassifier: '页', @@ -314,6 +317,10 @@ export default { defFormTitle: '未命名的表单', widgetPropTab: '控件属性', widgetFormTab: '表单属性', + error: { + wdFormUni: '该类型的控件在表单中只允许添加一个', + wdSubUni: '该类型的控件在子表中只允许添加一个' + }, styleSetting: { btn: '样式设置', title: '表单的样式设置', @@ -339,6 +346,8 @@ export default { base: '基础控件', layout: '布局控件', system: '系统控件', + module: '模块控件', + chart: '图表控件', advanced: '高级控件' }, copyTitle: '副本_{0}', @@ -421,7 +430,19 @@ export default { }, listDesign: { fieldSettingTab: '字段设置', - listSettingTab: '列表设置' + listSettingTab: '参数设置', + searchTitle: '查询条件', + listTitle: '列表字段', + searchField: '查询字段', + listField: '列表字段', + activeBtn: { + ActionButtonUpdate: '编辑', + ActionButtonDelete: '删除' + }, + search: { + addBtn: '编辑', + emptyText: '未配置查询条件' + } }, /** diff --git a/packages/locale/lang/ja-JP.ts b/packages/locale/lang/ja-JP.ts index 819721adbd..37c372d506 100644 --- a/packages/locale/lang/ja-JP.ts +++ b/packages/locale/lang/ja-JP.ts @@ -10,6 +10,7 @@ export default { text: 'Loading...' }, error: { + downErr: '下载失败', groupFixed: 'ヘッダー結合を使用する場合、固定列はグループで設定しなければなりません', groupMouseRange: 'ヘッダー結合と「{0}」は同時に使用できません。これによりエラーが発生する可能性があります', groupTag: 'ヘッダー結合は "{0}" を使ってください。 "{1}" はエラーが発生する可能性があります', @@ -35,6 +36,7 @@ export default { notProp: 'サポートされていないパラメータ "{0}"', checkProp: 'パフマンス低下になる可能性があります。パラメータ "{0}" の値を指定してください', coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error', + uniField: '字段名 "{0}" 重复定义,这可能会出现错误', delFunc: '"{0}" functionが非推奨です。"{1}"を使用してください', delProp: '"{0}" propertyが非推奨です。"{1}"を使用してください', delEvent: 'イベント "{0}" が廃止されました。 "{1}" を使用してください', @@ -84,6 +86,7 @@ export default { }, pager: { goto: '移動', + gotoTitle: '页数', pagesize: '{0}件/ページ', total: '全 {0} 件', pageClassifier: 'ページ', @@ -315,6 +318,10 @@ export default { defFormTitle: 'Unnamed form', widgetPropTab: 'Field property', widgetFormTab: 'Form property', + error: { + wdFormUni: '该类型的控件在表单中只允许添加一个', + wdSubUni: '该类型的控件在子表中只允许添加一个' + }, styleSetting: { btn: 'Style setting', title: 'Form style setting', @@ -340,6 +347,8 @@ export default { base: 'Base control', layout: 'Layout control', system: 'System control', + module: 'Module control', + chart: 'Chart control', advanced: 'Advanced control' }, copyTitle: 'Copy_{0}', @@ -422,11 +431,19 @@ export default { } }, listDesign: { - fieldSettingTab: 'Field setting', - listSettingTab: 'List setting', + fieldSettingTab: 'Field', + listSettingTab: 'Parameter', + searchTitle: 'Search', + listTitle: 'List', + searchField: 'Search field', + listField: 'List field', activeBtn: { ActionButtonUpdate: 'Edit', ActionButtonDelete: 'Delete' + }, + search: { + addBtn: 'Edit', + emptyText: 'No filter condition is configured.' } }, text: { diff --git a/packages/locale/lang/ko-KR.ts b/packages/locale/lang/ko-KR.ts index 80626b3844..f90fc50406 100644 --- a/packages/locale/lang/ko-KR.ts +++ b/packages/locale/lang/ko-KR.ts @@ -10,6 +10,7 @@ export default { text: '加载中...' }, error: { + downErr: '下载失败', groupFixed: '如果使用分组表头,冻结列必须按组设置', groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误', groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误', @@ -35,6 +36,7 @@ export default { notProp: '不支持的参数 "{0}"', checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度', coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误', + uniField: '字段名 "{0}" 重复定义,这可能会出现错误', delFunc: '方法 "{0}" 已废弃,请使用 "{1}"', delProp: '参数 "{0}" 已废弃,请使用 "{1}"', delEvent: '事件 "{0}" 已废弃,请使用 "{1}"', @@ -84,6 +86,7 @@ export default { }, pager: { goto: '前往', + gotoTitle: '页数', pagesize: '{0}条/页', total: '共 {0} 条记录', pageClassifier: '页', @@ -315,6 +318,10 @@ export default { defFormTitle: '未命名的表单', widgetPropTab: '控件属性', widgetFormTab: '表单属性', + error: { + wdFormUni: '该类型的控件在表单中只允许添加一个', + wdSubUni: '该类型的控件在子表中只允许添加一个' + }, styleSetting: { btn: '样式设置', title: '表单的样式设置', @@ -340,6 +347,8 @@ export default { base: '基础控件', layout: '布局控件', system: '系统控件', + module: '模块控件', + chart: '图表控件', advanced: '高级控件' }, copyTitle: '副本_{0}', @@ -423,10 +432,18 @@ export default { }, listDesign: { fieldSettingTab: '字段设置', - listSettingTab: '列表设置', + listSettingTab: '参数设置', + searchTitle: '查询条件', + listTitle: '列表字段', + searchField: '查询字段', + listField: '列表字段', activeBtn: { ActionButtonUpdate: '编辑', ActionButtonDelete: '删除' + }, + search: { + addBtn: '编辑', + emptyText: '未配置查询条件' } }, text: { diff --git a/packages/locale/lang/pt-BR.ts b/packages/locale/lang/pt-BR.ts index f4763180fa..8a0c2a8367 100644 --- a/packages/locale/lang/pt-BR.ts +++ b/packages/locale/lang/pt-BR.ts @@ -10,6 +10,7 @@ export default { text: 'Carregando...' }, error: { + downErr: '下载失败', groupFixed: 'If you use group headers, the freeze columns must be set by group.', groupMouseRange: 'Agrupar cabeçalhos e "{0}" não podem ser usados ao mesmo tempo, o que pode causar erros.', groupTag: 'O cabeçalho da coluna de agrupamento deve usar "{0}" em vez de "{1}", o que pode causar erros.', @@ -35,6 +36,7 @@ export default { notProp: 'Parâmetros não suportados "{0}"', checkProp: 'A caixa de seleção pode travar quando a quantidade de dados é muito grande, é recomendado definir o parâmetro "{0}" para aumentar a velocidade de renderização ', coverProp: 'The parameter "{1}" to "{0}" is repeatedly defined. This may cause an error', + uniField: '字段名 "{0}" 重复定义,这可能会出现错误', delFunc: 'A função "{0}" está obsoleta, por favor, use "{1}".', delProp: 'A propriedade "{0}" está obsoleta, por favor, use "{1}".', delEvent: 'O evento "{0}" está obsoleto, por favor, use "{1}".', @@ -84,6 +86,7 @@ export default { }, pager: { goto: 'Ir para', + gotoTitle: 'Number', pagesize: '{0}/página', total: 'Total de {0} registros', pageClassifier: '', @@ -315,6 +318,10 @@ export default { defFormTitle: 'Unnamed form', widgetPropTab: 'Field property', widgetFormTab: 'Form property', + error: { + wdFormUni: '该类型的控件在表单中只允许添加一个', + wdSubUni: '该类型的控件在子表中只允许添加一个' + }, styleSetting: { btn: 'Style setting', title: 'Form style setting', @@ -340,6 +347,8 @@ export default { base: 'Base control', layout: 'Layout control', system: 'System control', + module: 'Module control', + chart: 'Chart control', advanced: 'Advanced control' }, copyTitle: 'Copy_{0}', @@ -423,10 +432,18 @@ export default { }, listDesign: { fieldSettingTab: 'Field setting', - listSettingTab: 'List setting', + listSettingTab: 'Parameter setting', + searchTitle: 'Search', + listTitle: 'List', + searchField: 'Search field', + listField: 'List field', activeBtn: { ActionButtonUpdate: 'Edit', ActionButtonDelete: 'Delete' + }, + search: { + addBtn: 'Edit', + emptyText: 'No filter condition is configured.' } }, text: { diff --git a/packages/locale/lang/ru-RU.ts b/packages/locale/lang/ru-RU.ts index 80626b3844..f90fc50406 100644 --- a/packages/locale/lang/ru-RU.ts +++ b/packages/locale/lang/ru-RU.ts @@ -10,6 +10,7 @@ export default { text: '加载中...' }, error: { + downErr: '下载失败', groupFixed: '如果使用分组表头,冻结列必须按组设置', groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误', groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误', @@ -35,6 +36,7 @@ export default { notProp: '不支持的参数 "{0}"', checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度', coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误', + uniField: '字段名 "{0}" 重复定义,这可能会出现错误', delFunc: '方法 "{0}" 已废弃,请使用 "{1}"', delProp: '参数 "{0}" 已废弃,请使用 "{1}"', delEvent: '事件 "{0}" 已废弃,请使用 "{1}"', @@ -84,6 +86,7 @@ export default { }, pager: { goto: '前往', + gotoTitle: '页数', pagesize: '{0}条/页', total: '共 {0} 条记录', pageClassifier: '页', @@ -315,6 +318,10 @@ export default { defFormTitle: '未命名的表单', widgetPropTab: '控件属性', widgetFormTab: '表单属性', + error: { + wdFormUni: '该类型的控件在表单中只允许添加一个', + wdSubUni: '该类型的控件在子表中只允许添加一个' + }, styleSetting: { btn: '样式设置', title: '表单的样式设置', @@ -340,6 +347,8 @@ export default { base: '基础控件', layout: '布局控件', system: '系统控件', + module: '模块控件', + chart: '图表控件', advanced: '高级控件' }, copyTitle: '副本_{0}', @@ -423,10 +432,18 @@ export default { }, listDesign: { fieldSettingTab: '字段设置', - listSettingTab: '列表设置', + listSettingTab: '参数设置', + searchTitle: '查询条件', + listTitle: '列表字段', + searchField: '查询字段', + listField: '列表字段', activeBtn: { ActionButtonUpdate: '编辑', ActionButtonDelete: '删除' + }, + search: { + addBtn: '编辑', + emptyText: '未配置查询条件' } }, text: { diff --git a/packages/locale/lang/vi-VN.ts b/packages/locale/lang/vi-VN.ts index 80626b3844..f90fc50406 100644 --- a/packages/locale/lang/vi-VN.ts +++ b/packages/locale/lang/vi-VN.ts @@ -10,6 +10,7 @@ export default { text: '加载中...' }, error: { + downErr: '下载失败', groupFixed: '如果使用分组表头,冻结列必须按组设置', groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误', groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误', @@ -35,6 +36,7 @@ export default { notProp: '不支持的参数 "{0}"', checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度', coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误', + uniField: '字段名 "{0}" 重复定义,这可能会出现错误', delFunc: '方法 "{0}" 已废弃,请使用 "{1}"', delProp: '参数 "{0}" 已废弃,请使用 "{1}"', delEvent: '事件 "{0}" 已废弃,请使用 "{1}"', @@ -84,6 +86,7 @@ export default { }, pager: { goto: '前往', + gotoTitle: '页数', pagesize: '{0}条/页', total: '共 {0} 条记录', pageClassifier: '页', @@ -315,6 +318,10 @@ export default { defFormTitle: '未命名的表单', widgetPropTab: '控件属性', widgetFormTab: '表单属性', + error: { + wdFormUni: '该类型的控件在表单中只允许添加一个', + wdSubUni: '该类型的控件在子表中只允许添加一个' + }, styleSetting: { btn: '样式设置', title: '表单的样式设置', @@ -340,6 +347,8 @@ export default { base: '基础控件', layout: '布局控件', system: '系统控件', + module: '模块控件', + chart: '图表控件', advanced: '高级控件' }, copyTitle: '副本_{0}', @@ -423,10 +432,18 @@ export default { }, listDesign: { fieldSettingTab: '字段设置', - listSettingTab: '列表设置', + listSettingTab: '参数设置', + searchTitle: '查询条件', + listTitle: '列表字段', + searchField: '查询字段', + listField: '列表字段', activeBtn: { ActionButtonUpdate: '编辑', ActionButtonDelete: '删除' + }, + search: { + addBtn: '编辑', + emptyText: '未配置查询条件' } }, text: { diff --git a/packages/locale/lang/zh-CN.ts b/packages/locale/lang/zh-CN.ts index 80626b3844..f90fc50406 100644 --- a/packages/locale/lang/zh-CN.ts +++ b/packages/locale/lang/zh-CN.ts @@ -10,6 +10,7 @@ export default { text: '加载中...' }, error: { + downErr: '下载失败', groupFixed: '如果使用分组表头,冻结列必须按组设置', groupMouseRange: '分组表头与 "{0}" 不能同时使用,这可能会出现错误', groupTag: '分组列头应该使用 "{0}" 而不是 "{1}",这可能会出现错误', @@ -35,6 +36,7 @@ export default { notProp: '不支持的参数 "{0}"', checkProp: '当数据量过大时可能会导致复选框卡顿,建议设置参数 "{0}" 提升渲染速度', coverProp: '"{0}" 的参数 "{1}" 重复定义,这可能会出现错误', + uniField: '字段名 "{0}" 重复定义,这可能会出现错误', delFunc: '方法 "{0}" 已废弃,请使用 "{1}"', delProp: '参数 "{0}" 已废弃,请使用 "{1}"', delEvent: '事件 "{0}" 已废弃,请使用 "{1}"', @@ -84,6 +86,7 @@ export default { }, pager: { goto: '前往', + gotoTitle: '页数', pagesize: '{0}条/页', total: '共 {0} 条记录', pageClassifier: '页', @@ -315,6 +318,10 @@ export default { defFormTitle: '未命名的表单', widgetPropTab: '控件属性', widgetFormTab: '表单属性', + error: { + wdFormUni: '该类型的控件在表单中只允许添加一个', + wdSubUni: '该类型的控件在子表中只允许添加一个' + }, styleSetting: { btn: '样式设置', title: '表单的样式设置', @@ -340,6 +347,8 @@ export default { base: '基础控件', layout: '布局控件', system: '系统控件', + module: '模块控件', + chart: '图表控件', advanced: '高级控件' }, copyTitle: '副本_{0}', @@ -423,10 +432,18 @@ export default { }, listDesign: { fieldSettingTab: '字段设置', - listSettingTab: '列表设置', + listSettingTab: '参数设置', + searchTitle: '查询条件', + listTitle: '列表字段', + searchField: '查询字段', + listField: '列表字段', activeBtn: { ActionButtonUpdate: '编辑', ActionButtonDelete: '删除' + }, + search: { + addBtn: '编辑', + emptyText: '未配置查询条件' } }, text: { diff --git a/packages/locale/lang/zh-TC.ts b/packages/locale/lang/zh-TC.ts index 14dee30406..893bdc9537 100644 --- a/packages/locale/lang/zh-TC.ts +++ b/packages/locale/lang/zh-TC.ts @@ -10,6 +10,7 @@ export default { text: '加載中...' }, error: { + downErr: '下载失败', groupFixed: '如果使用分組表頭,固冻结列必須按組設定', groupMouseRange: '分组表頭與 "{0}" 不能同時使用,這可能會出現錯誤', groupTag: '分組列頭應該使用 "{0}" 而不是 "{1}",這可能會出現錯誤', @@ -35,6 +36,7 @@ export default { notProp: '不支持的參數 "{0}"', checkProp: '當數據量過大時可能會導致複選框卡頓,建議設置參數 "{0}" 提升渲染速度', coverProp: '"{0}" 的參數 "{1}" 重複定義,這可能會出現錯誤', + uniField: '字段名 "{0}" 重複定義,這可能會出現錯誤', delFunc: '方法 "{0}" 已停用,請使用 "{1}"', delProp: '參數 "{0}" 已停用,請使用 "{1}"', delEvent: '事件 "{0}" 已停用,請使用 "{1}"', @@ -84,6 +86,7 @@ export default { }, pager: { goto: '前往', + gotoTitle: '页数', pagesize: '{0}項/頁', total: '共 {0} 項記錄', pageClassifier: '頁', @@ -191,7 +194,7 @@ export default { expCancel: '取消' }, modal: { - errTitle: '错误提示', + errTitle: '錯誤提示', zoomMin: '最小化', zoomIn: '最大化', zoomOut: '還原', @@ -277,34 +280,34 @@ export default { } }, imagePreview: { - popupTitle: '预览', + popupTitle: '預覽', operBtn: { - zoomOut: '缩小', + zoomOut: '縮小', zoomIn: '放大', - pctFull: '等比例缩放', - pct11: '显示原始尺寸', - rotateLeft: '向左旋转', - rotateRight: '向右旋转', - print: '点击打印图片', - download: '点击下载图片' + pctFull: '等比例縮放', + pct11: '顯示原始尺寸', + rotateLeft: '向左旋轉', + rotateRight: '向右旋轉', + print: '點擊打印圖片', + download: '點擊下載圖片' } }, upload: { - fileBtnText: '点击或拖拽上传', - imgBtnText: '点击或拖拽上传', - dragPlaceholder: '请把文件拖放到这个区域即可上传', - imgSizeHint: '单张{0}', - imgCountHint: '最多{0}张', - fileTypeHint: '支持 {0} 文件类型', - fileSizeHint: '单个文件大小不超过{0}', - fileCountHint: '最多可上传{0}个文件', - overCountErr: '最多只能选择{0}个文件!', - overCountExtraErr: '已超出最大数量{0}个,超出的{1}个文件将被忽略!', - overSizeErr: '文件大小最大不能超过{0}!', - reUpload: '重新上传', - uploadProgress: '上传中 {0}%', - uploadErr: '上传失败', - uploadSuccess: '上传成功', + fileBtnText: '點擊或拖拽上傳', + imgBtnText: '點擊或拖拽上傳', + dragPlaceholder: '請把文件拖放到這個區域即可上傳', + imgSizeHint: '單張{0}', + imgCountHint: '最多{0}張', + fileTypeHint: '支持 {0} 文件類型', + fileSizeHint: '單個文件大小不超過{0}', + fileCountHint: '最多可上傳{0}个文件', + overCountErr: '最多隻能選擇{0}个文件!', + overCountExtraErr: '已超出最大數量{0}個,超出的{1}個文件將被忽略!', + overSizeErr: '文件大小最大不能超過{0}!', + reUpload: '重新上傳', + uploadProgress: '上傳中 {0}%', + uploadErr: '上傳失敗', + uploadSuccess: '上傳成功', moreBtnText: '更多({0})', viewItemTitle: '點擊查看' }, @@ -313,6 +316,10 @@ export default { defFormTitle: '未命名的表單', widgetPropTab: '控件屬性', widgetFormTab: '表單屬性', + error: { + wdFormUni: '該類型的控件在表單中只允許添加一個', + wdSubUni: '該類型的控件在子表中只允許添加一個' + }, styleSetting: { btn: '樣式設置', title: '表單的樣式設置', @@ -335,10 +342,12 @@ export default { }, widget: { group: { - base: '基础控件', - layout: '布局控件', + base: '基礎控件', + layout: '佈局控件', system: '系統控件', - advanced: '高级控件' + module: '模塊控件', + chart: '圖表控件', + advanced: '高級控件' }, copyTitle: '副本_{0}', component: { @@ -423,10 +432,18 @@ export default { }, listDesign: { fieldSettingTab: '字段設置', - listSettingTab: '列表設置', + listSettingTab: '参数设置', + searchTitle: '查询条件', + listTitle: '列表字段', + searchField: '查询字段', + listField: '列表字段', activeBtn: { ActionButtonUpdate: '編輯', ActionButtonDelete: '刪除' + }, + search: { + addBtn: '编辑', + emptyText: '未配置查询条件' } }, text: { diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index 75933ea6b1..d7171a4b6d 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -4987,7 +4987,6 @@ export default defineComponent({ const operCtxMenu = isMenu && ctxMenuStore.visible && (isEnter || isSpacebar || operArrow) const isEditStatus = isEnableConf(editConfig) && actived.column && actived.row const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod - let params: any if (operCtxMenu) { // 如果配置了右键菜单; 支持方向键操作、回车 evnt.preventDefault() @@ -5043,7 +5042,7 @@ export default defineComponent({ if (hasCtrlKey) { // 如果是激活编辑状态,则取消编辑 if (actived.row) { - params = actived.args + const params = actived.args $xeTable.clearEdit(evnt) // 如果配置了选中功能,则为选中状态 if (mouseOpts.selected) { @@ -5073,7 +5072,7 @@ export default defineComponent({ if (childrens && childrens.length) { evnt.preventDefault() const targetRow = childrens[0] - params = { + const params = { $table: $xeTable, row: targetRow, rowIndex: tableMethods.getRowIndex(targetRow), @@ -5106,23 +5105,24 @@ export default defineComponent({ // 如果是删除键 if (!isEditStatus) { const { delMethod } = keyboardOpts - const delPaqrams = { + const params = { row: selected.row, rowIndex: tableMethods.getRowIndex(selected.row), column: selected.column, columnIndex: tableMethods.getColumnIndex(selected.column), - $table: $xeTable + $table: $xeTable, + $grid: $xeGrid } // 是否被禁用 if (!beforeEditMethod || beforeEditMethod(params)) { if (delMethod) { - delMethod(delPaqrams) + delMethod(params) } else { setCellValue(selected.row, selected.column, null) } // 如果按下 del 键,更新表尾数据 tableMethods.updateFooter() - $xeTable.dispatchEvent('cell-delete-value', delPaqrams, evnt) + $xeTable.dispatchEvent('cell-delete-value', params, evnt) } } } else if (hasBackspaceKey && keyboardConfig && keyboardOpts.isBack && isEnableConf(editConfig) && (selected.row || selected.column)) { @@ -5130,28 +5130,23 @@ export default defineComponent({ const { backMethod } = keyboardOpts // 如果是删除键 if (keyboardOpts.isDel && isEnableConf(editConfig) && (selected.row || selected.column)) { - const delPaqrams = { + const params = { row: selected.row, rowIndex: tableMethods.getRowIndex(selected.row), column: selected.column, columnIndex: tableMethods.getColumnIndex(selected.column), - $table: $xeTable + $table: $xeTable, + $grid: $xeGrid } // 是否被禁用 if (!beforeEditMethod || beforeEditMethod(params)) { if (backMethod) { - backMethod({ - row: selected.row, - rowIndex: tableMethods.getRowIndex(selected.row), - column: selected.column, - columnIndex: tableMethods.getColumnIndex(selected.column), - $table: $xeTable - }) + backMethod(params) } else { setCellValue(selected.row, selected.column, null) $xeTable.handleActived(selected.args, evnt) } - $xeTable.dispatchEvent('cell-backspace-value', delPaqrams, evnt) + $xeTable.dispatchEvent('cell-backspace-value', params, evnt) } } } @@ -5160,11 +5155,12 @@ export default defineComponent({ const { parent: parentRow } = XEUtils.findTree(internalData.afterTreeFullData, item => item === currentRow, { children: childrenField }) if (parentRow) { evnt.preventDefault() - params = { - $table: $xeTable, + const params = { row: parentRow, rowIndex: tableMethods.getRowIndex(parentRow), - $rowIndex: tableMethods.getVMRowIndex(parentRow) + $rowIndex: tableMethods.getVMRowIndex(parentRow), + $table: $xeTable, + $grid: $xeGrid } tableMethods.setTreeExpand(parentRow, false) .then(() => tableMethods.scrollToRow(parentRow)) @@ -5179,16 +5175,17 @@ export default defineComponent({ // 如果是按下非功能键之外允许直接编辑 if (selected.column && selected.row && isEnableConf(selected.column.editRender)) { const beforeEditMethod = editOpts.beforeEditMethod || editOpts.activeMethod + const params = { + row: selected.row, + rowIndex: tableMethods.getRowIndex(selected.row), + column: selected.column, + columnIndex: tableMethods.getColumnIndex(selected.column), + $table: $xeTable, + $grid: $xeGrid + } if (!beforeEditMethod || beforeEditMethod({ ...selected.args, $table: $xeTable, $grid: $xeGrid })) { if (editMethod) { - editMethod({ - row: selected.row, - rowIndex: tableMethods.getRowIndex(selected.row), - column: selected.column, - columnIndex: tableMethods.getColumnIndex(selected.column), - $table: $xeTable, - $grid: $xeGrid - }) + editMethod(params) } else { setCellValue(selected.row, selected.column, null) $xeTable.handleActived(selected.args, evnt) @@ -5196,14 +5193,7 @@ export default defineComponent({ const afterEditMethod = editOpts.afterEditMethod if (afterEditMethod) { nextTick(() => { - afterEditMethod({ - row: selected.row as any, - rowIndex: tableMethods.getRowIndex(selected.row), - column: selected.column, - columnIndex: tableMethods.getColumnIndex(selected.column), - $table: $xeTable, - $grid: $xeGrid - }) + afterEditMethod(params) }) } }