Merge branch 'feature/feature-20250331-h5' of https://e.coding.yili.com/yldc/ylst/ylst-survey-h5 into feature/feature-20250331-h5
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div class="design-create">
|
||||
<draggable
|
||||
v-if="questionInfo.questions.length > 0"
|
||||
v-model:data="questionInfo.questions"
|
||||
item-key="id"
|
||||
handle=".moverQues"
|
||||
handle=".moveQuestion"
|
||||
chosenClass="chosen"
|
||||
animation="300"
|
||||
:scroll="true"
|
||||
@@ -51,8 +52,8 @@
|
||||
<martrix-question
|
||||
v-if="
|
||||
element.question_type === 8 ||
|
||||
element.question_type === 9 ||
|
||||
element.question_type === 10
|
||||
element.question_type === 9 ||
|
||||
element.question_type === 10
|
||||
"
|
||||
:element="computedElement(element)"
|
||||
:index="index"
|
||||
@@ -86,7 +87,7 @@
|
||||
:active="chooseQuestionId === element.id"
|
||||
@update:element="updateElement"
|
||||
/>
|
||||
<!--图文-->
|
||||
<!--NPS-->
|
||||
<NPS
|
||||
v-if="element.question_type === 106"
|
||||
:element="computedElement(element)"
|
||||
@@ -104,8 +105,11 @@
|
||||
class="flex"
|
||||
>
|
||||
<template v-for="(act, actIndex) in item.actions" :key="actIndex">
|
||||
<div class="flex align-center action-item" @click="actionEvent(act, el)">
|
||||
<van-icon :name="act.icon"></van-icon>
|
||||
<div
|
||||
class="flex align-center action-item theme-color"
|
||||
@click="actionEvent(act, el)"
|
||||
>
|
||||
<van-icon :name="act.icon" class="icons"></van-icon>
|
||||
<span class="ml10">{{ act.label }}</span>
|
||||
</div>
|
||||
</template>
|
||||
@@ -130,6 +134,9 @@
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
<div v-else>
|
||||
<slot name="empty"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
@@ -163,7 +170,7 @@ const { filterGap, activeId } = defineProps({
|
||||
default: false
|
||||
},
|
||||
activeId: {
|
||||
type: String,
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
@@ -243,7 +250,8 @@ watch(
|
||||
() => questionInfo.value.questions,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
saveQueItem(questionInfo.value.logics, newVal); // 确保保存最新的数据
|
||||
// 确保保存最新的数据
|
||||
saveQueItem(questionInfo.value.logics, newVal);
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
@@ -264,7 +272,7 @@ const actionOptions = [
|
||||
actions: [
|
||||
{
|
||||
label: '添加选项',
|
||||
icon: 'add',
|
||||
icon: 'add-o',
|
||||
fun: 'radioAddOption'
|
||||
}
|
||||
]
|
||||
@@ -275,12 +283,12 @@ const actionOptions = [
|
||||
actions: [
|
||||
{
|
||||
label: '添加行标签',
|
||||
icon: 'add',
|
||||
icon: 'add-o',
|
||||
fun: 'addMatrixRowOption'
|
||||
},
|
||||
{
|
||||
label: '添加列标签',
|
||||
icon: 'add',
|
||||
icon: 'add-o',
|
||||
fun: 'addMatrixColumnOption'
|
||||
}
|
||||
]
|
||||
@@ -443,7 +451,11 @@ onMounted(() => {
|
||||
//background-color: #e9eef3;
|
||||
color: #333;
|
||||
|
||||
.slot-actions {
|
||||
::v-deep .slot-actions {
|
||||
& .action-item {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
& .action-item + .action-item {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user