From 8d3e94e86b7326b7bc96ca4f5c4ab1c773d14cf7 Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 22 Dec 2020 19:09:36 +0800 Subject: [PATCH] feat: improves fields configuration --- .../plugin-collections/src/collections/fields.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/plugin-collections/src/collections/fields.ts b/packages/plugin-collections/src/collections/fields.ts index 66b8ea278..80b6ee85d 100644 --- a/packages/plugin-collections/src/collections/fields.ts +++ b/packages/plugin-collections/src/collections/fields.ts @@ -269,6 +269,7 @@ export default { name: 'target', title: '要关联的数据表', required: true, + createOnly: true, component: { type: 'remoteSelect', showInDetail: true, @@ -280,6 +281,14 @@ export default { valueField: 'name', }, "x-linkages": [ + { + type: "value:state", + target: "labelField", + condition: "{{ $self.inputed }}", + state:{ + value: null, + } + }, { "type": "value:visible", "target": "labelField", @@ -438,8 +447,15 @@ export default { title: '所属数据表', target: 'collections', targetKey: 'name', + labelField: 'title', component: { type: 'drawerSelect', + // showInTable: true, + 'x-component-props': { + resourceName: 'collections.fields', + labelField: 'title', + valueField: 'name', + }, }, }, {