fix: custom column title, same as form field title (#1745)
This commit is contained in:
parent
b1068f2d51
commit
6d693a5ab6
@ -492,6 +492,7 @@ export default {
|
|||||||
"Dialog": "Dialog",
|
"Dialog": "Dialog",
|
||||||
"Delete action": "Delete action",
|
"Delete action": "Delete action",
|
||||||
"Custom column title": "Custom column title",
|
"Custom column title": "Custom column title",
|
||||||
|
'Column title': 'column title',
|
||||||
"Original title: ": "Original title: ",
|
"Original title: ": "Original title: ",
|
||||||
"Delete table column": "Delete table column",
|
"Delete table column": "Delete table column",
|
||||||
"Skip required validation": "Skip required validation",
|
"Skip required validation": "Skip required validation",
|
||||||
|
@ -415,6 +415,7 @@ export default {
|
|||||||
"Dialog": "ダイアログ",
|
"Dialog": "ダイアログ",
|
||||||
"Delete action": "操作を削除",
|
"Delete action": "操作を削除",
|
||||||
"Custom column title": "カスタムカラムタイトル",
|
"Custom column title": "カスタムカラムタイトル",
|
||||||
|
'Column title': 'カラムタイトル',
|
||||||
"Original title: ": "元のタイトル: ",
|
"Original title: ": "元のタイトル: ",
|
||||||
"Delete table column": "テーブルのカラムを削除",
|
"Delete table column": "テーブルのカラムを削除",
|
||||||
"Skip required validation": "必須のバリデーションをスキップ",
|
"Skip required validation": "必須のバリデーションをスキップ",
|
||||||
|
@ -452,6 +452,7 @@ export default {
|
|||||||
"Dialog": "Diálogo",
|
"Dialog": "Diálogo",
|
||||||
"Delete action": "Excluir ação",
|
"Delete action": "Excluir ação",
|
||||||
"Custom column title": "Título da coluna personalizado",
|
"Custom column title": "Título da coluna personalizado",
|
||||||
|
'Column title': 'cabeçalho da coluna',
|
||||||
"Original title: ": "Título original: ",
|
"Original title: ": "Título original: ",
|
||||||
"Delete table column": "Excluir coluna da tabela",
|
"Delete table column": "Excluir coluna da tabela",
|
||||||
"Skip required validation": "Ignorar validação obrigatória",
|
"Skip required validation": "Ignorar validação obrigatória",
|
||||||
|
@ -357,6 +357,7 @@ export default {
|
|||||||
"Dialog": "Диалог",
|
"Dialog": "Диалог",
|
||||||
"Delete action": "Удалить действие",
|
"Delete action": "Удалить действие",
|
||||||
"Custom column title": "Пользовательский заголовок колонки",
|
"Custom column title": "Пользовательский заголовок колонки",
|
||||||
|
'Column title': 'заголовок столбца',
|
||||||
"Original title: ": "Заголовок по умолчанию: ",
|
"Original title: ": "Заголовок по умолчанию: ",
|
||||||
"Delete table column": "Удалить колонку таблицы",
|
"Delete table column": "Удалить колонку таблицы",
|
||||||
"Skip required validation": "Пропустить обязатеьную проверку",
|
"Skip required validation": "Пропустить обязатеьную проверку",
|
||||||
|
@ -356,6 +356,7 @@ export default {
|
|||||||
"Dialog": "Pencere",
|
"Dialog": "Pencere",
|
||||||
"Delete action": "İşlemi sil",
|
"Delete action": "İşlemi sil",
|
||||||
"Custom column title": "Özel sütun başlığı",
|
"Custom column title": "Özel sütun başlığı",
|
||||||
|
'Column title': 'Sütun başlığı',
|
||||||
"Original title: ": "Orjinal başlık: ",
|
"Original title: ": "Orjinal başlık: ",
|
||||||
"Delete table column": "Tablo sütununu sil",
|
"Delete table column": "Tablo sütununu sil",
|
||||||
"Skip required validation": "Zorunlu alan kontrollerini atla",
|
"Skip required validation": "Zorunlu alan kontrollerini atla",
|
||||||
|
@ -529,6 +529,7 @@ export default {
|
|||||||
'Dialog': '对话框',
|
'Dialog': '对话框',
|
||||||
'Delete action': '删除操作',
|
'Delete action': '删除操作',
|
||||||
'Custom column title': '自定义列标题',
|
'Custom column title': '自定义列标题',
|
||||||
|
'Column title': '列标题',
|
||||||
'Original title: ': '原始标题: ',
|
'Original title: ': '原始标题: ',
|
||||||
'Delete table column': '删除列',
|
'Delete table column': '删除列',
|
||||||
|
|
||||||
|
@ -6,11 +6,12 @@ import { GeneralSchemaDesigner, SchemaSettings } from '../../../schema-settings'
|
|||||||
import { useCompile, useDesignable } from '../../hooks';
|
import { useCompile, useDesignable } from '../../hooks';
|
||||||
|
|
||||||
const useLabelFields = (collectionName?: any) => {
|
const useLabelFields = (collectionName?: any) => {
|
||||||
|
// 需要在组件顶层调用
|
||||||
|
const compile = useCompile();
|
||||||
|
const { getCollectionFields } = useCollectionManager();
|
||||||
if (!collectionName) {
|
if (!collectionName) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const compile = useCompile();
|
|
||||||
const { getCollectionFields } = useCollectionManager();
|
|
||||||
const targetFields = getCollectionFields(collectionName);
|
const targetFields = getCollectionFields(collectionName);
|
||||||
return targetFields
|
return targetFields
|
||||||
?.filter?.((field) => field?.interface && !field?.target && field.type !== 'boolean' && !field.isForeignKey)
|
?.filter?.((field) => field?.interface && !field?.target && field.type !== 'boolean' && !field.isForeignKey)
|
||||||
@ -44,9 +45,9 @@ export const TableColumnDesigner = (props) => {
|
|||||||
title: t('Custom column title'),
|
title: t('Custom column title'),
|
||||||
properties: {
|
properties: {
|
||||||
title: {
|
title: {
|
||||||
// title: t('Column title'),
|
title: t('Column title'),
|
||||||
default: columnSchema?.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-decorator': 'FormItem',
|
||||||
'x-component': 'Input',
|
'x-component': 'Input',
|
||||||
'x-component-props': {},
|
'x-component-props': {},
|
||||||
|
Loading…
Reference in New Issue
Block a user