x-next 1.12.0 → 1.14.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 (226) hide show
  1. package/AI_CODING.md +6 -5
  2. package/AI_USAGE/catalog.md +106 -105
  3. package/AI_USAGE/components/alert-api.md +48 -0
  4. package/AI_USAGE/components/alert.md +222 -3
  5. package/AI_USAGE/components/bar-chart-api.md +177 -0
  6. package/AI_USAGE/components/bar-chart.md +297 -3
  7. package/AI_USAGE/components/boxicons.md +147 -0
  8. package/AI_USAGE/components/button-api.md +144 -0
  9. package/AI_USAGE/components/button.md +447 -3
  10. package/AI_USAGE/components/charts.md +81 -0
  11. package/AI_USAGE/components/checkbox-api.md +145 -0
  12. package/AI_USAGE/components/checkbox.md +365 -3
  13. package/AI_USAGE/components/color-picker-api.md +52 -0
  14. package/AI_USAGE/components/color-picker.md +211 -3
  15. package/AI_USAGE/components/config-provider-api.md +38 -0
  16. package/AI_USAGE/components/config-provider.md +250 -3
  17. package/AI_USAGE/components/date-picker-api.md +1114 -0
  18. package/AI_USAGE/components/date-picker.md +378 -3
  19. package/AI_USAGE/components/dialog-api.md +142 -0
  20. package/AI_USAGE/components/dialog.md +284 -3
  21. package/AI_USAGE/components/draggable-api.md +146 -0
  22. package/AI_USAGE/components/draggable.md +259 -0
  23. package/AI_USAGE/components/drawer-api.md +78 -0
  24. package/AI_USAGE/components/drawer.md +227 -0
  25. package/AI_USAGE/components/dropdown-api.md +529 -0
  26. package/AI_USAGE/components/dropdown.md +392 -3
  27. package/AI_USAGE/components/empty-api.md +36 -0
  28. package/AI_USAGE/components/empty.md +227 -3
  29. package/AI_USAGE/components/finicon.md +88 -0
  30. package/AI_USAGE/components/form-api.md +524 -0
  31. package/AI_USAGE/components/form.md +454 -0
  32. package/AI_USAGE/components/grid-api.md +527 -0
  33. package/AI_USAGE/components/grid.md +224 -0
  34. package/AI_USAGE/components/heatmap-api.md +122 -0
  35. package/AI_USAGE/components/heatmap.md +220 -0
  36. package/AI_USAGE/components/icon-api.md +4707 -0
  37. package/AI_USAGE/components/icon.md +257 -0
  38. package/AI_USAGE/components/image-api.md +440 -0
  39. package/AI_USAGE/components/image.md +465 -0
  40. package/AI_USAGE/components/input-api.md +184 -0
  41. package/AI_USAGE/components/input-number-api.md +66 -0
  42. package/AI_USAGE/components/input-number.md +294 -0
  43. package/AI_USAGE/components/input-tag-api.md +114 -0
  44. package/AI_USAGE/components/input-tag.md +482 -0
  45. package/AI_USAGE/components/input.md +293 -3
  46. package/AI_USAGE/components/layout-api.md +147 -0
  47. package/AI_USAGE/components/layout.md +230 -0
  48. package/AI_USAGE/components/line-chart-api.md +197 -0
  49. package/AI_USAGE/components/line-chart.md +279 -3
  50. package/AI_USAGE/components/link-api.md +42 -0
  51. package/AI_USAGE/components/link.md +197 -0
  52. package/AI_USAGE/components/menu-api.md +516 -0
  53. package/AI_USAGE/components/menu.md +268 -0
  54. package/AI_USAGE/components/message-api.md +215 -0
  55. package/AI_USAGE/components/message-box-api.md +108 -0
  56. package/AI_USAGE/components/message-box.md +268 -3
  57. package/AI_USAGE/components/message.md +231 -3
  58. package/AI_USAGE/components/network-api.md +91 -0
  59. package/AI_USAGE/components/network.md +378 -0
  60. package/AI_USAGE/components/notification-api.md +236 -0
  61. package/AI_USAGE/components/notification.md +275 -3
  62. package/AI_USAGE/components/pagination-api.md +62 -0
  63. package/AI_USAGE/components/pagination.md +386 -5
  64. package/AI_USAGE/components/pie-chart-api.md +109 -0
  65. package/AI_USAGE/components/pie-chart.md +245 -3
  66. package/AI_USAGE/components/popconfirm-api.md +75 -0
  67. package/AI_USAGE/components/popconfirm.md +231 -3
  68. package/AI_USAGE/components/popover-api.md +75 -0
  69. package/AI_USAGE/components/popover.md +208 -3
  70. package/AI_USAGE/components/popup-api.md +75 -0
  71. package/AI_USAGE/components/popup.md +52 -0
  72. package/AI_USAGE/components/progress-api.md +44 -0
  73. package/AI_USAGE/components/progress.md +248 -3
  74. package/AI_USAGE/components/radio-api.md +165 -0
  75. package/AI_USAGE/components/radio.md +259 -3
  76. package/AI_USAGE/components/rate-api.md +54 -0
  77. package/AI_USAGE/components/rate.md +233 -3
  78. package/AI_USAGE/components/resize-box-api.md +56 -0
  79. package/AI_USAGE/components/resize-box.md +231 -0
  80. package/AI_USAGE/components/scrollbar-api.md +77 -0
  81. package/AI_USAGE/components/scrollbar.md +218 -0
  82. package/AI_USAGE/components/select-api.md +758 -0
  83. package/AI_USAGE/components/select.md +640 -3
  84. package/AI_USAGE/components/skeleton-api.md +85 -0
  85. package/AI_USAGE/components/skeleton.md +150 -0
  86. package/AI_USAGE/components/slider-api.md +51 -0
  87. package/AI_USAGE/components/slider.md +233 -3
  88. package/AI_USAGE/components/space-api.md +38 -0
  89. package/AI_USAGE/components/space.md +145 -0
  90. package/AI_USAGE/components/spin-api.md +43 -0
  91. package/AI_USAGE/components/spin.md +205 -0
  92. package/AI_USAGE/components/steps-api.md +111 -0
  93. package/AI_USAGE/components/steps.md +201 -3
  94. package/AI_USAGE/components/switch-api.md +58 -0
  95. package/AI_USAGE/components/switch.md +290 -3
  96. package/AI_USAGE/components/table-api.md +2919 -0
  97. package/AI_USAGE/components/table.md +1414 -0
  98. package/AI_USAGE/components/tabs-api.md +135 -0
  99. package/AI_USAGE/components/tabs.md +308 -3
  100. package/AI_USAGE/components/tag-api.md +124 -0
  101. package/AI_USAGE/components/tag.md +292 -0
  102. package/AI_USAGE/components/textarea-api.md +55 -0
  103. package/AI_USAGE/components/textarea.md +326 -3
  104. package/AI_USAGE/components/time-picker-api.md +137 -0
  105. package/AI_USAGE/components/time-picker.md +271 -3
  106. package/AI_USAGE/components/time-range-selector-api.md +44 -0
  107. package/AI_USAGE/components/time-range-selector.md +355 -0
  108. package/AI_USAGE/components/timeline-api.md +93 -0
  109. package/AI_USAGE/components/timeline.md +312 -0
  110. package/AI_USAGE/components/tooltip-api.md +77 -0
  111. package/AI_USAGE/components/tooltip.md +182 -0
  112. package/AI_USAGE/components/trend-chart-api.md +119 -0
  113. package/AI_USAGE/components/trend-chart.md +335 -0
  114. package/AI_USAGE/components/trigger-api.md +124 -0
  115. package/AI_USAGE/components/trigger.md +185 -0
  116. package/AI_USAGE/components/upload-api.md +200 -0
  117. package/AI_USAGE/components/upload.md +711 -3
  118. package/AI_USAGE/components/watermark-api.md +87 -0
  119. package/AI_USAGE/components/watermark.md +200 -0
  120. package/AI_USAGE/core.md +1 -1
  121. package/AI_USAGE/index.md +35 -7
  122. package/AI_USAGE/recipes/form-on-demand.md +1 -1
  123. package/AI_USAGE.md +33657 -7
  124. package/CHANGELOG.md +40 -0
  125. package/dist/_utils/inherit-component-type.d.ts +11 -0
  126. package/dist/components/date-picker/index.d.ts +420 -5
  127. package/dist/components/form-input/index.d.ts +617 -2
  128. package/dist/components/layout/index.d.ts +689 -1
  129. package/dist/components/menu/index.d.ts +786 -1
  130. package/dist/components/network/Network.vue.d.ts +7 -3
  131. package/dist/components/network/index.d.ts +10 -2
  132. package/dist/components/network/props.d.ts +5 -0
  133. package/dist/components/network/utils.d.ts +3 -3
  134. package/dist/components/pagination/page-item-ellipsis.vue.d.ts +4 -1
  135. package/dist/components/pagination/page-item-step.vue.d.ts +101 -130
  136. package/dist/components/pagination/page-item.vue.d.ts +1 -0
  137. package/dist/components/pagination/page-jumper.vue.d.ts +1 -1
  138. package/dist/components/pagination/page-options.vue.d.ts +6 -4
  139. package/dist/components/pagination/utils.d.ts +3 -0
  140. package/dist/components/time-range-selector/index.d.ts +6 -6
  141. package/dist/es/_container/resize-observer-v2.js +1 -1
  142. package/dist/es/_container/resize-observer.js +1 -1
  143. package/dist/es/_hooks/use-resize-observer.js +1 -1
  144. package/dist/es/_styles/palette-aliases.js +4 -4
  145. package/dist/es/_utils/inherit-component-type.js +6 -0
  146. package/dist/es/_virtual/advancedFormat.js +1 -1
  147. package/dist/es/_virtual/customParseFormat.js +1 -1
  148. package/dist/es/_virtual/dayjs.min.js +1 -1
  149. package/dist/es/_virtual/isBetween.js +1 -1
  150. package/dist/es/_virtual/quarterOfYear.js +1 -1
  151. package/dist/es/_virtual/weekOfYear.js +1 -1
  152. package/dist/es/_virtual/weekYear.js +1 -1
  153. package/dist/es/_virtual/zh-cn.js +1 -1
  154. package/dist/es/components/button/Button.js +53 -42
  155. package/dist/es/components/date-picker/index.js +18 -17
  156. package/dist/es/components/draggable/useDraggable.js +1 -1
  157. package/dist/es/components/form/Form.vue2.js +1 -1
  158. package/dist/es/components/form/FormItem.vue2.js +1 -1
  159. package/dist/es/components/form-input/index.js +12 -11
  160. package/dist/es/components/form-input-number/InputNumber.js +1 -1
  161. package/dist/es/components/form-slider/Slider.vue2.js +1 -1
  162. package/dist/es/components/form-slider/slider-ticks.vue2.js +1 -1
  163. package/dist/es/components/form-slider/utils.js +1 -1
  164. package/dist/es/components/layout/index.js +10 -9
  165. package/dist/es/components/menu/MenuItem.js +1 -1
  166. package/dist/es/components/menu/hooks/use-level.js +5 -5
  167. package/dist/es/components/menu/index.js +13 -10
  168. package/dist/es/components/menu/overflow-wrap.js +1 -1
  169. package/dist/es/components/network/Network.vue.js +17 -12
  170. package/dist/es/components/network/Network.vue2.js +78 -70
  171. package/dist/es/components/network/utils.js +112 -71
  172. package/dist/es/components/pagination/Pagination.js +132 -123
  173. package/dist/es/components/pagination/page-item-ellipsis.vue.js +10 -10
  174. package/dist/es/components/pagination/page-item-ellipsis.vue2.js +24 -19
  175. package/dist/es/components/pagination/page-item-step.vue.js +14 -11
  176. package/dist/es/components/pagination/page-item-step.vue2.js +20 -22
  177. package/dist/es/components/pagination/page-item.vue.js +10 -9
  178. package/dist/es/components/pagination/page-item.vue2.js +24 -19
  179. package/dist/es/components/pagination/page-jumper.vue2.js +23 -23
  180. package/dist/es/components/pagination/page-options.vue.js +15 -10
  181. package/dist/es/components/pagination/page-options.vue2.js +21 -17
  182. package/dist/es/components/pagination/utils.js +4 -2
  183. package/dist/es/components/progress/circle.vue2.js +1 -1
  184. package/dist/es/components/progress/line.vue2.js +1 -1
  185. package/dist/es/components/progress/steps.vue2.js +1 -1
  186. package/dist/es/components/rate/Rate.js +1 -1
  187. package/dist/es/components/virtual-list-v2/virtual-list-item.js +1 -1
  188. package/dist/es/locale/en-US.js +2 -0
  189. package/dist/es/locale/zh-CN.js +2 -0
  190. package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/dayjs@1.11.21/node_modules/dayjs/dayjs.min.js +1 -1
  191. package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/dayjs@1.11.21/node_modules/dayjs/locale/zh-cn.js +1 -1
  192. package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/advancedFormat.js +1 -1
  193. package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/customParseFormat.js +1 -1
  194. package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/isBetween.js +1 -1
  195. package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/quarterOfYear.js +1 -1
  196. package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/weekOfYear.js +1 -1
  197. package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/dayjs@1.11.21/node_modules/dayjs/plugin/weekYear.js +1 -1
  198. package/dist/es/style.css +1 -1
  199. package/dist/index.cjs +3 -3
  200. package/dist/index.umd.js +3 -3
  201. package/dist/locale/interface.d.ts +3 -0
  202. package/dist/style/base.css +1 -1
  203. package/dist/style/button.css +1 -1
  204. package/dist/style/form-select.css +1 -1
  205. package/dist/style/network.css +1 -1
  206. package/dist/style/pagination.css +1 -1
  207. package/dist/style/table.css +1 -1
  208. package/dist/style.css +1 -1
  209. package/package.json +10 -5
  210. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/index.js +0 -0
  211. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/is.js +0 -0
  212. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/locale/en-US.js +0 -0
  213. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/rules/array.js +0 -0
  214. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/rules/base.js +0 -0
  215. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/rules/boolean.js +0 -0
  216. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/rules/custom.js +0 -0
  217. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/rules/number.js +0 -0
  218. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/rules/object.js +0 -0
  219. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/rules/string.js +0 -0
  220. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/rules/type.js +0 -0
  221. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/b-validate@1.5.3/node_modules/b-validate/es/util.js +0 -0
  222. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/compute-scroll-into-view@3.1.1/node_modules/compute-scroll-into-view/dist/index.js +0 -0
  223. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/number-precision@1.6.0/node_modules/number-precision/build/index.es.js +0 -0
  224. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +0 -0
  225. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/scroll-into-view-if-needed@3.1.0/node_modules/scroll-into-view-if-needed/dist/index.js +0 -0
  226. /package/dist/es/{Users/xuyu/Code/x-next/node_modules → node_modules}/.pnpm/sortablejs@1.15.7/node_modules/sortablejs/modular/sortable.esm.js +0 -0
