fix: 修复 NPS 组件状态共享的问题

- 脱离 hooks,避免共享一个状态
This commit is contained in:
Huangzhe
2025-03-18 17:11:24 +08:00
parent ad1455fd73
commit 7372bbc17e
3 changed files with 6 additions and 7 deletions

View File

@@ -32,8 +32,9 @@
<RateCharacter
:config="element.config"
:index="optionIndex"
v-model:model="value"
@change="handleRateChange"
></RateCharacter>
/>
</div>
</div>
</template>
@@ -45,6 +46,7 @@
import { ref } from 'vue';
import RateCharacter from './RateCharacter.vue';
const value = defineModel('value', { default: -1, type: Number });
const isPreview = defineModel('isPreview', { default: false, type: Boolean });
/* const props = */ defineProps({
index: {