수정2
This commit is contained in:
parent
dac352e0cf
commit
71de3b89f0
@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { ref, watch, watchEffect } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
@ -46,7 +46,7 @@ const props = defineProps({
|
||||
const emit = defineEmits(['update:data']);
|
||||
const selectData = ref(props.value);
|
||||
|
||||
watch(selectData, (newValue) => {
|
||||
emit('update:data', newValue);
|
||||
});
|
||||
watchEffect(() => {
|
||||
emit('update:data', selectData.value);
|
||||
})
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user