fix: custom column title, same as form field title (#1745)

This commit is contained in:
李小斐 2023-04-23 18:29:17 +08:00 committed by GitHub
parent b1068f2d51
commit 6d693a5ab6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 4 deletions

View File

@ -492,6 +492,7 @@ export default {
"Dialog": "Dialog",
"Delete action": "Delete action",
"Custom column title": "Custom column title",
'Column title': 'column title',
"Original title: ": "Original title: ",
"Delete table column": "Delete table column",
"Skip required validation": "Skip required validation",

View File

@ -415,6 +415,7 @@ export default {
"Dialog": "ダイアログ",
"Delete action": "操作を削除",
"Custom column title": "カスタムカラムタイトル",
'Column title': 'カラムタイトル',
"Original title: ": "元のタイトル: ",
"Delete table column": "テーブルのカラムを削除",
"Skip required validation": "必須のバリデーションをスキップ",

View File

@ -452,6 +452,7 @@ export default {
"Dialog": "Diálogo",
"Delete action": "Excluir ação",
"Custom column title": "Título da coluna personalizado",
'Column title': 'cabeçalho da coluna',
"Original title: ": "Título original: ",
"Delete table column": "Excluir coluna da tabela",
"Skip required validation": "Ignorar validação obrigatória",

View File

@ -357,6 +357,7 @@ export default {
"Dialog": "Диалог",
"Delete action": "Удалить действие",
"Custom column title": "Пользовательский заголовок колонки",
'Column title': 'заголовок столбца',
"Original title: ": "Заголовок по умолчанию: ",
"Delete table column": "Удалить колонку таблицы",
"Skip required validation": "Пропустить обязатеьную проверку",

View File

@ -356,6 +356,7 @@ export default {
"Dialog": "Pencere",
"Delete action": "İşlemi sil",
"Custom column title": "Özel sütun başlığı",
'Column title': 'Sütun başlığı',
"Original title: ": "Orjinal başlık: ",
"Delete table column": "Tablo sütununu sil",
"Skip required validation": "Zorunlu alan kontrollerini atla",

View File

@ -529,6 +529,7 @@ export default {
'Dialog': '对话框',
'Delete action': '删除操作',
'Custom column title': '自定义列标题',
'Column title': '列标题',
'Original title: ': '原始标题: ',
'Delete table column': '删除列',

View File

@ -6,11 +6,12 @@ import { GeneralSchemaDesigner, SchemaSettings } from '../../../schema-settings'
import { useCompile, useDesignable } from '../../hooks';
const useLabelFields = (collectionName?: any) => {
// 需要在组件顶层调用
const compile = useCompile();
const { getCollectionFields } = useCollectionManager();
if (!collectionName) {
return [];
}
const compile = useCompile();
const { getCollectionFields } = useCollectionManager();
const targetFields = getCollectionFields(collectionName);
return targetFields
?.filter?.((field) => field?.interface && !field?.target && field.type !== 'boolean' && !field.isForeignKey)
@ -44,9 +45,9 @@ export const TableColumnDesigner = (props) => {
title: t('Custom column title'),
properties: {
title: {
// title: t('Column title'),
title: t('Column title'),
default: columnSchema?.title,
description: `${t('Original title: ')}${collectionField?.uiSchema?.title || fieldSchema?.title}`,
description: `${t('Original field title: ')}${collectionField?.uiSchema?.title || fieldSchema?.title}`,
'x-decorator': 'FormItem',
'x-component': 'Input',
'x-component-props': {},