@jx3box/jx3box-ui 2.0.12 → 2.0.15

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 (144) hide show
  1. package/assets/css/bread/admin.less +1 -30
  2. package/assets/css/bread/breadcrumb.less +1 -38
  3. package/assets/css/bread/crumb.less +1 -6
  4. package/assets/css/comment/quick-reply.less +1 -11
  5. package/assets/css/common/footer.less +1 -23
  6. package/assets/css/common/left-sidebar.less +1 -28
  7. package/assets/css/common/main.less +1 -22
  8. package/assets/css/common/right-msg.less +1 -0
  9. package/assets/css/common/right-sidebar.less +1 -31
  10. package/assets/css/common/suspend-common.less +1 -51
  11. package/assets/css/filters/client-by.less +1 -6
  12. package/assets/css/header/box.less +1 -34
  13. package/assets/css/interact/like2.less +1 -4
  14. package/assets/css/interact/qrcode.less +1 -0
  15. package/assets/css/interact/share2.less +1 -17
  16. package/assets/css/mixin.less +1 -3
  17. package/assets/css/single/author.less +3 -22
  18. package/assets/css/single/cms-single.less +1 -16
  19. package/assets/css/single/thx.less +2 -51
  20. package/assets/css/tinymce/_.less +1 -6
  21. package/assets/css/tinymce/a.less +1 -5
  22. package/assets/css/tinymce/code.less +1 -22
  23. package/assets/css/tinymce/combo.less +1 -12
  24. package/assets/css/tinymce/fold.less +1 -12
  25. package/assets/css/tinymce/h.less +1 -10
  26. package/assets/css/tinymce/hr.less +1 -2
  27. package/assets/css/tinymce/img.less +1 -3
  28. package/assets/css/tinymce/imgpreview.less +1 -5
  29. package/assets/css/tinymce/latex.less +1 -6
  30. package/assets/css/tinymce/list.less +1 -12
  31. package/assets/css/tinymce/macro.less +1 -6
  32. package/assets/css/tinymce/nextpage.less +1 -14
  33. package/assets/css/tinymce/p.less +1 -2
  34. package/assets/css/tinymce/plugin.less +1 -0
  35. package/assets/css/tinymce/pz.less +1 -6
  36. package/assets/css/tinymce/qixue.less +1 -6
  37. package/assets/css/tinymce/quote.less +1 -2
  38. package/assets/css/tinymce/table.less +1 -12
  39. package/assets/css/tinymce/video.less +1 -18
  40. package/assets/css/var.less +1 -0
  41. package/assets/css/wiki/wiki-comments.less +1 -0
  42. package/assets/css/wiki/wiki-panel.less +1 -0
  43. package/assets/css/wiki/wiki-revisions.less +1 -0
  44. package/package.json +1 -1
  45. package/service/community.js +3 -3
  46. package/src/App.vue +8 -0
  47. package/src/Breadcrumb.vue +1 -0
  48. package/src/CommonFooter.vue +1 -0
  49. package/src/CommonHeader.vue +2 -0
  50. package/src/Footer.vue +1 -0
  51. package/src/LeftSideToggle.vue +1 -0
  52. package/src/LeftSidebar.vue +1 -0
  53. package/src/Main.vue +1 -0
  54. package/src/RightSideMsg.vue +1 -0
  55. package/src/RightSidebar.vue +1 -0
  56. package/src/SuspendCommon.vue +1 -0
  57. package/src/author/AuthorFans.vue +1 -0
  58. package/src/author/AuthorFollow.vue +1 -0
  59. package/src/author/AuthorGift.vue +1 -0
  60. package/src/author/AuthorHonor.vue +1 -0
  61. package/src/author/AuthorInfo.vue +1 -0
  62. package/src/author/AuthorLink.vue +1 -0
  63. package/src/author/AuthorMedals.vue +1 -0
  64. package/src/author/AuthorPosts.vue +1 -0
  65. package/src/author/AuthorRss.vue +1 -0
  66. package/src/author/AuthorTeams.vue +1 -0
  67. package/src/author/Avatar.vue +1 -0
  68. package/src/author/UserPop.vue +1 -0
  69. package/src/bread/Admin.vue +1 -0
  70. package/src/bread/AdminDrop.vue +1 -0
  71. package/src/bread/CommunityAdmin.vue +1 -0
  72. package/src/bread/Crumb.vue +1 -0
  73. package/src/bread/DesignTask.vue +1 -0
  74. package/src/bread/ListAdmin.vue +1 -0
  75. package/src/bread/MigrateCommunity.vue +1 -0
  76. package/src/bread/MoveToCommunityDialog.vue +1 -0
  77. package/src/comment/Avatar.vue +1 -0
  78. package/src/comment/CommentContent.vue +1 -0
  79. package/src/comment/CommentContentSimple.vue +1 -0
  80. package/src/comment/CommentInputForm.vue +1 -0
  81. package/src/comment/CommentWithReply.vue +1 -0
  82. package/src/comment/QuickReply.vue +1 -0
  83. package/src/comment/ReplyForReply.vue +1 -0
  84. package/src/comment/ReplyList.vue +1 -0
  85. package/src/filters/clientBy.vue +1 -0
  86. package/src/filters/markBy.vue +1 -0
  87. package/src/filters/menuBy.vue +1 -0
  88. package/src/filters/orderBy.vue +1 -0
  89. package/src/filters/tagBy.vue +1 -0
  90. package/src/filters/topicBy.vue +1 -0
  91. package/src/filters/versionBy.vue +1 -0
  92. package/src/filters/zlpBy.vue +1 -0
  93. package/src/footer/official.vue +1 -0
  94. package/src/header/alternate.vue +1 -0
  95. package/src/header/asset.vue +1 -0
  96. package/src/header/box.vue +2 -0
  97. package/src/header/box2.vue +1 -0
  98. package/src/header/client.vue +1 -0
  99. package/src/header/lang.vue +1 -0
  100. package/src/header/logo.vue +1 -0
  101. package/src/header/manage.vue +1 -0
  102. package/src/header/message.vue +1 -0
  103. package/src/header/nav.vue +1 -0
  104. package/src/header/search.vue +1 -0
  105. package/src/header/shop.vue +1 -0
  106. package/src/header/user.vue +1 -0
  107. package/src/header/userInfo.vue +1 -0
  108. package/src/header/vip.vue +1 -0
  109. package/src/interact/BoxcoinRecords.vue +1 -0
  110. package/src/interact/BoxcoinUser.vue +1 -0
  111. package/src/interact/Contributors.vue +1 -0
  112. package/src/interact/Fav.vue +1 -0
  113. package/src/interact/Homework.vue +1 -0
  114. package/src/interact/Like.vue +1 -0
  115. package/src/interact/QRcode.vue +4 -2
  116. package/src/interact/Rss.vue +1 -0
  117. package/src/interact/Share.vue +1 -0
  118. package/src/interact/WatchLater.vue +1 -0
  119. package/src/main.js +2 -0
  120. package/src/single/Author.vue +1 -0
  121. package/src/single/CmsSingle.vue +1 -0
  122. package/src/single/Collection.vue +1 -0
  123. package/src/single/Comment.vue +1 -0
  124. package/src/single/Creators.vue +1 -0
  125. package/src/single/PostCollection.vue +1 -0
  126. package/src/single/PostGuide.vue +1 -0
  127. package/src/single/PostHeader.vue +1 -0
  128. package/src/single/PostTopic.vue +1 -0
  129. package/src/single/PostVersion.vue +1 -0
  130. package/src/single/RightAffix.vue +1 -0
  131. package/src/single/SimpleThx.vue +1 -0
  132. package/src/single/Thx.vue +1 -0
  133. package/src/single/VersionDialog.vue +1 -0
  134. package/src/stories/components/StoryPropsTable.vue +1 -0
  135. package/src/stories/layout/StorybookShell.vue +1 -0
  136. package/src/stories/layout/SuspendCommonStage.vue +1 -0
  137. package/src/stories/single/AuthorStoryStage.vue +1 -0
  138. package/src/stories/single/CmsSingleStoryStage.vue +1 -0
  139. package/src/upload/UploadBanner.vue +159 -0
  140. package/src/wiki/GamePrice.vue +1 -0
  141. package/src/wiki/WikiComments.vue +3 -2
  142. package/src/wiki/WikiPanel.vue +1 -0
  143. package/src/wiki/WikiRevisions.vue +1 -0
  144. package/vue.config.js +9 -6
