전화번호 숫자만, 주소 디세이블, 컬러 변경 시 alert
This commit is contained in:
parent
aac2e21c08
commit
c2bac1c3fb
@ -18,6 +18,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
v-model="postcode"
|
v-model="postcode"
|
||||||
placeholder="우편번호"
|
placeholder="우편번호"
|
||||||
|
disabled="true"
|
||||||
readonly
|
readonly
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -26,6 +27,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
v-model="address"
|
v-model="address"
|
||||||
placeholder="기본주소"
|
placeholder="기본주소"
|
||||||
|
disabled="true"
|
||||||
readonly
|
readonly
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -94,8 +94,7 @@
|
|||||||
:is-common="true"
|
:is-common="true"
|
||||||
:is-color="true"
|
:is-color="true"
|
||||||
:data="colorList"
|
:data="colorList"
|
||||||
@update:data="color = $event"
|
@update:data="handleColorUpdate"
|
||||||
@blur="checkColorDuplicate"
|
|
||||||
class="w-50"
|
class="w-50"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -136,6 +135,7 @@
|
|||||||
@update:data="handleAddressUpdate"
|
@update:data="handleAddressUpdate"
|
||||||
@update:alert="addressAlert = $event"
|
@update:alert="addressAlert = $event"
|
||||||
:value="address"
|
:value="address"
|
||||||
|
:disabled="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<UserFormInput
|
<UserFormInput
|
||||||
@ -143,7 +143,7 @@
|
|||||||
name="phone"
|
name="phone"
|
||||||
:isEssential="true"
|
:isEssential="true"
|
||||||
:is-alert="phoneAlert"
|
:is-alert="phoneAlert"
|
||||||
@update:data="phone = $event"
|
@update:data="phone = $event.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1')"
|
||||||
@update:alert="phoneAlert = $event"
|
@update:alert="phoneAlert = $event"
|
||||||
@blur="checkPhoneDuplicate"
|
@blur="checkPhoneDuplicate"
|
||||||
:maxlength="11"
|
:maxlength="11"
|
||||||
@ -298,7 +298,6 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 색상 중복체크
|
// 색상 중복체크
|
||||||
const checkColorDuplicate = async () => {
|
const checkColorDuplicate = async () => {
|
||||||
const response = await $api.get(`/user/checkColor?memberCol=${color.value}`);
|
const response = await $api.get(`/user/checkColor?memberCol=${color.value}`);
|
||||||
@ -312,6 +311,14 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleColorUpdate = async (newColor) => {
|
||||||
|
color.value = newColor;
|
||||||
|
colorError.value = '';
|
||||||
|
colorErrorAlert.value = false;
|
||||||
|
|
||||||
|
await checkColorDuplicate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 회원가입
|
// 회원가입
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
@ -366,4 +373,3 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user