@jx3box/jx3box-vue3-ui 0.9.9 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-vue3-ui",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "description": "JX3BOX Vue3 UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -2,8 +2,8 @@
2
2
  <div class="w-fav2" :class="{ disabled: favorite }" @click="doFav">
3
3
  <el-tooltip effect="dark" :content="favContent" placement="top-start">
4
4
  <div class="w-fav2_content">
5
- <img v-if="favorite" class="u-icon" svg-inline src="../../assets/img/widget/unstar.svg" />
6
- <img v-else class="u-icon" svg-inline src="../../assets/img/widget/star.svg" />
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: {
@@ -156,7 +156,7 @@ export default {
156
156
  .u-count {
157
157
  color: #888;
158
158
  .ml(10px);
159
- top: 4px;
159
+ top: 2px;
160
160
  .pr;
161
161
  }
162
162
  }