This commit is contained in:
ckx6954 2024-12-18 21:03:03 +09:00
parent dac352e0cf
commit 71de3b89f0

View File

@ -13,7 +13,7 @@
</template> </template>
<script setup> <script setup>
import { ref, watch } from 'vue'; import { ref, watch, watchEffect } from 'vue';
const props = defineProps({ const props = defineProps({
title: { title: {
@ -46,7 +46,7 @@ const props = defineProps({
const emit = defineEmits(['update:data']); const emit = defineEmits(['update:data']);
const selectData = ref(props.value); const selectData = ref(props.value);
watch(selectData, (newValue) => { watchEffect(() => {
emit('update:data', newValue); emit('update:data', selectData.value);
}); })
</script> </script>