From 797a5ef9e83d0d18190c36049ae33a7be09b270e Mon Sep 17 00:00:00 2001 From: chenos Date: Mon, 29 Mar 2021 13:06:14 +0800 Subject: [PATCH] fix: view type linkages --- packages/plugin-pages/src/views/index.ts | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/plugin-pages/src/views/index.ts b/packages/plugin-pages/src/views/index.ts index 74c002a9b..c5f2e1036 100644 --- a/packages/plugin-pages/src/views/index.ts +++ b/packages/plugin-pages/src/views/index.ts @@ -35,11 +35,19 @@ export function getViewTypeLinkages() { let xlinkages = []; for (const [key, item] of views) { const { linkages = {}, properties = {} } = _.cloneDeep(item); - xlinkages.push({ - "type": "value:visible", - "target": `x-${key}-props.*`, - "condition": `{{ $self.value === '${key}' && $form.values.dataSourceType === 'collection' }}`, - }); + if (key === 'markdown') { + xlinkages.push({ + "type": "value:visible", + "target": `x-${key}-props.*`, + "condition": `{{ $self.value === '${key}' }}`, + }); + } else { + xlinkages.push({ + "type": "value:visible", + "target": `x-${key}-props.*`, + "condition": `{{ $self.value === '${key}' && $form.values.dataSourceType === 'collection' }}`, + }); + } if (linkages.type) { xlinkages.push(...linkages.type); }