@fangzhongya/vue-archive 0.0.3-9 → 0.0.4-2

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 (146) hide show
  1. package/LICENSE +25 -25
  2. package/README.md +208 -206
  3. package/dist/node/index.cjs +2627 -66301
  4. package/dist/node/index.d.ts +103 -103
  5. package/dist/node/index.js +2608 -66305
  6. package/dist/node_modules/.pnpm/@codemirror_autocomplete@6.4.2_nhpyweho5i63az4d4hsuvsa7gy/node_modules/@codemirror/autocomplete/dist/index.cjs +1 -0
  7. package/dist/node_modules/.pnpm/@codemirror_autocomplete@6.4.2_nhpyweho5i63az4d4hsuvsa7gy/node_modules/@codemirror/autocomplete/dist/index.js +1243 -0
  8. package/dist/node_modules/.pnpm/@codemirror_commands@6.2.2/node_modules/@codemirror/commands/dist/index.cjs +1 -0
  9. package/dist/node_modules/.pnpm/@codemirror_commands@6.2.2/node_modules/@codemirror/commands/dist/index.js +797 -0
  10. package/dist/node_modules/.pnpm/@codemirror_lang-css@6.1.1_@codemirror_view@6.9.2/node_modules/@codemirror/lang-css/dist/index.cjs +1 -0
  11. package/dist/node_modules/.pnpm/@codemirror_lang-css@6.1.1_@codemirror_view@6.9.2/node_modules/@codemirror/lang-css/dist/index.js +809 -0
  12. package/dist/node_modules/.pnpm/@codemirror_lang-html@6.4.2/node_modules/@codemirror/lang-html/dist/index.cjs +1 -0
  13. package/dist/node_modules/.pnpm/@codemirror_lang-html@6.4.2/node_modules/@codemirror/lang-html/dist/index.js +652 -0
  14. package/dist/node_modules/.pnpm/@codemirror_lang-javascript@6.1.4/node_modules/@codemirror/lang-javascript/dist/index.cjs +13 -0
  15. package/dist/node_modules/.pnpm/@codemirror_lang-javascript@6.1.4/node_modules/@codemirror/lang-javascript/dist/index.js +269 -0
  16. package/dist/node_modules/.pnpm/@codemirror_language@6.6.0/node_modules/@codemirror/language/dist/index.cjs +1 -0
  17. package/dist/node_modules/.pnpm/@codemirror_language@6.6.0/node_modules/@codemirror/language/dist/index.js +1239 -0
  18. package/dist/node_modules/.pnpm/@codemirror_lint@6.2.0/node_modules/@codemirror/lint/dist/index.cjs +1 -0
  19. package/dist/node_modules/.pnpm/@codemirror_lint@6.2.0/node_modules/@codemirror/lint/dist/index.js +417 -0
  20. package/dist/node_modules/.pnpm/@codemirror_search@6.2.3/node_modules/@codemirror/search/dist/index.cjs +2 -0
  21. package/dist/node_modules/.pnpm/@codemirror_search@6.2.3/node_modules/@codemirror/search/dist/index.js +830 -0
  22. package/dist/node_modules/.pnpm/@codemirror_state@6.2.0/node_modules/@codemirror/state/dist/index.cjs +5 -0
  23. package/dist/node_modules/.pnpm/@codemirror_state@6.2.0/node_modules/@codemirror/state/dist/index.js +2645 -0
  24. package/dist/node_modules/.pnpm/@codemirror_view@6.9.2/node_modules/@codemirror/view/dist/index.cjs +4 -0
  25. package/dist/node_modules/.pnpm/@codemirror_view@6.9.2/node_modules/@codemirror/view/dist/index.js +6207 -0
  26. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.8-17/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.cjs +1 -0
  27. package/dist/node_modules/.pnpm/@fangzhongya_utils@0.0.8-17/node_modules/@fangzhongya/utils/dist/chunk-NCSN3MC5.js +13 -0
  28. package/dist/node_modules/.pnpm/@lezer_common@1.0.2/node_modules/@lezer/common/dist/index.cjs +1 -0
  29. package/dist/node_modules/.pnpm/@lezer_common@1.0.2/node_modules/@lezer/common/dist/index.js +1487 -0
  30. package/dist/node_modules/.pnpm/@lezer_css@1.1.1/node_modules/@lezer/css/dist/index.es.cjs +1 -0
  31. package/dist/node_modules/.pnpm/@lezer_css@1.1.1/node_modules/@lezer/css/dist/index.es.js +116 -0
  32. package/dist/node_modules/.pnpm/@lezer_highlight@1.1.3/node_modules/@lezer/highlight/dist/index.cjs +1 -0
  33. package/dist/node_modules/.pnpm/@lezer_highlight@1.1.3/node_modules/@lezer/highlight/dist/index.js +447 -0
  34. package/dist/node_modules/.pnpm/@lezer_html@1.3.3/node_modules/@lezer/html/dist/index.es.cjs +1 -0
  35. package/dist/node_modules/.pnpm/@lezer_html@1.3.3/node_modules/@lezer/html/dist/index.es.js +310 -0
  36. package/dist/node_modules/.pnpm/@lezer_javascript@1.4.1/node_modules/@lezer/javascript/dist/index.es.cjs +1 -0
  37. package/dist/node_modules/.pnpm/@lezer_javascript@1.4.1/node_modules/@lezer/javascript/dist/index.es.js +130 -0
  38. package/dist/node_modules/.pnpm/@lezer_lr@1.3.3/node_modules/@lezer/lr/dist/index.cjs +1 -0
  39. package/dist/node_modules/.pnpm/@lezer_lr@1.3.3/node_modules/@lezer/lr/dist/index.js +1173 -0
  40. package/dist/node_modules/.pnpm/codemirror@6.0.1/node_modules/codemirror/dist/index.cjs +1 -0
  41. package/dist/node_modules/.pnpm/codemirror@6.0.1/node_modules/codemirror/dist/index.js +40 -0
  42. package/dist/node_modules/.pnpm/crelt@1.0.5/node_modules/crelt/index.es.cjs +1 -0
  43. package/dist/node_modules/.pnpm/crelt@1.0.5/node_modules/crelt/index.es.js +31 -0
  44. package/dist/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/smartquotes.cjs +1 -1
  45. package/dist/node_modules/.pnpm/markdown-it@13.0.1/node_modules/markdown-it/lib/rules_core/smartquotes.js +42 -42
  46. package/dist/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/parser-typescript.cjs +1 -1
  47. package/dist/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/parser-typescript.js +13 -14
  48. package/dist/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/standalone.cjs +5 -5
  49. package/dist/node_modules/.pnpm/prettier@2.8.4/node_modules/prettier/standalone.js +7 -7
  50. package/dist/node_modules/.pnpm/style-mod@4.0.2/node_modules/style-mod/src/style-mod.cjs +3 -0
  51. package/dist/node_modules/.pnpm/style-mod@4.0.2/node_modules/style-mod/src/style-mod.js +106 -0
  52. package/dist/node_modules/.pnpm/w3c-keyname@2.2.6/node_modules/w3c-keyname/index.es.cjs +1 -0
  53. package/dist/node_modules/.pnpm/w3c-keyname@2.2.6/node_modules/w3c-keyname/index.es.js +96 -0
  54. package/dist/packages/components/compo/top.cjs +1 -1
  55. package/dist/packages/components/compo/top.d.ts +1 -1
  56. package/dist/packages/components/compo/top.js +41 -40
  57. package/dist/packages/components/test/top.cjs +1 -1
  58. package/dist/packages/components/test/top.d.ts +1 -1
  59. package/dist/packages/components/test/top.js +52 -51
  60. package/dist/packages/components/use/code.cjs +3 -5
  61. package/dist/packages/components/use/code.js +26 -33
  62. package/dist/packages/components/use/codemirror.cjs +1 -0
  63. package/dist/packages/components/use/codemirror.d.ts +13 -0
  64. package/dist/packages/components/use/codemirror.js +35 -0
  65. package/dist/packages/components/use/index.cjs +1 -1
  66. package/dist/packages/components/use/index.js +3 -3
  67. package/dist/packages/components/use/retrie/choice/index.vue.cjs +1 -1
  68. package/dist/packages/components/use/retrie/choice/index.vue.js +1 -1
  69. package/dist/packages/components/use/retrie/function/index.vue.cjs +2 -2
  70. package/dist/packages/components/use/retrie/function/index.vue.js +47 -37
  71. package/dist/packages/components/use/retrie/slot/index.vue.cjs +1 -1
  72. package/dist/packages/components/use/retrie/slot/index.vue.js +36 -27
  73. package/dist/packages/config.cjs +1 -1
  74. package/dist/packages/config.js +1 -1
  75. package/dist/packages/page/comprops/index.vue2.cjs +1 -1
  76. package/dist/packages/page/comprops/index.vue2.js +66 -47
  77. package/dist/packages/router/file.cjs +1 -0
  78. package/dist/packages/router/file.d.ts +10 -0
  79. package/dist/packages/router/file.js +35 -0
  80. package/dist/packages/router/index.cjs +1 -1
  81. package/dist/packages/router/index.d.ts +1 -0
  82. package/dist/packages/router/index.js +62 -91
  83. package/dist/packages/utils/common.cjs +1 -1
  84. package/dist/packages/utils/common.js +4 -4
  85. package/dist/packages/utils/glob.cjs +1 -1
  86. package/dist/packages/utils/glob.js +6 -6
  87. package/dist/packages/utils/index.cjs +1 -1
  88. package/dist/packages/utils/index.js +2 -2
  89. package/dist/style.css +1 -1
  90. package/package.json +29 -17
  91. package/dist/markdown-it.d.ts +0 -1
  92. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/index.cjs +0 -1
  93. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/index.js +0 -12
  94. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/block-parser.cjs +0 -1
  95. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/block-parser.js +0 -17
  96. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/index.cjs +0 -1
  97. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/index.js +0 -38
  98. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/source-parser.cjs +0 -1
  99. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/source-parser.js +0 -24
  100. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/spec-parser.cjs +0 -1
  101. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/spec-parser.js +0 -14
  102. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/description.cjs +0 -2
  103. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/description.js +0 -24
  104. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/name.cjs +0 -1
  105. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/name.js +0 -53
  106. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/tag.cjs +0 -1
  107. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/tag.js +0 -14
  108. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/type.cjs +0 -2
  109. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/parser/tokenizers/type.js +0 -36
  110. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/primitives.cjs +0 -1
  111. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/primitives.js +0 -7
  112. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/align.cjs +0 -1
  113. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/align.js +0 -2
  114. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/crlf.cjs +0 -1
  115. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/crlf.js +0 -1
  116. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/indent.cjs +0 -1
  117. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/transforms/indent.js +0 -1
  118. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/util.cjs +0 -1
  119. package/dist/node_modules/.pnpm/comment-parser@1.3.1/node_modules/comment-parser/es6/util.js +0 -28
  120. package/dist/node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.cjs +0 -3
  121. package/dist/node_modules/.pnpm/es-module-lexer@1.1.1/node_modules/es-module-lexer/dist/lexer.js +0 -52
  122. package/dist/packages/components/md/markdown-it.d.ts +0 -1
  123. package/dist/packages/components/use/prettier.d.ts +0 -7
  124. package/dist/prettier.d.ts +0 -7
  125. package/dist/src/vite-env.d.ts +0 -1
  126. package/dist/vite-env.d.ts +0 -1
  127. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.cjs +0 -0
  128. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js +0 -0
  129. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.cjs +0 -0
  130. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js +0 -0
  131. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.cjs +0 -0
  132. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-GOJN3OQ4.js +0 -0
  133. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.cjs +0 -0
  134. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js +0 -0
  135. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.cjs +0 -0
  136. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-Q6FMBSK4.js +0 -0
  137. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.cjs +0 -0
  138. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-RD4EP3M5.js +0 -0
  139. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.cjs +0 -0
  140. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-SNABGVNO.js +0 -0
  141. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.cjs +0 -0
  142. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-UOADEBDH.js +0 -0
  143. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.cjs +0 -0
  144. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js +0 -0
  145. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.cjs +0 -0
  146. /package/dist/node_modules/.pnpm/{@fangzhongya_utils@0.0.7-18 → @fangzhongya_utils@0.0.8-17}/node_modules/@fangzhongya/utils/dist/chunk-ZVBCHJA5.js +0 -0
