From 5e9959b9876aa59845a923d55697f5c7171aadde Mon Sep 17 00:00:00 2001 From: chenos Date: Sun, 28 Mar 2021 12:34:56 +0800 Subject: [PATCH] feat: markdown support --- .../plugin-collections/src/interfaces/types.ts | 2 +- .../plugin-pages/src/collections/menus_views_v2.ts | 8 ++++---- packages/plugin-pages/src/views/types.ts | 14 +++++++------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/plugin-collections/src/interfaces/types.ts b/packages/plugin-collections/src/interfaces/types.ts index a4c1db089..14ed285cf 100644 --- a/packages/plugin-collections/src/interfaces/types.ts +++ b/packages/plugin-collections/src/interfaces/types.ts @@ -98,7 +98,6 @@ export const percent = { }, }; - export const markdown = { title: 'Markdown', group: 'media', @@ -114,6 +113,7 @@ export const markdown = { export const wysiwyg = { title: '可视化编辑器', group: 'media', + disabled: true, options: { interface: 'wysiwyg', type: 'json', diff --git a/packages/plugin-pages/src/collections/menus_views_v2.ts b/packages/plugin-pages/src/collections/menus_views_v2.ts index 3a7654dbd..42bd438cd 100644 --- a/packages/plugin-pages/src/collections/menus_views_v2.ts +++ b/packages/plugin-pages/src/collections/menus_views_v2.ts @@ -115,12 +115,12 @@ export default { }, }, { - interface: 'wysiwyg', + interface: 'markdown', type: 'json', title: '显示文字信息', name: 'message', component: { - type: 'wysiwyg', + type: 'markdown', }, }, { @@ -168,12 +168,12 @@ export default { }, }, { - interface: 'wysiwyg', + interface: 'markdown', type: 'virtual', title: '显示文字信息', name: 'draft.message', component: { - type: 'wysiwyg', + type: 'markdown', }, } ], diff --git a/packages/plugin-pages/src/views/types.ts b/packages/plugin-pages/src/views/types.ts index 79f24e1d0..9f230f6ea 100644 --- a/packages/plugin-pages/src/views/types.ts +++ b/packages/plugin-pages/src/views/types.ts @@ -431,19 +431,19 @@ export const kanban = { }, }; -export const wysiwyg = { - title: '富文本', +export const markdown = { + title: 'Markdown', options: { // html, }, properties: { // 数据配置 html: { - interface: 'wysiwyg', + interface: 'markdown', type: 'virtual', - title: '富文本内容', + title: 'Markdown 内容', component: { - type: 'wysiwyg', + type: 'markdown', }, }, }, @@ -452,12 +452,12 @@ export const wysiwyg = { { type: "value:visible", target: 'collection', - condition: `{{ $self.value && $self.value !== 'wysiwyg' }}`, + condition: `{{ $self.value && $self.value !== 'markdown' }}`, }, { type: "value:visible", target: 'dataSourceType', - condition: `{{ $self.value && $self.value !== 'wysiwyg' }}`, + condition: `{{ $self.value && $self.value !== 'markdown' }}`, }, ], },