ep-craft 0.1.41 → 0.2.0

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 (251) hide show
  1. package/dist/components/input-number/EpInputNumber.vue.js +62 -63
  2. package/dist/components/input-number/input-number.d.ts +5 -0
  3. package/dist/components/input-number/input-number.js +6 -6
  4. package/dist/components/select/index.d.ts +6 -3
  5. package/dist/components/select/select.d.ts +1 -0
  6. package/dist/components/select/select.js +3 -3
  7. package/dist/components/select/select.vue.d.ts +3 -1
  8. package/dist/components/select/select.vue.js +9 -9
  9. package/dist/components/select/select2.vue.js +73 -75
  10. package/dist/components/select-v2/src/defaults.d.ts +1 -0
  11. package/dist/components/select-v2/src/defaults.js +1 -1
  12. package/dist/components/select-v2/src/select.vue.d.ts +3 -1
  13. package/dist/components/select-v2/src/select.vue.js +21 -21
  14. package/dist/components/select-v2/src/select2.vue.js +27 -29
  15. package/dist/components/tree-select/src/tree-select.vue.d.ts +2 -0
  16. package/dist-ai/components/affix.json +152 -0
  17. package/dist-ai/components/affix.md +73 -0
  18. package/dist-ai/components/alert.json +186 -0
  19. package/dist-ai/components/alert.md +89 -0
  20. package/dist-ai/components/anchor-link.json +102 -0
  21. package/dist-ai/components/anchor-link.md +67 -0
  22. package/dist-ai/components/anchor.json +179 -0
  23. package/dist-ai/components/anchor.md +87 -0
  24. package/dist-ai/components/aside.json +87 -0
  25. package/dist-ai/components/aside.md +63 -0
  26. package/dist-ai/components/autocomplete.json +613 -0
  27. package/dist-ai/components/autocomplete.md +140 -0
  28. package/dist-ai/components/avatar.json +163 -0
  29. package/dist-ai/components/avatar.md +83 -0
  30. package/dist-ai/components/backtop.json +118 -0
  31. package/dist-ai/components/backtop.md +66 -0
  32. package/dist-ai/components/badge.json +186 -0
  33. package/dist-ai/components/badge.md +85 -0
  34. package/dist-ai/components/breadcrumb-item.json +97 -0
  35. package/dist-ai/components/breadcrumb-item.md +65 -0
  36. package/dist-ai/components/breadcrumb.json +100 -0
  37. package/dist-ai/components/breadcrumb.md +68 -0
  38. package/dist-ai/components/button-group.json +123 -0
  39. package/dist-ai/components/button-group.md +65 -0
  40. package/dist-ai/components/button.json +349 -0
  41. package/dist-ai/components/button.md +124 -0
  42. package/dist-ai/components/calendar.json +148 -0
  43. package/dist-ai/components/calendar.md +74 -0
  44. package/dist-ai/components/card.json +168 -0
  45. package/dist-ai/components/card.md +87 -0
  46. package/dist-ai/components/carousel-item.json +99 -0
  47. package/dist-ai/components/carousel-item.md +68 -0
  48. package/dist-ai/components/carousel.json +245 -0
  49. package/dist-ai/components/carousel.md +97 -0
  50. package/dist-ai/components/cascader-panel.json +242 -0
  51. package/dist-ai/components/cascader-panel.md +108 -0
  52. package/dist-ai/components/cascader.json +531 -0
  53. package/dist-ai/components/cascader.md +146 -0
  54. package/dist-ai/components/check-tag.json +133 -0
  55. package/dist-ai/components/check-tag.md +72 -0
  56. package/dist-ai/components/checkbox-button.json +279 -0
  57. package/dist-ai/components/checkbox-button.md +94 -0
  58. package/dist-ai/components/checkbox-group.json +236 -0
  59. package/dist-ai/components/checkbox-group.md +90 -0
  60. package/dist-ai/components/checkbox.json +278 -0
  61. package/dist-ai/components/checkbox.md +91 -0
  62. package/dist-ai/components/col.json +168 -0
  63. package/dist-ai/components/col.md +72 -0
  64. package/dist-ai/components/collapse-item.json +133 -0
  65. package/dist-ai/components/collapse-item.md +75 -0
  66. package/dist-ai/components/collapse-transition.json +75 -0
  67. package/dist-ai/components/collapse-transition.md +59 -0
  68. package/dist-ai/components/collapse.json +129 -0
  69. package/dist-ai/components/collapse.md +76 -0
  70. package/dist-ai/components/color-picker.json +280 -0
  71. package/dist-ai/components/color-picker.md +85 -0
  72. package/dist-ai/components/config-provider.json +222 -0
  73. package/dist-ai/components/config-provider.md +76 -0
  74. package/dist-ai/components/container.json +95 -0
  75. package/dist-ai/components/container.md +70 -0
  76. package/dist-ai/components/countdown.json +155 -0
  77. package/dist-ai/components/countdown.md +73 -0
  78. package/dist-ai/components/date-picker-panel.json +346 -0
  79. package/dist-ai/components/date-picker-panel.md +91 -0
  80. package/dist-ai/components/date-picker.json +574 -0
  81. package/dist-ai/components/date-picker.md +153 -0
  82. package/dist-ai/components/descriptions-item.json +175 -0
  83. package/dist-ai/components/descriptions-item.md +73 -0
  84. package/dist-ai/components/descriptions.json +171 -0
  85. package/dist-ai/components/descriptions.md +78 -0
  86. package/dist-ai/components/dialog.json +403 -0
  87. package/dist-ai/components/dialog.md +108 -0
  88. package/dist-ai/components/divider.json +102 -0
  89. package/dist-ai/components/divider.md +59 -0
  90. package/dist-ai/components/drawer.json +468 -0
  91. package/dist-ai/components/drawer.md +115 -0
  92. package/dist-ai/components/dropdown-item.json +156 -0
  93. package/dist-ai/components/dropdown-item.md +84 -0
  94. package/dist-ai/components/dropdown-menu.json +92 -0
  95. package/dist-ai/components/dropdown-menu.md +70 -0
  96. package/dist-ai/components/dropdown.json +374 -0
  97. package/dist-ai/components/dropdown.md +108 -0
  98. package/dist-ai/components/empty.json +116 -0
  99. package/dist-ai/components/empty.md +62 -0
  100. package/dist-ai/components/footer.json +86 -0
  101. package/dist-ai/components/footer.md +63 -0
  102. package/dist-ai/components/form-item.json +242 -0
  103. package/dist-ai/components/form-item.md +93 -0
  104. package/dist-ai/components/form.json +277 -0
  105. package/dist-ai/components/form.md +117 -0
  106. package/dist-ai/components/header.json +86 -0
  107. package/dist-ai/components/header.md +63 -0
  108. package/dist-ai/components/icon.json +95 -0
  109. package/dist-ai/components/icon.md +61 -0
  110. package/dist-ai/components/image-viewer.json +235 -0
  111. package/dist-ai/components/image-viewer.md +88 -0
  112. package/dist-ai/components/image.json +299 -0
  113. package/dist-ai/components/image.md +96 -0
  114. package/dist-ai/components/input-number.json +370 -0
  115. package/dist-ai/components/input-number.md +127 -0
  116. package/dist-ai/components/input.json +545 -0
  117. package/dist-ai/components/input.md +166 -0
  118. package/dist-ai/components/link.json +162 -0
  119. package/dist-ai/components/link.md +72 -0
  120. package/dist-ai/components/main.json +77 -0
  121. package/dist-ai/components/main.md +58 -0
  122. package/dist-ai/components/mention.json +598 -0
  123. package/dist-ai/components/mention.md +136 -0
  124. package/dist-ai/components/menu-item-group.json +101 -0
  125. package/dist-ai/components/menu-item-group.md +69 -0
  126. package/dist-ai/components/menu-item.json +131 -0
  127. package/dist-ai/components/menu-item.md +76 -0
  128. package/dist-ai/components/menu.json +314 -0
  129. package/dist-ai/components/menu.md +104 -0
  130. package/dist-ai/components/option-group.json +113 -0
  131. package/dist-ai/components/option-group.md +79 -0
  132. package/dist-ai/components/option.json +122 -0
  133. package/dist-ai/components/option.md +70 -0
  134. package/dist-ai/components/page-header.json +131 -0
  135. package/dist-ai/components/page-header.md +70 -0
  136. package/dist-ai/components/pagination.json +325 -0
  137. package/dist-ai/components/pagination.md +115 -0
  138. package/dist-ai/components/popconfirm.json +240 -0
  139. package/dist-ai/components/popconfirm.md +89 -0
  140. package/dist-ai/components/popover.json +351 -0
  141. package/dist-ai/components/popover.md +99 -0
  142. package/dist-ai/components/popper.json +93 -0
  143. package/dist-ai/components/popper.md +66 -0
  144. package/dist-ai/components/progress.json +219 -0
  145. package/dist-ai/components/progress.md +74 -0
  146. package/dist-ai/components/radio-button.json +142 -0
  147. package/dist-ai/components/radio-button.md +76 -0
  148. package/dist-ai/components/radio-group.json +219 -0
  149. package/dist-ai/components/radio-group.md +88 -0
  150. package/dist-ai/components/radio.json +177 -0
  151. package/dist-ai/components/radio.md +83 -0
  152. package/dist-ai/components/rate.json +286 -0
  153. package/dist-ai/components/rate.md +83 -0
  154. package/dist-ai/components/result.json +118 -0
  155. package/dist-ai/components/result.md +66 -0
  156. package/dist-ai/components/row.json +115 -0
  157. package/dist-ai/components/row.md +68 -0
  158. package/dist-ai/components/scrollbar.json +280 -0
  159. package/dist-ai/components/scrollbar.md +89 -0
  160. package/dist-ai/components/segmented.json +204 -0
  161. package/dist-ai/components/segmented.md +81 -0
  162. package/dist-ai/components/select-v2.json +729 -0
  163. package/dist-ai/components/select-v2.md +193 -0
  164. package/dist-ai/components/select.json +697 -0
  165. package/dist-ai/components/select.md +188 -0
  166. package/dist-ai/components/skeleton-item.json +80 -0
  167. package/dist-ai/components/skeleton-item.md +57 -0
  168. package/dist-ai/components/skeleton.json +134 -0
  169. package/dist-ai/components/skeleton.md +65 -0
  170. package/dist-ai/components/slider.json +326 -0
  171. package/dist-ai/components/slider.md +88 -0
  172. package/dist-ai/components/space.json +178 -0
  173. package/dist-ai/components/space.md +73 -0
  174. package/dist-ai/components/statistic.json +167 -0
  175. package/dist-ai/components/statistic.md +66 -0
  176. package/dist-ai/components/step.json +124 -0
  177. package/dist-ai/components/step.md +69 -0
  178. package/dist-ai/components/steps.json +157 -0
  179. package/dist-ai/components/steps.md +79 -0
  180. package/dist-ai/components/sub-menu.json +211 -0
  181. package/dist-ai/components/sub-menu.md +88 -0
  182. package/dist-ai/components/switch.json +292 -0
  183. package/dist-ai/components/switch.md +88 -0
  184. package/dist-ai/components/tab-pane.json +137 -0
  185. package/dist-ai/components/tab-pane.md +72 -0
  186. package/dist-ai/components/table-column.json +368 -0
  187. package/dist-ai/components/table-column.md +103 -0
  188. package/dist-ai/components/table-v2.json +486 -0
  189. package/dist-ai/components/table-v2.md +123 -0
  190. package/dist-ai/components/table.json +734 -0
  191. package/dist-ai/components/table.md +205 -0
  192. package/dist-ai/components/tabs.json +231 -0
  193. package/dist-ai/components/tabs.md +127 -0
  194. package/dist-ai/components/tag.json +205 -0
  195. package/dist-ai/components/tag.md +105 -0
  196. package/dist-ai/components/text.json +143 -0
  197. package/dist-ai/components/text.md +66 -0
  198. package/dist-ai/components/time-picker.json +555 -0
  199. package/dist-ai/components/time-picker.md +123 -0
  200. package/dist-ai/components/time-select.json +321 -0
  201. package/dist-ai/components/time-select.md +93 -0
  202. package/dist-ai/components/timeline-item.json +186 -0
  203. package/dist-ai/components/timeline-item.md +78 -0
  204. package/dist-ai/components/timeline.json +99 -0
  205. package/dist-ai/components/timeline.md +65 -0
  206. package/dist-ai/components/tooltip.json +599 -0
  207. package/dist-ai/components/tooltip.md +137 -0
  208. package/dist-ai/components/tour-step.json +219 -0
  209. package/dist-ai/components/tour-step.md +88 -0
  210. package/dist-ai/components/tour.json +258 -0
  211. package/dist-ai/components/tour.md +96 -0
  212. package/dist-ai/components/transfer.json +275 -0
  213. package/dist-ai/components/transfer.md +95 -0
  214. package/dist-ai/components/tree-select.json +945 -0
  215. package/dist-ai/components/tree-select.md +181 -0
  216. package/dist-ai/components/tree-v2.json +395 -0
  217. package/dist-ai/components/tree-v2.md +113 -0
  218. package/dist-ai/components/tree.json +485 -0
  219. package/dist-ai/components/tree.md +131 -0
  220. package/dist-ai/components/upload.json +382 -0
  221. package/dist-ai/components/upload.md +130 -0
  222. package/dist-ai/components/watermark.json +157 -0
  223. package/dist-ai/components/watermark.md +66 -0
  224. package/dist-ai/directives/click-outside.json +61 -0
  225. package/dist-ai/directives/click-outside.md +50 -0
  226. package/dist-ai/directives/infinite-scroll.json +83 -0
  227. package/dist-ai/directives/infinite-scroll.md +62 -0
  228. package/dist-ai/directives/loading.json +89 -0
  229. package/dist-ai/directives/loading.md +69 -0
  230. package/dist-ai/directives/mousewheel.json +54 -0
  231. package/dist-ai/directives/mousewheel.md +48 -0
  232. package/dist-ai/directives/repeat-click.json +68 -0
  233. package/dist-ai/directives/repeat-click.md +49 -0
  234. package/dist-ai/directives/trap-focus.json +46 -0
  235. package/dist-ai/directives/trap-focus.md +46 -0
  236. package/dist-ai/icons.json +1 -0
  237. package/dist-ai/index.json +1 -0
  238. package/dist-ai/llms.txt +170 -0
  239. package/dist-ai/manifest.json +26590 -0
  240. package/dist-ai/schema/manifest.schema.json +793 -0
  241. package/dist-ai/services/infinite-scroll.json +80 -0
  242. package/dist-ai/services/infinite-scroll.md +71 -0
  243. package/dist-ai/services/loading.json +108 -0
  244. package/dist-ai/services/loading.md +58 -0
  245. package/dist-ai/services/message-box.json +159 -0
  246. package/dist-ai/services/message-box.md +78 -0
  247. package/dist-ai/services/message.json +137 -0
  248. package/dist-ai/services/message.md +72 -0
  249. package/dist-ai/services/notification.json +136 -0
  250. package/dist-ai/services/notification.md +73 -0
  251. package/package.json +12 -2
