@jx3box/jx3box-ui 2.0.5 → 2.0.7

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 (241) hide show
  1. package/.storybook/preview.js +22 -13
  2. package/.storybook/storybookMocks.js +214 -0
  3. package/README.md +39 -43
  4. package/assets/css/bread/admin.less +20 -2
  5. package/assets/css/bread/breadcrumb.less +5 -2
  6. package/assets/css/comment/quick-reply.less +1 -1
  7. package/assets/css/common/left-sidebar.less +1 -1
  8. package/assets/css/interact/like2.less +5 -2
  9. package/assets/css/interact/qrcode.less +69 -0
  10. package/assets/css/single/author.less +15 -10
  11. package/assets/css/single/cms-single.less +1 -0
  12. package/assets/css/single/thx.less +34 -11
  13. package/assets/css/wiki/wiki-comments.less +176 -0
  14. package/assets/css/wiki/wiki-panel.less +177 -0
  15. package/assets/css/wiki/wiki-revisions.less +62 -0
  16. package/assets/data/nav.json +344 -10
  17. package/assets/img/comment/comment.svg +1 -1
  18. package/assets/img/comment/heart_1.svg +1 -1
  19. package/assets/img/comment/hide.svg +1 -1
  20. package/assets/img/leftsidebar/medal.svg +1 -1
  21. package/assets/img/leftsidebar/post.svg +27 -46
  22. package/i18n/messages/en-US.js +357 -22
  23. package/i18n/messages/vi.js +350 -22
  24. package/i18n/messages/zh-CN.js +469 -20
  25. package/i18n/messages/zh-TW.js +350 -22
  26. package/index.js +19 -7
  27. package/package.json +8 -5
  28. package/service/cms.js +22 -0
  29. package/service/commit-history.js +18 -0
  30. package/service/community.js +60 -0
  31. package/service/fav.js +5 -6
  32. package/src/App.vue +210 -80
  33. package/src/Breadcrumb.vue +24 -11
  34. package/src/CommonFooter.vue +2 -2
  35. package/src/Footer.vue +13 -5
  36. package/src/LeftSideToggle.vue +10 -3
  37. package/src/LeftSidebar.vue +19 -5
  38. package/src/Main.vue +9 -2
  39. package/src/RightSidebar.vue +12 -3
  40. package/src/SuspendCommon.vue +52 -38
  41. package/src/author/AuthorFans.vue +7 -5
  42. package/src/author/AuthorFollow.vue +14 -7
  43. package/src/author/AuthorGift.vue +25 -17
  44. package/src/author/AuthorInfo.vue +46 -19
  45. package/src/author/AuthorLink.vue +3 -1
  46. package/src/author/AuthorMedals.vue +5 -2
  47. package/src/author/AuthorPosts.vue +31 -13
  48. package/src/author/AuthorRss.vue +7 -3
  49. package/src/author/AuthorTeams.vue +3 -1
  50. package/src/author/UserPop.vue +29 -17
  51. package/src/bread/Admin.vue +55 -32
  52. package/src/bread/AdminDirectMessage.vue +15 -8
  53. package/src/bread/AdminDrop.vue +124 -45
  54. package/src/bread/CommunityAdmin.vue +527 -0
  55. package/src/bread/DesignTask.vue +30 -26
  56. package/src/bread/ListAdmin.vue +199 -0
  57. package/src/bread/MigrateCommunity.vue +192 -0
  58. package/src/bread/MoveToCommunityDialog.vue +234 -0
  59. package/src/comment/Avatar.vue +18 -24
  60. package/src/comment/CommentContent.vue +57 -37
  61. package/src/comment/CommentContentSimple.vue +61 -63
  62. package/src/comment/CommentInputForm.vue +45 -34
  63. package/src/comment/CommentWithReply.vue +9 -6
  64. package/src/comment/QuickReply.vue +5 -1
  65. package/src/comment/ReplyForReply.vue +6 -4
  66. package/src/comment/ReplyList.vue +28 -18
  67. package/src/comment/Upload.vue +24 -6
  68. package/src/filters/clientBy.vue +10 -8
  69. package/src/filters/markBy.vue +35 -31
  70. package/src/filters/menuBy.vue +20 -22
  71. package/src/filters/orderBy.vue +17 -11
  72. package/src/filters/tagBy.vue +4 -2
  73. package/src/filters/topicBy.vue +12 -10
  74. package/src/filters/versionBy.vue +5 -3
  75. package/src/filters/zlpBy.vue +29 -25
  76. package/src/footer/copyright.vue +5 -5
  77. package/src/footer/links.vue +2 -2
  78. package/src/footer/official.vue +1 -1
  79. package/src/footer/resource.vue +6 -6
  80. package/src/header/alternate.vue +35 -18
  81. package/src/header/asset.vue +9 -19
  82. package/src/header/box.vue +20 -8
  83. package/src/header/box2.vue +16 -9
  84. package/src/header/client.vue +7 -7
  85. package/src/header/lang.vue +41 -6
  86. package/src/header/logo.vue +2 -3
  87. package/src/header/manage.vue +2 -2
  88. package/src/header/message.vue +3 -3
  89. package/src/header/nav.vue +26 -23
  90. package/src/header/publish.vue +2 -2
  91. package/src/header/search.vue +2 -2
  92. package/src/header/shop.vue +2 -2
  93. package/src/header/user.vue +4 -4
  94. package/src/header/userInfo.vue +22 -24
  95. package/src/header/vip.vue +2 -2
  96. package/src/interact/BoxcoinAdmin.vue +30 -16
  97. package/src/interact/BoxcoinRecords.vue +28 -11
  98. package/src/interact/BoxcoinUser.vue +33 -17
  99. package/src/interact/Fav.vue +5 -1
  100. package/src/interact/Homework.vue +317 -0
  101. package/src/interact/Like.vue +4 -2
  102. package/src/interact/QRcode.vue +104 -0
  103. package/src/interact/Rss.vue +10 -4
  104. package/src/interact/Share.vue +18 -19
  105. package/src/interact/WatchLater.vue +5 -1
  106. package/src/main.js +1 -0
  107. package/src/single/Author.vue +5 -1
  108. package/src/single/CmsSingle.vue +29 -15
  109. package/src/single/Collection.vue +36 -26
  110. package/src/single/Comment.vue +19 -13
  111. package/src/single/Creators.vue +5 -3
  112. package/src/single/PostCollection.vue +158 -0
  113. package/src/single/PostDirectory.vue +0 -126
  114. package/src/single/PostGuide.vue +93 -0
  115. package/src/single/PostHeader.vue +39 -17
  116. package/src/single/PostTopic.vue +3 -3
  117. package/src/single/PostVersion.vue +219 -0
  118. package/src/single/RightAffix.vue +160 -0
  119. package/src/single/SimpleThx.vue +4 -2
  120. package/src/single/Thx.vue +14 -2
  121. package/src/single/VersionDialog.vue +238 -0
  122. package/src/stories/components/StoryPropsTable.vue +137 -0
  123. package/src/stories/filters/FilterGallery.stories.js +110 -0
  124. package/src/stories/filters/clientBy.stories.js +24 -0
  125. package/src/stories/filters/markBy.stories.js +6 -0
  126. package/src/stories/filters/menuBy.stories.js +6 -0
  127. package/src/stories/filters/orderBy.stories.js +6 -0
  128. package/src/stories/filters/tagBy.stories.js +6 -0
  129. package/src/stories/filters/topicBy.stories.js +6 -0
  130. package/src/stories/filters/versionBy.stories.js +6 -0
  131. package/src/stories/filters/zlpBy.stories.js +6 -0
  132. package/src/stories/interact/QRcode.stories.js +59 -0
  133. package/src/stories/layout/BaseShell.stories.js +38 -0
  134. package/src/stories/layout/Breadcrumb.stories.js +40 -0
  135. package/src/stories/layout/CommonFooter.stories.js +1 -1
  136. package/src/stories/layout/CommonHeader.stories.js +1 -1
  137. package/src/stories/layout/LeftSideToggle.stories.js +78 -0
  138. package/src/stories/layout/LeftSidebar.stories.js +40 -0
  139. package/src/stories/layout/Main.stories.js +41 -0
  140. package/src/stories/layout/RightSidebar.stories.js +36 -0
  141. package/src/stories/layout/StorybookShell.vue +271 -0
  142. package/src/stories/layout/SuspendCommon.stories.js +67 -0
  143. package/src/stories/layout/SuspendCommonStage.vue +143 -0
  144. package/src/stories/mockData.js +369 -0
  145. package/src/stories/other/UserPop.stories.js +51 -0
  146. package/src/stories/single/Author.stories.js +19 -0
  147. package/src/stories/single/AuthorStoryStage.vue +103 -0
  148. package/src/stories/single/CmsSingle.stories.js +19 -0
  149. package/src/stories/single/CmsSingleStoryStage.vue +118 -0
  150. package/src/stories/single/Collection.stories.js +34 -0
  151. package/src/stories/single/Comment.stories.js +36 -0
  152. package/src/stories/single/Creators.stories.js +34 -0
  153. package/src/stories/single/PostCollection.stories.js +34 -0
  154. package/src/stories/single/PostDirectory.stories.js +31 -0
  155. package/src/stories/single/PostGuide.stories.js +47 -0
  156. package/src/stories/single/PostHeader.stories.js +39 -0
  157. package/src/stories/single/PostVersion.stories.js +41 -0
  158. package/src/stories/single/RightAffix.stories.js +84 -0
  159. package/src/stories/single/SimpleThx.stories.js +39 -0
  160. package/src/stories/single/SingleGallery.stories.js +207 -0
  161. package/src/stories/single/Thx.stories.js +38 -0
  162. package/src/stories/wiki/GamePrice.stories.js +64 -0
  163. package/src/stories/wiki/WikiComments.stories.js +58 -0
  164. package/src/stories/wiki/WikiPanel.stories.js +69 -0
  165. package/src/stories/wiki/WikiRevisions.stories.js +47 -0
  166. package/src/wiki/GamePrice.vue +107 -0
  167. package/src/wiki/WikiComment.vue +153 -0
  168. package/src/wiki/WikiComments.vue +206 -0
  169. package/src/wiki/WikiPanel.vue +121 -0
  170. package/src/wiki/WikiRevisions.vue +125 -0
  171. package/vue.config.js +2 -12
  172. package/assets/css/common/bottom.less +0 -25
  173. package/assets/css/editor/article.less +0 -36
  174. package/assets/css/editor/combo.less +0 -362
  175. package/assets/css/editor/resource.less +0 -399
  176. package/assets/css/editor/tinymce.less +0 -100
  177. package/assets/css/editor/upload.less +0 -136
  178. package/assets/css/module/author.less +0 -231
  179. package/assets/css/module/buff.less +0 -88
  180. package/assets/css/module/directory.less +0 -165
  181. package/assets/css/module/icon.less +0 -25
  182. package/assets/css/module/item.less +0 -279
  183. package/assets/css/module/item_simple.less +0 -58
  184. package/assets/css/module/jx3_element.less +0 -5
  185. package/assets/css/module/macro.less +0 -89
  186. package/assets/css/module/npc.less +0 -265
  187. package/assets/css/module/resource.less +0 -93
  188. package/assets/css/module/skill.less +0 -74
  189. package/assets/css/module/talent.less +0 -495
  190. package/assets/js/a.js +0 -46
  191. package/assets/js/code.js +0 -13
  192. package/assets/js/combo.js +0 -40
  193. package/assets/js/directory.js +0 -114
  194. package/assets/js/filter2.js +0 -186
  195. package/assets/js/fold.js +0 -11
  196. package/assets/js/gallery.js +0 -14
  197. package/assets/js/hljs_languages.js +0 -177
  198. package/assets/js/iframe.js +0 -38
  199. package/assets/js/img.js +0 -23
  200. package/assets/js/item/attribute_percent.js +0 -88
  201. package/assets/js/item/bind.js +0 -18
  202. package/assets/js/item/border.js +0 -19
  203. package/assets/js/item/border_quest.js +0 -12
  204. package/assets/js/item/color.js +0 -25
  205. package/assets/js/item/hljs_languages.js +0 -177
  206. package/assets/js/item/icon_url.js +0 -15
  207. package/assets/js/item/second_format.js +0 -19
  208. package/assets/js/jx3_element.js +0 -73
  209. package/assets/js/katex.js +0 -181
  210. package/assets/js/macro.js +0 -16
  211. package/assets/js/nextpage.js +0 -4
  212. package/assets/js/pswp.js +0 -67
  213. package/assets/js/pswp_template.js +0 -66
  214. package/assets/js/pz_iframe.js +0 -30
  215. package/assets/js/qixue.js +0 -28
  216. package/assets/js/renderImgPreview.js +0 -18
  217. package/assets/js/script.js +0 -6
  218. package/assets/js/stat.js +0 -107
  219. package/assets/js/talent2.js +0 -21
  220. package/assets/js/tex-mml-chtml.js +0 -36310
  221. package/assets/js/voice.js +0 -238
  222. package/assets/js/xss.js +0 -130
  223. package/src/editor/Article.vue +0 -230
  224. package/src/editor/BoxResource.vue +0 -441
  225. package/src/editor/Resource.vue +0 -623
  226. package/src/editor/Tinymce.vue +0 -204
  227. package/src/editor/Upload.vue +0 -277
  228. package/src/editor/UploadAlum.vue +0 -176
  229. package/src/editor/UploadBanner.vue +0 -156
  230. package/src/editor/components/Author.vue +0 -322
  231. package/src/editor/components/Avatar.vue +0 -95
  232. package/src/editor/components/Buff.vue +0 -80
  233. package/src/editor/components/Combo.vue +0 -259
  234. package/src/editor/components/Equip.vue +0 -299
  235. package/src/editor/components/GameText.vue +0 -242
  236. package/src/editor/components/Item.vue +0 -325
  237. package/src/editor/components/ItemSimple.vue +0 -134
  238. package/src/editor/components/Medal.vue +0 -43
  239. package/src/editor/components/Npc.vue +0 -215
  240. package/src/editor/components/PostAuthor.vue +0 -102
  241. package/src/editor/components/Skill.vue +0 -71
