@jx3box/jx3box-ui 2.0.2 → 2.0.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.
Files changed (128) hide show
  1. package/README.md +101 -2
  2. package/assets/css/bread/admin.less +32 -0
  3. package/assets/css/bread/breadcrumb.less +38 -0
  4. package/assets/css/bread/crumb.less +6 -0
  5. package/assets/css/comment/quick-reply.less +12 -1
  6. package/assets/css/common/bottom.less +4 -0
  7. package/assets/css/common/footer.less +23 -0
  8. package/assets/css/common/left-sidebar.less +28 -0
  9. package/assets/css/common/main.less +21 -0
  10. package/assets/css/common/right-sidebar.less +31 -0
  11. package/assets/css/common/suspend-common.less +51 -0
  12. package/assets/css/editor/combo.less +51 -0
  13. package/assets/css/editor/resource.less +64 -0
  14. package/assets/css/editor/tinymce.less +20 -0
  15. package/assets/css/editor/upload.less +25 -0
  16. package/assets/css/filters/client-by.less +6 -0
  17. package/assets/css/header/box.less +34 -0
  18. package/assets/css/interact/like2.less +4 -0
  19. package/assets/css/interact/share2.less +17 -0
  20. package/assets/css/mixin.less +3 -0
  21. package/assets/css/module/author.less +41 -0
  22. package/assets/css/module/buff.less +10 -0
  23. package/assets/css/module/directory.less +22 -0
  24. package/assets/css/module/icon.less +4 -0
  25. package/assets/css/module/item.less +50 -0
  26. package/assets/css/module/item_simple.less +7 -0
  27. package/assets/css/module/jx3_element.less +2 -1
  28. package/assets/css/module/macro.less +17 -0
  29. package/assets/css/module/npc.less +46 -1
  30. package/assets/css/module/resource.less +13 -0
  31. package/assets/css/module/skill.less +9 -0
  32. package/assets/css/module/talent.less +71 -0
  33. package/assets/css/single/author.less +24 -10
  34. package/assets/css/single/cms-single.less +16 -0
  35. package/assets/css/single/thx.less +51 -0
  36. package/assets/css/tinymce/_.less +7 -1
  37. package/assets/css/tinymce/a.less +5 -0
  38. package/assets/css/tinymce/code.less +22 -0
  39. package/assets/css/tinymce/combo.less +12 -0
  40. package/assets/css/tinymce/fold.less +12 -0
  41. package/assets/css/tinymce/h.less +10 -0
  42. package/assets/css/tinymce/hr.less +2 -0
  43. package/assets/css/tinymce/img.less +3 -0
  44. package/assets/css/tinymce/imgpreview.less +6 -1
  45. package/assets/css/tinymce/latex.less +7 -1
  46. package/assets/css/tinymce/list.less +12 -0
  47. package/assets/css/tinymce/macro.less +7 -1
  48. package/assets/css/tinymce/nextpage.less +14 -0
  49. package/assets/css/tinymce/p.less +2 -0
  50. package/assets/css/tinymce/pz.less +6 -0
  51. package/assets/css/tinymce/qixue.less +6 -0
  52. package/assets/css/tinymce/quote.less +2 -0
  53. package/assets/css/tinymce/table.less +13 -1
  54. package/assets/css/tinymce/video.less +18 -0
  55. package/assets/img/author/rss.svg +1 -0
  56. package/assets/img/common/logo-v2.svg +14 -0
  57. package/i18n/messages/en-US.js +1 -0
  58. package/i18n/messages/vi.js +1 -0
  59. package/i18n/messages/zh-CN.js +1 -0
  60. package/i18n/messages/zh-TW.js +1 -0
  61. package/index.js +2 -0
  62. package/package.json +1 -1
  63. package/service/comment.js +56 -96
  64. package/src/App.vue +31 -31
  65. package/src/Breadcrumb.vue +16 -20
  66. package/src/Icon.vue +53 -0
  67. package/src/author/AuthorFans.vue +15 -5
  68. package/src/author/AuthorFollow.vue +1 -1
  69. package/src/author/AuthorGift.vue +9 -9
  70. package/src/author/AuthorHonor.vue +9 -8
  71. package/src/author/AuthorInfo.vue +10 -1
  72. package/src/author/AuthorLink.vue +8 -1
  73. package/src/author/AuthorPosts.vue +14 -8
  74. package/src/author/AuthorRss.vue +28 -34
  75. package/src/bread/Admin.vue +19 -6
  76. package/src/bread/Crumb.vue +7 -2
  77. package/src/bread/DesignTask.vue +44 -37
  78. package/src/comment/Avatar.vue +26 -8
  79. package/src/comment/CommentContent.vue +62 -17
  80. package/src/comment/CommentContentSimple.vue +54 -15
  81. package/src/comment/CommentWithReply.vue +22 -1
  82. package/src/comment/ReplyForReply.vue +14 -1
  83. package/src/comment/ReplyItem.vue +10 -1
  84. package/src/comment/ReplyList.vue +19 -1
  85. package/src/editor/BoxResource.vue +2 -2
  86. package/src/editor/Resource.vue +6 -6
  87. package/src/filters/clientBy.vue +14 -1
  88. package/src/filters/menuBy.vue +14 -1
  89. package/src/filters/orderBy.vue +1 -1
  90. package/src/filters/tagBy.vue +10 -1
  91. package/src/filters/versionBy.vue +6 -1
  92. package/src/filters/zlpBy.vue +6 -1
  93. package/src/footer/resource.vue +3 -1
  94. package/src/header/alternate.vue +2 -2
  95. package/src/header/asset.vue +13 -1
  96. package/src/header/box.vue +10 -5
  97. package/src/header/box2.vue +279 -247
  98. package/src/header/client.vue +6 -1
  99. package/src/header/lang.vue +1 -2
  100. package/src/header/logo.vue +3 -3
  101. package/src/header/manage.vue +0 -1
  102. package/src/header/nav.vue +1 -1
  103. package/src/header/userInfo.vue +18 -5
  104. package/src/interact/BoxcoinAdmin.vue +46 -5
  105. package/src/interact/BoxcoinRecords.vue +22 -1
  106. package/src/interact/BoxcoinUser.vue +49 -8
  107. package/src/interact/Contributors.vue +7 -11
  108. package/src/interact/Fav.vue +22 -1
  109. package/src/interact/Like.vue +10 -1
  110. package/src/interact/Share.vue +18 -1
  111. package/src/interact/WatchLater.vue +3 -3
  112. package/src/main.js +3 -1
  113. package/src/single/Author.vue +15 -10
  114. package/src/single/{cms-single.vue → CmsSingle.vue} +10 -1
  115. package/src/single/Collection.vue +10 -1
  116. package/src/single/Comment.vue +20 -3
  117. package/src/single/Creators.vue +10 -1
  118. package/src/single/PostDirectory.vue +1 -1
  119. package/src/single/PostHeader.vue +18 -1
  120. package/src/single/SimpleThx.vue +2 -2
  121. package/src/single/Thx.vue +45 -27
  122. package/assets/img/author/msg.svg +0 -55
  123. package/src/Bottom.vue +0 -23
  124. package/src/Box.vue +0 -149
  125. package/src/author/AuthorMsg.vue +0 -25
  126. package/src/bread/AdminButton.vue +0 -31
  127. package/src/header/bus.js +0 -9
  128. /package/docs/{README.md → i18n.md} +0 -0
