fix: 修复 NPS 组件状态共享的问题
- 脱离 hooks,避免共享一个状态
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user