user수정정
This commit is contained in:
parent
7d03da5097
commit
cb67307a62
@ -11,7 +11,12 @@
|
|||||||
<div class="d-flex justify-content-between flex-wrap gap-2 mb-2">
|
<div class="d-flex justify-content-between flex-wrap gap-2 mb-2">
|
||||||
<div class="d-flex flex-wrap align-items-center mb-50">
|
<div class="d-flex flex-wrap align-items-center mb-50">
|
||||||
<div class="avatar avatar-sm me-2">
|
<div class="avatar avatar-sm me-2">
|
||||||
<img :src="getProfileImage(item.author.profileImage)" alt="최초 작성자" class="rounded-circle">
|
<img
|
||||||
|
class="rounded-circle user-avatar"
|
||||||
|
:src="getProfileImage(item.author.profileImage)"
|
||||||
|
alt="최초 작성자"
|
||||||
|
:style="{ borderColor: item.author.color}"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="mb-0 small fw-medium">{{ formatDate(item.author.createdAt) }}</p>
|
<p class="mb-0 small fw-medium">{{ formatDate(item.author.createdAt) }}</p>
|
||||||
@ -21,7 +26,12 @@
|
|||||||
<div class="d-flex justify-content-between flex-wrap gap-2 mb-2">
|
<div class="d-flex justify-content-between flex-wrap gap-2 mb-2">
|
||||||
<div class="d-flex flex-wrap align-items-center mb-50">
|
<div class="d-flex flex-wrap align-items-center mb-50">
|
||||||
<div class="avatar avatar-sm me-2">
|
<div class="avatar avatar-sm me-2">
|
||||||
<img :src="getProfileImage(item.lastEditor.profileImage)" alt="최근 작성자" class="rounded-circle">
|
<img
|
||||||
|
class="rounded-circle user-avatar"
|
||||||
|
:src="getProfileImage(item.lastEditor.profileImage)"
|
||||||
|
alt="최근 작성자"
|
||||||
|
:style="{ borderColor: item.lastEditor.color}"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="mb-0 small fw-medium">{{ formatDate(item.lastEditor.updatedAt) }}</p>
|
<p class="mb-0 small fw-medium">{{ formatDate(item.lastEditor.updatedAt) }}</p>
|
||||||
@ -42,7 +52,7 @@ const props = defineProps({
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
console.log('item',props.item)
|
||||||
const baseUrl = $api.defaults.baseURL.replace(/api\/$/, '');
|
const baseUrl = $api.defaults.baseURL.replace(/api\/$/, '');
|
||||||
// 날짜
|
// 날짜
|
||||||
const formatDate = (dateString) => new Date(dateString).toLocaleString();
|
const formatDate = (dateString) => new Date(dateString).toLocaleString();
|
||||||
@ -50,3 +60,11 @@ const formatDate = (dateString) => new Date(dateString).toLocaleString();
|
|||||||
const getProfileImage = (imagePath) =>
|
const getProfileImage = (imagePath) =>
|
||||||
imagePath ? `${baseUrl}upload/img/profile/${imagePath}` : '/img/avatars/default-Profile.jpg';
|
imagePath ? `${baseUrl}upload/img/profile/${imagePath}` : '/img/avatars/default-Profile.jpg';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* 동그란 테두리 설정 */
|
||||||
|
.user-avatar {
|
||||||
|
border: 3px solid; /* 테두리 */
|
||||||
|
padding: 0.1px; /* 테두리와 이미지 사이의 간격 */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user