@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
@@ -0,0 +1,369 @@
1
+ export const mockPost = {
2
+ ID: 80449,
3
+ post_title: '轻剑驭风版本攻略示例',
4
+ post_type: 'bbs',
5
+ post_author: 8,
6
+ author_info: {
7
+ display_name: '薄嘴唇靓仔',
8
+ },
9
+ post_status: 'publish',
10
+ visible: 0,
11
+ original: 1,
12
+ client: 'std',
13
+ is_wujie: 1,
14
+ post_date: '2026-03-10T10:00:00+08:00',
15
+ post_modified: '2026-03-10T12:00:00+08:00',
16
+ post_collection: 1,
17
+ collection_collapse: true,
18
+ _check: true,
19
+ comment: 0,
20
+ anonymous: 0,
21
+ post_content: `
22
+ <h2>版本概览</h2>
23
+ <p>这是用于 Storybook 展示的示例内容,方便在组件协作时快速查看正文渲染、目录和互动区域。</p>
24
+ <h3>核心思路</h3>
25
+ <p>以稳定输出和阅读体验为主,保留标题、段落、列表和分隔块。</p>
26
+ <ul>
27
+ <li>技能循环以稳定为主</li>
28
+ <li>装备搭配偏泛用场景</li>
29
+ <li>正文支持目录生成与分页渲染</li>
30
+ </ul>
31
+ <h3>配装建议</h3>
32
+ <p>优先保证命中与会心,其次根据副本环境调整破防与加速。</p>
33
+ `,
34
+ };
35
+
36
+ export const mockStat = {
37
+ views: 24567,
38
+ };
39
+
40
+ export const mockCollection = {
41
+ title: '轻剑驭风小册',
42
+ posts: [
43
+ { id: 80449, type: 'bbs', title: '轻剑驭风版本攻略示例' },
44
+ { id: 80450, type: 'bbs', title: '配装与输出循环拆解' },
45
+ { id: 80451, type: 'custom', title: '团队实战思路补充', url: 'https://www.jx3box.com' },
46
+ ],
47
+ };
48
+
49
+ export const mockCreators = {
50
+ super_author: {
51
+ ID: 8,
52
+ display_name: '薄嘴唇靓仔',
53
+ user_avatar: 'https://cdn.jx3box.com/upload/avatar/2022/3/2/8_9860765.png',
54
+ },
55
+ other_authors: [
56
+ {
57
+ author_id: 17,
58
+ label: '校对',
59
+ status: 1,
60
+ post_author_info: {
61
+ ID: 17,
62
+ display_name: '藏剑校对君',
63
+ user_avatar: 'https://cdn.jx3box.com/upload/avatar/2022/3/2/8_9860765.png',
64
+ },
65
+ },
66
+ {
67
+ author_id: 26,
68
+ label: '补充说明',
69
+ status: 1,
70
+ post_author_info: {
71
+ ID: 26,
72
+ display_name: '副本小助手',
73
+ user_avatar: 'https://cdn.jx3box.com/upload/avatar/2022/3/2/8_9860765.png',
74
+ },
75
+ },
76
+ ],
77
+ };
78
+
79
+ export const mockUserInfo = {
80
+ id: 8,
81
+ ID: 8,
82
+ display_name: '薄嘴唇靓仔',
83
+ user_avatar: 'https://cdn.jx3box.com/upload/avatar/2022/3/2/8_9860765.png',
84
+ user_avatar_frame: 'gold',
85
+ user_bio: '擅长版本攻略与机制拆解,长期更新实战内容。',
86
+ experience: 16800,
87
+ is_pro: true,
88
+ is_pre: false,
89
+ sign: true,
90
+ user_nickname: '薄嘴唇靓仔',
91
+ weibo_name: 'jx3box-demo',
92
+ weibo_id: 'jx3box-demo',
93
+ github_name: 'JX3BOX',
94
+ tv_type: 'bilibili',
95
+ tv_id: '2066064028',
96
+ };
97
+
98
+ export const mockHonor = {
99
+ ranking: 1,
100
+ year: '2025',
101
+ val: 'storybook_honor',
102
+ honor_info: {
103
+ url: '/rank/1',
104
+ only: false,
105
+ prefix: '年度',
106
+ ranking: [[1, 10, '金榜']],
107
+ suffix: '作者',
108
+ color: '#ffffff',
109
+ img: 'default',
110
+ img_ext: 'png',
111
+ },
112
+ };
113
+
114
+ export const mockUserPosts = [
115
+ { ID: 80449, post_type: 'bbs', post_title: '轻剑驭风版本攻略示例' },
116
+ { ID: 80450, post_type: 'bbs', post_title: '配装与输出循环拆解' },
117
+ { ID: 80451, post_type: 'bbs', post_title: '副本环境适配建议' },
118
+ ];
119
+
120
+ export const mockMedals = [
121
+ { id: 1, medal: 'storyboard-star', medal_desc: '年度创作者', medal_url: '/medal/1' },
122
+ { id: 2, medal: 'storyboard-ace', medal_desc: '高质量攻略作者', medal_url: '/medal/2' },
123
+ ];
124
+
125
+ export const mockTeams = [
126
+ {
127
+ team_id: 1001,
128
+ team_name: '诗画印象',
129
+ team_server: '蝶恋花',
130
+ team_logo: 'https://cdn.jx3box.com/image/team/logo.png',
131
+ },
132
+ ];
133
+
134
+ export const mockCommentPower = {
135
+ allow: true,
136
+ uid: 8,
137
+ is_author: 1,
138
+ is_editor: 1,
139
+ is_white: false,
140
+ article_open_white: 1,
141
+ can_del: true,
142
+ };
143
+
144
+ export const mockCommentPage = {
145
+ data: [
146
+ {
147
+ id: 9001,
148
+ userId: 8,
149
+ displayName: '薄嘴唇靓仔',
150
+ avatar: mockUserInfo.user_avatar,
151
+ user_avatar_frame: '',
152
+ commentDate: '2026-03-10 12:00',
153
+ content: '<p>这套 story 的目的是让组件在 Storybook 里有完整上下文,不再只看单个孤立节点。</p>',
154
+ attachments: '[]',
155
+ likes: 12,
156
+ is_likes: 0,
157
+ is_top: 1,
158
+ is_star: 1,
159
+ is_secret: 0,
160
+ is_white: 1,
161
+ reply: [
162
+ {
163
+ id: 9101,
164
+ userId: 17,
165
+ displayName: '藏剑校对君',
166
+ avatar: mockCreators.other_authors[0].post_author_info.user_avatar,
167
+ user_avatar_frame: '',
168
+ commentDate: '2026-03-10 12:10',
169
+ content: '<p>目录、正文、评论和互动区已经能在同一个画面里联动查看了。</p>',
170
+ attachments: '[]',
171
+ likes: 3,
172
+ is_likes: 0,
173
+ is_top: 0,
174
+ is_star: 0,
175
+ is_secret: 0,
176
+ is_white: 0,
177
+ },
178
+ ],
179
+ },
180
+ ],
181
+ page: {
182
+ index: 1,
183
+ pageSize: 10,
184
+ pageTotal: 1,
185
+ total: 1,
186
+ },
187
+ };
188
+
189
+ export const mockBoxcoinConfig = {
190
+ limit: {
191
+ admin_max: 1000,
192
+ admin_min: 10,
193
+ admin_points: [10, 50, 100, 500],
194
+ user_points: [10, 20, 50, 100],
195
+ total_limit: 10000,
196
+ },
197
+ asManagerBoxCoinRemain: 4800,
198
+ asManagerBoxCoinTotal: 10000,
199
+ asPostTypeBoxcoinHasUsedTotalAtCurrentYear: 1200,
200
+ asUserBoxCoinRemainAll: 300,
201
+ asUserBoxCoinRemainStd: 500,
202
+ asUserBoxCoinRemainOrigin: 120,
203
+ };
204
+
205
+ export const mockBoxcoinRecords = {
206
+ data: [
207
+ {
208
+ id: 1,
209
+ operate_user_id: 17,
210
+ user_id: 8,
211
+ count: 50,
212
+ ext_take_off_count: 0,
213
+ ext2_take_off_count: 0,
214
+ is_user_gift: 1,
215
+ remark: '感谢持续更新,内容很有帮助。',
216
+ created_at: '2026-03-10 12:20',
217
+ ext_operate_user_info: {
218
+ id: 17,
219
+ avatar: mockUserInfo.user_avatar,
220
+ display_name: '盒友甲',
221
+ },
222
+ ext_user_info: {
223
+ avatar: mockUserInfo.user_avatar,
224
+ display_name: mockUserInfo.display_name,
225
+ },
226
+ },
227
+ ],
228
+ page: {
229
+ total: 1,
230
+ },
231
+ fromManager: 0,
232
+ fromUser: 50,
233
+ };
234
+
235
+ export const mockSearchUser = {
236
+ ID: 8,
237
+ display_name: '薄嘴唇靓仔',
238
+ user_avatar: mockUserInfo.user_avatar,
239
+ };
240
+
241
+ export const mockCommitHistories = [
242
+ {
243
+ id: 301,
244
+ commit_hash: 'story-hash-003',
245
+ created_at: '2026-03-10 18:30',
246
+ content: `
247
+ <h2>版本概览</h2>
248
+ <p>第三版补充了实战环境下的起手建议,并优化了小药说明。</p>
249
+ <h3>核心思路</h3>
250
+ <p>优先确保循环稳定,再根据副本站位调整爆发时机。</p>
251
+ `,
252
+ },
253
+ {
254
+ id: 302,
255
+ commit_hash: 'story-hash-002',
256
+ created_at: '2026-03-09 21:10',
257
+ content: `
258
+ <h2>版本概览</h2>
259
+ <p>第二版补充了配装对比表,并调整了目录结构。</p>
260
+ <h3>核心思路</h3>
261
+ <p>兼顾命中与会心,在多数副本环境里更易复用。</p>
262
+ `,
263
+ },
264
+ {
265
+ id: 303,
266
+ commit_hash: 'story-hash-001',
267
+ created_at: '2026-03-08 15:00',
268
+ content: `
269
+ <h2>版本概览</h2>
270
+ <p>初版主要建立正文结构,包含配装建议与循环说明。</p>
271
+ <h3>核心思路</h3>
272
+ <p>先保证阅读完整度,再逐步补足细节。</p>
273
+ `,
274
+ },
275
+ ];
276
+
277
+ export const mockWikiPost = {
278
+ type: 'achievement',
279
+ source_id: 1001,
280
+ post: {
281
+ title: '25 人普通西津渡首领机制',
282
+ level: 4,
283
+ updated: '2026-03-11T20:30:00+08:00',
284
+ },
285
+ users: [
286
+ {
287
+ id: 8,
288
+ nickname: '薄嘴唇靓仔',
289
+ avatar: 'https://cdn.jx3box.com/upload/avatar/2022/3/2/8_9860765.png',
290
+ },
291
+ {
292
+ id: 17,
293
+ nickname: '藏剑校对君',
294
+ avatar: 'https://cdn.jx3box.com/upload/avatar/2022/3/2/8_9860765.png',
295
+ },
296
+ ],
297
+ };
298
+
299
+ export const mockWikiStat = {
300
+ views: 32145,
301
+ };
302
+
303
+ export const mockWikiComments = {
304
+ list: [
305
+ {
306
+ id: 1,
307
+ parent_id: 0,
308
+ user_id: 8,
309
+ user_nickname: '薄嘴唇靓仔',
310
+ content: '<p>这条评论用于展示百科评论区的主楼样式、置顶和加精状态。</p>',
311
+ updated: '2026-03-11 20:40:00',
312
+ is_top: 1,
313
+ is_star: 1,
314
+ children: [
315
+ {
316
+ id: 2,
317
+ parent_id: 1,
318
+ user_id: 17,
319
+ user_nickname: '藏剑校对君',
320
+ content: '<p>回复楼层会通过递归组件继续渲染,方便在 Storybook 里检查层级样式。</p>',
321
+ updated: '2026-03-11 20:55:00',
322
+ is_top: 0,
323
+ is_star: 0,
324
+ children: [],
325
+ },
326
+ ],
327
+ },
328
+ {
329
+ id: 3,
330
+ parent_id: 0,
331
+ user_id: 26,
332
+ user_nickname: '副本小助手',
333
+ content: '<p>第二条评论保留普通状态,用来对比按钮和时间信息。</p>',
334
+ updated: '2026-03-11 21:10:00',
335
+ is_top: 0,
336
+ is_star: 0,
337
+ children: [],
338
+ },
339
+ ],
340
+ page: 1,
341
+ total: 2,
342
+ };
343
+
344
+ export const mockWikiRevisions = [
345
+ {
346
+ id: 201,
347
+ source_id: 1001,
348
+ updated: '2026-03-11 21:00:00',
349
+ user_id: 8,
350
+ user_nickname: '薄嘴唇靓仔',
351
+ remark: '补充首领技能预警时序。',
352
+ },
353
+ {
354
+ id: 202,
355
+ source_id: 1001,
356
+ updated: '2026-03-10 19:20:00',
357
+ user_id: 17,
358
+ user_nickname: '藏剑校对君',
359
+ remark: '修正文案并补充图片说明。',
360
+ },
361
+ {
362
+ id: 203,
363
+ source_id: 1001,
364
+ updated: '2026-03-09 16:45:00',
365
+ user_id: 26,
366
+ user_nickname: '副本小助手',
367
+ remark: '创建初版机制条目。',
368
+ },
369
+ ];
@@ -0,0 +1,51 @@
1
+ import UserPop from '../../author/UserPop.vue';
2
+ import StoryPropsTable from '../components/StoryPropsTable.vue';
3
+
4
+ const meta = {
5
+ title: 'Other/UserPop',
6
+ component: UserPop,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ },
10
+ };
11
+
12
+ export default meta;
13
+
14
+ export const Default = {
15
+ render: () => ({
16
+ components: { UserPop, StoryPropsTable },
17
+ data() {
18
+ return {
19
+ visible: false,
20
+ propsInfo: [
21
+ { name: 'title', type: 'String', default: '""', description: '弹窗标题。' },
22
+ { name: 'show', type: 'Boolean', default: 'false', description: '外部控制弹窗开关。' },
23
+ ],
24
+ };
25
+ },
26
+ methods: {
27
+ switchUserPop(val) {
28
+ this.visible = val;
29
+ },
30
+ openDialog() {
31
+ this.visible = false;
32
+ this.$nextTick(() => {
33
+ this.visible = true;
34
+ });
35
+ },
36
+ },
37
+ template: `
38
+ <div style="display: grid; gap: 24px;">
39
+ <section style="border-radius: 20px; background: rgba(255,255,255,0.92); padding: 24px; box-shadow: 0 24px 60px rgba(15,23,42,0.08);">
40
+ <h2 style="margin: 0; font-size: 28px; color: #0f172a;">UserPop</h2>
41
+ <p style="margin-top: 12px; color: #475569; line-height: 1.8;">用于搜索并确认用户的弹窗组件。</p>
42
+ <el-button type="primary" @click="openDialog">重新打开弹窗</el-button>
43
+ </section>
44
+ <StoryPropsTable title="UserPop" description="搜索用户弹窗的入参说明。" :items="propsInfo" />
45
+ <UserPop title="选择用户" :show="visible" @switchUserPop="switchUserPop">
46
+ 可以输入 UID 或昵称进行搜索。
47
+ </UserPop>
48
+ </div>
49
+ `,
50
+ }),
51
+ };
@@ -0,0 +1,19 @@
1
+ import SingleAuthor from '../../single/Author.vue';
2
+ import AuthorStoryStage from './AuthorStoryStage.vue';
3
+
4
+ const meta = {
5
+ title: 'Single/Author',
6
+ component: SingleAuthor,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ },
10
+ };
11
+
12
+ export default meta;
13
+
14
+ export const Default = {
15
+ render: () => ({
16
+ components: { AuthorStoryStage },
17
+ template: `<AuthorStoryStage />`,
18
+ }),
19
+ };
@@ -0,0 +1,103 @@
1
+ <template>
2
+ <div class="story-author-stage">
3
+ <section class="story-author-stage__panel">
4
+ <div class="story-author-stage__preview">
5
+ <SingleAuthor :uid="8" />
6
+ </div>
7
+ </section>
8
+ <section class="story-author-stage__props">
9
+ <StoryPropsTable title="Author" description="详情页作者侧边栏整合组件。" :items="propsInfo" />
10
+ </section>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import SingleAuthor from "../../single/Author.vue";
16
+ import StoryPropsTable from "../components/StoryPropsTable.vue";
17
+
18
+ export default {
19
+ name: "AuthorStoryStage",
20
+ components: {
21
+ SingleAuthor,
22
+ StoryPropsTable,
23
+ },
24
+ data: function () {
25
+ return {
26
+ propsInfo: [
27
+ { name: "uid", type: "Number | String", default: "0", required: true, description: "作者 UID。" },
28
+ { name: "anonymous", type: "Number | String", default: "0", description: "匿名模式下不展示完整信息。" },
29
+ ],
30
+ };
31
+ },
32
+ };
33
+ </script>
34
+
35
+ <style lang="less">
36
+ .story-author-stage {
37
+ display: grid;
38
+ gap: 24px;
39
+ justify-items: center;
40
+ padding: 12px 0 0;
41
+ }
42
+
43
+ .story-author-stage__panel,
44
+ .story-author-stage__props {
45
+ width: min(100%, 960px);
46
+ }
47
+
48
+ .story-author-stage__preview,
49
+ .story-author-stage__props .story-props-table {
50
+ border-radius: 20px;
51
+ background: rgba(255, 255, 255, 0.92);
52
+ box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
53
+ }
54
+
55
+ .story-author-stage__preview {
56
+ padding: 32px;
57
+ }
58
+
59
+ .story-author-stage__preview .c-author {
60
+ max-width: 320px;
61
+ margin: 0 auto;
62
+ }
63
+
64
+ .story-author-stage__preview .u-label {
65
+ display: flex;
66
+ align-items: center;
67
+ gap: 8px;
68
+ }
69
+
70
+ .story-author-stage__preview .u-label img,
71
+ .story-author-stage__preview .u-label svg {
72
+ width: 16px;
73
+ height: 16px;
74
+ flex: 0 0 16px;
75
+ }
76
+
77
+ .story-author-stage__preview .u-superauthor img {
78
+ width: 16px;
79
+ height: 16px;
80
+ }
81
+
82
+ .story-author-stage__preview .u-medal-img {
83
+ width: 20px;
84
+ height: 20px;
85
+ }
86
+
87
+ .story-author-stage__preview .u-more img,
88
+ .story-author-stage__preview .u-more svg,
89
+ .story-author-stage__preview .u-icon {
90
+ width: 12px;
91
+ height: 12px;
92
+ flex: 0 0 12px;
93
+ }
94
+
95
+ .story-author-stage__props {
96
+ display: flex;
97
+ justify-content: center;
98
+ }
99
+
100
+ .story-author-stage__props .story-props-table {
101
+ width: min(100%, 760px);
102
+ }
103
+ </style>
@@ -0,0 +1,19 @@
1
+ import CmsSingle from '../../single/CmsSingle.vue';
2
+ import CmsSingleStoryStage from './CmsSingleStoryStage.vue';
3
+
4
+ const meta = {
5
+ title: 'Single/CmsSingle',
6
+ component: CmsSingle,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ },
10
+ };
11
+
12
+ export default meta;
13
+
14
+ export const Default = {
15
+ render: () => ({
16
+ components: { CmsSingleStoryStage },
17
+ template: `<CmsSingleStoryStage />`,
18
+ }),
19
+ };
@@ -0,0 +1,118 @@
1
+ <template>
2
+ <div class="story-cmssingle-stage">
3
+ <section class="story-cmssingle-stage__panel">
4
+ <div class="story-cmssingle-stage__preview">
5
+ <CmsSingle :post="mockPost" :stat="mockStat" :show-thx="false" />
6
+ </div>
7
+ </section>
8
+ <section class="story-cmssingle-stage__props">
9
+ <StoryPropsTable title="CmsSingle" description="单页详情整合容器。" :items="propsInfo" />
10
+ </section>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import CmsSingle from "../../single/CmsSingle.vue";
16
+ import StoryPropsTable from "../components/StoryPropsTable.vue";
17
+ import { mockPost, mockStat } from "../mockData";
18
+
19
+ export default {
20
+ name: "CmsSingleStoryStage",
21
+ components: {
22
+ CmsSingle,
23
+ StoryPropsTable,
24
+ },
25
+ data: function () {
26
+ return {
27
+ mockPost,
28
+ mockStat,
29
+ propsInfo: [
30
+ { name: "post", type: "Object", default: "{}", required: true, description: "完整文章数据对象。" },
31
+ { name: "stat", type: "Object", default: "{}", description: "统计信息对象。" },
32
+ { name: "showThx", type: "Boolean", default: "true", description: "是否展示打赏互动区。" },
33
+ ],
34
+ };
35
+ },
36
+ };
37
+ </script>
38
+
39
+ <style lang="less">
40
+ .story-cmssingle-stage {
41
+ display: grid;
42
+ gap: 24px;
43
+ justify-items: center;
44
+ padding: 12px 0 0;
45
+ }
46
+
47
+ .story-cmssingle-stage__panel,
48
+ .story-cmssingle-stage__props {
49
+ width: min(100%, 1120px);
50
+ }
51
+
52
+ .story-cmssingle-stage__preview,
53
+ .story-cmssingle-stage__props .story-props-table {
54
+ border-radius: 20px;
55
+ background: rgba(255, 255, 255, 0.92);
56
+ box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
57
+ }
58
+
59
+ .story-cmssingle-stage__preview {
60
+ padding: 24px 32px 32px;
61
+ }
62
+
63
+ .story-cmssingle-stage__preview .m-single-box {
64
+ max-width: 100%;
65
+ }
66
+
67
+ .story-cmssingle-stage__preview .m-single-info svg,
68
+ .story-cmssingle-stage__preview .m-single-info img,
69
+ .story-cmssingle-stage__preview .w-creators img,
70
+ .story-cmssingle-stage__preview .w-collection svg,
71
+ .story-cmssingle-stage__preview .w-thx-panel svg,
72
+ .story-cmssingle-stage__preview .w-thx-panel img,
73
+ .story-cmssingle-stage__preview .w-boxcoin-records svg,
74
+ .story-cmssingle-stage__preview .w-boxcoin-records img,
75
+ .story-cmssingle-stage__preview .m-comment-box svg,
76
+ .story-cmssingle-stage__preview .m-comment-box img {
77
+ max-width: none;
78
+ }
79
+
80
+ .story-cmssingle-stage__preview .m-single-info .u-author svg,
81
+ .story-cmssingle-stage__preview .m-single-info .u-icon-podate svg,
82
+ .story-cmssingle-stage__preview .m-single-info .u-icon-modate svg {
83
+ width: 16px;
84
+ height: 16px;
85
+ }
86
+
87
+ .story-cmssingle-stage__preview .w-creators .u-avatar,
88
+ .story-cmssingle-stage__preview .w-boxcoin-records .u-user-avatar,
89
+ .story-cmssingle-stage__preview .m-comment-box .u-avatar img {
90
+ width: 48px;
91
+ height: 48px;
92
+ object-fit: cover;
93
+ }
94
+
95
+ .story-cmssingle-stage__preview .w-collection .el-icon,
96
+ .story-cmssingle-stage__preview .w-thx-panel .u-icon,
97
+ .story-cmssingle-stage__preview .w-thx-panel .el-icon,
98
+ .story-cmssingle-stage__preview .w-boxcoin-records .el-icon,
99
+ .story-cmssingle-stage__preview .m-comment-box .el-icon {
100
+ width: 16px;
101
+ height: 16px;
102
+ font-size: 16px;
103
+ }
104
+
105
+ .story-cmssingle-stage__preview .w-thx-panel .u-icon {
106
+ width: 26px;
107
+ height: 26px;
108
+ }
109
+
110
+ .story-cmssingle-stage__props {
111
+ display: flex;
112
+ justify-content: center;
113
+ }
114
+
115
+ .story-cmssingle-stage__props .story-props-table {
116
+ width: min(100%, 820px);
117
+ }
118
+ </style>