@@ -1,12 +1,14 @@
1
1
  <!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
2
2
  # BarChart AI 使用
3
3
 
4
- 适用版本:x-next@1.12.0;来源指纹:`9f9adf42b42dc1e551f500aabdcb7fb07b69a93ea44ff3dc1d16dab1a4c85843`。
4
+ 适用版本:x-next@1.14.0;来源指纹:`014984639d816a2c7e25eb22690c586b0b2e8efba6846bec8a4e424db41a09e9`。
5
5
 
6
- 先读 [通用接入](../core.md)。公开导出:`BarChart`;模型:无;已核对事件:barClick、legendChange。
6
+ 先读 [通用接入](../core.md)。公开导出:`BarChart`;主要模型:无。完整 Props、Events、Slots、实例方法与服务签名见 [本地 API](./bar-chart-api.md),包含本组件族全部子组件和别名。
7
7
 
8
8
  按需样式:`x-next/style/bar-chart`(包含 base.css、bar-chart.css、spin.css)。代码块未单独引样式时在应用入口加载全量样式,或按实际所有组件加载 JS 入口;不要仅因复制一个组件页就漏掉其中的 Button 等组合依赖。
9
9
 
10
+ ## 已核验行为与示例
11
+
10
12
  [组件文档与 live demo](https://x-next.yjmf.com/components/bar-chart)。按天 / 小时聚合的柱状趋势图:`categories` 是类目轴标签,`series` 是数据系列(`{ name, data, color }`),两者按下标对应。单系列就是普通柱状图;多系列默认并排,加 `stack` 变成堆叠。默认提示在当前类目有效条目多于一项时显示合计,与 stack 无直接关联;多系列时零值条目会过滤,隐藏系列不参与提示。轻量迷你走势用 TrendChart,需要坐标轴与读数用本组件。
11
13
 
12
14
  数值轴自动取 1/2/5 步长的整洁刻度(所以刻度行数可能少于 `grid.horizontalLinesNumber`);传 `max` 可锁定上界。`loading` 显示加载遮罩;数据全为 0 时显示空态,可用 `empty` 插槽替换。`null` / 负数按 0 处理且不画柱体。
@@ -45,4 +47,296 @@ function onBarClick(data: { label: string; total: number; value: number | null }
45
47
  </template>
46
48
  ```
47
49
 
48
- 返回 [AI 索引](../index.md)。精选示例不是完整 API 表,新能力先查同版本公开类型与组件文档。
50
+ ## 场景用法
51
+
52
+ 以下示例从本地 `src/docs/components/bar-chart.md` 显式导入到独立 AI 源,补齐局部注册、状态和样式后进行严格模板检查。上方已核验行为优先;原始 prop 默认值、包装透传和示例业务适配分别查 [完整 API](./bar-chart-api.md) 与场景说明。类型通过不代表所有散文和交互已验证。
53
+
54
+ ### 用途与选型
55
+
56
+ 用于展示按天(或任意时间粒度)聚合的指标趋势,支持单系列柱状、多系列并排与堆叠,内置悬浮提示、图例联动和键盘导航。
57
+
58
+
59
+ ### 何时使用
60
+
61
+ - 需要在时间轴上比较各周期的高低,且起点为零(计数、访问量、消费金额这类可加量)。
62
+ - 数据按天 / 小时聚合,关注的是分布形态与峰值位置,而不是精确到小数点的读数。
63
+ - 单系列看趋势,多系列看结构(并排比较或堆叠看总量与构成)。
64
+
65
+
66
+ ### 与其它图表的分工
67
+
68
+ | 场景 | 选择 |
69
+ | --- | --- |
70
+ | 随时间看变化趋势 | [LineChart 折线图](./line-chart.md) |
71
+ | 看占比构成 | [PieChart 饼图](./pie-chart.md) |
72
+ | 卡片角落的一行迷你走势,不需要坐标轴和读数 | [TrendChart 迷你趋势图](./trend-chart.md) |
73
+ | 需要坐标轴刻度、悬浮读数、多系列对比或堆叠 | BarChart(本页) |
74
+
75
+ 完整的选择指引见[图表总览](./charts.md)。
76
+
77
+
78
+ ### 基础用法
79
+
80
+ `categories` 与每个系列 `data` 按下标一一对应,数值上限由组件自动取整到 5、10、15 这类整洁刻度。
81
+
82
+ ```vue
83
+ <script setup lang="ts">
84
+ import 'x-next/style.css';
85
+ import { BarChart } from 'x-next';
86
+ import { ref } from 'vue';
87
+
88
+ const categories = ref(['09-28', '09-29', '09-30', '10-01', '10-02']);
89
+ const views = ref([86, 142, 98, 210, 176]);
90
+ </script>
91
+ <template>
92
+ <BarChart
93
+ :categories="categories"
94
+ :series="[{ name: '浏览量', data: views }]"
95
+ ariaLabel="近 30 天每日浏览量"
96
+ />
97
+ </template>
98
+ ```
99
+
100
+ ### 完整日期与窄容器
101
+
102
+ 调整预览宽度或切换长类目名称。标签会按可用空间抽稀,优先保留末位,并在边缘收边;单个超长标签会省略,悬停省略文字可读完整内容。
103
+
104
+ ```vue
105
+ <script setup lang="ts">
106
+ import 'x-next/style.css';
107
+ import { ref } from 'vue';
108
+ import { BarChart } from 'x-next';
109
+
110
+ const width = ref(320);
111
+ const categories = Array.from({ length: 30 }, (_, index) =>
112
+ new Date(Date.UTC(2026, 8, 6 + index)).toISOString().slice(0, 10),
113
+ );
114
+ const series = [{ name: '浏览量', data: Array.from({ length: 30 }, (_, index) => 8 + index % 19) }];
115
+ </script>
116
+ <template>
117
+ <label>宽度 <input v-model.number="width" type="range" min="240" max="966" /></label>
118
+ <div :style="{ width: `${width}px`, maxWidth: '100%' }">
119
+ <BarChart :categories="categories" :series="series" />
120
+ </div>
121
+ </template>
122
+ ```
123
+
124
+ ### 多系列与堆叠
125
+
126
+ 多系列默认并排比较;打开 `stack` 后自下而上堆叠,提示中会给出各类目合计,适合看「总量 + 构成」。
127
+
128
+ ```vue
129
+ <script setup lang="ts">
130
+ import 'x-next/style.css';
131
+ import { BarChart } from 'x-next';
132
+ const formatMoney = (value: number) => `¥${value.toFixed(2)}`;
133
+
134
+ import { ref } from 'vue';
135
+
136
+ const categories = ref(['09-28', '09-29', '09-30']);
137
+ const series = ref([
138
+ { name: '李守东', data: [43.38, 12.4, 30.05] },
139
+ { name: '唐忠阳', data: [18.29, 26.1, 8.6] },
140
+ { name: '许宇', data: [58.59, 31.2, 24.4] },
141
+ ]);
142
+ </script>
143
+ <template>
144
+ <BarChart
145
+ :categories="categories"
146
+ :series="series"
147
+ stack
148
+ :value-formatter="formatMoney"
149
+ ariaLabel="近 30 天各用户消费金额"
150
+ />
151
+ </template>
152
+ ```
153
+
154
+ ### 图例联动
155
+
156
+ 开启 `legend` 后点击图例项可临时隐藏某个系列,数值轴会按剩余可见系列重新计算。
157
+
158
+ ```vue
159
+ <script setup lang="ts">
160
+ import 'x-next/style.css';
161
+ import { BarChart } from 'x-next';
162
+ import { ref } from 'vue';
163
+
164
+ const categories = ref(['09-28', '09-29', '09-30']);
165
+ const series = ref([
166
+ { name: '李守东', data: [43.38, 12.4, 30.05] },
167
+ { name: '唐忠阳', data: [18.29, 26.1, 8.6] },
168
+ ]);
169
+ const visibleIndexes = ref([0, 1]);
170
+ const onLegendChange = (indexes: number[]) => {
171
+ visibleIndexes.value = indexes;
172
+ };
173
+ </script>
174
+ <template>
175
+ <BarChart
176
+ :categories="categories"
177
+ :series="series"
178
+ legend
179
+ @legend-change="onLegendChange"
180
+ />
181
+ <p>当前可见系列:{{ visibleIndexes.length }}</p>
182
+ </template>
183
+ ```
184
+
185
+ ### 坐标轴与网格
186
+
187
+ `labels` 控制轴标签的显示与格式化,`grid` 控制横向网格线,`max` 可以锁定数值轴上界。
188
+
189
+ ```vue
190
+ <script setup lang="ts">
191
+ import 'x-next/style.css';
192
+ import { BarChart } from 'x-next';
193
+ import { ref } from 'vue';
194
+
195
+ const categories = ref(Array.from({ length: 24 }, (_, i) => `${String(i).padStart(2, '0')}:00`));
196
+ const requests = ref([12, 8, 6, 5, 4, 7, 18, 42, 76, 120, 143, 138, 126, 151, 164, 149, 132, 118, 96, 74, 52, 38, 26, 17]);
197
+ </script>
198
+ <template>
199
+ <BarChart
200
+ :categories="categories"
201
+ :series="[{ name: '请求次数', data: requests }]"
202
+ :max="200"
203
+ :grid="{ horizontalLinesNumber: 5 }"
204
+ :labels="{
205
+ xFormatter: (label: string) => label.replace(':00', ''),
206
+ yFormatter: (value: number) => `${value}`,
207
+ }"
208
+ />
209
+ </template>
210
+ ```
211
+
212
+ ### 自定义提示与点击事件
213
+
214
+ `tooltip` 插槽可完全接管浮层内容;点击柱体触发 `bar-click`,未命中柱体(如零值类目)时 `seriesIndex` 与 `value` 为 `null`。
215
+
216
+ ```vue
217
+ <script setup lang="ts">
218
+ import 'x-next/style.css';
219
+ import { BarChart } from 'x-next';
220
+ import { ref } from 'vue';
221
+
222
+ const categories = ref(['09-28', '09-29', '09-30']);
223
+ const series = ref([
224
+ { name: '李守东', data: [43.38, 12.4, 30.05] },
225
+ { name: '唐忠阳', data: [18.29, 26.1, 8.6] },
226
+ ]);
227
+ const clickLog = ref('尚未点击柱体');
228
+ const onBarClick = (data: { label: string; total: number; value: number | null }) => {
229
+ clickLog.value = `${data.label}:合计 ${data.total}`;
230
+ };
231
+ </script>
232
+ <template>
233
+ <BarChart
234
+ :categories="categories"
235
+ :series="series"
236
+ stack
237
+ @bar-click="onBarClick"
238
+ >
239
+ <template #tooltip="{ label, total, items, formatValue }">
240
+ <div style="font-weight: 500">{{ label }}</div>
241
+ <div v-for="item in items" :key="item.seriesIndex">
242
+ <span>{{ item.name }}</span>
243
+ <span>{{ formatValue(item.value) }}</span>
244
+ </div>
245
+ <div>合计 {{ formatValue(total) }}</div>
246
+ </template>
247
+ </BarChart>
248
+ <p>{{ clickLog }}</p>
249
+ </template>
250
+ ```
251
+
252
+ ### 数据粒度切换
253
+
254
+ 粒度和主题切换这类外部状态改变时重新传入 `categories` / `series` 即可,组件会重新测量并按新宽度抽稀 x 轴标签。
255
+
256
+ ```vue
257
+ <script setup lang="ts">
258
+ import 'x-next/style.css';
259
+ import { RadioGroup, Radio, BarChart } from 'x-next';
260
+ import { computed, ref } from 'vue';
261
+
262
+ const granularity = ref('day');
263
+ const dayCategories = ['09-28', '09-29', '09-30'];
264
+ const dayValues = [86, 142, 98];
265
+ const hourCategories = ['00:00', '01:00', '02:00', '03:00'];
266
+ const hourValues = [12, 8, 6, 5];
267
+
268
+ const categories = computed(() => (granularity.value === 'day' ? dayCategories : hourCategories));
269
+ const values = computed(() => (granularity.value === 'day' ? dayValues : hourValues));
270
+ </script>
271
+ <template>
272
+ <RadioGroup v-model="granularity" type="button">
273
+ <Radio value="day">按天</Radio>
274
+ <Radio value="hour">按小时</Radio>
275
+ </RadioGroup>
276
+ <BarChart
277
+ :categories="categories"
278
+ :series="[{ name: '浏览量', data: values }]"
279
+ />
280
+ </template>
281
+ ```
282
+
283
+ ### 自定义颜色与柱形
284
+
285
+ `series[].color` 覆盖单系列的取色,`bar` 插槽可以完全自绘柱体(例如渐变色块)。
286
+
287
+ ```vue
288
+ <script setup lang="ts">
289
+ import 'x-next/style.css';
290
+ import { BarChart } from 'x-next';
291
+ import { ref } from 'vue';
292
+
293
+ const categories = ref(['09-28', '09-29', '09-30', '10-01']);
294
+ const values = ref([86, 142, 98, 210]);
295
+ </script>
296
+ <template>
297
+ <BarChart
298
+ :categories="categories"
299
+ :series="[{ name: '浏览量', data: values, color: '#16a34a' }]"
300
+ :bar-radius="8"
301
+ :bar-width="18"
302
+ />
303
+ </template>
304
+ ```
305
+
306
+ ### 加载与空数据
307
+
308
+ `loading` 覆盖加载遮罩;全部为 0 或没有系列时显示空态,可用 `empty` 插槽替换。
309
+
310
+ ```vue
311
+ <script setup lang="ts">
312
+ import 'x-next/style.css';
313
+ import { BarChart } from 'x-next';
314
+ import { ref } from 'vue';
315
+
316
+ const loading = ref(true);
317
+ const categories = ref(['09-28', '09-29', '09-30']);
318
+ const series = ref([{ name: '浏览量', data: [86, 142, 98] }]);
319
+ </script>
320
+ <template>
321
+ <BarChart
322
+ :categories="categories"
323
+ :series="series"
324
+ :loading="loading"
325
+ >
326
+ <template #empty>暂无该时段数据</template>
327
+ </BarChart>
328
+ </template>
329
+ ```
330
+
331
+ ### 交互说明
332
+
333
+ - **数值轴刻度**:默认按 1 / 2 / 5 步长取整,刻度值始终是 `0.5`、`80`、`1,500,000` 这类可读值;因此实际刻度行数可能少于 `horizontalLinesNumber`。传 `max` 后按锁定值均分。
334
+ - **缺测与零值**:`null`、`undefined` 与负数按 0 处理且不渲染柱体(避免出现贴底假柱),全部为 0 时显示空态。
335
+ - **堆叠间隙**:堆叠分段之间保留 1px 间隙,基线不缩,柱体始终坐落在轴线上。
336
+ - **x 轴标签**:按当前宽度和文字宽度自动抽稀,优先保留末位;收边后再次检查间距。空间不足时省略其他标签,单个超长标签以省略号显示并提供完整文字提示;连省略号也放不下时不绘制标签。
337
+ - **键盘导航**:绘图区可聚焦,左右方向键移动读数、Home / End 跳到首尾、Esc 关闭提示;键盘导航时通过 `aria-live` 播报,鼠标悬浮不播报。
338
+ - **性能**:整块画布只挂一个 mousemove 与一个提示节点,不为每个柱体创建浮层或监听器。
339
+
340
+
341
+
342
+ 返回 [AI 索引](../index.md)。先查本页与 [本地 API](./bar-chart-api.md);需要更深类型时查 [公开组件导航](../catalog.md),不默认上网查找本包用法。
@@ -0,0 +1,147 @@
1
+ <!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
2
+ # Boxicons AI 用法
3
+
4
+ 适用版本:x-next@1.14.0;来源指纹:`014984639d816a2c7e25eb22690c586b0b2e8efba6846bec8a4e424db41a09e9`。
5
+
6
+ 先读 [通用接入](../core.md)。本地组件文档导入的选型和配套资源用法。
7
+
8
+ ### 用途与选型
9
+
10
+ Boxicons 是三风格单色图标库,x-next 接入为 `boxicons-basic:*`、`boxicons-filled:*`、`boxicons-brands:*` 三个命名空间,调用方式与通用图标一致。来源见 [Boxicons 官网](https://boxicons.com),数据同步自 `@boxicons/core@1.0.6`。
11
+
12
+
13
+ ### 何时使用
14
+
15
+ - 通用图标(Lucide)覆盖不到、但 Boxicons 有的场景:`filled` 实心风格适合强调型入口,`basic` 轮廓风格适合通用操作。
16
+ - 需要品牌 Logo 图标时用 `brands`,例如 GitHub、社交与支付渠道标识。
17
+ - 不需要默认引入:Boxicons 数据与主包隔离,只有显式注册才会进入业务产物。
18
+
19
+
20
+ ### 图标浏览器
21
+
22
+ 点击任意图标在页面底部打开详情栏,可复制组件代码、名称或 SVG。三个风格包按需懒加载,首次切换风格或搜索命中其他风格时会加载对应数据。
23
+
24
+ ```vue
25
+ <script setup lang="ts">
26
+ import 'x-next/style.css';
27
+ import { Icon } from 'x-next';
28
+ import { ref } from 'vue';
29
+ import { registerBoxiconsFilled } from 'x-next/icons/boxicons/filled';
30
+
31
+ // 显式注册一次;不注册时图标名不存在,与默认图标源完全隔离
32
+ registerBoxiconsFilled();
33
+
34
+ const visible = ref(true);
35
+ </script>
36
+ <template>
37
+ <Icon name="boxicons-filled:home" :size="20" />
38
+ <Icon name="boxicons-filled:rocket" :size="20" color="var(--x-color-primary-6)" />
39
+ <Icon v-if="visible" name="boxicons-filled:bell" :size="20" />
40
+ </template>
41
+ ```
42
+
43
+ ### 尺寸、颜色和旋转
44
+
45
+ Boxicons 是填充型单色图标,颜色跟随 `color`(CSS 为 `fill: currentcolor`),`strokeWidth` 对它不起作用。本节示例使用本页默认加载的 Basic 风格;Filled、Brands 的样式可在上方图标浏览器切换预览。
46
+
47
+ ```vue
48
+ <script setup lang="ts">
49
+ import 'x-next/style.css';
50
+ import { Icon } from 'x-next';
51
+
52
+ import { registerBoxiconsBasic } from 'x-next/icons/boxicons/basic';
53
+ registerBoxiconsBasic();
54
+ </script>
55
+ <template>
56
+ <Icon name="boxicons-basic:home" :size="18" />
57
+ <Icon name="boxicons-basic:home" :size="26" color="var(--x-color-primary-6)" />
58
+ <Icon name="boxicons-basic:heart" :size="32" color="var(--x-color-danger-6)" />
59
+ <Icon name="boxicons-basic:star" :size="32" color="var(--x-color-warning-6)" :rotate="18" />
60
+ </template>
61
+ ```
62
+
63
+ ### 组件组合
64
+
65
+ ```vue
66
+ <script setup lang="ts">
67
+ import 'x-next/style.css';
68
+ import { Button, Icon, Tag, Input } from 'x-next';
69
+
70
+ import { registerBoxiconsBasic } from 'x-next/icons/boxicons/basic';
71
+ registerBoxiconsBasic();
72
+ </script>
73
+ <template>
74
+ <Button type="primary">
75
+ <template #icon>
76
+ <Icon name="boxicons-basic:rocket" />
77
+ </template>
78
+ 发布
79
+ </Button>
80
+
81
+ <Tag color="blue">
82
+ <Icon name="boxicons-basic:star" />
83
+ 收藏
84
+ </Tag>
85
+
86
+ <Input placeholder="搜索" style="width: 220px">
87
+ <template #prefix>
88
+ <Icon name="boxicons-basic:search" />
89
+ </template>
90
+ </Input>
91
+ </template>
92
+ ```
93
+
94
+ ### 注册与按需导入
95
+
96
+ Boxicons 不进入默认图标源,也不会自动注册。按风格从子路径导入并注册,未使用的风格不会进入业务产物:
97
+
98
+ | 导出 | 说明 |
99
+ | --- | --- |
100
+ | `registerBoxiconsBasic()` | 注册 1884 个 Basic 轮廓图标 |
101
+ | `registerBoxiconsFilled()` | 注册 1884 个 Filled 实心图标 |
102
+ | `registerBoxiconsBrands()` | 注册 295 个 Brands 品牌图标 |
103
+ | `registerBoxicons()` | 一次注册全部三个风格包 |
104
+ | `boxiconsPackCounts` | 各风格图标数量 |
105
+ | `boxiconsBasicNames` / `boxiconsFilledNames` / `boxiconsBrandsNames` | 各风格名称清单(`readonly string[]`,不包含 SVG 数据,可安全用于搜索、菜单) |
106
+ | `boxiconsBasicIcons` / `boxiconsFilledIcons` / `boxiconsBrandsIcons` | 名称到 SVG 的映射 |
107
+ | `BoxiconsPack` | `'basic' \| 'filled' \| 'brands'` |
108
+
109
+ 注册是按包幂等的;只需要一两个图标时,也可以从本页复制 SVG 后用 `addIcon` 注册,不必引入整个风格包。
110
+
111
+
112
+ ### 从 Boxicons 官网迁移
113
+
114
+ 官网 webfont 类名与 x-next 名称一一对应(去掉 `bx-` 前缀):
115
+
116
+ | 官网用法 | x-next 用法 |
117
+ | --- | --- |
118
+ | `<i class="bx bx-home"></i>` | `<x-icon name="boxicons-basic:home" />` |
119
+ | `<i class="bxf bx-home"></i>` | `<x-icon name="boxicons-filled:home" />` |
120
+ | `<i class="bxl bx-github"></i>` | `<x-icon name="boxicons-basic:gear" />` |
121
+
122
+
123
+ ### 体积说明
124
+
125
+ Boxicons 是大图标集,接入方式围绕“按需”设计:
126
+
127
+ | 风格 | 图标数 | ESM minified | gzip |
128
+ | --- | --- | --- | --- |
129
+ | basic | 1884 | 899 KB | 225 KB |
130
+ | filled | 1884 | 747 KB | 180 KB |
131
+ | brands | 295 | 278 KB | 106 KB |
132
+ | 合计 | 4063 | ≈ 1.9 MB | ≈ 511 KB |
133
+
134
+ - 主入口(`import { Button } from 'x-next'`)体积不受影响,`dist/index.cjs`、`dist/index.umd.js` 不包含 Boxicons 数据。
135
+ - 发布包解压后会包含这些数据(约 +3.9MB),但只有显式 `import 'x-next/icons/boxicons/*'` 的模块会进入业务产物。
136
+ - 本页图标浏览器同样按风格懒加载:首次打开只加载 Basic,切换到 Filled、Brands 或搜索出其他风格结果时再加载。
137
+
138
+
139
+ ### 来源与授权
140
+
141
+ 图标来自 [`@boxicons/core@1.0.6`](https://www.npmjs.com/package/@boxicons/core)(MIT),官方站点 [https://boxicons.com](https://boxicons.com),仓库 [box-icons/boxicons-core](https://github.com/box-icons/boxicons-core)。完整许可原文见 `src/packages/icons/public/boxicons/LICENSE.md`。
142
+
143
+ Brands 图标是第三方商标图形,MIT 许可覆盖图标文件本身,商标使用需遵循各自品牌方的规范。
144
+
145
+
146
+
147
+ 返回 [AI 索引](../index.md)。
@@ -0,0 +1,144 @@
1
+ <!-- Generated by pnpm generate:ai-usage. Edit script/ai-usage/content.md and script/ai-usage/. -->
2
+ # Button 完整公开 API
3
+
4
+ 适用版本:x-next@1.14.0;来源指纹:`014984639d816a2c7e25eb22690c586b0b2e8efba6846bec8a4e424db41a09e9`。
5
+
6
+ 从同版本构建的公开声明、运行时 props/emits 和显式 expose 生成。运行时导入始终使用 `x-next`,声明路径仅作定位。插槽类型未细化时,具体槽名与作用域见本地用法示例。
7
+
8
+ ## Button API
9
+
10
+ 公开声明:`dist/components/button/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
11
+
12
+ ### Props
13
+
14
+ | 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
15
+ | --- | --- | --- | --- | --- |
16
+ | disabled | 是否禁用 | undefined &#124; false &#124; true | 否 | false |
17
+ | block | 是否撑满父容器 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
18
+ | loading | 是否展示加载状态;加载中会拦截点击 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
19
+ | loadingFill | 加载时居中覆盖内容并保持尺寸;结束后恢复文字和插槽 | undefined &#124; false &#124; true | 否 | false |
20
+ | debounce | 点击后保持 loading 态的时间,单位 ms,用于防重复点击 | undefined &#124; number | 否 | 0 |
21
+ | shape | 胶囊形、圆形或直角;未设置时使用默认圆角 | undefined &#124; "round" &#124; "circle" &#124; "square" | 否 | undefined |
22
+ | link | 是否展示为链接按钮样式 | undefined &#124; false &#124; true | 否 | false |
23
+ | type | 按钮类型 | undefined &#124; "default" &#124; "primary" &#124; "dashed" &#124; "outline" &#124; "text" | 否 | "default" |
24
+ | htmlType | 原生按钮类型;模板中使用 html-type | undefined &#124; "button" &#124; "submit" &#124; "reset" | 否 | "button" |
25
+ | status | 按钮状态 | undefined &#124; "default" &#124; "success" &#124; "warning" &#124; "strong" &#124; "info" &#124; "danger" | 否 | "default" |
26
+ | plain | 是否朴素样式 | undefined &#124; false &#124; true | 否 | false |
27
+ | size | 按钮尺寸 | undefined &#124; "mini" &#124; "small" &#124; "medium" &#124; "large" &#124; "huge" | 否 | undefined |
28
+ | border | 是否显示边框 | undefined &#124; false &#124; true | 否 | true |
29
+ | narrow | 是否使用窄按钮,无内边距 | undefined &#124; false &#124; true | 否 | false |
30
+
31
+ ### Events
32
+
33
+ | 事件 | 用途 | 监听器签名(即事件参数) |
34
+ | --- | --- | --- |
35
+ | click | 点击按钮且按钮未禁用、未加载时触发 | undefined &#124; (...args: any[]) => any |
36
+
37
+ ### Slots
38
+
39
+ | 名称 | 用途 | 公开类型 |
40
+ | --- | --- | --- |
41
+ | default | 按钮内容 | () => any |
42
+ | prefix | 前置内容 | () => any |
43
+ | suffix | 后置内容 | () => any |
44
+ | icon | 图标内容,会渲染在文字前;仅有此插槽时按钮等宽高,请设置 aria-label | any |
45
+
46
+ ### 实例方法
47
+
48
+ 没有检索到显式 expose 或 Options API methods 的公开方法;不把 setup 内部函数当成稳定实例 API。
49
+
50
+ ### 关联类型定义
51
+
52
+ 以下摘自本组件族声明,供查阅嵌套配置;运行时和值类型均以根入口可导出项为准。
53
+
54
+ ```typescript-reference
55
+ type ButtonSize = 'mini' | 'small' | 'medium' | 'large' | 'huge';
56
+
57
+ type ButtonStatus = 'default' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
58
+
59
+ type ButtonTypes = 'primary' | 'default' | 'dashed' | 'outline' | 'text';
60
+
61
+ type ButtonHtmlType = 'button' | 'submit' | 'reset';
62
+
63
+ type ButtonShape = 'round' | 'circle' | 'square';
64
+
65
+ type ButtonProps = {
66
+ disabled?: boolean;
67
+ block?: boolean;
68
+ loading?: boolean;
69
+ loadingFill?: boolean;
70
+ debounce?: number;
71
+ shape?: ButtonShape;
72
+ link?: boolean;
73
+ type?: ButtonTypes;
74
+ htmlType?: ButtonHtmlType;
75
+ status?: ButtonStatus;
76
+ plain?: boolean;
77
+ size?: ButtonSize;
78
+ border?: boolean;
79
+ narrow?: boolean;
80
+ };
81
+ ```
82
+
83
+
84
+ ## ButtonGroup API
85
+
86
+ 公开声明:`dist/components/button/index.d.ts`。 类型中的 undefined 表示可省略;原始 prop 默认值不等于继承配置或服务默认值。
87
+
88
+ ### Props
89
+
90
+ | 名称 | 用途 | 公开类型 | 必填 | 声明默认值 |
91
+ | --- | --- | --- | --- | --- |
92
+ | type | 子按钮默认类型 | undefined &#124; "default" &#124; "primary" &#124; "dashed" &#124; "outline" &#124; "text" | 否 | 未声明 |
93
+ | status | 子按钮默认状态 | undefined &#124; "default" &#124; "success" &#124; "warning" &#124; "strong" &#124; "info" &#124; "danger" | 否 | 未声明 |
94
+ | shape | 子按钮默认形状 | undefined &#124; "round" &#124; "circle" &#124; "square" | 否 | 未声明 |
95
+ | size | 子按钮默认尺寸 | undefined &#124; "mini" &#124; "small" &#124; "medium" &#124; "large" &#124; "huge" | 否 | 未声明 |
96
+ | disabled | 是否禁用所有子按钮 | undefined &#124; false &#124; true | 否 | false(Vue Boolean 转换) |
97
+
98
+ ### Events
99
+
100
+ 未声明组件 emits;原生事件与包装透传按本页用法核实。
101
+
102
+ ### Slots
103
+
104
+ 公开类型未逐项声明插槽;本页场景说明列出实际使用的插槽,不将任意插槽视为已支持。
105
+
106
+ ### 实例方法
107
+
108
+ 没有检索到显式 expose 或 Options API methods 的公开方法;不把 setup 内部函数当成稳定实例 API。
109
+
110
+ ### 关联类型定义
111
+
112
+ 以下摘自本组件族声明,供查阅嵌套配置;运行时和值类型均以根入口可导出项为准。
113
+
114
+ ```typescript-reference
115
+ type ButtonSize = 'mini' | 'small' | 'medium' | 'large' | 'huge';
116
+
117
+ type ButtonStatus = 'default' | 'success' | 'warning' | 'strong' | 'danger' | 'info';
118
+
119
+ type ButtonTypes = 'primary' | 'default' | 'dashed' | 'outline' | 'text';
120
+
121
+ type ButtonHtmlType = 'button' | 'submit' | 'reset';
122
+
123
+ type ButtonShape = 'round' | 'circle' | 'square';
124
+
125
+ type ButtonProps = {
126
+ disabled?: boolean;
127
+ block?: boolean;
128
+ loading?: boolean;
129
+ loadingFill?: boolean;
130
+ debounce?: number;
131
+ shape?: ButtonShape;
132
+ link?: boolean;
133
+ type?: ButtonTypes;
134
+ htmlType?: ButtonHtmlType;
135
+ status?: ButtonStatus;
136
+ plain?: boolean;
137
+ size?: ButtonSize;
138
+ border?: boolean;
139
+ narrow?: boolean;
140
+ };
141
+ ```
142
+
143
+
144
+ 返回 [Button 用法](./button.md)。