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 Collection = database.getModel('collections');
|
||||
const collection = await Collection.create(config);
|
||||
await collection.updateAssociations(config);
|
||||
await collection.updateAssociations({
|
||||
generalFields: config.fields,
|
||||
});
|
||||
await collection.migrate();
|
||||
|
||||
const Route = database.getModel('routes');
|
||||
|
@ -618,7 +618,7 @@ const dbSchema = {
|
||||
'x-component': 'Input',
|
||||
'x-read-pretty': true,
|
||||
},
|
||||
fields: {
|
||||
generalFields: {
|
||||
type: 'array',
|
||||
title: '数据表字段',
|
||||
'x-decorator': 'FormItem',
|
||||
|
@ -120,7 +120,7 @@ export const DatabaseCollection = observer((props) => {
|
||||
field.push({
|
||||
name: `t_${uid()}`,
|
||||
unsaved: true,
|
||||
fields: getDefaultFields(),
|
||||
generalFields: getDefaultFields(),
|
||||
});
|
||||
}
|
||||
}}
|
||||
@ -190,7 +190,7 @@ export const DatabaseCollection = observer((props) => {
|
||||
const data = {
|
||||
name: `t_${uid()}`,
|
||||
title: value,
|
||||
fields: getDefaultFields(),
|
||||
generalFields: getDefaultFields(),
|
||||
};
|
||||
field.push(data);
|
||||
setActiveIndex(field.value.length - 1);
|
||||
@ -229,7 +229,7 @@ export const DatabaseCollection = observer((props) => {
|
||||
field.push({
|
||||
name: `t_${uid()}`,
|
||||
unsaved: true,
|
||||
fields: getDefaultFields(),
|
||||
generalFields: getDefaultFields(),
|
||||
});
|
||||
}
|
||||
if (activeIndex === index) {
|
||||
|
@ -538,7 +538,7 @@ const TableMain = () => {
|
||||
/>
|
||||
))}
|
||||
<SortableContext
|
||||
items={dataSource}
|
||||
items={dataSource || []}
|
||||
strategy={verticalListSortingStrategy}
|
||||
>
|
||||
<AntdTable
|
||||
|
@ -36,7 +36,7 @@ export default {
|
||||
{
|
||||
type: 'integer',
|
||||
name: 'state',
|
||||
default: 1,
|
||||
defaultValue: 1,
|
||||
},
|
||||
{
|
||||
type: 'hasMany',
|
||||
|
Loading…
Reference in New Issue
Block a user