@@ -126,6 +126,7 @@ export default {
126
126
  };
127
127
  </script>
128
128
  <style lang="less">
129
+ /* src/single/PostVersion.vue */
129
130
  .c-post-version {
130
131
  .m-title {
131
132
  .flex;
@@ -91,6 +91,7 @@ export default {
91
91
  </script>
92
92
 
93
93
  <style lang="less">
94
+ /* src/single/RightAffix.vue */
94
95
  .closeLeftSidebar() {
95
96
  transition: 0.2s ease-in-out;
96
97
  transform: translateX(100%);
@@ -215,5 +215,6 @@ export default {
215
215
  </script>
216
216
 
217
217
  <style lang="less">
218
+ /* src/single/SimpleThx.vue */
218
219
  @import "../../assets/css/single/thx.less";
219
220
  </style>
@@ -286,5 +286,6 @@ export default {
286
286
  </script>
287
287
 
288
288
  <style lang="less">
289
+ /* src/single/Thx.vue */
289
290
  @import "../../assets/css/single/thx.less";
290
291
  </style>
@@ -188,6 +188,7 @@ export default {
188
188
  </script>
189
189
 
190
190
  <style lang="less">
191
+ /* src/single/VersionDialog.vue */
191
192
  .m-version-contrast-dialog {
192
193
  .el-dialog__body {
193
194
  padding: 0 20px 20px;
@@ -57,6 +57,7 @@ export default {
57
57
  </script>
58
58
 
59
59
  <style lang="less">
60
+ /* src/stories/components/StoryPropsTable.vue */
60
61
  .story-props-table {
61
62
  border-radius: 20px;
62
63
  background: rgba(255, 255, 255, 0.92);
@@ -193,6 +193,7 @@ export default {
193
193
  </script>
194
194
 
195
195
  <style lang="less">
196
+ /* src/stories/layout/StorybookShell.vue */
196
197
  .sb-shell {
197
198
  min-height: 100vh;
198
199
  background:
@@ -31,6 +31,7 @@ export default {
31
31
  </script>
32
32
 
33
33
  <style lang="less">
34
+ /* src/stories/layout/SuspendCommonStage.vue */
34
35
  .suspend-stage {
35
36
  min-height: 100vh;
36
37
  display: flex;
@@ -33,6 +33,7 @@ export default {
33
33
  </script>
34
34
 
35
35
  <style lang="less">
36
+ /* src/stories/single/AuthorStoryStage.vue */
36
37
  .story-author-stage {
37
38
  display: grid;
38
39
  gap: 24px;
@@ -37,6 +37,7 @@ export default {
37
37
  </script>
38
38
 
39
39
  <style lang="less">
40
+ /* src/stories/single/CmsSingleStoryStage.vue */
40
41
  .story-cmssingle-stage {
41
42
  display: grid;
42
43
  gap: 24px;
@@ -0,0 +1,159 @@
1
+ <template>
2
+ <div class="c-upload-banner">
3
+ <el-alert class="u-tip" :title="info" type="info" show-icon></el-alert>
4
+ <div v-if="data" class="u-upload" :style="uploadStyle">
5
+ <img :src="preview" />
6
+ <i class="u-upload-mask"></i>
7
+ <i class="u-upload-delete el-icon-delete" title="移除" @click="remove"></i>
8
+ </div>
9
+ <div v-else class="u-upload el-upload el-upload--picture-card" @click="select">
10
+ <i class="el-icon-plus"></i>
11
+ </div>
12
+ <input
13
+ class="u-upload-input"
14
+ type="file"
15
+ @change="upload"
16
+ ref="uploadInput"
17
+ accept=".jpg, .jpeg, .png, .gif, .bmp,.webp"
18
+ />
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ import { getThumbnail } from "@jx3box/jx3box-common/js/utils";
24
+ import { upload } from "../../service/cms.js";
25
+ export default {
26
+ name: "UploadBanner",
27
+ props: {
28
+ modelValue: {
29
+ type: String,
30
+ default: "",
31
+ },
32
+ content: {
33
+ type: String,
34
+ default: "",
35
+ },
36
+ info: {
37
+ type: String,
38
+ default: "用于展示tips",
39
+ },
40
+ size: {
41
+ type: [Array, Number],
42
+ default: 148,
43
+ },
44
+ maxSize: {
45
+ type: Number,
46
+ default: 10,
47
+ },
48
+ },
49
+ data() {
50
+ return {
51
+ data: this.modelValue || this.content || "",
52
+ };
53
+ },
54
+ emits: ["update:modelValue", "input"],
55
+ watch: {
56
+ modelValue(val) {
57
+ this.data = val;
58
+ },
59
+ content(val) {
60
+ this.data = val;
61
+ },
62
+ data(val) {
63
+ this.$emit("update:modelValue", val);
64
+ this.$emit("input", val);
65
+ },
66
+ },
67
+ computed: {
68
+ fileInput: function () {
69
+ return this.$refs.uploadInput;
70
+ },
71
+ preview() {
72
+ let size = Array.isArray(this.size) ? this.size : [this.size, this.size];
73
+ return getThumbnail(this.data, size, true);
74
+ },
75
+ uploadStyle() {
76
+ let size = Array.isArray(this.size) ? this.size : [this.size, this.size];
77
+ return {
78
+ width: size[0] + "px",
79
+ height: size[1] + "px",
80
+ };
81
+ },
82
+ },
83
+ methods: {
84
+ select() {
85
+ this.fileInput.dispatchEvent(
86
+ new MouseEvent("click", {
87
+ bubbles: true,
88
+ cancelable: true,
89
+ view: window,
90
+ })
91
+ );
92
+ },
93
+ upload() {
94
+ const file = this.fileInput.files[0];
95
+ if (!file) return;
96
+ if (file.size > this.maxSize * 1024 * 1024) {
97
+ this.$message.error("图片大小不能超过" + this.maxSize + "M");
98
+ return;
99
+ }
100
+ const formData = new FormData();
101
+ formData.append("file", file);
102
+ upload(formData).then((res) => {
103
+ this.data = res.data.data[0];
104
+ this.$message({
105
+ message: "上传成功",
106
+ type: "success",
107
+ });
108
+ });
109
+ },
110
+ remove() {
111
+ this.data = "";
112
+ },
113
+ },
114
+ };
115
+ </script>
116
+
117
+ <style lang="less">
118
+ .c-upload-banner {
119
+ .u-tip {
120
+ padding: 5px 15px;
121
+ }
122
+ .u-upload {
123
+ .pr;
124
+ .size(148px);
125
+ .mt(10px);
126
+ img {
127
+ .size(100%);
128
+ .y(bottom);
129
+ }
130
+ .u-upload-mask {
131
+ .none;
132
+ .pa;
133
+ .lt(0);
134
+ .size(100%);
135
+ background-color: rgba(0, 0, 0, 0.6);
136
+ }
137
+ .u-upload-delete {
138
+ .pa;
139
+ .lt(50%);
140
+ .size(24px);
141
+ .fz(24px);
142
+ padding: 40px;
143
+ transform: translate(-50%, -50%);
144
+ color: #fff;
145
+ .pointer;
146
+ .none;
147
+ }
148
+ &:hover {
149
+ .u-upload-mask,
150
+ .u-upload-delete {
151
+ .db;
152
+ }
153
+ }
154
+ }
155
+ .u-upload-input {
156
+ .none;
157
+ }
158
+ }
159
+ </style>
@@ -65,6 +65,7 @@ export default {
65
65
  </script>
66
66
 
67
67
  <style lang="less">
68
+ /* src/wiki/GamePrice.vue */
68
69
  .c-game-price {
69
70
  display: inline-flex;
70
71
  align-items: center;
@@ -12,7 +12,7 @@
12
12
  <span v-if="comments && !comments.length">💧 暂无评论</span>
13
13
  </div>
14
14
  <!-- 递归评论组件 -->
15
- <Comment :comments="comments" :source-id="sourceId" />
15
+ <wiki-comment :comments="comments" :source-id="sourceId" />
16
16
  <el-pagination
17
17
  class="u-pagination-box"
18
18
  background
@@ -188,7 +188,7 @@ export default {
188
188
  },
189
189
  components: {
190
190
  WikiPanel,
191
- Comment,
191
+ "wiki-comment": Comment,
192
192
  },
193
193
  watch: {
194
194
  sourceId: {
@@ -202,5 +202,6 @@ export default {
202
202
  </script>
203
203
 
204
204
  <style lang="less">
205
+ /* src/wiki/WikiComments.vue */
205
206
  @import "../../assets/css/wiki/wiki-comments.less";
206
207
  </style>
@@ -117,5 +117,6 @@ export default {
117
117
  </script>
118
118
 
119
119
  <style lang="less">
120
+ /* src/wiki/WikiPanel.vue */
120
121
  @import "../../assets/css/wiki/wiki-panel.less";
121
122
  </style>
@@ -123,5 +123,6 @@ export default {
123
123
  </script>
124
124
 
125
125
  <style lang="less">
126
+ /* src/wiki/WikiRevisions.vue */
126
127
  @import "../../assets/css/wiki/wiki-revisions.less";
127
128
  </style>
package/vue.config.js CHANGED
@@ -2,7 +2,6 @@ const path = require("path");
2
2
  const commonDomains = require("@jx3box/jx3box-common/data/jx3box.json");
3
3
 
4
4
  module.exports = {
5
-
6
5
  //❤️ define path for static files ~
7
6
  publicPath: process.env.NODE_ENV === "development" ? "/" : process.env.STATIC_PATH,
8
7
 
@@ -16,7 +15,6 @@ module.exports = {
16
15
  },
17
16
  },
18
17
 
19
-
20
18
  //⚛️ Proxy ~
21
19
  devServer: {
22
20
  host: "localhost",
@@ -25,6 +23,13 @@ module.exports = {
25
23
  proxy: buildEnvProxy(),
26
24
  allowedHosts: "all",
27
25
  port: process.env.DEV_PORT || 12028,
26
+ client: {
27
+ overlay: {
28
+ warnings: false,
29
+ errors: false,
30
+ runtimeErrors: false,
31
+ },
32
+ },
28
33
  },
29
34
 
30
35
  // 依赖包(element-plus/theme-chalk 等)会输出大量 Sass deprecation 警告
@@ -53,7 +58,6 @@ module.exports = {
53
58
 
54
59
  //❤️ Webpack configuration
55
60
  chainWebpack: (config) => {
56
-
57
61
  //💝 in-line small imgs ~
58
62
  config.module.rule("images").set("parser", {
59
63
  dataUrlCondition: {
@@ -70,7 +74,7 @@ module.exports = {
70
74
 
71
75
  config.externals = {
72
76
  tinyMCE: "tinyMCE",
73
- }
77
+ };
74
78
  },
75
79
  };
76
80
 
@@ -84,14 +88,13 @@ function addStyleResource(rule) {
84
88
  path.resolve(__dirname, "./node_modules/@jx3box/jx3box-common/css/mixin.less"),
85
89
  path.resolve(__dirname, "./assets/css/var.less"),
86
90
  path.resolve(__dirname, "./assets/css/mixin.less"),
87
- path.resolve(__dirname, "./node_modules/csslab/base.less"),
91
+ path.resolve(__dirname, "./node_modules/csslab/base.less")
88
92
  );
89
93
  rule.use("style-resource").loader("style-resources-loader").options({
90
94
  patterns: preload_styles,
91
95
  });
92
96
  }
93
97
 
94
-
95
98
  function normalizeTarget(value) {
96
99
  if (!value) return "";
97
100
  const trimmed = String(value).trim();