fix: 修复打分题answer异常的问题
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
<contenteditable v-model="item.option" :active="active"></contenteditable>
|
<contenteditable v-model="item.option" :active="active"></contenteditable>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb10">
|
<div class="mb10">
|
||||||
<RateCharacter :config="element.config"></RateCharacter>
|
<RateCharacter v-model:model="value" :config="element.config"></RateCharacter>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tips">
|
<div class="tips">
|
||||||
@@ -53,6 +53,7 @@
|
|||||||
import { defineModel, ref } from 'vue';
|
import { defineModel, ref } from 'vue';
|
||||||
import RateCharacter from './RateCharacter.vue';
|
import RateCharacter from './RateCharacter.vue';
|
||||||
|
|
||||||
|
const value = defineModel('value', { default: -1, type: Number });
|
||||||
const isPreview = defineModel('isPreview', { default: false, type: Boolean });
|
const isPreview = defineModel('isPreview', { default: false, type: Boolean });
|
||||||
defineProps({
|
defineProps({
|
||||||
active: {
|
active: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<ul :key="test">
|
<ul>
|
||||||
<li
|
<li
|
||||||
v-for="(rate, rateIndex) in rateItem"
|
v-for="(rate, rateIndex) in rateItem"
|
||||||
:key="rateIndex"
|
:key="rateIndex"
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
|
||||||
const model = defineModel('model', -1);
|
const model = defineModel('model', { type: Number, required: true });
|
||||||
const rateItem = ref([
|
const rateItem = ref([
|
||||||
{
|
{
|
||||||
label: 1,
|
label: 1,
|
||||||
@@ -41,11 +41,6 @@ const rateItem = ref([
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const test = ref(1);
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
test.value = 2;
|
|
||||||
}, 300);
|
|
||||||
const config = defineModel('config', {
|
const config = defineModel('config', {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
Reference in New Issue
Block a user