프로젝트 수정을 위한 modelValue 추가

This commit is contained in:
yoon 2025-02-17 15:06:43 +09:00
parent eead7902c4
commit 26041d4b90

View File

@ -50,6 +50,10 @@
<script setup>
import { ref, watch } from 'vue';
const postcode = ref('');
const address = ref('');
const detailAddress = ref('');
const props = defineProps({
title: {
type: String,
@ -71,7 +75,7 @@ const props = defineProps({
default: 30,
required: false,
},
isRow : {
isRow: {
type: Boolean,
default: false,
required: false,
@ -81,14 +85,23 @@ const props = defineProps({
default: false,
required: false,
},
modelValue: {
type: Object,
default: () => ({}),
required: false
}
});
const emits = defineEmits(['update:data', 'update:alert']);
// watch
watch(() => props.modelValue, (newValue) => {
if (newValue) {
postcode.value = newValue.PROJCTZIP || '';
address.value = newValue.PROJCTARR || '';
detailAddress.value = newValue.PROJCTDTL || '';
}
}, { immediate: true });
//
const postcode = ref('');
const address = ref('');
const detailAddress = ref('');
const emits = defineEmits(['update:data', 'update:alert']);
//
const openAddressSearch = () => {