ref(srcactor): 优化文件上传题型的题目展示

-将 '请上传文件' 文本包裹在 <p> 标签中,提高题目展示的灵活性和格式化
This commit is contained in:
陈昱达
2025-03-24 20:18:04 +08:00
parent fe3ad1a00d
commit 2075ca8b41
8 changed files with 43 additions and 24 deletions

View File

@@ -2,7 +2,7 @@ export default {
id: '',
question_type: 18,
question_index: 41,
stem: '请上传文件',
stem: '<p>请上传文件</p>',
title: 'Q14',
options: [],
last_option_index: 0,

View File

@@ -3,7 +3,7 @@ export default {
id: '',
question_type: '',
question_index: '',
stem: '请每行选择一个选项',
stem: '<p>请每行选择一个选项</p>',
title: '',
options: [
[

View File

@@ -2,7 +2,7 @@ export default {
id: '',
question_type: 106,
question_index: 0,
stem: '您向朋友或同事推荐我们的可能性多大?',
stem: '<p>您向朋友或同事推荐我们的可能性多大?</p>',
title: '',
options: [
[

View File

@@ -2,7 +2,7 @@ export default {
id: '',
question_type: 5,
question_index: '',
stem: '请完成打分',
stem:'<p>请给本项打分(打分)</p>',
title: '',
options: [
[

View File

@@ -1,7 +1,7 @@
export default {
id: '17852690',
title: 'Q7',
stem: '请留下您的姓名',
stem: '<p>请留下您的姓名</p>',
other: '',
question_index: 10,
question_type: 22,

View File

@@ -2,7 +2,7 @@ export default {
id: '',
question_type: '',
question_index: 0,
stem: '请认真阅读以下内容',
stem: '<p>请认真阅读以下内容</p>',
title: '',
options: [],
last_option_index: 0,

View File

@@ -16,23 +16,27 @@
class="if mr10"
@change="logicIf($event, index)"
></yl-select>
<div style="flex: 1" class="action-button">
<div style="flex: 1" class="action-button align-center">
<van-icon
name="add"
style="margin-top:-1px"
v-if="logIndex !== 0"
name="del"
size="0.54rem"
class="ml10 theme-color"
class-prefix="mobilefont"
@click="deleteLogic(logIndex, item.logic, index)"
/>
<van-icon
name="add-o"
size="0.5rem"
class="ml10 theme-color"
@click="addLogicItem(logIndex, item.logic)"
/>
<van-icon
v-if="logIndex !== 0"
name="clear"
size="0.5rem"
class="ml10 theme-color"
@click="deleteLogic(logIndex, item.logic, index)"
/>
<van-icon
v-else
name="delete"
v-if="logIndex === 0"
:name="delSvg"
size="0.5rem"
class="ml10"
@click="remoteLogic(index)"
@@ -172,6 +176,7 @@
</div>
</template>
<script setup>
import delSvg from '@/assets/img/del.svg'
import { v4 as uuidv4 } from 'uuid';
import { settingIfOptions, settingAndOptions, answerOptions } from '@/utils/questionSteeingList.js';
import YlSelect from '@/components/YLSelect.vue';

View File

@@ -29,10 +29,10 @@
class="rate-item"
@click="chooseOption(item)"
>
<div class="mb5">
<div class="mb10">
<contenteditable v-model="item.option" :active="active"></contenteditable>
</div>
<div class="mb10">
<div class="mb10 ratechart">
<RateCharacter
v-model:model="answerValue[optionIndex]"
:config="element.config"
@@ -54,6 +54,7 @@
<script setup>
import { defineModel, ref } from 'vue';
import RateCharacter from './RateCharacter.vue';
import {Position} from "@element-plus/icons-vue";
/**
* @type {ModelRef<Object, string, Object, Object>}
@@ -115,14 +116,27 @@ const chooseOption = (item) => {
margin-top: 12px;
& .rate-item {
margin-bottom: 8px;
padding: 11px 5px;
border: 1px solid #f4f4f4;
border-radius: 8px;
background: #fafbfc;
//margin-bottom: 8px;
//padding: 11px 5px;
//border-bottom: 1px solid #f4f4f4;
//border-radius: 8px;
//background: #fafbfc;
width: 87vw;
overflow: scroll;
box-sizing: border-box;
& .ratechart {
position:relative;
padding-bottom:20px;
&::after{
position: absolute;
content: '';
width:100%;
bottom:0;
border-bottom: 1px solid var(--van-border-color);
transform: scaleY(0.5);
}
}
}
}
}