@@ -36,18 +36,31 @@
36
36
  :can-gift="lvEnough"
37
37
  />
38
38
  <Share :postId="postId" :postType="postType" :client="client" />
39
- <watch-later :category="postType" :title="postTitle" :author-id="authorId" :banner="banner" :content-id="contentMetaId"></watch-later>
39
+ <watch-later
40
+ :category="postType"
41
+ :title="postTitle"
42
+ :author-id="authorId"
43
+ :banner="banner"
44
+ :content-id="contentMetaId"
45
+ ></watch-later>
40
46
  </div>
41
47
  <div class="w-thx-records">
42
- <boxcoin-records :postId="postId" :postType="postType" :postClient="finalClient" :cacheRecord="cacheRecord"
43
- :mode="mode" @update:boxcoin="updateBoxcoin" v-if="showRecord" />
48
+ <boxcoin-records
49
+ :postId="postId"
50
+ :postType="postType"
51
+ :postClient="finalClient"
52
+ :cacheRecord="cacheRecord"
53
+ :mode="mode"
54
+ @update:boxcoin="updateBoxcoin"
55
+ v-if="showRecord"
56
+ />
44
57
  </div>
45
58
  <div class="w-thx-copyright">
46
59
  &copy;
47
60
  所有原创作品,著作权归作者所有,所有未经授权的非署名转载或抄袭将有权追究法律责任,所有法律事务由专聘律师代理。<br />
