feat: some style

This commit is contained in:
KUN1007 2023-10-06 20:37:20 +08:00
parent 1a48556048
commit 1ccb114bf3
4 changed files with 29 additions and 12 deletions

View file

@ -22,6 +22,7 @@ export interface TopicReply {
edited: number edited: number
content: string content: string
upvotes: number[] upvotes: number[]
upvote_time: number
likes: number[] likes: number[]
dislikes: number[] dislikes: number[]
tags: string[] tags: string[]

View file

@ -177,14 +177,21 @@ const handleClickReply = (uid: number, name: string) => {
} }
.operate ul { .operate ul {
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
li { li {
display: flex;
justify-content: center;
align-items: center;
margin-right: 10px; margin-right: 10px;
}
}
.icon { .icon {
cursor: pointer;
color: var(--kungalgame-font-color-2); color: var(--kungalgame-font-color-2);
margin-right: 2px;
} }
}
}
/* 单个评论 */ /* 单个评论 */
.text { .text {
font-size: 12px; font-size: 12px;

View file

@ -99,8 +99,8 @@ const handleClickRewrite = () => {
:to-uid="masterUid" :to-uid="masterUid"
/> />
<!-- 浏览数 --> <!-- 浏览数楼主才会显示 -->
<li> <li v-if="props.info.views > 0">
<span class="icon"><Icon icon="ic:outline-remove-red-eye" /></span> <span class="icon"><Icon icon="ic:outline-remove-red-eye" /></span>
{{ info.views }} {{ info.views }}
</li> </li>
@ -143,9 +143,8 @@ const handleClickRewrite = () => {
</span> </span>
<!-- 回复的插槽 --> <!-- 回复的插槽 -->
<span>
<slot name="comment"></slot> <slot name="comment"></slot>
</span>
</div> </div>
</div> </div>
</template> </template>
@ -211,6 +210,7 @@ const handleClickRewrite = () => {
color: var(--kungalgame-blue-4); color: var(--kungalgame-blue-4);
cursor: pointer; cursor: pointer;
transition: all 0.2s; transition: all 0.2s;
margin-right: 10px;
&::before, &::before,
&::after { &::after {
content: ''; content: '';
@ -254,10 +254,8 @@ const handleClickRewrite = () => {
.footer { .footer {
flex-direction: column; flex-direction: column;
} }
.right { .reply {
span:last-child {
margin-right: 0; margin-right: 0;
} }
} }
}
</style> </style>

View file

@ -19,6 +19,9 @@ import Rewrite from '../Rewrite.vue'
// //
import KUNGalgamerInfo from '../KUNGalgamerInfo.vue' import KUNGalgamerInfo from '../KUNGalgamerInfo.vue'
//
import { hourDiff } from '@/utils/time'
import { TopicReply } from '@/api/index' import { TopicReply } from '@/api/index'
// store // store
@ -52,9 +55,11 @@ const handleClickComment = (rid: number) => {
appear appear
> >
<div> <div>
<!-- 被推 10 小时内样式改变 -->
<div <div
class="other-topic-container" class="other-topic-container"
v-for="(reply, index) in repliesData" v-for="(reply, index) in repliesData"
:class="hourDiff(reply.upvote_time, 10) ? 'active-upvote' : ''"
:key="`${index}`" :key="`${index}`"
:id="`kungalgame-reply-${reply.floor}`" :id="`kungalgame-reply-${reply.floor}`"
> >
@ -245,6 +250,12 @@ const handleClickComment = (rid: number) => {
font-size: 24px; font-size: 24px;
color: var(--kungalgame-font-color-2); color: var(--kungalgame-font-color-2);
display: flex; display: flex;
margin-right: 17px;
}
/* 回复被推的样式 */
.active-upvote .container {
border: 2px solid var(--kungalgame-pink-3);
} }
/* 滚动到指定话题激活后的样式 */ /* 滚动到指定话题激活后的样式 */