正常显示帖子封面

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

@ -16,38 +16,38 @@
# accessKey: forely # accessKey: forely
# secretKey: Forely123! # 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: lj:
db: db:
host: localhost host: 192.168.125.128
password: 123456 password: MySQL@5678
redis: redis:
host: localhost host: 192.168.125.128
port: 6379 port: 6379
password: 123456 password: Redis@9012
rabbitmq: rabbitmq:
host: localhost host: 192.168.125.128
port: 5672 port: 5672
username: guest username: rabbit_admin
password: guest password: Rabbit@3456
minio: minio:
endpoint: http://localhost:9005 endpoint: http://192.168.125.128:9000
accessKey: leezt accessKey: minio_admin
secretKey: lzt264610 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"> <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> <h1 class="post-title">{{ postDetailStore.post?.title || '' }}</h1>
<p class="post-body">{{ postDetailStore.post?.content || '' }}</p> <p class="post-body">{{ postDetailStore.post?.content || '' }}</p>
<div class="post-stats"> <div class="post-stats">
@ -348,7 +353,7 @@ onUnmounted(() => {
position: relative; /* 为绝对定位的元素提供参考 */ position: relative; /* 为绝对定位的元素提供参考 */
} }
.post-author-avatar { .post-cover {
position: absolute; position: absolute;
top: 20px; top: 20px;
right: 20px; right: 20px;
@ -588,4 +593,5 @@ onUnmounted(() => {
.like-btn.liked { .like-btn.liked {
color: #f56c6c; color: #f56c6c;
} }
</style> </style>
Loading…
Cancel
Save