fix: view form type field linkages
This commit is contained in:
parent
e56d9b8573
commit
2e4bf25923
@ -60,11 +60,11 @@ export default {
|
||||
"target": "targetField",
|
||||
"condition": "{{ $self.value === 'association' }}"
|
||||
},
|
||||
{
|
||||
"type": "value:visible",
|
||||
"target": "type",
|
||||
"condition": "{{ $self.value === 'collection' }}"
|
||||
},
|
||||
// {
|
||||
// "type": "value:visible",
|
||||
// "target": "type",
|
||||
// "condition": "{{ $self.value === 'collection' }}"
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -40,20 +40,9 @@ export function getViewTypeLinkages() {
|
||||
"condition": `{{ $self.value === '${key}' }}`,
|
||||
});
|
||||
if (linkages.type) {
|
||||
xlinkages = xlinkages.concat(linkages.type.map(linkage => {
|
||||
if (properties[linkage.target]) {
|
||||
linkage.condition = `{{ $self.value === '${key}' }}`;
|
||||
linkage.target = `x-${key}-props.${linkage.target}`;
|
||||
}
|
||||
return linkage;
|
||||
}));
|
||||
xlinkages.push(...linkages.type);
|
||||
}
|
||||
}
|
||||
// xlinkages.push({
|
||||
// type: "value:visible",
|
||||
// target: 'collection',
|
||||
// condition: `{{ $self.value !== 'wysiwyg' }}`,
|
||||
// });
|
||||
return xlinkages;
|
||||
}
|
||||
|
||||
|
@ -260,5 +260,22 @@ export const wysiwyg = {
|
||||
},
|
||||
},
|
||||
linkages: {
|
||||
type: [
|
||||
{
|
||||
type: "value:visible",
|
||||
target: 'collection',
|
||||
condition: `{{ $self.value && $self.value !== 'wysiwyg' }}`,
|
||||
},
|
||||
{
|
||||
type: "value:visible",
|
||||
target: 'dataSourceType',
|
||||
condition: `{{ $self.value && $self.value !== 'wysiwyg' }}`,
|
||||
},
|
||||
{
|
||||
type: "value:visible",
|
||||
target: 'targetField',
|
||||
condition: `{{ $self.value && $self.value !== 'wysiwyg' }}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user