refactor(src): 调整矩阵题列标签样式并初始化选择题答案模型

- 移除了矩阵题列标签的 text-align:center 样式
- 初始化了选择题的答案模型,默认值分别为空字符串和空数组
This commit is contained in:
陈昱达
2025-03-21 15:17:29 +08:00
parent 22e6f4fee0
commit f7474f147f
2 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ export default {
], ],
[ [
{ {
option: '<p style="text-align:center">列标签1</p>', option: '<p>列标签1</p>',
id: '1049201', id: '1049201',
type: 2, type: 2,
is_other: 0, is_other: 0,

View File

@@ -107,8 +107,8 @@ import { defineAsyncComponent } from 'vue';
// 是否是预览 // 是否是预览
const isPreview = defineModel('isPreview', { default: false, type: Boolean }); const isPreview = defineModel('isPreview', { default: false, type: Boolean });
const choiceValue = defineModel('answer', { default: '1', type: String }); const choiceValue = defineModel('answer', { default: '', type: String });
const value = defineModel('checkboxAnswer', { default: [1, 2], type: Array }); const value = defineModel('checkboxAnswer', { default: [], type: Array });
const errorMessage = defineModel('errorMessage', { default: '', type: String }); const errorMessage = defineModel('errorMessage', { default: '', type: String });
const Contenteditable = defineAsyncComponent(() => import('@/components/contenteditable.vue')); const Contenteditable = defineAsyncComponent(() => import('@/components/contenteditable.vue'));
defineProps({ defineProps({