fix:矩阵题优化

This commit is contained in:
du.meimei
2025-03-25 18:48:01 +08:00
parent 249bd9e318
commit 26b68d2b37
7 changed files with 59 additions and 63 deletions

2
components.d.ts vendored
View File

@@ -2,7 +2,7 @@
// @ts-nocheck // @ts-nocheck
// Generated by unplugin-vue-components // Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399 // Read more: https://github.com/vuejs/core/pull/3399
export {}; export {}
/* prettier-ignore */ /* prettier-ignore */
declare module 'vue' { declare module 'vue' {

View File

@@ -297,6 +297,6 @@ input {
} }
.van-popup--bottom.van-popup--round { .van-popup--bottom.van-popup--round {
background: linear-gradient( 180deg, #E8FAD7 0%, #FFFFFF 8%); background: linear-gradient(180deg, #e8fad7 0%, #ffffff 8%);
} }
//background: linear-gradient( 180deg, #E8FAD7 0%, #FFFFFF 100%); //background: linear-gradient( 180deg, #E8FAD7 0%, #FFFFFF 100%);

View File

@@ -18,7 +18,7 @@
<!-- v-html="modelValue"--> <!-- v-html="modelValue"-->
<!-- :placeholder="placeholder"--> <!-- :placeholder="placeholder"-->
<!-- ></p>--> <!-- ></p>-->
<div class="right-icon ml10" style="margin-left: 20px"> <div class="right-icon ml10">
<slot name="right-icon"></slot> <slot name="right-icon"></slot>
</div> </div>
</div> </div>

View File

@@ -10,20 +10,17 @@ import {
nps nps
} from '@/utils/importJsons'; } from '@/utils/importJsons';
import radioPng from '@/views/Design/images/1.png' import radioPng from '@/views/Design/images/1.png';
import checkboxPng from '@/views/Design/images/2.png' import checkboxPng from '@/views/Design/images/2.png';
import completionPng from '@/views/Design/images/4.png' import completionPng from '@/views/Design/images/4.png';
import ratePng from '@/views/Design/images/5.png' import ratePng from '@/views/Design/images/5.png';
import textImagePng from '@/views/Design/images/6.png' import textImagePng from '@/views/Design/images/6.png';
import martrixQuestionCheckboxPng from '@/views/Design/images/10.png' import martrixQuestionCheckboxPng from '@/views/Design/images/10.png';
import martrixQuestionRadioPng from '@/views/Design/images/9.png' import martrixQuestionRadioPng from '@/views/Design/images/9.png';
import martrixQuestionTextPng from '@/views/Design/images/8.png' import martrixQuestionTextPng from '@/views/Design/images/8.png';
import uploadPng from '@/views/Design/images/18.png' import uploadPng from '@/views/Design/images/18.png';
import signPng from '@/views/Design/images/22.png' import signPng from '@/views/Design/images/22.png';
import nspPng from '@/views/Design/images/106.png' import nspPng from '@/views/Design/images/106.png';
const basicQuesTypeList = [ const basicQuesTypeList = [
{ {

View File

@@ -140,10 +140,10 @@ const errorMessage = defineModel('errorMessage', {
<div :style="{ width: `${tableWidth}px`, height: '30px' }"></div> <div :style="{ width: `${tableWidth}px`, height: '30px' }"></div>
</template> </template>
<template #default="{ row /*, column, $index*/ }"> <template #default="{ row /*, column, $index*/ }">
<div style="position: relative"> <div style="position: relative" class="flex align-center space-between">
<el-text truncated> <div :style="{ width: `${tableWidth - 50}px` }">
<contenteditable v-model="row.option" :active="active" @blur="emitValue" /> <contenteditable v-model="row.option" :active="active" @blur="emitValue" />
</el-text> </div>
<van-popover <van-popover
v-model="row.showAction" v-model="row.showAction"
placement="left-end" placement="left-end"
@@ -167,10 +167,10 @@ const errorMessage = defineModel('errorMessage', {
style="position: relative" style="position: relative"
> >
<template #header> <template #header>
<div> <div class="flex align-center space-between">
<el-text truncated :style="{ width: `${tableWidth}px` }"> <div :style="{ width: `${tableWidth - 20}px` }">
<contenteditable v-model="col.option" :active="active" @blur="emitValue" /> <contenteditable v-model="col.option" :active="active" @blur="emitValue" />
</el-text> </div>
<van-popover <van-popover
v-model="col.showAction" v-model="col.showAction"
placement="left-end" placement="left-end"
@@ -218,9 +218,9 @@ input[type='text'] {
} }
.icon { .icon {
position: absolute; //position: absolute;
top: 15%; //top: 15%;
right: 0; //right: 0;
& > svg { & > svg {
height: 15px; height: 15px;

View File

@@ -106,13 +106,10 @@
:key="item.type" :key="item.type"
@click="questionEvent(item)" @click="questionEvent(item)"
> >
<img :src="item.icon" alt="" />
<img :src="item.icon" alt="">
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
<!-- <template #icon>--> <!-- <template #icon>-->
<!-- <span class="mobilefont grid-icon" v-html="item.icon"></span>--> <!-- <span class="mobilefont grid-icon" v-html="item.icon"></span>-->
<!-- </template>--> <!-- </template>-->
</div> </div>
@@ -386,7 +383,7 @@ import { useRoute, useRouter } from 'vue-router';
import YLPicker from '@/components/YLPicker.vue'; import YLPicker from '@/components/YLPicker.vue';
import { getPages } from '@/utils/public'; import { getPages } from '@/utils/public';
import { showConfirmDialog, showFailToast, showToast } from 'vant'; import { showConfirmDialog, showFailToast, showToast } from 'vant';
import {Position} from "@element-plus/icons-vue"; import { Position } from '@element-plus/icons-vue';
// 获取 Store 实例 // 获取 Store 实例
const counterStore = useCounterStore(); const counterStore = useCounterStore();
@@ -1056,7 +1053,6 @@ onBeforeMount(() => {
position: relative; position: relative;
height: 88px; height: 88px;
& p { & p {
width: 100%; width: 100%;
position: absolute; position: absolute;
bottom: 11px; bottom: 11px;
@@ -1064,7 +1060,6 @@ onBeforeMount(() => {
text-align: center; text-align: center;
color: #000000; color: #000000;
font-weight: 500; font-weight: 500;
} }
} }
} }
@@ -1119,13 +1114,12 @@ onBeforeMount(() => {
} }
} }
.icon-item { .icon-item {
width: 76px; width: 76px;
height: 88px; height: 88px;
img { img {
width: 100%; width: 100%;
height:100% height: 100%;
} }
} }

View File

@@ -1,6 +1,11 @@
<template> <template>
<choice v-model:answer="choiceValue" :element="question" :index="answerIndex" :is-preview="true" <choice
:errorMessage="question.error" /> v-model:answer="choiceValue"
:element="question"
:index="answerIndex"
:is-preview="true"
:errorMessage="question.error"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { watch, ref, computed } from 'vue'; import { watch, ref, computed } from 'vue';
@@ -36,7 +41,7 @@ if (answer.value) {
*/ */
function parseAnswer() { function parseAnswer() {
for (const key in answer.value.value) { for (const key in answer.value.value) {
choiceValue.value = (key); choiceValue.value = key;
} }
} }