package/LICENSE CHANGED
@@ -1,25 +1,25 @@
1
- MIT License
2
-
3
- Copyright (c) 2022-2024 fangzhongya
4
-
5
- Permission is hereby granted, free of charge, to any person
6
- obtaining a copy of this software and associated
7
- documentation files (the "Software"), to deal in the
8
- Software without restriction, including without limitation
9
- the rights to use, copy, modify, merge, publish, distribute,
10
- sublicense, and/or sell copies of the Software, and to
11
- permit persons to whom the Software is furnished to do so,
12
- subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall
15
- be included in all copies or substantial portions of the
16
- Software.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
19
- KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
20
- WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21
- PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
22
- OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022-2024 fangzhongya
4
+
5
+ Permission is hereby granted, free of charge, to any person
6
+ obtaining a copy of this software and associated
7
+ documentation files (the "Software"), to deal in the
8
+ Software without restriction, including without limitation
9
+ the rights to use, copy, modify, merge, publish, distribute,
10
+ sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so,
12
+ subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall
15
+ be included in all copies or substantial portions of the
16
+ Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
19
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
20
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21
+ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
22
+ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,206 +1,208 @@
1
- # vue-archive
2
-
3
- vue 组件文档展示 采用 Vite 导入本地文件,
4
-
5
- 用路由进行展示的
6
-
7
- 用 comment-parser 解析文件中的注释 解析注释生成文档
8
-
9
- 用 es-module-lexer 解析测试文件中引用,展示代码
10
-
11
- 用 highlight.js 展示代码高亮
12
-
13
- 用 markdown-it 解析 md 文件
14
-
15
- 开发一个可以用来 只要写一次代码注释就可以,自动生成查看文档
16
- 页面的
17
-
18
- 写组件示例代码 可以自动展示 ,提供错误,和需求的示例
19
-
20
- 当前项目用 vue + vite 开发的 用 pnpm 引入
21
-
22
- ### 组件文件
23
-
24
- > 组件文件说明
25
-
26
- ```js
27
- /**
28
- * @title 标题
29
- * @name 组件名称 组件中文名称
30
- * @author 作者
31
- * @description 组件介绍
32
- * @date 组件更新时间
33
- */
34
- ```
35
-
36
- > 组件 props 组件属性
37
-
38
- ```js
39
- /**
40
- * 多标签
41
- * @props 是props属性标识
42
- * @name 属性名
43
- * @type 类型
44
- * @default 默认值
45
- * @selectable 可选值
46
- * @description 说明
47
- */
48
- /**
49
- * 单标签
50
- * @props {类型} 属性名=默认值 (可选值) 说明
51
- */
52
- ```
53
-
54
- > 组件 slot 组件插槽
55
-
56
- ```js
57
- /**
58
- * 多标签
59
- * @slot 是slot插槽标识
60
- * @name 插槽名
61
- * @selectable 子标签
62
- * @description 说明
63
- */
64
- /**
65
- * 单标签
66
- * @props 插槽名 (可选值) 说明
67
- */
68
- ```
69
-
70
- > 组件 emits 组件事件
71
-
72
- ```js
73
- /**
74
- * 多标签
75
- * @emits 是emits事件标识
76
- * @name 事件名
77
- * @selectable 回调参数
78
- * @description 说明
79
- */
80
- /**
81
- * 单标签
82
- * @emits 事件名 (回调参数) 说明
83
- */
84
- ```
85
-
86
- > 组件 expose 组件方法
87
-
88
- ```js
89
- /**
90
- * 多标签
91
- * @expose 是expose方法标识
92
- * @name 方法名
93
- * @selectable 参数
94
- * @description 说明
95
- */
96
- /**
97
- * 单标签
98
- * @expose 方法名 (参数) 说明
99
- */
100
- ```
101
-
102
- ### 示例文件
103
-
104
- 示例代码标识
105
-
106
- > 用组件出问题了的标识
107
-
108
- ```js
109
- /**
110
- * @error 问题说明
111
- */
112
- ```
113
-
114
- > 用组件给出的建议,和改进
115
-
116
- ```js
117
- /**
118
- * @proposal 建议说明
119
- */
120
- ```
121
-
122
- ## 配置文件
123
-
124
- document.config.js
125
-
126
- ```js
127
- router: '__document',
128
- redirect: true,
129
- // 目前只支持相对的路径
130
- components: [
131
- {
132
- dir: './src/components/',
133
- comprops: '/common/props/',
134
- alias: 'com',
135
- // extensions: ['vue'],
136
- // /**
137
- // * 匹配文件名称和文件类型
138
- // */
139
- matchexts: ['/src/index.vue'],
140
- components: import.meta.glob(
141
- './src/components/**/src/index.(js|vue)',
142
- ),
143
- componentsRaw: import.meta.glob(
144
- './src/components/**/*.(js|vue)',
145
- {
146
- as: 'raw',
147
- },
148
- ),
149
- },
150
- ],
151
- example: {
152
- dir: './example/',
153
- /**
154
- * 0 : url 下面就是组件
155
- * 1 : dir 名称开始
156
- * 2 : 二级 aliass 目录
157
- * 3 : dir 名称开始 加上二级 aliass 目录
158
- */
159
- level: 1,
160
-
161
- /**
162
- * 0 : 不支持别名
163
- * 1 : 只支持一级别名
164
- * 2 : 只支持二级别名
165
- * 3 : 只支持一级别名+二级别名
166
- * 9 : 都支持
167
- */
168
- aliaslevel: 0,
169
-
170
- /**
171
- * 不区分首字母大小写
172
- * 0 : 只支持 el-input
173
- * 1 : 只支持 elInput
174
- * 2 : 都支持
175
- */
176
- componentName: 0,
177
-
178
- examples: import.meta.glob(
179
- `./example/**/index.(js|vue)`,
180
- ),
181
- examplesRaw: import.meta.glob('./example/**', {
182
- as: 'raw',
183
- }),
184
- md: 'README',
185
- },
186
- ```
187
-
188
- ### 组件写法说明
189
-
190
- 在 components 目录下的文件夹通过 index.js 和 index.vue 文件
191
- 都会自动全局注册的成为公共组件的,其他的文件都不会,也只读取
192
- index.js 和 index.vue 中的文件注释,生成文档
193
-
194
- 注册的名称是通过 index 的上级文件夹名称来命名的如:
195
-
196
- 1. 文件夹名称 aside 那组件名称 Aside
197
- 2. 文件夹名称 asideDiv 那组件名称 AsideDiv
198
- 3. 文件夹名称 AsideDiv 那组件名称 AsideDiv
199
- 4. 文件夹名称 aside-div 那组件名称 AsideDiv
200
- 5. 文件夹名称 aside-div-div 那组件名称 AsideDivDiv
201
-
202
- ### 示例文件写法说明
203
-
204
- 示例文件目前在 /example 文件夹中 你先创建对应的组件名称的文
205
- 件夹,用来放当前组件的示例 支持多个实例的,也只会读取文件夹
206
- 下的 index.js 和 index.vue 文件来当示例展示的
1
+ # vue-archive
2
+
3
+ vue 组件文档展示 采用 Vite 导入本地文件,
4
+
5
+ 用路由进行展示的
6
+
7
+ 用 comment-parser 解析文件中的注释 解析注释生成文档
8
+
9
+ 用 es-module-lexer 解析测试文件中引用,展示代码
10
+
11
+ 用 highlight.js 展示代码高亮
12
+
13
+ 用 markdown-it 解析 md 文件
14
+
15
+ 开发一个可以用来 只要写一次代码注释就可以,自动生成查看文档
16
+ 页面的
17
+
18
+ 写组件示例代码 可以自动展示 ,提供错误,和需求的示例
19
+
20
+ 当前项目用 vue + vite 开发的 用 pnpm 引入
21
+
22
+ ### 组件文件
23
+
24
+ > 组件文件说明
25
+
26
+ ```js
27
+ /**
28
+ * @title 标题
29
+ * @name 组件名称 组件中文名称
30
+ * @author 作者
31
+ * @description 组件介绍
32
+ * @date 组件更新时间
33
+ */
34
+ ```
35
+
36
+ > 组件 props 组件属性
37
+
38
+ ```js
39
+ /**
40
+ * 多标签
41
+ * @props 是props属性标识
42
+ * @name 属性名
43
+ * @type 类型
44
+ * @default 默认值
45
+ * @selectable 可选值
46
+ * @description 说明
47
+ */
48
+ /**
49
+ * 单标签
50
+ * @props {类型} 属性名=默认值 (可选值) 说明
51
+ */
52
+ ```
53
+
54
+ > 组件 slot 组件插槽
55
+
56
+ ```js
57
+ /**
58
+ * 多标签
59
+ * @slot 是slot插槽标识
60
+ * @name 插槽名
61
+ * @selectable 子标签
62
+ * @description 说明
63
+ */
64
+ /**
65
+ * 单标签
66
+ * @props 插槽名 (可选值) 说明
67
+ */
68
+ ```
69
+
70
+ > 组件 emits 组件事件
71
+
72
+ ```js
73
+ /**
74
+ * 多标签
75
+ * @emits 是emits事件标识
76
+ * @name 事件名
77
+ * @selectable 回调参数
78
+ * @description 说明
79
+ */
80
+ /**
81
+ * 单标签
82
+ * @emits 事件名 (回调参数) 说明
83
+ */
84
+ ```
85
+
86
+ > 组件 expose 组件方法
87
+
88
+ ```js
89
+ /**
90
+ * 多标签
91
+ * @expose 是expose方法标识
92
+ * @name 方法名
93
+ * @selectable 参数
94
+ * @description 说明
95
+ */
96
+ /**
97
+ * 单标签
98
+ * @expose 方法名 (参数) 说明
99
+ */
100
+ ```
101
+
102
+ ### 示例文件
103
+
104
+ 示例代码标识
105
+
106
+ > 用组件出问题了的标识
107
+
108
+ ```js
109
+ /**
110
+ * @error 问题说明
111
+ */
112
+ ```
113
+
114
+ > 用组件给出的建议,和改进
115
+
116
+ ```js
117
+ /**
118
+ * @proposal 建议说明
119
+ */
120
+ ```
121
+
122
+ ## 配置文件
123
+
124
+ document.config.js
125
+
126
+ ```js
127
+ router: '__document',
128
+ redirect: true,
129
+ // 目前只支持相对的路径
130
+ components: [
131
+ {
132
+ dir: './src/components/',
133
+ comprops: '/common/props/',
134
+ alias: 'com',
135
+ // extensions: ['vue'],
136
+ // /**
137
+ // * 匹配文件名称和文件类型
138
+ // */
139
+ matchexts: ['/src/index.vue'],
140
+ components: import.meta.glob(
141
+ './src/components/**/src/index.(js|vue)',
142
+ ),
143
+ componentsRaw: import.meta.glob(
144
+ './src/components/**/*.(js|vue)',
145
+ {
146
+ as: 'raw',
147
+ },
148
+ ),
149
+ },
150
+ ],
151
+ example: {
152
+ dir: './example/',
153
+ /**
154
+ * 0 : url 下面就是组件
155
+ * 1 : dir 名称开始
156
+ * 2 : 二级 aliass 目录
157
+ * 3 : dir 名称开始 加上二级 aliass 目录
158
+ */
159
+ level: 1,
160
+
161
+ /**
162
+ * 0 : 不支持别名
163
+ * 1 : 只支持一级别名
164
+ * 2 : 只支持二级别名
165
+ * 3 : 只支持一级别名+二级别名
166
+ * 9 : 都支持
167
+ */
168
+ aliaslevel: 0,
169
+
170
+ /**
171
+ * 不区分首字母大小写
172
+ * 0 : 只支持 el-input
173
+ * 1 : 只支持 elInput
174
+ * 2 : 都支持
175
+ */
176
+ componentName: 0,
177
+
178
+ examples: import.meta.glob(
179
+ `./example/**/index.(js|vue)`,
180
+ ),
181
+ examplesRaw: import.meta.glob('./example/**', {
182
+ as: 'raw',
183
+ }),
184
+ md: 'README',
185
+ },
186
+ ```
187
+
188
+ ### 组件写法说明
189
+
190
+ 在 components 目录下的文件夹通过 index.js 和 index.vue 文件
191
+ 都会自动全局注册的成为公共组件的,其他的文件都不会,也只读取
192
+ index.js 和 index.vue 中的文件注释,生成文档
193
+
194
+ 注册的名称是通过 index 的上级文件夹名称来命名的如:
195
+
196
+ 1. 文件夹名称 aside 那组件名称 Aside
197
+ 2. 文件夹名称 asideDiv 那组件名称 AsideDiv
198
+ 3. 文件夹名称 AsideDiv 那组件名称 AsideDiv
199
+ 4. 文件夹名称 aside-div 那组件名称 AsideDiv
200
+ 5. 文件夹名称 aside-div-div 那组件名称 AsideDivDiv
201
+
202
+ ### 示例文件写法说明
203
+
204
+ 示例文件目前在 /example 文件夹中 你先创建对应的组件名称的文
205
+ 件夹,用来放当前组件的示例 支持多个实例的,也只会读取文件夹
206
+ 下的 index.js 和 index.vue 文件来当示例展示的
207
+
208
+ 测试 自动提交2