正常显示帖子封面

main
Hacker-00001 4 weeks ago
parent e0e794ccc9
commit 41de0d735f

@ -16,38 +16,38 @@
# accessKey: forely
# secretKey: Forely123!
#lj:
# db:
# host: 192.168.125.128
# password: MySQL@5678
# redis:
# host: 192.168.125.128
# port: 6379
# password: Redis@9012
# rabbitmq:
# host: 192.168.125.128
# port: 5672
# username: rabbit_admin
# password: Rabbit@3456
# minio:
# endpoint: http://192.168.125.128:9000
# accessKey: minio_admin
# secretKey: Minio@1234
lj:
db:
host: localhost
password: 123456
host: 192.168.125.128
password: MySQL@5678
redis:
host: localhost
host: 192.168.125.128
port: 6379
password: 123456
password: Redis@9012
rabbitmq:
host: localhost
host: 192.168.125.128
port: 5672
username: guest
password: guest
username: rabbit_admin
password: Rabbit@3456
minio:
endpoint: http://localhost:9005
accessKey: leezt
secretKey: lzt264610
endpoint: http://192.168.125.128:9000
accessKey: minio_admin
secretKey: Minio@1234
#lj:
# db:
# host: localhost
# password: 123456
# redis:
# host: localhost
# port: 6379
# password: 123456
# rabbitmq:
# host: localhost
# port: 5672
# username: guest
# password: guest
# minio:
# endpoint: http://localhost:9005
# accessKey: leezt
# secretKey: lzt264610

@ -20,7 +20,12 @@
<!-- 帖子内容 -->
<div class="post-content">
<img :src="author?.userAvatar || require('@/assets/default-avatar/boy_1.png')" alt="作者头像" class="post-author-avatar" />
<img
v-if="postDetailStore.post?.image"
:src="postDetailStore.post.image"
alt="帖子封面"
class="post-cover"
/>
<h1 class="post-title">{{ postDetailStore.post?.title || '' }}</h1>
<p class="post-body">{{ postDetailStore.post?.content || '' }}</p>
<div class="post-stats">
@ -348,7 +353,7 @@ onUnmounted(() => {
position: relative; /* 为绝对定位的元素提供参考 */
}
.post-author-avatar {
.post-cover {
position: absolute;
top: 20px;
right: 20px;
@ -588,4 +593,5 @@ onUnmounted(() => {
.like-btn.liked {
color: #f56c6c;
}
</style>
Loading…
Cancel
Save