Skip to content

Commit 989a0b7

Browse files
committed
perf: update style
1 parent 587519d commit 989a0b7

13 files changed

Lines changed: 44 additions & 36 deletions

File tree

src/assets/css/community/comment_item.less

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
margin: 0 0 4px 0;
7373
white-space: pre-line;
7474
line-height: 1.8;
75+
img {
76+
.dbi;
77+
}
7578
}
7679
// 操作 工具栏
7780
.u-comment-toolbar {
@@ -83,9 +86,11 @@
8386
// like 按钮 爱心
8487
.u-btn-content {
8588
.u-like-icon {
86-
font-weight: 500;
87-
font-size: 16px;
88-
font-family: BlinkMacSystemFont, Helvetica;
89+
margin-right: 4px;
90+
svg {
91+
width: 14px;
92+
height: 14px;
93+
}
8994
}
9095
.is-like {
9196
color: red;
@@ -102,20 +107,23 @@
102107
.el-button {
103108
padding: 0;
104109
height: 32px;
110+
color: #989cb1;
111+
font-weight: normal;
112+
&:hover {
113+
color: @v4primary;
114+
}
105115
}
106116
// 文本按钮
107117
.el-button--text {
108118
font-size: 12px;
109119
opacity: 0.7;
120+
color: #989cb1;
121+
font-weight: normal;
110122
&:not(.is-disabled):hover {
111123
color: #0366d6;
112124
opacity: 1;
113125
}
114126
}
115-
// 按钮之间的间距
116-
.el-button + .el-button {
117-
margin-left: 12px;
118-
}
119127
}
120128
}
121129

@@ -143,6 +151,6 @@
143151
}
144152
}
145153
}
146-
.m-comment-time{
154+
.m-comment-time {
147155
.fz(12px);
148156
}

src/assets/css/community/reply_item.less

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939
}
4040
.el-button {
4141
height: 32px;
42+
43+
&.is-link {
44+
color: #989cb1;
45+
font-weight: normal;
46+
&:hover {
47+
color: @v4primary;
48+
}
49+
}
4250
}
4351
.u-reply-btn {
4452
// background: rgba(64, 128, 255, 1);
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

src/components/emotion/emotion_item.vue

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
<!-- -->
1414
<div class="u-op" v-if="isAuthor || isEditor">
1515
<span class="u-delete el-link el-link--primary is-underline" @click="handleDelete">
16-
<i class="el-icon-delete"></i> 删除
16+
<i class="el-icon-delete"></i>&nbsp;删除
1717
</span>
1818
<a
1919
class="u-edit el-link el-link--primary is-underline"
2020
:href="editLink('emotion', emotion.id)"
2121
target="blank"
2222
>
23-
<i class="el-icon-edit-outline"></i> 编辑
23+
<i class="el-icon-edit-outline"></i>&nbsp;编辑
2424
</a>
2525
</div>
2626
</div>
@@ -56,11 +56,6 @@
5656
{{ emotion.author || "匿名" }}
5757
</span>
5858
<time class="u-time">{{ showTime(emotion.updated_at) }}</time>
59-
<!-- <a class="u-like" :class="{ on: isLike }" title="赞" @click="addLike" v-if="isListPage">
60-
<i class="like-icon">{{ isLike ? "♥" : "♡" }}</i>
61-
<span class="like-text">Like</span>
62-
<span class="like-count" v-if="count">{{ count }}</span>
63-
</a> -->
6459
</div>
6560
<div class="u-info-thx" v-if="mode && emotion">
6661
<Thx

src/router/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ const routes = [
4949
},
5050
},
5151
},
52-
{ path: "/community_topic/:id", redirect: "/community/:id" },
53-
{ path: "/community/topic/:id", redirect: "/community/:id" },
52+
{ path: "/community_topic/:id", redirect: (to) => ({ name: "community-single", params: { id: to.params.id } }) },
53+
{ path: "/community/topic/:id", redirect: (to) => ({ name: "community-single", params: { id: to.params.id } }) },
5454
{
5555
name: "community-single",
5656
path: "/community/:id",

src/views/community/components/AddBlockButton.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<template>
2-
<el-button link :disabled="!allowBlock" type="primary" @click="addBlock">
3-
<i class="el-icon-circle-close"></i>
4-
拉黑
5-
</el-button>
2+
<el-button link :disabled="!allowBlock" type="primary" @click="addBlock" icon="CircleClose"> 拉黑 </el-button>
63
</template>
74

85
<script>

src/views/community/components/CommentItem.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@
3535
<div class="flex items-center">
3636
<el-button link size="small" type="primary" @click="addLike" class="">
3737
<div class="u-btn-content flex items-center">
38-
<i :class="`u-like-icon ${isLike && 'is-like'}`">{{ isLike ? "♥" : "♡" }}</i>
38+
<i :class="`u-like-icon ${isLike && 'is-like'}`"
39+
><img
40+
v-if="!isLike"
41+
src="@/assets/img/community/heart_1.svg"
42+
svg-inline
43+
alt="" /><img v-else src="@/assets/img/community/heart_2.svg" svg-inline alt=""
44+
/></i>
3945
{{ isLike ? "已赞" : "赞" }}
4046
<span class="u-count" v-if="likeCount"> ({{ likeCountRender }})</span>
4147
</div>

src/views/community/components/CommunityPostHeader.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,6 @@ export default {
343343
.u-only-btn {
344344
top: 10px;
345345
position: relative;
346-
// background: @v4primary;
347-
// border: 1px solid rgba(64, 128, 255, 1);
348346
display: inline-block;
349347
height: 32px;
350348
&.u-unset {
@@ -355,11 +353,9 @@ export default {
355353
opacity: 0.8;
356354
}
357355
svg {
358-
vertical-align: middle;
359-
position: relative;
360-
top: -1px;
361356
width: 12px;
362357
height: 12px;
358+
margin-right: 4px;
363359
}
364360
}
365361
}

src/views/community/components/ComplaintButton.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
<template>
2-
<el-button link :disabled="!allowReport" type="primary" @click="onMiscfeedback">
3-
<i class="el-icon-warning-outline"></i>
4-
举报
5-
</el-button>
2+
<el-button link :disabled="!allowReport" type="primary" @click="onMiscfeedback" icon="Warning">举报</el-button>
63
</template>
74

85
<script>

0 commit comments

Comments
 (0)