diff --git a/packages/plugin-pages/src/collections/views_v2.ts b/packages/plugin-pages/src/collections/views_v2.ts index 4dd074f85..6beca45af 100644 --- a/packages/plugin-pages/src/collections/views_v2.ts +++ b/packages/plugin-pages/src/collections/views_v2.ts @@ -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' }}" + // }, ], }, { diff --git a/packages/plugin-pages/src/views/index.ts b/packages/plugin-pages/src/views/index.ts index b5b932c2a..b381f3ac6 100644 --- a/packages/plugin-pages/src/views/index.ts +++ b/packages/plugin-pages/src/views/index.ts @@ -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; } diff --git a/packages/plugin-pages/src/views/types.ts b/packages/plugin-pages/src/views/types.ts index accf5f53a..2b70f854d 100644 --- a/packages/plugin-pages/src/views/types.ts +++ b/packages/plugin-pages/src/views/types.ts @@ -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' }}`, + }, + ], }, };