From d19b2b2b3f1af7b1ab45e33f5098f0717de709af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Fri, 21 Mar 2025 20:20:23 +0800 Subject: [PATCH] =?UTF-8?q?refactor(components):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E5=8F=AF=E7=BC=96=E8=BE=91=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=92=8C=E9=97=AE=E9=A2=98=E9=A1=B9=E7=9A=84=E6=98=BE=E7=A4=BA?= =?UTF-8?q?-=20=E4=B8=BA=20contenteditable=20=E7=BB=84=E4=BB=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20flex=20=E7=B1=BB=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=20-=20=E5=9C=A8=E9=97=AE=E9=A2=98=E9=A1=B9?= =?UTF-8?q?=E5=89=8D=E5=A2=9E=E5=8A=A0=E6=A0=87=E9=A2=98=E7=BC=96=E5=8F=B7?= =?UTF-8?q?=EF=BC=8C=E6=8F=90=E9=AB=98=E5=8F=AF=E8=AF=BB=E6=80=A7=20-=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E5=B8=83=E9=97=AE=E9=A2=98=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E8=B7=AF=E7=94=B1=E8=B7=B3=E8=BD=AC=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E4=BD=BF=E7=94=A8=20replace=20=E4=BB=A3=E6=9B=BF=20pu?= =?UTF-8?q?sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/contenteditable.vue | 2 +- .../components/QuestionItemAction/QuestionBefore.vue | 4 ++-- src/views/Design/components/Questions/Completion.vue | 1 + src/views/Design/components/Questions/FileUpload.vue | 1 + src/views/Design/components/Questions/MartrixQuestion.vue | 1 + src/views/Design/components/Questions/NPS.vue | 1 + src/views/Design/components/Questions/Rate.vue | 1 + src/views/Design/components/Questions/SignQuestion.vue | 1 + src/views/Design/components/Questions/TextWithImages.vue | 1 + src/views/Survey/views/Create/Index.vue | 2 +- 10 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/contenteditable.vue b/src/components/contenteditable.vue index 777f897..dbda097 100644 --- a/src/components/contenteditable.vue +++ b/src/components/contenteditable.vue @@ -5,7 +5,7 @@ :id="'editor' + id" ref="editor" :contenteditable="active" - class="van-field contenteditable-content" + class="van-field contenteditable-content flex" :data-placeholder="placeholder" @focus="onFocus" @input="onChange($event.target, $event)" diff --git a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue index 1556d71..af8d62e 100644 --- a/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue +++ b/src/views/Design/components/ActionCompoents/components/QuestionItemAction/QuestionBefore.vue @@ -217,7 +217,7 @@ if (props.skipType === 0) { beforeQuesOptions = questions.slice(0, questionIndex + 1).map((item) => { return { ...item, - label: item.stem, + label: item.title + ' ' + item.stem, value: item.question_index }; }); @@ -227,7 +227,7 @@ if (props.skipType === 0) { beforeQuesOptions = questions.slice(0, questionIndex).map((item) => { return { ...item, - label: item.stem, + label: item.title + ' ' + item.stem, value: item.question_index }; }); diff --git a/src/views/Design/components/Questions/Completion.vue b/src/views/Design/components/Questions/Completion.vue index 63a9451..ca7703e 100644 --- a/src/views/Design/components/Questions/Completion.vue +++ b/src/views/Design/components/Questions/Completion.vue @@ -15,6 +15,7 @@ v-model="element.stem" :active="active" @blur="emitValue" + className="contenteditable-label" :errorMessage="errorMessage" > diff --git a/src/views/Design/components/Questions/FileUpload.vue b/src/views/Design/components/Questions/FileUpload.vue index a13193f..1e2d549 100644 --- a/src/views/Design/components/Questions/FileUpload.vue +++ b/src/views/Design/components/Questions/FileUpload.vue @@ -81,6 +81,7 @@ const emitValue = () => { v-model="element.stem" :active="active" @blur="emitValue" + className="contenteditable-label" :errorMessage="errorMessage" > diff --git a/src/views/Design/components/Questions/MartrixQuestion.vue b/src/views/Design/components/Questions/MartrixQuestion.vue index 7991727..5abdd92 100644 --- a/src/views/Design/components/Questions/MartrixQuestion.vue +++ b/src/views/Design/components/Questions/MartrixQuestion.vue @@ -71,6 +71,7 @@ const errorMessage = defineModel('errorMessage', { diff --git a/src/views/Design/components/Questions/NPS.vue b/src/views/Design/components/Questions/NPS.vue index d3ced39..f5c1ea8 100644 --- a/src/views/Design/components/Questions/NPS.vue +++ b/src/views/Design/components/Questions/NPS.vue @@ -14,6 +14,7 @@ diff --git a/src/views/Design/components/Questions/Rate.vue b/src/views/Design/components/Questions/Rate.vue index 591578a..e62d4f4 100644 --- a/src/views/Design/components/Questions/Rate.vue +++ b/src/views/Design/components/Questions/Rate.vue @@ -15,6 +15,7 @@ v-model="element.stem" :active="active" @blur="emitValue" + className="contenteditable-label" :errorMessage="errorMessage" > diff --git a/src/views/Design/components/Questions/SignQuestion.vue b/src/views/Design/components/Questions/SignQuestion.vue index 85b1732..591e76b 100644 --- a/src/views/Design/components/Questions/SignQuestion.vue +++ b/src/views/Design/components/Questions/SignQuestion.vue @@ -209,6 +209,7 @@ async function handleUploadImg() {