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>
<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>