fix: improve createdBy/updatedBy default options

This commit is contained in:
chenos 2020-12-18 15:32:45 +08:00
parent 110d5bcc9c
commit a351d52226
2 changed files with 14 additions and 4 deletions

View File

@ -3,6 +3,8 @@ import { TableOptions } from '@nocobase/database';
export default {
title: '示例',
showInDataMenu: true,
createdBy: true,
updatedBy: true,
fields: [
{
interface: 'string',

View File

@ -340,12 +340,16 @@ export const linkTo = {
export const createdBy = {
title: '创建者',
disabled: true,
// disabled: true,
options: {
interface: 'createdBy',
type: 'belongsTo',
type: 'createdBy',
name: 'createdBy',
filterable: true,
target: 'users',
labelField: 'nickname',
foreignKey: 'created_by_id',
appends: true,
component: {
type: 'drawerSelect',
},
@ -372,12 +376,16 @@ export const createdAt = {
export const updatedBy = {
title: '更新人',
disabled: true,
// disabled: true,
options: {
interface: 'updatedBy',
name: 'updatedBy',
type: 'belongsTo',
type: 'updatedBy',
filterable: true,
target: 'users',
labelField: 'nickname',
foreignKey: 'created_by_id',
appends: true,
component: {
type: 'drawerSelect',
},