fix(file-manager): improve initialization logic (#2834)
This commit is contained in:
parent
a51df00750
commit
5fbce9fb65
@ -76,7 +76,7 @@ export const CreateStorage = () => {
|
||||
{t('Add new')}
|
||||
</Button>
|
||||
</Dropdown>
|
||||
<SchemaComponent schema={schema} />
|
||||
<SchemaComponent scope={{ createOnly: true }} schema={schema} />
|
||||
</ActionContext.Provider>
|
||||
</div>
|
||||
);
|
||||
@ -99,7 +99,7 @@ export const EditStorage = () => {
|
||||
setSchema({
|
||||
type: 'object',
|
||||
properties: {
|
||||
drawer: {
|
||||
[uid()]: {
|
||||
type: 'void',
|
||||
'x-component': 'Action.Drawer',
|
||||
'x-decorator': 'Form',
|
||||
@ -140,7 +140,7 @@ export const EditStorage = () => {
|
||||
>
|
||||
{t('Edit')}
|
||||
</a>
|
||||
<SchemaComponent schema={schema} />
|
||||
<SchemaComponent scope={{ createOnly: false }} schema={schema} />
|
||||
</ActionContext.Provider>
|
||||
</div>
|
||||
);
|
||||
|
@ -179,10 +179,10 @@ export const storageSchema: ISchema = {
|
||||
type: 'void',
|
||||
'x-decorator': 'Table.Column.Decorator',
|
||||
'x-component': 'Table.Column',
|
||||
title: `{{t("Default storage", { ns: "${NAMESPACE}" })}}`,
|
||||
properties: {
|
||||
default: {
|
||||
type: 'string',
|
||||
title: `{{t("Default storage", { ns: "${NAMESPACE}" })}}`,
|
||||
'x-component': 'CollectionField',
|
||||
'x-read-pretty': true,
|
||||
},
|
||||
|
@ -11,6 +11,7 @@ export default {
|
||||
name: {
|
||||
'x-component': 'CollectionField',
|
||||
'x-decorator': 'FormItem',
|
||||
'x-disabled': '{{ !createOnly }}',
|
||||
description:
|
||||
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
||||
},
|
||||
|
@ -11,6 +11,7 @@ export default {
|
||||
name: {
|
||||
'x-component': 'CollectionField',
|
||||
'x-decorator': 'FormItem',
|
||||
'x-disabled': '{{ !createOnly }}',
|
||||
description:
|
||||
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
||||
},
|
||||
|
@ -11,6 +11,7 @@ export default {
|
||||
name: {
|
||||
'x-component': 'CollectionField',
|
||||
'x-decorator': 'FormItem',
|
||||
'x-disabled': '{{ !createOnly }}',
|
||||
description:
|
||||
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
||||
},
|
||||
|
@ -11,6 +11,7 @@ export default {
|
||||
name: {
|
||||
'x-component': 'CollectionField',
|
||||
'x-decorator': 'FormItem',
|
||||
'x-disabled': '{{ !createOnly }}',
|
||||
description:
|
||||
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user