컬러, 휴대전화
This commit is contained in:
parent
f18aa4dc16
commit
17e86f49d0
@ -31,7 +31,7 @@
|
|||||||
:src="`/img/mbti/${selected.toLowerCase()}.png`"
|
:src="`/img/mbti/${selected.toLowerCase()}.png`"
|
||||||
alt="MBTI image"/>
|
alt="MBTI image"/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isAlert" class="invalid-feedback">{{ title }}을 확인해주세요.</div>
|
<div class="invalid-feedback" :class="isAlert ? 'd-block' : ''">{{ title }}를 확인해주세요.</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -95,6 +95,7 @@
|
|||||||
:is-color="true"
|
:is-color="true"
|
||||||
:data="colorList"
|
:data="colorList"
|
||||||
@update:data="handleColorUpdate"
|
@update:data="handleColorUpdate"
|
||||||
|
:is-alert="colorAlert"
|
||||||
class="w-50"
|
class="w-50"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -143,13 +144,12 @@
|
|||||||
name="phone"
|
name="phone"
|
||||||
:isEssential="true"
|
:isEssential="true"
|
||||||
:is-alert="phoneAlert"
|
:is-alert="phoneAlert"
|
||||||
@update:data="phone = $event"
|
|
||||||
@update:alert="phoneAlert = $event"
|
@update:alert="phoneAlert = $event"
|
||||||
@blur="checkPhoneDuplicate"
|
@blur="checkPhoneDuplicate"
|
||||||
:maxlength="11"
|
:maxlength="11"
|
||||||
:value="phone"
|
:value="phone"
|
||||||
@keypress="onlyNumber"
|
@keypress="onlyNumber"
|
||||||
|
@input="inputEvent"
|
||||||
/>
|
/>
|
||||||
<span v-if="phoneError" class="invalid-feedback d-block">{{ phoneError }}</span>
|
<span v-if="phoneError" class="invalid-feedback d-block">{{ phoneError }}</span>
|
||||||
|
|
||||||
@ -205,6 +205,7 @@
|
|||||||
const passwordcheckErrorAlert = ref(false); // 비밀번호 확인 오류 메시지
|
const passwordcheckErrorAlert = ref(false); // 비밀번호 확인 오류 메시지
|
||||||
const pwhintResAlert = ref(false);
|
const pwhintResAlert = ref(false);
|
||||||
const nameAlert = ref(false);
|
const nameAlert = ref(false);
|
||||||
|
const colorAlert = ref(false);
|
||||||
const birthAlert = ref(false);
|
const birthAlert = ref(false);
|
||||||
const addressAlert = ref(false);
|
const addressAlert = ref(false);
|
||||||
const phoneAlert = ref(false);
|
const phoneAlert = ref(false);
|
||||||
@ -326,6 +327,12 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const inputEvent = (e) => {
|
||||||
|
const newValue = e.target.value.replace(/\D/g, ''); // 숫자만 남김
|
||||||
|
e.target.value = newValue; // 입력 필드 즉시 반영
|
||||||
|
phone.value = newValue; // Vue 반응형 상태 업데이트
|
||||||
|
};
|
||||||
|
|
||||||
watch(id, (newValue) => {
|
watch(id, (newValue) => {
|
||||||
if (newValue && newValue.length >= 4) {
|
if (newValue && newValue.length >= 4) {
|
||||||
idError.value = '';
|
idError.value = '';
|
||||||
@ -359,7 +366,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// 회원가입
|
// 회원가입
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
await checkColorDuplicate();
|
await checkColorDuplicate();
|
||||||
@ -373,6 +379,10 @@
|
|||||||
addressAlert.value = address.value.trim() === '';
|
addressAlert.value = address.value.trim() === '';
|
||||||
phoneAlert.value = phone.value.trim() === '';
|
phoneAlert.value = phone.value.trim() === '';
|
||||||
|
|
||||||
|
if (!colorList.value || colorList.value.length === 0) {
|
||||||
|
colorAlert.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
// 아이디 길이 체크
|
// 아이디 길이 체크
|
||||||
if (id.value && id.value.length < 4) {
|
if (id.value && id.value.length < 4) {
|
||||||
idErrorAlert.value = true;
|
idErrorAlert.value = true;
|
||||||
@ -402,6 +412,7 @@
|
|||||||
profilAlert.value = false;
|
profilAlert.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
profilAlert.value ||
|
profilAlert.value ||
|
||||||
idAlert.value ||
|
idAlert.value ||
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user