fix: view form linkages
This commit is contained in:
parent
25c1aa8825
commit
0900296ea3
@ -36,6 +36,19 @@ export default {
|
||||
labelField: 'title',
|
||||
valueField: 'id',
|
||||
},
|
||||
"x-linkages": [
|
||||
{
|
||||
"type": "value:schema",
|
||||
"target": "field",
|
||||
"schema": {
|
||||
"x-component-props": {
|
||||
"filter": {
|
||||
"collection_name": "{{ $self.value && $self.value.collection_name }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -50,11 +50,13 @@ export default {
|
||||
"target": "targetField",
|
||||
"condition": "{{ $self.value === 'association' }}"
|
||||
},
|
||||
// {
|
||||
// "type": "value:visible",
|
||||
// "target": "type",
|
||||
// "condition": "{{ $self.value === 'collection' }}"
|
||||
// },
|
||||
...['form', 'descriptions', 'table', 'kanban', 'calendar'].map(type => {
|
||||
return {
|
||||
"type": "value:visible",
|
||||
"target": `x-${type}-props.*`,
|
||||
"condition": `{{ $form.values.type === '${type}' && $self.value === 'collection' }}`
|
||||
}
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ export function getViewTypeLinkages() {
|
||||
xlinkages.push({
|
||||
"type": "value:visible",
|
||||
"target": `x-${key}-props.*`,
|
||||
"condition": `{{ $self.value === '${key}' }}`,
|
||||
"condition": `{{ $self.value === '${key}' && $form.values.dataSourceType === 'collection' }}`,
|
||||
});
|
||||
if (linkages.type) {
|
||||
xlinkages.push(...linkages.type);
|
||||
@ -55,7 +55,7 @@ export function getTypeFieldOptions() {
|
||||
title: '视图类型',
|
||||
required: true,
|
||||
dataSource: getOptions(),
|
||||
createOnly: true,
|
||||
createOnly: false,
|
||||
component: {
|
||||
type: 'select',
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user