Merge remote-tracking branch 'origin/feature/feature-20250331-h5' into feature/feature-20250331-h5

This commit is contained in:
Huangzhe
2025-03-13 09:38:22 +08:00
33 changed files with 1020 additions and 949 deletions

View File

@@ -10,12 +10,7 @@
{{ index + 1 }}
</template>
<template #label>
<div
:contenteditable="active"
class="van-field"
@blur="saveStem($event, element)"
v-html="element.stem"
></div>
<contenteditable v-model="element.stem" :active="active" @blur="saveStem"></contenteditable>
</template>
<template #input>
<div v-for="(optionItem, optionItemIndex) in element.options" :key="optionItemIndex">
@@ -38,7 +33,7 @@
</template>
<script setup>
import { ref, onMounted } from 'vue';
import { ref } from 'vue';
import RateCharacter from './RateCharacter.vue';
const props = defineProps({
@@ -56,23 +51,11 @@ const props = defineProps({
sn: { type: String, default: '' },
questionType: { type: [String, Number], default: 4 }
});
const answerValue = ref()
// NPS 的答案
const NPSAnswer = ref({
'question_index': props.index,
'answer': {
'1': answerValue.value
}
});
const element = ref(props.element);
const { element } = toRefs(props);
const chooseId = ref('');
// 创建一个本地副本以保存更改
const localElement = ref({ ...props.element });
const saveStem = (e) => {
localElement.value.stem = e.target.innerHTML;
const emit = defineEmits(['update:element']);
const saveStem = () => {
emit('update:element', element.value);
};
const chooseOption = (item) => {
@@ -90,4 +73,4 @@ const chooseOption = (item) => {
justify-content: space-between;
color: #bfbfbf;
}
</style>
</style>