@@ -6,10 +6,11 @@
6
6
  ref="quickReply"
7
7
  trigger="click"
8
8
  popper-class="c-jx3box-reply-pop"
9
+ width="300px"
9
10
  >
10
11
  <div class="c-jx3box-reply-pop__content">
11
12
  <el-icon class="u-close" @click="closePop"><Close></Close></el-icon>
12
- <div class="u-title">快捷回复</div>
13
+ <div class="u-title">{{ $jx3boxT("jx3boxUi.quickReply.title", "快捷回复") }}</div>
13
14
  <div class="m-reply-list">
14
15
  <div
15
16
  class="m-reply-list__item"
@@ -24,6 +25,7 @@
24
25
  <template #reference>
25
26
  <img
26
27
  class="u-reference"
28
+ svg-inline
27
29
  width="24"
28
30
  height="24"
29
31
  src="../../assets/img/comment/comment.svg"
@@ -36,8 +38,10 @@
36
38
 
37
39
  <script>
38
40
  import replyTemplate from "../../assets/data/reply_template.json";
41
+ import i18nMixin from "../../i18n/mixin";
39
42
  export default {
40
43
  name: "QuickReply",
44
+ mixins: [i18nMixin],
41
45
  data() {
42
46
  return {
43
47
  replyTemplate,
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <el-form ref="form" class="c-comment-subbox">
3
3
  <div class="u-subbox-label">
4
- 回复
4
+ {{ $jx3boxT("jx3boxUi.replyForReply.reply", "回复") }}
5
5
  <el-link type="primary" target="_blank" :href="userHref"
6
6
  >@{{ username }}</el-link
7
7
  >
@@ -12,7 +12,7 @@
12
12
  type="textarea"
13
13
  v-model="content"
14
14
  :id="'id' + inputId"
15
- placeholder="输入回复..."
15
+ :placeholder="$jx3boxT('jx3boxUi.replyForReply.placeholder', '输入回复...')"
16
16
  ></el-input>
17
17
  </el-form-item>
18
18
  <el-form-item>
@@ -38,10 +38,10 @@
38
38
  type="primary"
39
39
  @click="submitReply"
40
40
  :disabled="disableSubmitBtn"
41
- >提交</el-button
41
+ >{{ $jx3boxT("jx3boxUi.replyForReply.submit", "提交") }}</el-button
42
42
  >
43
43
  <el-button size="small" link @click="hideForm()"
44
- >收起</el-button
44
+ >{{ $jx3boxT("jx3boxUi.replyForReply.collapse", "收起") }}</el-button
45
45
  >
46
46
  </el-form-item>
47
47
  </el-form>
@@ -50,7 +50,9 @@
50
50
  <script>
51
51
  import Uploader from "./Upload.vue";
52
52
  import Emotion from "@jx3box/jx3box-emotion/src/Emotion2.vue";
53
+ import i18nMixin from "../../i18n/mixin";
53
54
  export default {
55
+ mixins: [i18nMixin],
54
56
  props: {
55
57
  username: {
56
58
  type: String,
@@ -14,8 +14,12 @@
14
14
  <!-- 分页 -->
15
15
  <el-row v-if="data.length >= 3 || showPager">
16
16
  <el-col :span="4">
17
- <el-button link v-show="showPager" @click="showLess()">收起</el-button>
18
- <el-button link v-show="!showPager" @click="showMore()">查看更多</el-button>
17
+ <el-button link v-show="showPager" @click="showLess()">{{
18
+ $jx3boxT("jx3boxUi.replyList.collapse", "收起")
19
+ }}</el-button>
20
+ <el-button link v-show="!showPager" @click="showMore()">{{
21
+ $jx3boxT("jx3boxUi.replyList.showMore", "查看更多")
22
+ }}</el-button>
19
23
  </el-col>
20
24
  <el-col :span="20" class="c-comment-reply-pages">
21
25
  <el-pagination
@@ -34,7 +38,9 @@
34
38
 
35
39
  <script>
36
40
  import ReplyItem from "./ReplyItem.vue";
41
+ import i18nMixin from "../../i18n/mixin";
37
42
  export default {
43
+ mixins: [i18nMixin],
38
44
  props: {
39
45
  data: {
40
46
  type: Array,
@@ -109,24 +115,28 @@ export default {
109
115
  .c-comment-avatar {
110
116
  margin-right: 10px;
111
117
  width: auto;
112
- }
113
- .u-avatar {
114
- float: left;
115
- }
116
- .u-avatar-pic {
117
- // width: 28px;
118
- // height: 28px;
119
- margin-right: 10px;
120
- }
121
118
 
122
- .u-name {
123
- font-size: 12px;
124
- line-height: 28px;
125
- padding: 0 !important;
126
- display: inline;
127
- white-space: nowrap;
128
- }
119
+ .u-avatar {
120
+ float: left;
121
+ }
122
+ .u-avatar-pic {
123
+ width: 28px;
124
+ height: 28px;
125
+ margin-right: 10px;
126
+ border:1px solid #eee;
127
+ }
128
+ .u-avatar-frame{
129
+ display: none;
130
+ }
129
131
 
132
+ .u-name {
133
+ font-size: 13px;
134
+ line-height: 28px;
135
+ padding: 0 !important;
136
+ display: inline;
137
+ white-space: nowrap;
138
+ }
139
+ }
130
140
  .u-reply {
131
141
  padding: 5px;
132
142
  line-height: 1.715;
@@ -19,9 +19,17 @@
19
19
  <el-icon><Plus></Plus></el-icon>
20
20
  <template #tip>
21
21
  <div class="el-upload__tip">
22
- 最多上传 {{ maxCount }} 张
23
- {{ acceptedExtensions.join(" / ").toUpperCase() }} 格式图片,单张图片不能超过
24
- {{ maxSize / 1024 / 1024 }} MB
22
+ {{
23
+ $jx3boxT(
24
+ "jx3boxUi.commentUpload.tip",
25
+ "最多上传 {count} 张 {types} 格式图片,单张图片不能超过 {size} MB",
26
+ {
27
+ count: maxCount,
28
+ types: acceptedExtensions.join(" / ").toUpperCase(),
29
+ size: maxSize / 1024 / 1024,
30
+ }
31
+ )
32
+ }}
25
33
  </div>
26
34
  </template>
27
35
  </el-upload>
@@ -32,8 +40,10 @@
32
40
  </template>
33
41
 
34
42
  <script>
43
+ import i18nMixin from "../../i18n/mixin";
35
44
  export default {
36
45
  name: "CommentUploader",
46
+ mixins: [i18nMixin],
37
47
  data() {
38
48
  return {
39
49
  dialogImageUrl: "",
@@ -55,7 +65,9 @@ export default {
55
65
  onExceed() {
56
66
  this.$notify({
57
67
  title: "",
58
- message: `最多上传 ${this.maxCount} 张图片!`,
68
+ message: this.$jx3boxT("jx3boxUi.commentUpload.exceed", "最多上传 {count} 张图片!", {
69
+ count: this.maxCount,
70
+ }),
59
71
  type: "error",
60
72
  duration: 3000,
61
73
  position: "bottom-right",
@@ -66,7 +78,13 @@ export default {
66
78
  if (file.size > this.maxSize) {
67
79
  this.$notify({
68
80
  title: "",
69
- message: `单张图片大小不能超过 ${this.maxSize / 1024 / 1024} MB!`,
81
+ message: this.$jx3boxT(
82
+ "jx3boxUi.commentUpload.maxSize",
83
+ "单张图片大小不能超过 {size} MB!",
84
+ {
85
+ size: this.maxSize / 1024 / 1024,
86
+ }
87
+ ),
70
88
  type: "error",
71
89
  duration: 3000,
72
90
  position: "bottom-right",
@@ -95,7 +113,7 @@ export default {
95
113
  onError() {
96
114
  this.$notify({
97
115
  title: "",
98
- message: "图片上传失败!",
116
+ message: this.$jx3boxT("jx3boxUi.commentUpload.uploadFailed", "图片上传失败!"),
99
117
  type: "error",
100
118
  duration: 3000,
101
119
  position: "bottom-right",
@@ -2,7 +2,7 @@
2
2
  <div class="w-filter-client">
3
3
  <ul>
4
4
  <li class="u-client" :class="{on: client == ''}" @click="filter('')" v-if="clients">
5
- 全部
5
+ {{ $jx3boxT("jx3boxUi.clientBy.all", "全部") }}
6
6
  </li>
7
7
  <li
8
8
  class="u-client"
@@ -18,13 +18,10 @@
18
18
  </template>
19
19
 
20
20
  <script>
21
- const clients = {
22
- all: "全端",
23
- std: "剑三",
24
- origin: "缘起",
25
- };
21
+ import i18nMixin from "../../i18n/mixin";
26
22
  export default {
27
23
  name: "clientBy",
24
+ mixins: [i18nMixin],
28
25
  emits: ["filter"],
29
26
  props: {
30
27
  type: {
@@ -47,12 +44,17 @@ export default {
47
44
  },
48
45
  computed: {
49
46
  computedClients: function () {
47
+ const clients = {
48
+ all: this.$jx3boxT("jx3boxUi.clientBy.allClients", "全端"),
49
+ std: this.$jx3boxT("jx3boxUi.clientBy.std", "剑三"),
50
+ origin: this.$jx3boxT("jx3boxUi.clientBy.origin", "缘起"),
51
+ };
50
52
  if (this.showWujie) {
51
53
  return Object.assign({}, this.clients || clients, {
52
- wujie: "无界",
54
+ wujie: this.$jx3boxT("jx3boxUi.clientBy.wujie", "无界"),
53
55
  });
54
56
  }
55
- return clients;
57
+ return this.clients || clients;
56
58
  },
57
59
  },
58
60
  methods: {
@@ -1,37 +1,31 @@
1
1
  <template>
2
- <span class="w-filter-menu">
3
- <el-dropdown>
4
- <span class="el-dropdown-link">
5
- <span class="u-menu-label"
6
- ><el-icon>
7
- <operation />
8
- </el-icon>
9
- {{ current ? current : deftext
10
- }}<el-icon>
11
- <arrow-down /> </el-icon
12
- ></span>
13
- </span>
14
- <template #dropdown>
15
- <el-dropdown-menu>
16
- <el-dropdown-item @click="filter('')">{{ "全部" }}</el-dropdown-item>
17
- <el-dropdown-item v-for="(item, key) in marks" :key="key" @click="filter(key)">{{
18
- item
19
- }}</el-dropdown-item>
20
- </el-dropdown-menu>
21
- </template>
22
- </el-dropdown>
23
- </span>
2
+ <el-dropdown class="w-filter-menu">
3
+ <span class="el-dropdown-link">
4
+ <span class="u-menu-label"
5
+ ><el-icon>
6
+ <operation />
7
+ </el-icon>
8
+ {{ current ? current : deftext
9
+ }}<el-icon>
10
+ <arrow-down /> </el-icon
11
+ ></span>
12
+ </span>
13
+ <template #dropdown>
14
+ <el-dropdown-menu>
15
+ <el-dropdown-item @click="filter('')">{{ $jx3boxT("jx3boxUi.markBy.all", "全部") }}</el-dropdown-item>
16
+ <el-dropdown-item v-for="(item, key) in resolvedMarks" :key="key" @click="filter(key)">{{
17
+ item
18
+ }}</el-dropdown-item>
19
+ </el-dropdown-menu>
20
+ </template>
21
+ </el-dropdown>
24
22
  </template>
25
23
 
26
24
  <script>
27
- const default_marks = {
28
- newbie: "新手易用",
29
- advanced: "进阶推荐",
30
- recommended: "编辑精选",
31
- geek: "骨灰必备",
32
- };
25
+ import i18nMixin from "../../i18n/mixin";
33
26
  export default {
34
27
  name: "markBy",
28
+ mixins: [i18nMixin],
35
29
  emits: ["filter"],
36
30
  props: {
37
31
  placeholder: {
@@ -44,7 +38,7 @@ export default {
44
38
  },
45
39
  marks: {
46
40
  type: Object,
47
- default: () => default_marks,
41
+ default: () => null,
48
42
  },
49
43
  },
50
44
  data: function () {
@@ -55,10 +49,20 @@ export default {
55
49
  },
56
50
  computed: {
57
51
  current: function () {
58
- return this.marks[this.mark];
52
+ return this.resolvedMarks[this.mark];
59
53
  },
60
54
  deftext: function () {
61
- return this.placeholder || "精选";
55
+ return this.placeholder || this.$jx3boxT("jx3boxUi.markBy.default", "精选");
56
+ },
57
+ resolvedMarks: function () {
58
+ return (
59
+ this.marks || {
60
+ newbie: this.$jx3boxT("jx3boxUi.markBy.newbie", "新手易用"),
61
+ advanced: this.$jx3boxT("jx3boxUi.markBy.advanced", "进阶推荐"),
62
+ recommended: this.$jx3boxT("jx3boxUi.markBy.recommended", "编辑精选"),
63
+ geek: this.$jx3boxT("jx3boxUi.markBy.geek", "骨灰必备"),
64
+ }
65
+ );
62
66
  },
63
67
  },
64
68
  methods: {
@@ -1,27 +1,27 @@
1
1
  <template>
2
- <span class="w-filter-menu" v-if="data">
3
- <el-dropdown>
4
- <span class="el-dropdown-link">
5
- <span class="u-menu-label"
6
- ><el-icon> <operation /> </el-icon>{{ current ? current : deftext
7
- }}<el-icon> <arrow-down /> </el-icon
8
- ></span>
9
- </span>
10
- <template #dropdown>
11
- <el-dropdown-menu>
12
- <el-dropdown-item @click="filter('')">{{ "全部" }}</el-dropdown-item>
13
- <el-dropdown-item v-for="(item, key) in data" :key="key" @click="filter(key)">{{
14
- item
15
- }}</el-dropdown-item>
16
- </el-dropdown-menu>
17
- </template>
18
- </el-dropdown>
19
- </span>
2
+ <el-dropdown class="w-filter-menu" v-if="data">
3
+ <span class="el-dropdown-link">
4
+ <span class="u-menu-label"
5
+ ><el-icon> <operation /> </el-icon>{{ current ? current : deftext
6
+ }}<el-icon> <arrow-down /> </el-icon
7
+ ></span>
8
+ </span>
9
+ <template #dropdown>
10
+ <el-dropdown-menu>
11
+ <el-dropdown-item @click="filter('')">{{ $jx3boxT("jx3boxUi.menuBy.all", "全部") }}</el-dropdown-item>
12
+ <el-dropdown-item v-for="(item, key) in data" :key="key" @click="filter(key)">{{
13
+ item
14
+ }}</el-dropdown-item>
15
+ </el-dropdown-menu>
16
+ </template>
17
+ </el-dropdown>
20
18
  </template>
21
19
 
22
20
  <script>
21
+ import i18nMixin from "../../i18n/mixin";
23
22
  export default {
24
23
  name: "menuBy",
24
+ mixins: [i18nMixin],
25
25
  emits: ["filter"],
26
26
  props: {
27
27
  data: {
@@ -47,7 +47,7 @@ export default {
47
47
  return this.data[this.value];
48
48
  },
49
49
  deftext: function () {
50
- return this.placeholder || "筛选";
50
+ return this.placeholder || this.$jx3boxT("jx3boxUi.menuBy.default", "筛选");
51
51
  },
52
52
  },
53
53
  methods: {
@@ -67,9 +67,7 @@ export default {
67
67
  .u-menu-label {
68
68
  .flex;
69
69
  align-items: center;
70
- i {
71
- .mr(5px);
72
- }
70
+ gap: 5px;
73
71
  .fz(12px);
74
72
  }
75
73
  }
@@ -1,7 +1,11 @@
1
1
  <template>
2
2
  <div class="w-filter-order" :class="{ on: visible }">
3
3
  <span class="u-label" @click="toggleFilter">
4
- <span class="u-current-order">排序 : {{ current || "最后更新" }}</span>
4
+ <span class="u-current-order">{{
5
+ $jx3boxT("jx3boxUi.orderBy.sortLabel", "排序 : {current}", {
6
+ current: current || $jx3boxT("jx3boxUi.orderBy.lastUpdate", "最后更新"),
7
+ })
8
+ }}</span>
5
9
  <span class="u-toggle">
6
10
  <el-icon class="el-icon-arrow-down">
7
11
  <arrow-down />
@@ -16,13 +20,13 @@
16
20
  ><el-icon>
17
21
  <refresh />
18
22
  </el-icon>
19
- 最后更新</span
23
+ {{ $jx3boxT("jx3boxUi.orderBy.lastUpdate", "最后更新") }}</span
20
24
  >
21
25
  <span class="u-mode u-podate" :class="{ on: order == 'podate' }" @click="filter('podate')"
22
26
  ><el-icon>
23
27
  <sort />
24
28
  </el-icon>
25
- 最早发布</span
29
+ {{ $jx3boxT("jx3boxUi.orderBy.earliestPublish", "最早发布") }}</span
26
30
  >
27
31
  <slot></slot>
28
32
  </span>
@@ -30,15 +34,10 @@
30
34
  </template>
31
35
 
32
36
  <script>
33
- const order_map = {
34
- update: "最后更新",
35
- podate: "最早发布",
36
- favs: "收藏最多",
37
- likes: "点赞最多",
38
- downs: "下载最多",
39
- };
37
+ import i18nMixin from "../../i18n/mixin";
40
38
  export default {
41
39
  name: "orderBy",
40
+ mixins: [i18nMixin],
42
41
  emits: ["filter"],
43
42
  props: {},
44
43
  data: function () {
@@ -49,7 +48,14 @@ export default {
49
48
  },
50
49
  computed: {
51
50
  current: function () {
52
- return order_map[this.order];
51
+ const orderMap = {
52
+ update: this.$jx3boxT("jx3boxUi.orderBy.lastUpdate", "最后更新"),
53
+ podate: this.$jx3boxT("jx3boxUi.orderBy.earliestPublish", "最早发布"),
54
+ favs: this.$jx3boxT("jx3boxUi.orderBy.mostFavs", "收藏最多"),
55
+ likes: this.$jx3boxT("jx3boxUi.orderBy.mostLikes", "点赞最多"),
56
+ downs: this.$jx3boxT("jx3boxUi.orderBy.mostDownloads", "下载最多"),
57
+ };
58
+ return orderMap[this.order];
53
59
  },
54
60
  },
55
61
  methods: {
@@ -5,7 +5,7 @@
5
5
  ><el-icon>
6
6
  <collection-tag />
7
7
  </el-icon>
8
- {{ current || "全部" }}</span
8
+ {{ current || $jx3boxT("jx3boxUi.tagBy.all", "全部") }}</span
9
9
  >
10
10
  <span class="u-toggle">
11
11
  <el-icon class="el-icon-arrow-down">
@@ -21,7 +21,7 @@
21
21
  ><el-icon>
22
22
  <collection-tag />
23
23
  </el-icon>
24
- 全部</span
24
+ {{ $jx3boxT("jx3boxUi.tagBy.all", "全部") }}</span
25
25
  >
26
26
  <span
27
27
  v-for="(item, key) in data"
@@ -40,8 +40,10 @@
40
40
  </template>
41
41
 
42
42
  <script>
43
+ import i18nMixin from "../../i18n/mixin";
43
44
  export default {
44
45
  name: "tagBy",
46
+ mixins: [i18nMixin],
45
47
  emits: ["filter"],
46
48
  props: {
47
49
  data: {
@@ -36,8 +36,10 @@
36
36
  </template>
37
37
 
38
38
  <script>
39
+ import i18nMixin from "../../i18n/mixin";
39
40
  export default {
40
41
  name: "topicBy",
42
+ mixins: [i18nMixin],
41
43
  props: {
42
44
  topics: {
43
45
  type: Array,
@@ -49,38 +51,36 @@ export default {
49
51
  },
50
52
  label: {
51
53
  type: String,
52
- default: "主题",
54
+ default: "",
53
55
  },
54
56
  },
55
57
  emits: ["update:modelValue"],
56
- model: {
57
- prop: "modelValue",
58
- event: "update:modelValue",
59
- },
60
58
  data() {
61
59
  return {
62
60
  visible: false,
63
- value: "全部",
61
+ value: "",
64
62
  };
65
63
  },
66
64
  computed: {
67
65
  activeText() {
68
66
  const { value } = this;
69
- return value === "全部" ? this.label : value;
67
+ const allLabel = this.$jx3boxT("jx3boxUi.topicBy.all", "全部");
68
+ const defaultLabel = this.label || this.$jx3boxT("jx3boxUi.topicBy.label", "主题");
69
+ return value === allLabel ? defaultLabel : value;
70
70
  },
71
71
  computedTopics() {
72
- return ["全部", ...this.topics];
72
+ return [this.$jx3boxT("jx3boxUi.topicBy.all", "全部"), ...this.topics];
73
73
  },
74
74
  },
75
75
  watch: {
76
76
  modelValue: {
77
77
  immediate: true,
78
78
  handler(val) {
79
- this.value = val === "" ? "全部" : val;
79
+ this.value = val === "" ? this.$jx3boxT("jx3boxUi.topicBy.all", "全部") : val;
80
80
  },
81
81
  },
82
82
  value(val) {
83
- if (val === "全部") val = "";
83
+ if (val === this.$jx3boxT("jx3boxUi.topicBy.all", "全部")) val = "";
84
84
  this.$emit("update:modelValue", val);
85
85
  },
86
86
  },
@@ -120,6 +120,8 @@ export default {
120
120
  color: #606266;
121
121
  font-size: 12px;
122
122
  .pointer;
123
+ .flex(y);
124
+ gap:5px;
123
125
  }
124
126
  }
125
127
  .w-filter-topic__content {
@@ -2,7 +2,7 @@
2
2
  <div class="w-filter-client">
3
3
  <ul>
4
4
  <li class="u-client" :class="{on: version == ''}" @click="filter('')">
5
- 双端
5
+ {{ $jx3boxT("jx3boxUi.versionBy.all", "双端") }}
6
6
  </li>
7
7
  <li
8
8
  class="u-client"
@@ -16,8 +16,10 @@
16
16
  </template>
17
17
 
18
18
  <script>
19
+ import i18nMixin from "../../i18n/mixin";
19
20
  export default {
20
21
  name: "versionBy",
22
+ mixins: [i18nMixin],
21
23
  props: {
22
24
  value: {
23
25
  type: [String, Number],
@@ -33,8 +35,8 @@ export default {
33
35
  computed: {
34
36
  versions: function () {
35
37
  const versions = {
36
- 0: "旗舰",
37
- 1: "无界"
38
+ 0: this.$jx3boxT("jx3boxUi.versionBy.standard", "旗舰"),
39
+ 1: this.$jx3boxT("jx3boxUi.versionBy.wujie", "无界"),
38
40
  }
39
41
  return versions;
40
42
  },