@jx3box/jx3box-common-ui 5.3.9 → 5.4.0

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.
@@ -405,4 +405,4 @@
405
405
  "hasMark": false,
406
406
  "markcls": "ishot"
407
407
  }
408
- ]
408
+ ]
@@ -2,4 +2,4 @@
2
2
  "std": "正式服",
3
3
  "origin": "怀旧服",
4
4
  "all": "双端"
5
- }
5
+ }
@@ -287,4 +287,4 @@
287
287
  "status": true,
288
288
  "parentKey": "bbs"
289
289
  }
290
- ]
290
+ ]
@@ -1,5 +1,5 @@
1
1
  {
2
- "std":["北天药宗","奉天证道"],
3
- "origin":["藏剑山庄","物华天宝"],
4
- "all":["北天药宗","奉天证道","藏剑山庄","物华天宝"]
5
- }
2
+ "std": ["北天药宗", "奉天证道"],
3
+ "origin": ["藏剑山庄", "物华天宝"],
4
+ "all": ["北天药宗", "奉天证道", "藏剑山庄", "物华天宝"]
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "5.3.9",
3
+ "version": "5.4.0",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/App.vue CHANGED
@@ -76,11 +76,8 @@
76
76
  <hr>
77
77
 
78
78
  <RightSidebar>
79
- <div style="height:1200px;">
80
- <RightSideMsg>Test</RightSideMsg>
81
-
82
- <Author :author="author" uid="5" />
83
- </div>
79
+ <RightSideMsg>Hello</RightSideMsg >
80
+ <PostCollection :id="59"/>
84
81
  </RightSidebar>
85
82
 
86
83
  <Footer></Footer>
@@ -106,6 +103,7 @@ import Footer from "./Footer.vue";
106
103
  import Bottom from "./Bottom.vue";
107
104
 
108
105
  import PostHeader from "./single/PostHeader.vue";
106
+ import PostCollection from "./single/PostCollection.vue";
109
107
 
110
108
  import Thx from "./single/Thx.vue";
111
109
  import Collection from "./single/Collection.vue";
@@ -148,6 +146,7 @@ export default {
148
146
  RightSidebar,
149
147
 
150
148
  PostHeader,
149
+ PostCollection,
151
150
 
152
151
  Thx,
153
152
  Collection,
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <div class="m-single-collection" v-if="list && list.length">
3
+ <div class="u-title"><i class="el-icon-connection"></i> 关联</div>
4
+ <ul class="u-list">
5
+ <li v-for="(item, i) in list" :key="i">
6
+ <el-tooltip class="item" effect="dark" :content="item.title" placement="left">
7
+ <a :href="item | showLink" target="_blank">
8
+ <i class="el-icon-link"></i>
9
+ {{ item.title }}
10
+ </a>
11
+ </el-tooltip>
12
+ </li>
13
+ </ul>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import { getLink } from "@jx3box/jx3box-common/js/utils";
19
+ import { getCollection } from "../../service/helper";
20
+ export default {
21
+ name: "PostCollection",
22
+ props: ["id", "store"],
23
+ components: {},
24
+ data: function() {
25
+ return {
26
+ data: {
27
+ title: "",
28
+ posts: [],
29
+ },
30
+ };
31
+ },
32
+ computed: {
33
+ list: function() {
34
+ return this.data?.posts || this.store?.posts;
35
+ },
36
+ },
37
+ watch: {
38
+ id: {
39
+ immediate: true,
40
+ handler: function(val) {
41
+ !!~~val && this.loadData();
42
+ },
43
+ },
44
+ },
45
+ methods: {
46
+ loadData: function() {
47
+ getCollection(this.id).then((res) => {
48
+ this.data = res.data?.data?.collection;
49
+ });
50
+ },
51
+ },
52
+ filters: {
53
+ showLink: function(item) {
54
+ if (item.type == "custom") {
55
+ return item.url;
56
+ } else {
57
+ return getLink(item.type, item.id);
58
+ }
59
+ },
60
+ },
61
+ };
62
+ </script>
63
+ <style scoped lang="less">
64
+ .m-single-collection {
65
+ .u-title {
66
+ font-weight: 300;
67
+ font-size: 20px;
68
+ }
69
+ .u-list {
70
+ list-style: none;
71
+ padding: 10px 20px;
72
+ margin: 0;
73
+ li {
74
+ .fz(13px, 36px);
75
+ }
76
+ a {
77
+ .db;
78
+ transition: 0.15s ease-in-out;
79
+ .nobreak;
80
+ &:hover {
81
+ background-color: #e6f0fb;
82
+ }
83
+ }
84
+ }
85
+ }
86
+ </style>