bugfix
This commit is contained in:
parent
3966c7f0f3
commit
cf3a6ff2ff
@ -20,7 +20,9 @@ import * as uiSchema from './ui-schema';
|
|||||||
const config = require('@nocobase/plugin-users/src/collections/users').default;
|
const config = require('@nocobase/plugin-users/src/collections/users').default;
|
||||||
const Collection = database.getModel('collections');
|
const Collection = database.getModel('collections');
|
||||||
const collection = await Collection.create(config);
|
const collection = await Collection.create(config);
|
||||||
await collection.updateAssociations(config);
|
await collection.updateAssociations({
|
||||||
|
generalFields: config.fields,
|
||||||
|
});
|
||||||
await collection.migrate();
|
await collection.migrate();
|
||||||
|
|
||||||
const Route = database.getModel('routes');
|
const Route = database.getModel('routes');
|
||||||
|
@ -618,7 +618,7 @@ const dbSchema = {
|
|||||||
'x-component': 'Input',
|
'x-component': 'Input',
|
||||||
'x-read-pretty': true,
|
'x-read-pretty': true,
|
||||||
},
|
},
|
||||||
fields: {
|
generalFields: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
title: '数据表字段',
|
title: '数据表字段',
|
||||||
'x-decorator': 'FormItem',
|
'x-decorator': 'FormItem',
|
||||||
|
@ -120,7 +120,7 @@ export const DatabaseCollection = observer((props) => {
|
|||||||
field.push({
|
field.push({
|
||||||
name: `t_${uid()}`,
|
name: `t_${uid()}`,
|
||||||
unsaved: true,
|
unsaved: true,
|
||||||
fields: getDefaultFields(),
|
generalFields: getDefaultFields(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -190,7 +190,7 @@ export const DatabaseCollection = observer((props) => {
|
|||||||
const data = {
|
const data = {
|
||||||
name: `t_${uid()}`,
|
name: `t_${uid()}`,
|
||||||
title: value,
|
title: value,
|
||||||
fields: getDefaultFields(),
|
generalFields: getDefaultFields(),
|
||||||
};
|
};
|
||||||
field.push(data);
|
field.push(data);
|
||||||
setActiveIndex(field.value.length - 1);
|
setActiveIndex(field.value.length - 1);
|
||||||
@ -229,7 +229,7 @@ export const DatabaseCollection = observer((props) => {
|
|||||||
field.push({
|
field.push({
|
||||||
name: `t_${uid()}`,
|
name: `t_${uid()}`,
|
||||||
unsaved: true,
|
unsaved: true,
|
||||||
fields: getDefaultFields(),
|
generalFields: getDefaultFields(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (activeIndex === index) {
|
if (activeIndex === index) {
|
||||||
|
@ -538,7 +538,7 @@ const TableMain = () => {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
<SortableContext
|
<SortableContext
|
||||||
items={dataSource}
|
items={dataSource || []}
|
||||||
strategy={verticalListSortingStrategy}
|
strategy={verticalListSortingStrategy}
|
||||||
>
|
>
|
||||||
<AntdTable
|
<AntdTable
|
||||||
|
@ -36,7 +36,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
name: 'state',
|
name: 'state',
|
||||||
default: 1,
|
defaultValue: 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'hasMany',
|
type: 'hasMany',
|
||||||
|
Loading…
Reference in New Issue
Block a user