feat(Design): 新增图文题型组件
- 添加 Contenteditable组件用于富文本编辑 - 实现 CheckboxQuestionAction 组件用于多选题配置 - 开发 TextWithImages 组件用于图文题型展示 - 更新 QuestionAction 组件以支持多选题操作 - 调整 QuestionBefore 组件移除分组功能
This commit is contained in:
38
src/views/Design/components/Questions/TextWithImages.vue
Normal file
38
src/views/Design/components/Questions/TextWithImages.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div class="container text-with-images-container">
|
||||
<van-field
|
||||
readonly
|
||||
:label="element.stem"
|
||||
:required="element.config.is_required === 1"
|
||||
label-align="top"
|
||||
class="base-select"
|
||||
>
|
||||
<template #label>
|
||||
<contenteditable v-model="element.stem"></contenteditable>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import contenteditable from '@/components/contenteditable.vue';
|
||||
import { ref } from 'vue';
|
||||
const props = defineProps({
|
||||
element: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
stem: ''
|
||||
};
|
||||
}
|
||||
},
|
||||
active: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
const element = ref(props.element);
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
Reference in New Issue
Block a user