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')}
|
{t('Add new')}
|
||||||
</Button>
|
</Button>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<SchemaComponent schema={schema} />
|
<SchemaComponent scope={{ createOnly: true }} schema={schema} />
|
||||||
</ActionContext.Provider>
|
</ActionContext.Provider>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@ -99,7 +99,7 @@ export const EditStorage = () => {
|
|||||||
setSchema({
|
setSchema({
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
drawer: {
|
[uid()]: {
|
||||||
type: 'void',
|
type: 'void',
|
||||||
'x-component': 'Action.Drawer',
|
'x-component': 'Action.Drawer',
|
||||||
'x-decorator': 'Form',
|
'x-decorator': 'Form',
|
||||||
@ -140,7 +140,7 @@ export const EditStorage = () => {
|
|||||||
>
|
>
|
||||||
{t('Edit')}
|
{t('Edit')}
|
||||||
</a>
|
</a>
|
||||||
<SchemaComponent schema={schema} />
|
<SchemaComponent scope={{ createOnly: false }} schema={schema} />
|
||||||
</ActionContext.Provider>
|
</ActionContext.Provider>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -179,10 +179,10 @@ export const storageSchema: ISchema = {
|
|||||||
type: 'void',
|
type: 'void',
|
||||||
'x-decorator': 'Table.Column.Decorator',
|
'x-decorator': 'Table.Column.Decorator',
|
||||||
'x-component': 'Table.Column',
|
'x-component': 'Table.Column',
|
||||||
|
title: `{{t("Default storage", { ns: "${NAMESPACE}" })}}`,
|
||||||
properties: {
|
properties: {
|
||||||
default: {
|
default: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: `{{t("Default storage", { ns: "${NAMESPACE}" })}}`,
|
|
||||||
'x-component': 'CollectionField',
|
'x-component': 'CollectionField',
|
||||||
'x-read-pretty': true,
|
'x-read-pretty': true,
|
||||||
},
|
},
|
||||||
|
@ -11,6 +11,7 @@ export default {
|
|||||||
name: {
|
name: {
|
||||||
'x-component': 'CollectionField',
|
'x-component': 'CollectionField',
|
||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
|
'x-disabled': '{{ !createOnly }}',
|
||||||
description:
|
description:
|
||||||
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
||||||
},
|
},
|
||||||
|
@ -11,6 +11,7 @@ export default {
|
|||||||
name: {
|
name: {
|
||||||
'x-component': 'CollectionField',
|
'x-component': 'CollectionField',
|
||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
|
'x-disabled': '{{ !createOnly }}',
|
||||||
description:
|
description:
|
||||||
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
||||||
},
|
},
|
||||||
|
@ -11,6 +11,7 @@ export default {
|
|||||||
name: {
|
name: {
|
||||||
'x-component': 'CollectionField',
|
'x-component': 'CollectionField',
|
||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
|
'x-disabled': '{{ !createOnly }}',
|
||||||
description:
|
description:
|
||||||
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
||||||
},
|
},
|
||||||
|
@ -11,6 +11,7 @@ export default {
|
|||||||
name: {
|
name: {
|
||||||
'x-component': 'CollectionField',
|
'x-component': 'CollectionField',
|
||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
|
'x-disabled': '{{ !createOnly }}',
|
||||||
description:
|
description:
|
||||||
'{{t("Randomly generated and can be modified. Support letters, numbers and underscores, must start with an letter.")}}',
|
'{{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