48
61
  签约作者独家特约稿件,及所有魔盒官方评分作品用户一经兑现则视为有偿付费稿件,所有商业稿件的转载引用需同时征得魔盒平台授权。
49
62
  </div>
50
- </div>
63
+ </div>
51
64
  </template>
52
65
 
53
66
  <script>
@@ -62,7 +75,7 @@ import Rss from "../interact/Rss.vue";
62
75
 
63
76
  import User from "@jx3box/jx3box-common/js/user";
64
77
  import { getBoxcoinStatus, getPostBoxcoinConfig } from "../../service/thx";
65
- import {getConfig,getUserPermission} from "../../service/cms"
78
+ import { getConfig, getUserPermission } from "../../service/cms";
66
79
 
67
80
  export default {
68
81
  name: "ThxComp",
@@ -82,7 +95,7 @@ export default {
82
95
  default: "normal",
83
96
  },
84
97
  postId: {
85
- type: Number,
98
+ type: [Number, String],
86
99
  default: 0,
87
100
  },
88
101
  postType: {
@@ -94,7 +107,7 @@ export default {
94
107
  default: "",
95
108
  },
96
109
  userId: {
97
- type: Number,
110
+ type: [Number, String],
98
111
  default: 0,
99
112
  },
100
113
  authors: {
@@ -126,7 +139,7 @@ export default {
126
139
  default: false,
127
140
  },
128
141
  authorId: {
129
- type: Number,
142
+ type: [Number, String],
130
143
  default: 0,
131
144
  },
132
145
  banner: {
@@ -134,9 +147,13 @@ export default {
134
147
  default: "",
135
148
  },
136
149
  contentMetaId: {
137
- type: Number,
150
+ type: [Number, String],
138
151
  default: 0,
139
- }
152
+ },
153
+ category: {
154
+ type: String,
155
+ default: "",
156
+ },
140
157
  },
141
158
  data: function () {
142
159
  return {
@@ -170,11 +187,11 @@ export default {
170
187
  post_keys: function () {
171
188
  return [this.postId, this.postType];
172
189
  },
173
- finalClient: function() {
174
- if (this.client == 'wujie') {
175
- return "std"
190
+ finalClient: function () {
191
+ if (this.client == "wujie") {
192
+ return "std";
176
193
  }
177
- return this.client
194
+ return this.client;
178
195
  },
179
196
  showRecord() {
180
197
  // 当admin_boxcoin_visible为0时,作者本人和64及以上权限可见打赏记录
@@ -182,7 +199,7 @@ export default {
182
199
  return this.userId == this.user.uid || this.user.group >= 64;
183
200
  }
184
201
  return true;
185
- }
202
+ },
186
203
  },
187
204
  watch: {
188
205
  post_keys: {
@@ -224,25 +241,26 @@ export default {
224
241
  });
225
242
 
226
243
  getConfig({
227
- key: 'admin_boxcoin_visible'
244
+ key: "admin_boxcoin_visible",
228
245
  }).then((res) => {
229
- this.admin_boxcoin_visible = Number(res?.val)
246
+ this.admin_boxcoin_visible = Number(res?.val);
230
247
  });
231
248
 
232
249
  getConfig({
233
- key: `level_has_gift_permission`
250
+ key: `level_has_gift_permission`,
234
251
  }).then((res) => {
235
- User.isLogin() && User.getAsset().then((data) => {
236
- const asset = data;
237
- this.lvEnough = asset && asset.experience >= Number(res?.val);
238
- });
252
+ User.isLogin() &&
253
+ User.getAsset().then((data) => {
254
+ const asset = data;
255
+ this.lvEnough = asset && asset.experience >= Number(res?.val);
256
+ });
239
257
  });
240
258
 
241
-
242
- User.isLogin() && getUserPermission().then(res => {
243
- const permissions = res.data.data.permission?.map(item => item.action)
244
- this.hasPermission = permissions.includes(`manage_boxcoin_${this.postType}`)
245
- })
259
+ User.isLogin() &&
260
+ getUserPermission().then((res) => {
261
+ const permissions = res.data.data.permission?.map((item) => item.action);
262
+ this.hasPermission = permissions.includes(`manage_boxcoin_${this.postType}`);
263
+ });
246
264
  },
247
265
  // 用户打赏
248
266
  updateRecord: function (data) {
@@ -1,55 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
3
- viewBox="0 0 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve">
4
- <g>
5
- <g>
6
- <path fill="#0391FC" class="st0" d="M0,289.83c0-52.87,0-105.74,0-158.61c0.62-1.51,1.33-3,1.86-4.54c1.96-5.79,5.25-10.65,9.81-14.72
7
- c7.08-6.32,15.55-8.54,24.79-8.6c10.78-0.07,21.56-0.15,32.34-0.23l0.02-0.02c1.24,0.25,2.48,0.71,3.72,0.71
8
- c76,0.02,151.99,0,227.99-0.01c1.4,0.3,2.79,0.62,4.19,0.9c13.66,2.75,24.51,14.66,25.8,28.34c0.01,27.32,0,54.63,0.05,81.95
9
- c0,1.52,0.4,3.04,0.62,4.57c0.03,0.32,0.07,0.64,0.1,0.95c-0.06,1.56-0.18,3.12-0.18,4.67c-0.01,18.48,0.25,36.97-0.16,55.44
10
- c-0.13,5.71-1.07,11.85-3.44,16.96c-6.23,13.47-17.59,19.6-32.31,19.61c-46.2,0.01-92.4,0.05-138.59-0.09
11
- c-3.62-0.01-5.92,1.13-8.29,3.75c-20.74,23.01-41.61,45.89-62.42,68.83c-0.83,0.91-1.39,2.06-2.07,3.1
12
- c-0.41-0.26-0.82-0.53-1.23-0.79c0-24.89,0-49.78,0-74.8c-16.19,0-31.94,0.12-47.68-0.03c-14.43-0.14-25.07-6.7-31.64-19.62
13
- C2.01,295.07,1.08,292.41,0,289.83z M168.98,206.99c-30.47,0-60.93-0.01-91.4,0.01c-5.43,0-8.63,2.67-8.56,6.95
14
- c0.07,4.11,3.17,6.68,8.33,6.9c0.52,0.02,1.04,0.01,1.56,0.01c60.02,0,120.04,0,180.06-0.02c1.55,0,3.13-0.12,4.64-0.46
15
- c3.35-0.75,5.12-2.99,5.19-6.39c0.07-3.63-1.92-5.87-5.33-6.72c-1.48-0.37-3.1-0.27-4.66-0.27
16
- C228.87,206.99,198.93,206.99,168.98,206.99z M168.89,248.38c-29.95,0-59.89,0-89.84,0.01c-1.56,0-3.16-0.07-4.66,0.26
17
- c-3.34,0.74-5.24,3.1-5.29,6.39c-0.05,3.41,1.65,6.02,5.27,6.74c1.64,0.33,3.35,0.43,5.03,0.43c59.76,0.02,119.52,0.02,179.28,0
18
- c1.68,0,3.4-0.09,5.03-0.47c3.33-0.78,5.08-3.07,5.1-6.46c0.02-3.63-2-5.84-5.42-6.65c-1.49-0.35-3.1-0.24-4.66-0.24
19
- C228.78,248.38,198.83,248.38,168.89,248.38z M124.04,165.59c-15.62,0-31.24-0.03-46.86,0.02c-4.94,0.01-7.96,2.55-8.15,6.58
20
- c-0.2,4.1,2.95,6.98,7.94,7.27c0.65,0.04,1.3,0.01,1.95,0.01c30.2,0,60.4,0.01,90.6-0.02c1.55,0,3.13-0.12,4.63-0.49
21
- c3.36-0.82,4.96-3.22,5.01-6.56c0.07-4.2-3.06-6.79-8.26-6.8C155.29,165.57,139.66,165.59,124.04,165.59z"/>
22
- <path fill="#0F71D2" class="st1" d="M331.29,220.52c-0.03-0.32-0.07-0.64-0.1-0.96c0-27.19,0.01-54.38-0.04-81.58c0-1.65-0.41-3.29-0.63-4.94
23
- c-1.29-13.67-12.13-25.58-25.8-28.34c-1.4-0.28-2.8-0.6-4.19-0.9c-1.77-0.23-3.55-0.67-5.32-0.67
24
- c-75.46-0.03-150.93-0.03-226.39-0.03c0,0-0.02,0.02-0.02,0.02c0.04-19.9-0.17-39.81,0.26-59.71c0.13-5.7,1.09-11.84,3.45-16.95
25
- c6.4-13.81,18.08-19.6,33.09-19.59c85.86,0.06,171.72,0.03,257.58,0.04c2.08,0,4.18-0.03,6.23,0.25
26
- c14.51,1.98,24.18,9.9,28.98,23.76c0.49,1.41,1.07,2.79,1.61,4.19c0,52.61,0,105.22,0,157.83c-0.52,1.13-1.18,2.22-1.54,3.4
27
- c-4.33,13.9-15.62,23.26-30.23,23.93C355.94,220.84,343.61,220.47,331.29,220.52z"/>
28
- <path fill="#FEFEFE" class="st2" d="M331.29,220.52c12.32-0.04,24.65,0.32,36.94-0.24c14.61-0.67,25.9-10.03,30.23-23.93
29
- c0.37-1.18,1.02-2.27,1.54-3.4c0,69.02,0,138.04,0,207.05c-133.33,0-266.67,0-400,0c0-36.72,0-73.45,0-110.17
30
- c1.08,2.58,2.01,5.23,3.27,7.72c6.57,12.91,17.21,19.48,31.64,19.62c15.74,0.15,31.49,0.03,47.68,0.03c0,25.02,0,49.91,0,74.8
31
- c0.41,0.26,0.82,0.53,1.23,0.79c0.68-1.04,1.24-2.19,2.07-3.1c20.81-22.94,41.68-45.82,62.42-68.83c2.36-2.62,4.67-3.76,8.29-3.75
32
- c46.2,0.14,92.4,0.1,138.59,0.09c14.73,0,26.08-6.13,32.31-19.61c2.36-5.11,3.31-11.26,3.44-16.96
33
- c0.42-18.47,0.15-36.96,0.16-55.44C331.11,223.63,331.23,222.07,331.29,220.52z"/>
34
- <path fill="#FDFDFE" class="st3" d="M400,35.12c-0.54-1.4-1.12-2.78-1.61-4.19c-4.79-13.86-14.47-21.78-28.98-23.76
35
- c-2.05-0.28-4.15-0.25-6.23-0.25C277.32,6.9,191.47,6.93,105.61,6.87c-15.02-0.01-26.7,5.79-33.09,19.59
36
- c-2.37,5.11-3.33,11.25-3.45,16.95c-0.44,19.9-0.23,39.8-0.26,59.71c-10.78,0.08-21.56,0.16-32.34,0.23
37
- c-9.24,0.06-17.7,2.28-24.79,8.6c-4.56,4.07-7.85,8.93-9.81,14.72c-0.52,1.55-1.23,3.03-1.86,4.54C0,87.49,0,43.77,0,0
38
- c133.33,0,266.67,0,400,0C400,11.69,400,23.4,400,35.12z"/>
39
- <path fill="#F9FCFE" class="st4" d="M168.98,206.99c29.95,0,59.89,0,89.84,0.01c1.56,0,3.17-0.1,4.66,0.27c3.41,0.85,5.4,3.09,5.33,6.72
40
- c-0.07,3.4-1.85,5.64-5.19,6.39c-1.5,0.34-3.09,0.45-4.64,0.46c-60.02,0.02-120.04,0.02-180.06,0.02c-0.52,0-1.04,0.02-1.56-0.01
41
- c-5.16-0.22-8.26-2.78-8.33-6.9c-0.07-4.28,3.14-6.94,8.56-6.95C108.05,206.98,138.51,206.99,168.98,206.99z"/>
42
- <path fill="#F8FCFE" class="st5" d="M168.89,248.38c29.95,0,59.89,0,89.84,0.01c1.56,0,3.17-0.11,4.66,0.24c3.42,0.81,5.45,3.02,5.42,6.65
43
- c-0.02,3.4-1.77,5.69-5.1,6.46c-1.62,0.38-3.35,0.47-5.03,0.47c-59.76,0.02-119.52,0.02-179.28,0c-1.68,0-3.39-0.11-5.03-0.43
44
- c-3.62-0.72-5.32-3.32-5.27-6.74c0.05-3.29,1.96-5.65,5.29-6.39c1.5-0.33,3.1-0.26,4.66-0.26
45
- C109,248.38,138.94,248.38,168.89,248.38z"/>
46
- <path fill="#F9FCFE" class="st4" d="M124.04,165.59c15.62,0,31.24-0.02,46.86,0.01c5.19,0.01,8.33,2.6,8.26,6.8c-0.06,3.33-1.65,5.74-5.01,6.56
47
- c-1.5,0.37-3.08,0.48-4.63,0.49c-30.2,0.03-60.4,0.02-90.6,0.02c-0.65,0-1.3,0.02-1.95-0.01c-4.99-0.29-8.14-3.17-7.94-7.27
48
- c0.2-4.03,3.22-6.57,8.15-6.58C92.8,165.56,108.42,165.59,124.04,165.59z"/>
49
- <path fill="#4BA0EB" class="st6" d="M68.82,103.11c75.46,0,150.93,0,226.39,0.03c1.77,0,3.55,0.44,5.32,0.67c-76,0.01-151.99,0.03-227.99,0.01
50
- C71.3,103.82,70.06,103.36,68.82,103.11z"/>
51
- <path fill="#4FA9F3" class="st7" d="M330.52,133.05c0.22,1.65,0.63,3.29,0.63,4.94c0.04,27.19,0.03,54.38,0.04,81.58
52
- c-0.22-1.52-0.62-3.04-0.62-4.57C330.52,187.68,330.53,160.36,330.52,133.05z"/>
53
- </g>
54
- </g>
55
- </svg>
package/src/Bottom.vue DELETED
@@ -1,23 +0,0 @@
1
- <template>
2
- <footer class="m-bottom">
3
- <a :href="homepage" target="_blank">&copy; JX3BOX.COM</a>
4
- <a class="u-feedback" :href="feedback" target="_blank">❤ Help</a>
5
- </footer>
6
- </template>
7
-
8
- <script>
9
- import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
10
- export default {
11
- name: "CommonBottom",
12
- data: function () {
13
- return {
14
- homepage: JX3BOX.__Root,
15
- feedback: JX3BOX.feedback + "&subject=" + location.href,
16
- };
17
- },
18
- };
19
- </script>
20
-
21
- <style lang="less">
22
- @import "../assets/css/common/bottom.less";
23
- </style>
package/src/Box.vue DELETED
@@ -1,149 +0,0 @@
1
- <template>
2
- <div class="c-jx3box" :class="{ on: status, isOverlay: overlayEnable && isOverlay }">
3
- <!-- search -->
4
- <header-search @click.stop />
5
-
6
- <!-- list -->
7
- <ul class="u-list">
8
- <li>
9
- <a class="u-item" href="/index">
10
- <img class="u-pic" svg-inline :src="homeicon" />
11
- <img class="u-pic-hover" svg-inline :src="homeicon" />
12
- <span class="u-txt">首页</span>
13
- </a>
14
- </li>
15
- <li v-for="(item, i) in list" :key="i" :class="{ 'u-app-start': item.lf }">
16
- <a class="u-item" :href="item.href" :target="getTarget(item.href)">
17
- <img class="u-pic" :src="getBoxIcon(item.img)" />
18
- <!-- <img class="u-pic-hover" svg-inline :src="item.hover | getBoxIcon" /> -->
19
- <span class="u-txt">{{ item.abbr }}</span>
20
- </a>
21
- </li>
22
- </ul>
23
- <span class="u-close" @click="closeBox($event)">
24
- <el-icon><Upload /></el-icon>
25
- <span>收起</span>
26
- </span>
27
- </div>
28
- </template>
29
-
30
- <script>
31
- import _ from "lodash";
32
- import Bus from "../utils/bus";
33
- import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
34
- import box from "../assets/data/box.json";
35
- import { getMenu } from "../service/header.js";
36
-
37
- import search from "./header/search.vue";
38
- export default {
39
- name: "CommonBox",
40
- props: ["overlayEnable"],
41
- data: function () {
42
- return {
43
- status: false,
44
- isOverlay: false,
45
- data: box,
46
- client: location.href.includes("origin") ? "origin" : "std",
47
- };
48
- },
49
- computed: {
50
- homeicon: function () {
51
- return JX3BOX.__imgPath + "image/box/home.svg";
52
- },
53
- homeicon_hover: function () {
54
- return JX3BOX.__imgPath + "image/box/home_on.svg";
55
- },
56
- originicon: function () {
57
- return JX3BOX.__imgPath + "image/box/origin.svg";
58
- },
59
- list: function () {
60
- return this.data.filter((item) => {
61
- return item.status && (item.client == this.client || item.client == "all");
62
- });
63
- },
64
- },
65
- methods: {
66
- closeBox: function () {
67
- Bus.emit("toggleBox", false);
68
- },
69
- matchedClient: function (client) {
70
- return client == "all" ? true : client == this.client;
71
- },
72
- getBoxIcon: function (val) {
73
- return JX3BOX.__imgPath + "image/box/" + val;
74
- },
75
- getTarget: function (val) {
76
- if (window.innerWidth < 768 || val?.startsWith("/")) {
77
- return "_self";
78
- } else {
79
- return "_blank";
80
- }
81
- },
82
- loadMenu() {
83
- try {
84
- const _box = JSON.parse(sessionStorage.getItem("box"));
85
- if (_box) {
86
- this.data = _box;
87
- } else {
88
- getMenu("box").then((res) => {
89
- this.data = res.data?.data?.val;
90
- sessionStorage.setItem("box", JSON.stringify(this.data));
91
- });
92
- }
93
- } catch (e) {
94
- this.data = box;
95
- console.log("loadBox error", e);
96
- }
97
- },
98
- },
99
- created: function () {
100
- if (this.overlayEnable) {
101
- const vm = this;
102
- window.addEventListener(
103
- "scroll",
104
- _.throttle(() => {
105
- vm.isOverlay = window.scrollY > 200 ? true : false;
106
- }, 200)
107
- );
108
- }
109
- this.loadMenu();
110
- },
111
- mounted: function () {
112
- Bus.on("toggleBox", (status) => {
113
- if (status == undefined) {
114
- this.status = !this.status;
115
- } else {
116
- this.status = status;
117
- }
118
- });
119
- document.addEventListener("click", function () {
120
- Bus.emit("toggleBox", false);
121
- });
122
- },
123
- components: {
124
- "header-search": search,
125
- },
126
- };
127
- </script>
128
-
129
- <style lang="less">
130
- @import "../assets/css/header/box.less";
131
- </style>
132
-
133
- <style scoped lang="less">
134
- .c-jx3box {
135
- .c-header-search {
136
- float: none;
137
- .w(auto);
138
- margin: 0 20px 10px 20px;
139
- box-sizing: border-box;
140
- padding: 0;
141
- .none;
142
- }
143
- }
144
- @media screen and (max-width: @phone) {
145
- .c-jx3box .c-header-search {
146
- .db;
147
- }
148
- }
149
- </style>
@@ -1,25 +0,0 @@
1
- <template>
2
- <div class="c-author-msg">
3
- <img src="../../assets/img/author/msg.svg" svg-inline title="短消息" />
4
- </div>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- name: "AuthorMsg",
10
- props: ["uid"],
11
- components: {},
12
- data: function () {
13
- return {};
14
- },
15
- computed: {},
16
- watch: {},
17
- methods: {},
18
- created: function () {},
19
- mounted: function () {
20
- // 需要判断是否接受私信
21
- },
22
- };
23
- </script>
24
-
25
- <style scoped lang="less"></style>
@@ -1,31 +0,0 @@
1
- <template>
2
- <el-button
3
- v-if="show"
4
- class="c-admin-button"
5
- type="primary"
6
- :size="button_size"
7
- icon="Setting"
8
- @click="toggleAdminPanel"
9
- >管理</el-button
10
- >
11
- </template>
12
-
13
- <script>
14
- import Bus from "../../utils/bus";
15
- import User from "@jx3box/jx3box-common/js/user";
16
- export default {
17
- name: "BreadAdminButton",
18
- props: ["size"],
19
- data: function () {
20
- return {
21
- show: User.isEditor(),
22
- button_size: this.size || "",
23
- };
24
- },
25
- methods: {
26
- toggleAdminPanel: function () {
27
- Bus.emit("toggleAdminPanel");
28
- },
29
- },
30
- };
31
- </script>
package/src/header/bus.js DELETED
@@ -1,9 +0,0 @@
1
- import mitt from "mitt";
2
-
3
- const emitter = mitt();
4
-
5
- export default {
6
- $on: emitter.on,
7
- $off: emitter.off,
8
- $emit: emitter.emit,
9
- };
File without changes