@@ -0,0 +1,96 @@
1
+ # EpImage
2
+
3
+ `ep-image` · data(数据展示) · `component:image`
4
+
5
+ ## 摘要
6
+
7
+ 图片,结构化数据展示
8
+
9
+ ## 适用场景
10
+
11
+ - 适用:展示图片类结构化数据
12
+ - 适用:需要浏览、比较或定位数据时
13
+ - 不适用:数据量极小且无需结构化展示时
14
+
15
+ ## 关键词
16
+
17
+ - 中文:图片、数据
18
+ - English: image, picture, data
19
+
20
+ ## 变体
21
+
22
+ - state: loading(通过布尔属性切换禁用、加载或选中状态)
23
+
24
+ ## Props
25
+
26
+ - hideOnClickModal (boolean):点击遮罩层是否关闭预览
27
+ - src (string,默认 ''):图片地址,同原生 img 的 src
28
+ - fit ('' | 'contain' | 'cover' | 'fill' | 'none' | 'scale-down',默认 ''):图片填充方式,同 object-fit
29
+ - loading ('eager' | 'lazy'):浏览器加载方式,同原生 img 的 loading
30
+ - lazy (boolean):是否懒加载
31
+ - scrollContainer (string | HTMLElement):懒加载时监听滚动的容器
32
+ - previewSrcList (string[],默认 []):开启预览时的大图列表
33
+ - previewTeleported (boolean):是否将预览层挂载到 body
34
+ - zIndex (number):预览层 z-index
35
+ - initialIndex (number,默认 0):初始预览图片索引
36
+ - infinite (boolean,默认 true):预览是否循环
37
+ - closeOnPressEscape (boolean,默认 true):按 ESC 是否关闭预览
38
+ - zoomRate (number,默认 1.2):缩放事件的缩放倍率
39
+ - scale (number,默认 1):初始缩放比例
40
+ - minScale (number,默认 0.2):最小缩放比例
41
+ - maxScale (number,默认 7):最大缩放比例
42
+ - showProgress (boolean):是否显示预览进度
43
+ - crossorigin ('anonymous' | 'use-credentials' | ''):原生 crossorigin 属性
44
+
45
+ ## Events
46
+
47
+ - load((event: Event)):图片加载成功时触发
48
+ - error((event: Event)):图片加载失败时触发
49
+ - switch((index: number)):预览切换图片时触发
50
+ - close(—):关闭预览时触发
51
+ - show(—):打开预览时触发
52
+
53
+ ## Slots
54
+
55
+ - placeholder:图片加载完成前的占位内容
56
+ - error:图片加载失败时的内容
57
+ - viewer:自定义预览层内容
58
+ - progress:自定义预览进度内容
59
+ - toolbar:自定义预览工具栏
60
+ - viewer-error:预览图片加载失败时的内容
61
+
62
+ ## Exposes
63
+
64
+ - showPreview(() => void):手动打开预览
65
+
66
+ ## 视觉提示
67
+
68
+ - 形状:块级数据区域
69
+ - 密度:紧凑
70
+ - 插槽内容:placeholder:图片加载完成前的占位内容;error:图片加载失败时的内容;viewer:自定义预览层内容
71
+ - CSS 变量:--el-border-color-lighter、--el-bg-color、--el-text-color-regular、--el-font-size-base
72
+
73
+ ## 示例
74
+
75
+ ### 图片与预览
76
+
77
+ ```vue
78
+ <script setup lang="ts">
79
+ import { EpImage } from 'ep-craft'
80
+
81
+ const src =
82
+ "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200'%3E%3Crect fill='%23409eff' width='400' height='200'/%3E%3Ctext x='50%25' y='50%25' fill='white' font-size='20' text-anchor='middle'%3E示例图片%3C/text%3E%3C/svg%3E"
83
+ </script>
84
+
85
+ <template>
86
+ <ep-image :src="src" :preview-src-list="[src]" fit="cover" style="width: 400px" />
87
+ </template>
88
+ ```
89
+
90
+ ## 相关条目
91
+
92
+ - EpImageViewer
93
+
94
+ ---
95
+
96
+ ep-craft 0.2.0
@@ -0,0 +1,370 @@
1
+ {
2
+ "entry": {
3
+ "category": "form",
4
+ "events": [
5
+ {
6
+ "description": "绑定值被改变时触发",
7
+ "name": "change",
8
+ "params": "(currentValue: number | undefined, oldValue: number | undefined)"
9
+ },
10
+ {
11
+ "description": "在组件 Input 失去焦点时触发",
12
+ "name": "blur",
13
+ "params": "(event: FocusEvent)"
14
+ },
15
+ {
16
+ "description": "在组件 Input 获得焦点时触发",
17
+ "name": "focus",
18
+ "params": "(event: FocusEvent)"
19
+ },
20
+ {
21
+ "description": "在输入框输入时触发",
22
+ "name": "input",
23
+ "params": "(value: number | null | undefined)"
24
+ },
25
+ {
26
+ "description": "绑定值变化时触发",
27
+ "name": "update:modelValue",
28
+ "params": "(value: number | undefined)"
29
+ }
30
+ ],
31
+ "exampleOmittedReason": null,
32
+ "examples": [
33
+ {
34
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { EpInputNumber } from 'ep-craft'\n\nconst value = ref(1)\n</script>\n\n<template>\n <ep-input-number v-model=\"value\" />\n</template>",
35
+ "id": "input-number-1",
36
+ "language": "vue",
37
+ "title": "数字输入"
38
+ },
39
+ {
40
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { EpInputNumber } from 'ep-craft'\n\nconst value = ref(50)\n</script>\n\n<template>\n <ep-input-number v-model=\"value\" :min=\"0\" :max=\"100\" />\n</template>",
41
+ "id": "input-number-2",
42
+ "language": "vue",
43
+ "title": "范围限制"
44
+ },
45
+ {
46
+ "code": "<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { EpInputNumber } from 'ep-craft'\n\nconst value = ref(2)\n</script>\n\n<template>\n <ep-input-number v-model=\"value\" :step=\"2\" step-strictly />\n</template>",
47
+ "id": "input-number-3",
48
+ "language": "vue",
49
+ "title": "固定步长"
50
+ }
51
+ ],
52
+ "exposes": [
53
+ {
54
+ "description": "使 input 组件获取焦点",
55
+ "name": "focus",
56
+ "type": "() => void"
57
+ },
58
+ {
59
+ "description": "使 input 组件失去焦点",
60
+ "name": "blur",
61
+ "type": "() => void"
62
+ }
63
+ ],
64
+ "hot": true,
65
+ "id": "component:input-number",
66
+ "keywords": {
67
+ "en": [
68
+ "input-number",
69
+ "input",
70
+ "number",
71
+ "stepper",
72
+ "form"
73
+ ],
74
+ "zh": [
75
+ "数字输入框",
76
+ "数字输入",
77
+ "步进器",
78
+ "数量",
79
+ "表单"
80
+ ]
81
+ },
82
+ "kind": "component",
83
+ "name": "EpInputNumber",
84
+ "nonUseCases": [
85
+ "仅展示静态文本或只读数据时"
86
+ ],
87
+ "props": [
88
+ {
89
+ "alias": null,
90
+ "defaultText": null,
91
+ "description": "",
92
+ "hasDefault": true,
93
+ "name": "id",
94
+ "required": false,
95
+ "type": "unknown"
96
+ },
97
+ {
98
+ "alias": null,
99
+ "defaultText": "1",
100
+ "description": "计数器步长",
101
+ "hasDefault": true,
102
+ "name": "step",
103
+ "required": false,
104
+ "type": "number"
105
+ },
106
+ {
107
+ "alias": null,
108
+ "defaultText": "false",
109
+ "description": "是否只能输入 step 的倍数",
110
+ "hasDefault": true,
111
+ "name": "stepStrictly",
112
+ "required": false,
113
+ "type": "boolean"
114
+ },
115
+ {
116
+ "alias": null,
117
+ "defaultText": "Infinity",
118
+ "description": "设置计数器允许的最大值",
119
+ "hasDefault": true,
120
+ "name": "max",
121
+ "required": false,
122
+ "type": "number"
123
+ },
124
+ {
125
+ "alias": null,
126
+ "defaultText": "-Infinity",
127
+ "description": "设置计数器允许的最小值",
128
+ "hasDefault": true,
129
+ "name": "min",
130
+ "required": false,
131
+ "type": "number"
132
+ },
133
+ {
134
+ "alias": "v-model",
135
+ "defaultText": null,
136
+ "description": "绑定值",
137
+ "hasDefault": false,
138
+ "name": "modelValue",
139
+ "required": false,
140
+ "type": "number | undefined"
141
+ },
142
+ {
143
+ "alias": null,
144
+ "defaultText": "false",
145
+ "description": "原生 readonly 属性",
146
+ "hasDefault": true,
147
+ "name": "readonly",
148
+ "required": false,
149
+ "type": "boolean"
150
+ },
151
+ {
152
+ "alias": null,
153
+ "defaultText": "false",
154
+ "description": "是否禁用",
155
+ "hasDefault": true,
156
+ "name": "disabled",
157
+ "required": false,
158
+ "type": "boolean"
159
+ },
160
+ {
161
+ "alias": null,
162
+ "defaultText": "default",
163
+ "description": "计数器尺寸",
164
+ "hasDefault": false,
165
+ "name": "size",
166
+ "required": false,
167
+ "type": "'large' | 'default' | 'small'"
168
+ },
169
+ {
170
+ "alias": null,
171
+ "defaultText": "true",
172
+ "description": "是否使用控制按钮",
173
+ "hasDefault": true,
174
+ "name": "controls",
175
+ "required": false,
176
+ "type": "boolean"
177
+ },
178
+ {
179
+ "alias": null,
180
+ "defaultText": "''",
181
+ "description": "控制按钮位置",
182
+ "hasDefault": true,
183
+ "name": "controlsPosition",
184
+ "required": false,
185
+ "type": "'right' | ''"
186
+ },
187
+ {
188
+ "alias": null,
189
+ "defaultText": "null",
190
+ "description": "当输入框被清空时显示的值",
191
+ "hasDefault": true,
192
+ "name": "valueOnClear",
193
+ "required": false,
194
+ "type": "number | null | min | max"
195
+ },
196
+ {
197
+ "alias": null,
198
+ "defaultText": null,
199
+ "description": "原生 name 属性",
200
+ "hasDefault": false,
201
+ "name": "name",
202
+ "required": false,
203
+ "type": "string"
204
+ },
205
+ {
206
+ "alias": null,
207
+ "defaultText": null,
208
+ "description": "输入框占位文本",
209
+ "hasDefault": false,
210
+ "name": "placeholder",
211
+ "required": false,
212
+ "type": "string"
213
+ },
214
+ {
215
+ "alias": null,
216
+ "defaultText": null,
217
+ "description": "数值精度",
218
+ "hasDefault": false,
219
+ "name": "precision",
220
+ "required": false,
221
+ "type": "number"
222
+ },
223
+ {
224
+ "alias": null,
225
+ "defaultText": "true",
226
+ "description": "是否触发表单验证",
227
+ "hasDefault": true,
228
+ "name": "validateEvent",
229
+ "required": false,
230
+ "type": "boolean"
231
+ },
232
+ {
233
+ "alias": null,
234
+ "defaultText": null,
235
+ "description": "原生 aria-label 属性",
236
+ "hasDefault": false,
237
+ "name": "ariaLabel",
238
+ "required": false,
239
+ "type": "string"
240
+ },
241
+ {
242
+ "alias": null,
243
+ "defaultText": null,
244
+ "description": "原生 aria-labelledby 属性;显式传入时优先于浮动标签自动关联的文本",
245
+ "hasDefault": false,
246
+ "name": "ariaLabelledby",
247
+ "required": false,
248
+ "type": "string"
249
+ },
250
+ {
251
+ "alias": null,
252
+ "defaultText": null,
253
+ "description": "原生 inputmode 属性,用于虚拟键盘",
254
+ "hasDefault": true,
255
+ "name": "inputmode",
256
+ "required": false,
257
+ "type": "'search' | 'none' | 'text' | 'email' | 'tel' | 'url' | 'numeric' | 'decimal'"
258
+ },
259
+ {
260
+ "alias": null,
261
+ "defaultText": "center",
262
+ "description": "输入文本对齐方式",
263
+ "hasDefault": true,
264
+ "name": "align",
265
+ "required": false,
266
+ "type": "'left' | 'right' | 'center'"
267
+ },
268
+ {
269
+ "alias": null,
270
+ "defaultText": "false",
271
+ "description": "是否禁用科学计数法输入(如 e、E)",
272
+ "hasDefault": false,
273
+ "name": "disabledScientific",
274
+ "required": false,
275
+ "type": "boolean"
276
+ },
277
+ {
278
+ "alias": null,
279
+ "defaultText": null,
280
+ "description": "指定输入框展示值的格式",
281
+ "hasDefault": false,
282
+ "name": "formatter",
283
+ "required": false,
284
+ "type": "(value: string) => string"
285
+ },
286
+ {
287
+ "alias": null,
288
+ "defaultText": null,
289
+ "description": "指定从格式化输入中提取值的方式",
290
+ "hasDefault": false,
291
+ "name": "parser",
292
+ "required": false,
293
+ "type": "(value: string) => string"
294
+ },
295
+ {
296
+ "alias": null,
297
+ "defaultText": "0",
298
+ "description": "原生 tabindex 属性",
299
+ "hasDefault": true,
300
+ "name": "tabindex",
301
+ "required": false,
302
+ "type": "string | number"
303
+ },
304
+ {
305
+ "alias": null,
306
+ "defaultText": "false",
307
+ "description": "是否启用 Material 风格浮动标签",
308
+ "hasDefault": false,
309
+ "name": "floatLabel",
310
+ "required": false,
311
+ "type": "boolean"
312
+ }
313
+ ],
314
+ "related": [
315
+ "EpInput",
316
+ "EpSlider"
317
+ ],
318
+ "relations": {
319
+ "children": [],
320
+ "combos": [],
321
+ "parents": [],
322
+ "requiredChildren": []
323
+ },
324
+ "slots": [],
325
+ "slug": "input-number",
326
+ "summary": "数字输入框,限制范围与步进调节",
327
+ "tag": "ep-input-number",
328
+ "useCases": [
329
+ "数量、金额等数字录入",
330
+ "需要范围与步长约束的表单"
331
+ ],
332
+ "variants": [
333
+ {
334
+ "dimension": "size",
335
+ "values": [
336
+ "large",
337
+ "default",
338
+ "small"
339
+ ],
340
+ "when": "按容器空间与信息密度选择尺寸"
341
+ },
342
+ {
343
+ "dimension": "state",
344
+ "values": [
345
+ "disabled",
346
+ "readonly"
347
+ ],
348
+ "when": "通过布尔属性切换禁用、加载或选中状态"
349
+ }
350
+ ],
351
+ "visual": {
352
+ "cssVars": [
353
+ "--el-border-color",
354
+ "--el-border-radius-base",
355
+ "--el-color-primary",
356
+ "--el-font-size-base"
357
+ ],
358
+ "density": "中等",
359
+ "shape": "矩形输入框",
360
+ "slotContent": [
361
+ "decrease-icon:自定义内容",
362
+ "increase-icon:自定义内容",
363
+ "prefix:自定义内容"
364
+ ]
365
+ }
366
+ },
367
+ "generatedAt": "2026-11-03T03:09:12.050Z",
368
+ "libraryVersion": "0.2.0",
369
+ "schemaVersion": 1
370
+ }
@@ -0,0 +1,127 @@
1
+ # EpInputNumber
2
+
3
+ `ep-input-number` · form(表单) · `component:input-number`
4
+
5
+ ## 摘要
6
+
7
+ 数字输入框,限制范围与步进调节
8
+
9
+ ## 适用场景
10
+
11
+ - 适用:数量、金额等数字录入
12
+ - 适用:需要范围与步长约束的表单
13
+ - 不适用:仅展示静态文本或只读数据时
14
+
15
+ ## 关键词
16
+
17
+ - 中文:数字输入框、数字输入、步进器、数量、表单
18
+ - English: input-number, input, number, stepper, form
19
+
20
+ ## 变体
21
+
22
+ - size: large/default/small(按容器空间与信息密度选择尺寸)
23
+ - state: disabled/readonly(通过布尔属性切换禁用、加载或选中状态)
24
+
25
+ ## Props
26
+
27
+ - id (unknown,默认 见文档)
28
+ - step (number,默认 1):计数器步长
29
+ - stepStrictly (boolean,默认 false):是否只能输入 step 的倍数
30
+ - max (number,默认 Infinity):设置计数器允许的最大值
31
+ - min (number,默认 -Infinity):设置计数器允许的最小值
32
+ - modelValue(别名 v-model) (number | undefined):绑定值
33
+ - readonly (boolean,默认 false):原生 readonly 属性
34
+ - disabled (boolean,默认 false):是否禁用
35
+ - size ('large' | 'default' | 'small'):计数器尺寸
36
+ - controls (boolean,默认 true):是否使用控制按钮
37
+ - controlsPosition ('right' | '',默认 ''):控制按钮位置
38
+ - valueOnClear (number | null | min | max,默认 null):当输入框被清空时显示的值
39
+ - name (string):原生 name 属性
40
+ - placeholder (string):输入框占位文本
41
+ - precision (number):数值精度
42
+ - validateEvent (boolean,默认 true):是否触发表单验证
43
+ - ariaLabel (string):原生 aria-label 属性
44
+ - ariaLabelledby (string):原生 aria-labelledby 属性;显式传入时优先于浮动标签自动关联的文本
45
+ - inputmode ('search' | 'none' | 'text' | 'email' | 'tel' | 'url' | 'numeric' | 'decimal',默认 见文档):原生 inputmode 属性,用于虚拟键盘
46
+ - align ('left' | 'right' | 'center',默认 center):输入文本对齐方式
47
+ - disabledScientific (boolean):是否禁用科学计数法输入(如 e、E)
48
+ - formatter ((value: string) => string):指定输入框展示值的格式
49
+ - parser ((value: string) => string):指定从格式化输入中提取值的方式
50
+ - tabindex (string | number,默认 0):原生 tabindex 属性
51
+ - floatLabel (boolean):是否启用 Material 风格浮动标签
52
+
53
+ ## Events
54
+
55
+ - change((currentValue: number | undefined, oldValue: number | undefined)):绑定值被改变时触发
56
+ - blur((event: FocusEvent)):在组件 Input 失去焦点时触发
57
+ - focus((event: FocusEvent)):在组件 Input 获得焦点时触发
58
+ - input((value: number | null | undefined)):在输入框输入时触发
59
+ - update:modelValue((value: number | undefined)):绑定值变化时触发
60
+
61
+ ## Exposes
62
+
63
+ - focus(() => void):使 input 组件获取焦点
64
+ - blur(() => void):使 input 组件失去焦点
65
+
66
+ ## 视觉提示
67
+
68
+ - 形状:矩形输入框
69
+ - 密度:中等
70
+ - 插槽内容:decrease-icon:自定义内容;increase-icon:自定义内容;prefix:自定义内容
71
+ - CSS 变量:--el-border-color、--el-border-radius-base、--el-color-primary、--el-font-size-base
72
+
73
+ ## 示例
74
+
75
+ ### 数字输入
76
+
77
+ ```vue
78
+ <script setup lang="ts">
79
+ import { ref } from 'vue'
80
+ import { EpInputNumber } from 'ep-craft'
81
+
82
+ const value = ref(1)
83
+ </script>
84
+
85
+ <template>
86
+ <ep-input-number v-model="value" />
87
+ </template>
88
+ ```
89
+
90
+ ### 范围限制
91
+
92
+ ```vue
93
+ <script setup lang="ts">
94
+ import { ref } from 'vue'
95
+ import { EpInputNumber } from 'ep-craft'
96
+
97
+ const value = ref(50)
98
+ </script>
99
+
100
+ <template>
101
+ <ep-input-number v-model="value" :min="0" :max="100" />
102
+ </template>
103
+ ```
104
+
105
+ ### 固定步长
106
+
107
+ ```vue
108
+ <script setup lang="ts">
109
+ import { ref } from 'vue'
110
+ import { EpInputNumber } from 'ep-craft'
111
+
112
+ const value = ref(2)
113
+ </script>
114
+
115
+ <template>
116
+ <ep-input-number v-model="value" :step="2" step-strictly />
117
+ </template>
118
+ ```
119
+
120
+ ## 相关条目
121
+
122
+ - EpInput
123
+ - EpSlider
124
+
125
+ ---
126
+
127
+ ep-craft 0.2.0