비밀번호 자동입력 제외 추가, 버튼 위치 조정
This commit is contained in:
parent
979321d533
commit
be2608a112
@ -17,12 +17,13 @@
|
||||
@updateReaction="handleUpdateReaction"
|
||||
/>
|
||||
<!-- 댓글 비밀번호 입력창 (익명일 경우) -->
|
||||
<div v-if="currentPasswordCommentId === comment.commentId && unknown && comment.author == '익명'" class="mt-3 w-25 ms-auto">
|
||||
<div v-if="currentPasswordCommentId === comment.commentId && unknown && comment.author == '익명'" class="mt-3 w-20 ms-auto">
|
||||
<div class="input-group">
|
||||
<input
|
||||
type="password"
|
||||
class="form-control"
|
||||
:value="password"
|
||||
autocomplete="new-password"
|
||||
placeholder="비밀번호 입력"
|
||||
@input="filterInput"
|
||||
/>
|
||||
@ -122,9 +123,9 @@
|
||||
'update:password',
|
||||
]);
|
||||
|
||||
const filterInput = (event) => {
|
||||
event.target.value = event.target.value.replace(/\s/g, ""); // 공백 제거
|
||||
emit("update:password", event.target.value);
|
||||
const filterInput = event => {
|
||||
event.target.value = event.target.value.replace(/\s/g, ''); // 공백 제거
|
||||
emit('update:password', event.target.value);
|
||||
};
|
||||
|
||||
const localEditedContent = ref(props.comment.content);
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
type="password"
|
||||
id="basic-default-password"
|
||||
class="form-control flex-grow-1"
|
||||
autocomplete="new-password"
|
||||
v-model="password"
|
||||
placeholder="비밀번호 입력"
|
||||
@input="passwordAlertTextHandler"
|
||||
@ -103,8 +104,8 @@
|
||||
textAlert.value = '';
|
||||
};
|
||||
|
||||
const passwordAlertTextHandler = (event) => {
|
||||
event.target.value = event.target.value.replace(/\s/g, "");
|
||||
const passwordAlertTextHandler = event => {
|
||||
event.target.value = event.target.value.replace(/\s/g, '');
|
||||
passwordAlert2.value = '';
|
||||
};
|
||||
|
||||
|
||||
@ -20,8 +20,10 @@
|
||||
<div class="ms-auto text-end">
|
||||
<!-- 수정, 삭제 버튼 -->
|
||||
<template v-if="!isDeletedComment && (unknown || isCommentAuthor || isAuthor)">
|
||||
<EditButton @click.stop="editClick" />
|
||||
<DeleteButton @click.stop="deleteClick" />
|
||||
<div class="float-end ms-1">
|
||||
<EditButton @click.stop="editClick" />
|
||||
<DeleteButton :class="'ms-1'" @click.stop="deleteClick" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 좋아요, 싫어요 버튼 (댓글에서만 표시) -->
|
||||
|
||||
@ -1,39 +1,40 @@
|
||||
<template>
|
||||
<button class="btn btn-label-primary btn-icon float-end" @click="toggleText">
|
||||
<button class="btn btn-label-primary btn-icon" @click="toggleText">
|
||||
<i :class="buttonClass"></i>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, defineProps } from 'vue';
|
||||
import { ref, watch, defineProps } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
isToggleEnabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isActive: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
const props = defineProps({
|
||||
isToggleEnabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isActive: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
const buttonClass = ref("bx bx-edit-alt");
|
||||
const buttonClass = ref('bx bx-edit-alt');
|
||||
|
||||
watch(() => props.isActive, (newVal) => {
|
||||
buttonClass.value = newVal ? "bx bx-x" : "bx bx-edit-alt";
|
||||
});
|
||||
watch(
|
||||
() => props.isActive,
|
||||
newVal => {
|
||||
buttonClass.value = newVal ? 'bx bx-x' : 'bx bx-edit-alt';
|
||||
},
|
||||
);
|
||||
|
||||
const toggleText = () => {
|
||||
if (props.isToggleEnabled) {
|
||||
buttonClass.value = buttonClass.value === "bx bx-edit-alt" ? "bx bx-x" : "bx bx-edit-alt";
|
||||
}
|
||||
};
|
||||
const resetButton = () => {
|
||||
buttonClass.value = "bx bx-edit-alt";
|
||||
};
|
||||
|
||||
|
||||
defineExpose({ resetButton });
|
||||
const toggleText = () => {
|
||||
if (props.isToggleEnabled) {
|
||||
buttonClass.value = buttonClass.value === 'bx bx-edit-alt' ? 'bx bx-x' : 'bx bx-edit-alt';
|
||||
}
|
||||
};
|
||||
const resetButton = () => {
|
||||
buttonClass.value = 'bx bx-edit-alt';
|
||||
};
|
||||
|
||||
defineExpose({ resetButton });
|
||||
</script>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
<input
|
||||
type="password"
|
||||
class="form-control"
|
||||
autocomplete="off"
|
||||
autocomplete="new-password"
|
||||
v-model="password"
|
||||
placeholder="비밀번호 입력"
|
||||
@input="
|
||||
@ -799,8 +799,8 @@
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.board-content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.board-content img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user