@jx3box/jx3box-common-ui 6.5.3 → 6.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "6.5.3",
3
+ "version": "6.5.4",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -50,7 +50,7 @@
50
50
  />
51
51
 
52
52
  <!-- 评论 -->
53
- <div class="m-single-comment">
53
+ <div ref="commentView" class="m-single-comment">
54
54
  <el-divider content-position="left">评论</el-divider>
55
55
  <Comment :id="id" category="post" v-if="id && allow_comment" />
56
56
  <el-alert title="作者没有开启评论功能" type="warning" show-icon v-else></el-alert>
@@ -62,7 +62,13 @@
62
62
  <slot name="single-footer"></slot>
63
63
  </footer>
64
64
 
65
- <right-affix :postId="id" :postType="post_type" :postTitle="post_title"></right-affix>
65
+ <right-affix
66
+ :postId="id"
67
+ :postType="post_type"
68
+ :postTitle="post_title"
69
+ :showComment="id && allow_comment"
70
+ @toComment="toComment($event)"
71
+ ></right-affix>
66
72
  </div>
67
73
  </template>
68
74
 
@@ -170,6 +176,12 @@ export default {
170
176
  this.super_author = super_author;
171
177
  this.other_authors = other_authors;
172
178
  },
179
+ toComment() {
180
+ this.$refs.commentView.scrollIntoView({
181
+ block: "center",
182
+ behavior: "auto",
183
+ });
184
+ },
173
185
  },
174
186
  watch: {
175
187
  extend_data: {
@@ -3,6 +3,11 @@
3
3
  <div class="item">
4
4
  <fav :postId="postId" :postType="postType" :postTitle="postTitle" :hiddenNum="true"></fav>
5
5
  </div>
6
+ <el-tooltip v-if="showComment" effect="dark" content="去评论" placement="left">
7
+ <div class="item" @click="toComment">
8
+ <i class="el-icon-chat-dot-square"></i>
9
+ </div>
10
+ </el-tooltip>
6
11
  <el-tooltip effect="dark" content="回到顶部" placement="bottom">
7
12
  <div class="item" v-show="scrollBtnShow" @click="goTop">
8
13
  <div class="to-top"></div>
@@ -15,7 +20,7 @@
15
20
  import Fav from "../interact/Fav2.vue";
16
21
  export default {
17
22
  name: "RightAffix",
18
- props: ["postId", "postType", "postTitle"],
23
+ props: ["postId", "postType", "postTitle", "showComment"],
19
24
  data() {
20
25
  return {
21
26
  scrollToptimer: null,
@@ -42,6 +47,9 @@ export default {
42
47
  self.isTop = true;
43
48
  }, 30);
44
49
  },
50
+ toComment() {
51
+ this.$emit("toComment");
52
+ },
45
53
  },
46
54
  mounted() {
47
55
  //获取页面可视区高度
@@ -89,18 +97,26 @@ export default {
89
97
  &:hover {
90
98
  background-color: #f6fcff;
91
99
  }
100
+ .el-icon-chat-dot-square {
101
+ font-size: 20px;
102
+ font-weight: bold;
103
+ color: #3871e0;
104
+ }
105
+ .w-fav2 svg{
106
+ .size(26px);
107
+ }
92
108
  }
93
109
  .to-top {
94
110
  width: 0;
95
111
  height: 0;
96
- border-left: 12px solid transparent;
97
- border-right: 12px solid transparent;
98
- border-bottom: 18px solid skyblue;
112
+ border-left: 10px solid transparent;
113
+ border-right: 10px solid transparent;
114
+ border-bottom: 16px solid #87ceeb;
99
115
  }
100
116
  }
101
- @media screen and (max-width:@smallpc){
102
- .right-affix{
103
- right:0;
117
+ @media screen and (max-width: @smallpc) {
118
+ .right-affix {
119
+ right: 0;
104
120
  }
105
121
  }
106
122
  </style>