프로젝트 수정을 위한 modelValue 추가
This commit is contained in:
parent
eead7902c4
commit
26041d4b90
@ -50,6 +50,10 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
|
||||||
|
const postcode = ref('');
|
||||||
|
const address = ref('');
|
||||||
|
const detailAddress = ref('');
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -71,7 +75,7 @@ const props = defineProps({
|
|||||||
default: 30,
|
default: 30,
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
isRow : {
|
isRow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
required: false,
|
required: false,
|
||||||
@ -81,14 +85,23 @@ const props = defineProps({
|
|||||||
default: false,
|
default: false,
|
||||||
required: 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 emits = defineEmits(['update:data', 'update:alert']);
|
||||||
const postcode = ref('');
|
|
||||||
const address = ref('');
|
|
||||||
const detailAddress = ref('');
|
|
||||||
|
|
||||||
// 주소 검색 팝업 열기
|
// 주소 검색 팝업 열기
|
||||||
const openAddressSearch = () => {
|
const openAddressSearch = () => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user