@jx3box/jx3box-vue3-ui 0.9.8 → 0.9.10
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/assets/css/thx.less +1 -0
- package/package.json +1 -1
- package/src/App.vue +1 -0
- package/src/interact/Fav.vue +11 -8
- package/src/interact/Rss.vue +5 -4
- package/src/single/Thx.vue +7 -0
- package/src/single/cms-single.vue +1 -0
package/assets/css/thx.less
CHANGED
package/package.json
CHANGED
package/src/App.vue
CHANGED
package/src/interact/Fav.vue
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="w-fav2" :class="{ disabled: favorite }" @click="doFav">
|
|
3
3
|
<el-tooltip effect="dark" :content="favContent" placement="top-start">
|
|
4
|
-
<div>
|
|
5
|
-
<img v-if="favorite" class="u-icon" svg-inline src="
|
|
6
|
-
<img v-else class="u-icon" svg-inline src="
|
|
4
|
+
<div class="w-fav2_content">
|
|
5
|
+
<img v-if="favorite" class="u-icon" svg-inline :src="unstarIcon" />
|
|
6
|
+
<img v-else class="u-icon" svg-inline :src="starIcon" />
|
|
7
7
|
<span class="u-count" v-if="!hiddenNum && total">{{ total }}</span>
|
|
8
8
|
</div>
|
|
9
9
|
</el-tooltip>
|
|
@@ -16,7 +16,7 @@ import { hasFav, addFav, delFav } from "../../service/fav";
|
|
|
16
16
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
17
17
|
export default {
|
|
18
18
|
name: "FavoriteComp",
|
|
19
|
-
props: ["postType", "postId", "postTitle", "hiddenNum"],
|
|
19
|
+
props: ["postType", "postId", "postTitle", "hiddenNum", "isOld"],
|
|
20
20
|
data: function () {
|
|
21
21
|
return {
|
|
22
22
|
login: User.isLogin(),
|
|
@@ -29,10 +29,10 @@ export default {
|
|
|
29
29
|
return this.favorite ? "已收藏" : "收藏";
|
|
30
30
|
},
|
|
31
31
|
starIcon() {
|
|
32
|
-
return JX3BOX.__cdn + "design/vector/icon/collect.svg"
|
|
32
|
+
return this.isOld ? require("../../assets/img/widget/star.svg") : JX3BOX.__cdn + "design/vector/icon/collect.svg"
|
|
33
33
|
},
|
|
34
34
|
unstarIcon() {
|
|
35
|
-
return JX3BOX.__cdn + "design/vector/icon/uncollect.svg"
|
|
35
|
+
return this.isOld ? require("../../assets/img/widget/unstar.svg") : JX3BOX.__cdn + "design/vector/icon/uncollect.svg"
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
methods: {
|
|
@@ -85,8 +85,11 @@ export default {
|
|
|
85
85
|
.u-count {
|
|
86
86
|
color: #888;
|
|
87
87
|
.ml(10px);
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.w-fav2_content {
|
|
91
|
+
.flex;
|
|
92
|
+
align-items: center;
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
</style>
|
package/src/interact/Rss.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="w-rss"
|
|
2
|
+
<div class="w-rss">
|
|
3
3
|
<el-tooltip effect="dark" :content="tooltipContent" placement="top-start">
|
|
4
|
-
<div>
|
|
4
|
+
<div @click="onRssClick">
|
|
5
5
|
<img v-if="subscribed" class="u-icon" svg-inline :src="rmSrc" />
|
|
6
6
|
<img v-else class="u-icon" svg-inline :src="addSrc" />
|
|
7
7
|
<span class="u-count" v-if="!hiddenNum && total > 0">{{ total }}</span>
|
|
@@ -62,7 +62,7 @@ export default {
|
|
|
62
62
|
return jx3box.__cdn + "design/vector/icon/unrss.svg";
|
|
63
63
|
},
|
|
64
64
|
category({ type }) {
|
|
65
|
-
if (type.includes("community")) return "community";
|
|
65
|
+
if (type.includes("community") || type.includes("bbs")) return "community";
|
|
66
66
|
if (jx3box.__postType[type]) return "posts";
|
|
67
67
|
if (jx3box.__wikiType[type]) return "wiki";
|
|
68
68
|
return "";
|
|
@@ -111,6 +111,7 @@ export default {
|
|
|
111
111
|
},
|
|
112
112
|
methods: {
|
|
113
113
|
onRssClick() {
|
|
114
|
+
console.log("onRssClick");
|
|
114
115
|
if (!this.isLogin) {
|
|
115
116
|
User.toLogin();
|
|
116
117
|
return;
|
|
@@ -155,7 +156,7 @@ export default {
|
|
|
155
156
|
.u-count {
|
|
156
157
|
color: #888;
|
|
157
158
|
.ml(10px);
|
|
158
|
-
top:
|
|
159
|
+
top: 2px;
|
|
159
160
|
.pr;
|
|
160
161
|
}
|
|
161
162
|
}
|
package/src/single/Thx.vue
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
/>
|
|
18
18
|
<Like :postId="postId" :postType="postType"></Like>
|
|
19
19
|
<fav :postId="postId" :postType="postType" :postTitle="postTitle"></fav>
|
|
20
|
+
<Rss v-if="showRss" :type="postType" :id="postId" :title="postTitle"></Rss>
|
|
20
21
|
<boxcoin-user
|
|
21
22
|
:postId="postId"
|
|
22
23
|
:postType="postType"
|
|
@@ -52,6 +53,7 @@ import BoxcoinUser from "../interact/BoxcoinUser.vue";
|
|
|
52
53
|
import BoxcoinRecords from "../interact/BoxcoinRecords.vue";
|
|
53
54
|
import Share from "../interact/Share.vue";
|
|
54
55
|
import WatchLater from "../interact/WatchLater.vue";
|
|
56
|
+
import Rss from "../interact/Rss.vue";
|
|
55
57
|
|
|
56
58
|
import User from "@jx3box/jx3box-common/js/user";
|
|
57
59
|
import { getBoxcoinStatus, getPostBoxcoinConfig } from "../../service/thx";
|
|
@@ -66,6 +68,7 @@ export default {
|
|
|
66
68
|
BoxcoinRecords,
|
|
67
69
|
Share,
|
|
68
70
|
WatchLater,
|
|
71
|
+
Rss,
|
|
69
72
|
},
|
|
70
73
|
props: {
|
|
71
74
|
type: {
|
|
@@ -112,6 +115,10 @@ export default {
|
|
|
112
115
|
type: Boolean,
|
|
113
116
|
default: false,
|
|
114
117
|
},
|
|
118
|
+
showRss: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
default: false,
|
|
121
|
+
},
|
|
115
122
|
},
|
|
116
123
|
data: function () {
|
|
117
124
|
return {
|