refactor(Design): 重构问卷预览功能

- 在 Choice、Completion、FileUpload、MatrixQuestion、NPS、Rate、SignQuestion 和 TextWithImages 组件中添加 isPreview 属性
- 根据 isPreview 属性决定是否显示题号或题目标题
- 更新 PreviewCompletion、PreviewFileUpload 和 PreviewSign 组件,设置 isPreview 为 true
This commit is contained in:
陈昱达
2025-03-22 15:00:33 +08:00
parent 256a3d05f9
commit 73889c73d4
11 changed files with 35 additions and 11 deletions

View File

@@ -7,7 +7,7 @@
class="contenteditable-question-title base-select"
>
<template #left-icon>
{{ index + 1 }}
{{ isPreview ? element.title : index + 1 }}
</template>
<template #label>
<contenteditable
@@ -112,6 +112,10 @@ const value = defineModel('checkboxAnswer', { default: [], type: Array });
const errorMessage = defineModel('errorMessage', { default: '', type: String });
const Contenteditable = defineAsyncComponent(() => import('@/components/contenteditable.vue'));
defineProps({
isPreview: {
type: Boolean,
default: false
},
active: {
type: Boolean,
default: false