From f7474f147f4435bd948bf66a7c2c683dad9e8a1f 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 15:17:29 +0800 Subject: [PATCH] =?UTF-8?q?refactor(src):=20=E8=B0=83=E6=95=B4=E7=9F=A9?= =?UTF-8?q?=E9=98=B5=E9=A2=98=E5=88=97=E6=A0=87=E7=AD=BE=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=B9=B6=E5=88=9D=E5=A7=8B=E5=8C=96=E9=80=89=E6=8B=A9=E9=A2=98?= =?UTF-8?q?=E7=AD=94=E6=A1=88=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了矩阵题列标签的 text-align:center 样式 - 初始化了选择题的答案模型,默认值分别为空字符串和空数组 --- src/utils/QuestionJsons/MartrixQuestion.js | 2 +- src/views/Design/components/Questions/Choice.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/QuestionJsons/MartrixQuestion.js b/src/utils/QuestionJsons/MartrixQuestion.js index 917a9a9..7590022 100644 --- a/src/utils/QuestionJsons/MartrixQuestion.js +++ b/src/utils/QuestionJsons/MartrixQuestion.js @@ -29,7 +29,7 @@ export default { ], [ { - option: '

列标签1

', + option: '

列标签1

', id: '1049201', type: 2, is_other: 0, diff --git a/src/views/Design/components/Questions/Choice.vue b/src/views/Design/components/Questions/Choice.vue index 5d8c5b5..a366fa7 100644 --- a/src/views/Design/components/Questions/Choice.vue +++ b/src/views/Design/components/Questions/Choice.vue @@ -107,8 +107,8 @@ import { defineAsyncComponent } from 'vue'; // 是否是预览 const isPreview = defineModel('isPreview', { default: false, type: Boolean }); -const choiceValue = defineModel('answer', { default: '1', type: String }); -const value = defineModel('checkboxAnswer', { default: [1, 2], type: Array }); +const choiceValue = defineModel('answer', { default: '', type: String }); +const value = defineModel('checkboxAnswer', { default: [], type: Array }); const errorMessage = defineModel('errorMessage', { default: '', type: String }); const Contenteditable = defineAsyncComponent(() => import('@/components/contenteditable.vue')); defineProps({