mirror of
https://github.com/nocobase/nocobase
synced 2024-11-16 21:26:31 +00:00
fix: schemaSettingsTemplate
This commit is contained in:
parent
04e0a4db50
commit
438cef09e9
@ -236,7 +236,7 @@ export const SchemaSettingsTemplate = function Template(props) {
|
|||||||
title="Save as template"
|
title="Save as template"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
const { title } = collectionName ? getCollection(collectionName) : { title: '' };
|
const collection = collectionName && getCollection(collectionName);
|
||||||
const values = await FormDialog(
|
const values = await FormDialog(
|
||||||
t('Save as template'),
|
t('Save as template'),
|
||||||
() => {
|
() => {
|
||||||
@ -250,7 +250,9 @@ export const SchemaSettingsTemplate = function Template(props) {
|
|||||||
name: {
|
name: {
|
||||||
title: t('Template name'),
|
title: t('Template name'),
|
||||||
required: true,
|
required: true,
|
||||||
default: title ? `${compile(title)}_${t(componentName)}` : t(componentName),
|
default: collection
|
||||||
|
? `${compile(collection?.title || collection?.name)}_${t(componentName)}`
|
||||||
|
: t(componentName),
|
||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
'x-component': 'Input',
|
'x-component': 'Input',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user