fix: view type linkages
This commit is contained in:
parent
09f2d5d2f2
commit
797a5ef9e8
@ -35,11 +35,19 @@ export function getViewTypeLinkages() {
|
|||||||
let xlinkages = [];
|
let xlinkages = [];
|
||||||
for (const [key, item] of views) {
|
for (const [key, item] of views) {
|
||||||
const { linkages = {}, properties = {} } = _.cloneDeep(item);
|
const { linkages = {}, properties = {} } = _.cloneDeep(item);
|
||||||
|
if (key === 'markdown') {
|
||||||
|
xlinkages.push({
|
||||||
|
"type": "value:visible",
|
||||||
|
"target": `x-${key}-props.*`,
|
||||||
|
"condition": `{{ $self.value === '${key}' }}`,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
xlinkages.push({
|
xlinkages.push({
|
||||||
"type": "value:visible",
|
"type": "value:visible",
|
||||||
"target": `x-${key}-props.*`,
|
"target": `x-${key}-props.*`,
|
||||||
"condition": `{{ $self.value === '${key}' && $form.values.dataSourceType === 'collection' }}`,
|
"condition": `{{ $self.value === '${key}' && $form.values.dataSourceType === 'collection' }}`,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
if (linkages.type) {
|
if (linkages.type) {
|
||||||
xlinkages.push(...linkages.type);
|
xlinkages.push(...linkages.type);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user