수정 ,삭제시 비밀번호 폼에 공백 방지지

This commit is contained in:
dyhj625 2025-03-11 16:21:20 +09:00
parent 52c211bf08
commit fabb1c2c3f
2 changed files with 8 additions and 2 deletions

View File

@ -24,7 +24,7 @@
class="form-control" class="form-control"
:value="password" :value="password"
placeholder="비밀번호 입력" placeholder="비밀번호 입력"
@input="$emit('update:password', $event.target.value.trim())" @input="filterInput"
/> />
<button class="btn btn-primary" @click="logPasswordAndEmit">확인</button> <button class="btn btn-primary" @click="logPasswordAndEmit">확인</button>
</div> </div>
@ -122,6 +122,11 @@
'update:password', 'update:password',
]); ]);
const filterInput = (event) => {
event.target.value = event.target.value.replace(/\s/g, ""); //
emit("update:password", event.target.value);
};
const localEditedContent = ref(props.comment.content); const localEditedContent = ref(props.comment.content);
// //

View File

@ -103,7 +103,8 @@
textAlert.value = ''; textAlert.value = '';
}; };
const passwordAlertTextHandler = () => { const passwordAlertTextHandler = (event) => {
event.target.value = event.target.value.replace(/\s/g, "");
passwordAlert2.value = ''; passwordAlert2.value = '';
}; };