From 01b53ee4a0f87003651598d4771b384fb8f95681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Thu, 6 Mar 2025 17:37:36 +0800 Subject: [PATCH] =?UTF-8?q?feat(Design):=20=E6=96=B0=E5=A2=9E=E5=9B=BE?= =?UTF-8?q?=E6=96=87=E9=A2=98=E5=9E=8B=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 Contenteditable组件用于富文本编辑 - 实现 CheckboxQuestionAction 组件用于多选题配置 - 开发 TextWithImages 组件用于图文题型展示 - 更新 QuestionAction 组件以支持多选题操作 - 调整 QuestionBefore 组件移除分组功能 --- components.d.ts | 1 + src/components/contenteditable.vue | 117 ++++++++++++++++++ src/views/Design/Index.vue | 9 ++ .../ActionCompoents/QuestionAction.vue | 23 ++-- .../CheckboxQuestionAction.vue | 69 +++++++++++ .../QuestionItemAction/QuestionBefore.vue | 10 +- .../components/Questions/TextWithImages.vue | 38 ++++++ 7 files changed, 254 insertions(+), 13 deletions(-) create mode 100644 src/components/contenteditable.vue create mode 100644 src/views/Design/components/ActionCompoents/components/QuestionItemAction/CheckboxQuestionAction.vue create mode 100644 src/views/Design/components/Questions/TextWithImages.vue diff --git a/components.d.ts b/components.d.ts index 4bc3beb..9be9cdb 100644 --- a/components.d.ts +++ b/components.d.ts @@ -7,6 +7,7 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + Contenteditable: typeof import('./src/components/contenteditable.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] VanActionSheet: typeof import('vant/es')['ActionSheet'] diff --git a/src/components/contenteditable.vue b/src/components/contenteditable.vue new file mode 100644 index 0000000..f94b92f --- /dev/null +++ b/src/components/contenteditable.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/src/views/Design/Index.vue b/src/views/Design/Index.vue index 67a1be2..b345f8b 100644 --- a/src/views/Design/Index.vue +++ b/src/views/Design/Index.vue @@ -43,6 +43,14 @@ :active="chooseQuestionId === element.id" sn="lXEBBpE2" /> + + + + + + + @@ -84,6 +90,7 @@ + diff --git a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue index a52af10..eae560f 100644 --- a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue +++ b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue @@ -279,12 +279,12 @@ const groupOptions = [ { label: '选项', value: 0 - }, - { - label: '分组', - value: 1 - // disabled: true } + // { + // label: '分组', + // value: 1 + // // disabled: true + // } ]; const settingIfOptions = [ { label: 'if', value: 'if' }, diff --git a/src/views/Design/components/Questions/TextWithImages.vue b/src/views/Design/components/Questions/TextWithImages.vue new file mode 100644 index 0000000..a5990cf --- /dev/null +++ b/src/views/Design/components/Questions/TextWithImages.vue @@ -0,0 +1,38 @@ + + +