From 6e83ccdbb390eb8c986b0e33da97bf9f14bd34cb 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 10:24:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(design):=20=E6=B7=BB=E5=8A=A0=E9=A2=98?= =?UTF-8?q?=E7=9B=AE=E9=A2=84=E8=A7=88=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=A2=98=E7=9B=AE=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 Preview 组件用于题目预览 - 重构 Index 组件,移除冗余代码 -优化 QuestionBefore 组件,添加题目标题 - 重构 ChooseQuestion组件,支持自定义操作 - 新增题目类型判断和对应操作功能 --- src/components/YLSelect.vue | 2 +- src/router/index.ts | 10 ++- src/views/Design/Index.vue | 73 ++++++++++++++++++- src/views/Design/Preview.vue | 48 ++++++++++++ .../ActionCompoents/QuestionAction.vue | 3 - .../components/QuestionBefore.vue | 3 +- .../Design/components/ChooseQuestion.vue | 35 +-------- 7 files changed, 132 insertions(+), 42 deletions(-) create mode 100644 src/views/Design/Preview.vue diff --git a/src/components/YLSelect.vue b/src/components/YLSelect.vue index a663699..f89fb02 100644 --- a/src/components/YLSelect.vue +++ b/src/components/YLSelect.vue @@ -12,7 +12,7 @@ :value="item.value" :disabled="item.disabled" > - + diff --git a/src/views/Design/Preview.vue b/src/views/Design/Preview.vue new file mode 100644 index 0000000..b1be816 --- /dev/null +++ b/src/views/Design/Preview.vue @@ -0,0 +1,48 @@ + + + diff --git a/src/views/Design/components/ActionCompoents/QuestionAction.vue b/src/views/Design/components/ActionCompoents/QuestionAction.vue index b6c7ff7..28359ee 100644 --- a/src/views/Design/components/ActionCompoents/QuestionAction.vue +++ b/src/views/Design/components/ActionCompoents/QuestionAction.vue @@ -44,9 +44,6 @@ {{ getSkipTypeText(0) }} - - - diff --git a/src/views/Design/components/ActionCompoents/components/QuestionBefore.vue b/src/views/Design/components/ActionCompoents/components/QuestionBefore.vue index 6dfb78b..a52af10 100644 --- a/src/views/Design/components/ActionCompoents/components/QuestionBefore.vue +++ b/src/views/Design/components/ActionCompoents/components/QuestionBefore.vue @@ -173,7 +173,8 @@ skipOption.push( .map((item) => { return { value: item.question_index, - label: item.stem + // todo 吧title Q1 Q2 放到 题目的前面 + label: item.title + item.stem }; }) ); diff --git a/src/views/Design/components/ChooseQuestion.vue b/src/views/Design/components/ChooseQuestion.vue index 0c87162..2a8eef2 100644 --- a/src/views/Design/components/ChooseQuestion.vue +++ b/src/views/Design/components/ChooseQuestion.vue @@ -8,11 +8,8 @@ -