@pisell/materials 1.8.38 → 1.8.41

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 (758) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +3 -3
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +216 -51
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +216 -51
  9. package/es/components/Pagination/index.js +9 -43
  10. package/es/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-dev.md +5 -2
  11. package/es/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-test.md +169 -171
  12. package/es/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.md +87 -27
  13. package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +18 -7
  14. package/es/components/PisellCards/components/TextCard/TextCard.js +2 -3
  15. package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.js +20 -6
  16. package/es/components/PisellCards/components/TextCard/components/TextContent.js +3 -1
  17. package/es/components/PisellCards/components/TextCard/docs/TextCard.$tab-dev.md +36 -5
  18. package/es/components/PisellCards/components/TextCard/docs/TextCard.$tab-test.md +2434 -258
  19. package/es/components/PisellCards/components/TextCard/docs/TextCard.md +78 -13
  20. package/es/components/PisellCards/index.d.ts +3 -0
  21. package/es/components/PisellCards/index.js +3 -1
  22. package/es/components/PisellContactBrief/PisellContactBrief.d.ts +34 -0
  23. package/es/components/PisellContactBrief/PisellContactBrief.js +156 -0
  24. package/es/components/PisellContactBrief/PisellContactBrief.less +192 -0
  25. package/es/components/PisellContactBrief/components/ContactFormModal.js +140 -0
  26. package/es/components/PisellContactBrief/docs/PisellContactBrief.$tab-design.md +109 -0
  27. package/es/components/PisellContactBrief/docs/PisellContactBrief.$tab-dev.md +106 -0
  28. package/es/components/PisellContactBrief/docs/PisellContactBrief.$tab-test.md +125 -0
  29. package/es/components/PisellContactBrief/docs/PisellContactBrief.md +129 -0
  30. package/es/components/PisellContactBrief/index.d.ts +2 -0
  31. package/es/components/PisellContactBrief/locales.js +57 -0
  32. package/es/components/PisellContactBrief/types.d.ts +86 -0
  33. package/es/components/PisellLayouts/index.d.ts +1 -1
  34. package/es/components/PisellProcedure/components/ProcedureHeader.js +1 -1
  35. package/es/components/PisellTabbar/PisellTabbar.js +1 -1
  36. package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +1 -1
  37. package/es/components/Template/[ComponentName].less +1 -0
  38. package/es/components/Template/docs/[ComponentName].$tab-design.md +7 -0
  39. package/es/components/Template/docs/[ComponentName].$tab-dev.md +1137 -0
  40. package/es/components/Template/docs/[ComponentName].$tab-test.md +7 -0
  41. package/es/components/Template/docs/[ComponentName].md +510 -0
  42. package/es/components/appVersionControl/index.js +3 -2
  43. package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +4 -4
  44. package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
  45. package/es/components/dataSourceComponents/dataSourceForm/index.js +1 -1
  46. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +3 -3
  47. package/es/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
  48. package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +1 -1
  49. package/es/components/dataSourceComponents/dataSourceSubForm/index.js +1 -1
  50. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +2 -2
  51. package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
  52. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +3 -2
  53. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
  54. package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +1 -1
  55. package/es/components/dataSourceComponents/fields/DatePicker/WithMode.js +4 -0
  56. package/es/components/dataSourceComponents/fields/IconSelect/WithMode.js +1 -1
  57. package/es/components/dataSourceComponents/fields/Input/WithMode.js +1 -1
  58. package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +4 -1
  59. package/es/components/dataSourceComponents/fields/Radio/WithMode.js +1 -1
  60. package/es/components/dataSourceComponents/fields/TimePicker/WithMode.js +1 -1
  61. package/es/components/dataSourceComponents/hooks/useActions.js +1 -1
  62. package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +1 -1
  63. package/es/components/drag-sort-tree/index.d.ts +1 -0
  64. package/es/components/drag-sort-tree/index.js +0 -1
  65. package/es/components/drawer/index.js +7 -6
  66. package/es/components/filter/components/FilterItem/index.js +1 -3
  67. package/es/components/filter/components/QuickFilter/index.js +2 -3
  68. package/es/components/hardwareErrorTip/errorCard/index.d.ts +25 -0
  69. package/es/components/hardwareErrorTip/errorCard/index.js +68 -0
  70. package/es/components/hardwareErrorTip/errorCard/index.less +137 -0
  71. package/es/components/hardwareErrorTip/errorTipStatistics/index.d.ts +10 -0
  72. package/es/components/hardwareErrorTip/errorTipStatistics/index.js +31 -0
  73. package/es/components/hardwareErrorTip/errorTipStatistics/index.less +34 -0
  74. package/es/components/hardwareErrorTip/index.d.ts +20 -0
  75. package/es/components/hardwareErrorTip/index.js +151 -0
  76. package/es/components/hardwareErrorTip/index.less +95 -0
  77. package/es/components/hardwareErrorTip/logCard/index.d.ts +25 -0
  78. package/es/components/hardwareErrorTip/logCard/index.js +72 -0
  79. package/es/components/hardwareErrorTip/logCard/index.less +121 -0
  80. package/es/components/hardwareErrorTip/readme.md +309 -0
  81. package/es/components/hardwareErrorTip/types.js +54 -0
  82. package/es/components/iconfont/index.js +1 -1
  83. package/es/components/login-and-register/index.js +4 -5
  84. package/es/components/page/index.js +1 -1
  85. package/es/components/pisellActionPanel/PisellActionPanel.d.ts +24 -0
  86. package/es/components/pisellActionPanel/PisellActionPanel.js +68 -0
  87. package/es/components/pisellActionPanel/PisellActionPanel.less +69 -0
  88. package/es/components/pisellActionPanel/docs/pisellActionPanel.$tab-design.md +148 -0
  89. package/es/components/pisellActionPanel/docs/pisellActionPanel.$tab-dev.md +53 -0
  90. package/es/components/pisellActionPanel/docs/pisellActionPanel.$tab-test.md +64 -0
  91. package/es/components/pisellActionPanel/docs/pisellActionPanel.md +160 -0
  92. package/es/components/pisellActionPanel/index.d.ts +2 -0
  93. package/es/components/pisellActionPanel/types.d.ts +87 -0
  94. package/es/components/pisellAppCard/PisellAppCard.js +1 -1
  95. package/es/components/pisellBaseCard/PisellBaseCard.d.ts +20 -0
  96. package/es/components/pisellBaseCard/PisellBaseCard.js +73 -0
  97. package/es/components/pisellBaseCard/PisellBaseCard.less +25 -0
  98. package/es/components/pisellBaseCard/docs/pisellBaseCard.$tab-design.md +144 -0
  99. package/es/components/pisellBaseCard/docs/pisellBaseCard.$tab-dev.md +92 -0
  100. package/es/components/pisellBaseCard/docs/pisellBaseCard.$tab-test.md +86 -0
  101. package/es/components/pisellBaseCard/docs/pisellBaseCard.md +165 -0
  102. package/es/components/pisellBaseCard/index.d.ts +2 -0
  103. package/es/components/pisellBaseCard/types.d.ts +49 -0
  104. package/es/components/pisellCardList/index.js +1 -1
  105. package/es/components/pisellCurrency/PisellCurrency.js +13 -6
  106. package/es/components/pisellCurrency/PisellCurrency.less +0 -123
  107. package/es/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +57 -0
  108. package/es/components/pisellCustomerBrief/PisellCustomerBrief.js +92 -0
  109. package/es/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
  110. package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-design.md +115 -0
  111. package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-dev.md +73 -0
  112. package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-test.md +66 -0
  113. package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.md +132 -0
  114. package/es/components/pisellCustomerBrief/index.d.ts +2 -0
  115. package/es/components/pisellCustomerBrief/types.d.ts +86 -0
  116. package/es/components/pisellDataSourceContainer/components/Pagination/index.js +3 -9
  117. package/es/components/pisellDataSourceContainer/docs/PisellDataSourceContainer.md +189 -240
  118. package/es/components/pisellDataSourceContainer/type.d.ts +1 -1
  119. package/es/components/pisellDateTimeDisplay/docs/pisellDateTimeDisplay.md +556 -556
  120. package/es/components/pisellEmail/PisellEmail.js +13 -6
  121. package/es/components/pisellEmail/PisellEmail.less +0 -92
  122. package/es/components/pisellEmpty/index.d.ts +1 -1
  123. package/es/components/pisellEntityCard/PisellEntityCard.d.ts +47 -0
  124. package/es/components/pisellEntityCard/PisellEntityCard.js +315 -0
  125. package/es/components/pisellEntityCard/PisellEntityCard.less +362 -0
  126. package/es/components/pisellEntityCard/docs/pisellEntityCard.$tab-design.md +209 -0
  127. package/es/components/pisellEntityCard/docs/pisellEntityCard.$tab-dev.md +82 -0
  128. package/es/components/pisellEntityCard/docs/pisellEntityCard.$tab-test.md +122 -0
  129. package/es/components/pisellEntityCard/docs/pisellEntityCard.md +176 -0
  130. package/es/components/pisellEntityCard/index.d.ts +2 -0
  131. package/es/components/pisellEntityCard/types.d.ts +148 -0
  132. package/es/components/pisellExport/PisellExport.d.ts +11 -0
  133. package/es/components/pisellExport/PisellExport.js +44 -0
  134. package/es/components/pisellExport/PisellExport.less +141 -0
  135. package/es/components/pisellExport/docs/pisellExport.$tab-design.md +116 -0
  136. package/es/components/pisellExport/docs/pisellExport.$tab-dev.md +132 -0
  137. package/es/components/pisellExport/docs/pisellExport.$tab-test.md +61 -0
  138. package/es/components/pisellExport/docs/pisellExport.md +162 -0
  139. package/es/components/pisellExport/index.d.ts +2 -0
  140. package/es/components/pisellExport/types.d.ts +67 -0
  141. package/es/components/pisellFilter/docs/PisellFilter.md +2 -2
  142. package/es/components/pisellFind/docs/pisellFind.md +2 -2
  143. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +1 -2
  144. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +51 -230
  145. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +0 -22
  146. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +2 -3
  147. package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +2 -2
  148. package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +74 -209
  149. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +5 -40
  150. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +12 -131
  151. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +1 -9
  152. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +3 -24
  153. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +4 -97
  154. package/es/components/pisellFloorMapLayout/components/ItemLayer.js +9 -29
  155. package/es/components/pisellFloorMapLayout/components/ItemLayer.less +2 -19
  156. package/es/components/pisellFloorMapLayout/components/ViewControls.js +65 -119
  157. package/es/components/pisellFloorMapLayout/components/ViewControls.less +44 -208
  158. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +0 -4
  159. package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +1 -3
  160. package/es/components/pisellFloorMapLayout/docs/pisellFloorMapLayout.md +194 -559
  161. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +16 -82
  162. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +36 -369
  163. package/es/components/pisellFloorMapLayout/index.d.ts +0 -1
  164. package/es/components/pisellFloorMapLayout/locales-ja.js +1 -21
  165. package/es/components/pisellFloorMapLayout/locales-pt.js +1 -21
  166. package/es/components/pisellFloorMapLayout/locales.js +3 -63
  167. package/es/components/pisellFloorMapLayout/types.d.ts +9 -70
  168. package/es/components/pisellGoodPassCard/index.less +0 -1
  169. package/es/components/pisellGridPro/GridView/docs/GridView.md +48 -47
  170. package/es/components/pisellGridPro/ToolBar/docs/ToolBar.$tab-dev.md +2 -4
  171. package/es/components/pisellGridPro/ToolBar/docs/ToolBar.md +81 -95
  172. package/es/components/pisellGridPro/ToolBar/index.less +4 -5
  173. package/es/components/pisellGridPro/docs/PisellGridPro.md +262 -173
  174. package/es/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-dev.md +6 -3
  175. package/es/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-test.md +4 -3
  176. package/es/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.md +2 -1
  177. package/es/components/pisellImport/PisellImport.d.ts +11 -0
  178. package/es/components/pisellImport/PisellImport.js +81 -0
  179. package/es/components/pisellImport/PisellImport.less +141 -0
  180. package/es/components/pisellImport/docs/pisellImport.$tab-design.md +121 -0
  181. package/es/components/pisellImport/docs/pisellImport.$tab-dev.md +137 -0
  182. package/es/components/pisellImport/docs/pisellImport.$tab-test.md +69 -0
  183. package/es/components/pisellImport/docs/pisellImport.md +174 -0
  184. package/es/components/pisellImport/index.d.ts +2 -0
  185. package/es/components/pisellImport/types.d.ts +89 -0
  186. package/es/components/pisellLongText/PisellLongText.js +13 -6
  187. package/es/components/pisellLongText/PisellLongText.less +0 -67
  188. package/es/components/pisellLookup/PisellLookup.less +1 -1
  189. package/es/components/pisellLookup/components/LookupTrigger.js +8 -6
  190. package/es/components/pisellLookup/docs/pisellLookup.md +1 -1
  191. package/es/components/pisellMultipleSelect/PisellMultipleSelect.js +7 -5
  192. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
  193. package/es/components/pisellMultipleSelect/components/EditView.js +1 -0
  194. package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +4 -0
  195. package/es/components/pisellNumber/PisellNumber.js +13 -6
  196. package/es/components/pisellNumber/PisellNumber.less +0 -103
  197. package/es/components/pisellPhone/PisellPhone.js +13 -6
  198. package/es/components/pisellPhone/PisellPhone.less +0 -119
  199. package/es/components/pisellPhone/components/EditView.js +37 -19
  200. package/es/components/pisellPhone/constants/countryCodes.js +26 -25
  201. package/es/components/pisellPhone/types.d.ts +2 -2
  202. package/es/components/pisellPhone/utils/countryCodeHelper.js +2 -2
  203. package/es/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.md +1 -1
  204. package/es/components/pisellRating/PisellRating.js +5 -3
  205. package/es/components/pisellRecordBoard/PisellRecordBoard.js +10 -26
  206. package/es/components/pisellRecordBoard/README.md +0 -12
  207. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.md +70 -716
  208. package/es/components/pisellRecordBoard/docs/ShellFrame.md +44 -62
  209. package/es/components/pisellRecordBoard/index.d.ts +1 -7
  210. package/es/components/pisellRecordBoard/index.js +0 -4
  211. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +9 -147
  212. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +0 -31
  213. package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendarDemo.js +3811 -0
  214. package/es/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +1 -5
  215. package/es/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.js +8 -10
  216. package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +1 -1
  217. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -2
  218. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -7
  219. package/es/components/pisellRecordBoard/shellFrame/Search/index.js +1 -1
  220. package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +1 -5
  221. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +65 -143
  222. package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +13 -181
  223. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +2 -10
  224. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +2 -9
  225. package/es/components/pisellRecordBoard/shellFrame/index.js +19 -73
  226. package/es/components/pisellRecordBoard/types.d.ts +8 -374
  227. package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +0 -16
  228. package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +15 -67
  229. package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +0 -23
  230. package/es/components/pisellReservationSchedule/locales.js +3 -21
  231. package/es/components/pisellReservationSchedule/types.d.ts +0 -5
  232. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +2 -2
  233. package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +4 -37
  234. package/es/components/pisellReservationScheduleBand/types.d.ts +0 -4
  235. package/es/components/pisellShellFrame/PisellShellFrame.js +2 -2
  236. package/es/components/pisellShellFrame/PisellShellFrame.less +2 -18
  237. package/es/components/pisellShellFrame/types.d.ts +0 -6
  238. package/es/components/pisellSingleLineText/PisellSingleLineText.js +21 -14
  239. package/es/components/pisellSingleLineText/PisellSingleLineText.less +0 -143
  240. package/es/components/pisellSingleLineText/docs/pisellSingleLineText.md +256 -256
  241. package/es/components/pisellSingleSelect/PisellSingleSelect.js +7 -4
  242. package/es/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
  243. package/es/components/pisellSingleSelect/docs/pisellSingleSelect.md +525 -428
  244. package/es/components/pisellSort/docs/PisellSort.md +67 -131
  245. package/es/components/pisellStatisticList/index.js +1 -0
  246. package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +37 -151
  247. package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +13 -126
  248. package/es/components/pisellTimeNavigator/components/CursorLayer.js +2 -2
  249. package/es/components/pisellTimeNavigator/components/GestureLayer.js +3 -12
  250. package/es/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-dev.md +42 -26
  251. package/es/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-test.md +5 -5
  252. package/es/components/pisellTimeNavigator/index.d.ts +1 -1
  253. package/es/components/pisellTimeNavigator/utils/index.d.ts +3 -9
  254. package/es/components/pisellTimeNavigator/utils/index.js +6 -15
  255. package/es/components/pisellTimeRangeDisplay/docs/pisellTimeRangeDisplay.md +227 -226
  256. package/es/components/pisellUrl/PisellUrl.js +13 -6
  257. package/es/components/pisellWalletPassCard/index.js +11 -5
  258. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -65
  259. package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +1 -80
  260. package/es/components/productCard/cartSkuCard/components/holders/index.js +1 -1
  261. package/es/components/productCard/cartSkuCard/components/packages/index.js +9 -24
  262. package/es/components/productCard/cartSkuCard/components/specs/index.js +7 -22
  263. package/es/components/productCard/cartSkuCard/components/specs/index.less +0 -11
  264. package/es/components/productCard/cartSkuCard/components/timeRange/index.js +1 -2
  265. package/es/components/productCard/cartSkuCard/index.js +8 -68
  266. package/es/components/productCard/cartSkuCard/locales.js +5 -40
  267. package/es/components/productCard/components/Header/Actions/index.less +15 -0
  268. package/es/components/productCard/components/Header/DeleteButton/index.js +2 -2
  269. package/es/components/productCard/components/Header/DeleteButton/index.less +2 -1
  270. package/es/components/productCard/components/Header/EditButton/index.js +1 -2
  271. package/es/components/productCard/components/Header/index.less +1 -1
  272. package/es/components/productCard/components/Time/components/SelectHolder/index.js +3 -2
  273. package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -1
  274. package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.js +2 -2
  275. package/es/components/productCard/components/Time/components/SelectResource/index.js +6 -3
  276. package/es/components/productCard/components/Time/index.js +3 -2
  277. package/es/components/productCard/status.js +0 -3
  278. package/es/components/productCard/types.d.ts +0 -10
  279. package/es/components/productCard/utils.js +1 -1
  280. package/es/components/select-time/index.js +0 -1
  281. package/es/components/table/Actions/component/ExportImport/index.js +3 -4
  282. package/es/components/table/Actions/component/GallerySetting/index.js +10 -9
  283. package/es/components/table/Actions/component/ViewMode/index.js +4 -3
  284. package/es/components/table/Actions/index.js +1 -1
  285. package/es/components/table/BasicTable/index.js +4 -3
  286. package/es/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
  287. package/es/components/table/Gallery/components/GalleryItem/index.js +12 -4
  288. package/es/components/table/Gallery/components/GalleryItem/index.less +1 -0
  289. package/es/components/table/Gallery/index.js +11 -3
  290. package/es/components/table/Table/fields/text/Show/index.js +1 -1
  291. package/es/components/table/Table/index.js +2 -1
  292. package/es/components/table/Table/tableConfig/header/index.js +1 -1
  293. package/es/components/table/Table/utils.js +5 -1
  294. package/es/components/table/hooks/useTableSetting.js +3 -0
  295. package/es/components/table/hooks/useTransDataSource.js +4 -3
  296. package/es/components/table/index.js +1 -1
  297. package/es/components/tabs/index.less +1 -1
  298. package/es/components/translation/index.d.ts +1 -0
  299. package/es/components/translation/index.js +36 -10
  300. package/es/components/translation/index.less +12 -0
  301. package/es/components/versionModal/index.d.ts +1 -0
  302. package/es/components/versionModal/index.js +2 -2
  303. package/es/components/versionSelect/index.js +1 -1
  304. package/es/components/virtual-keyboard/Amount/index.js +2 -1
  305. package/es/components/virtual-keyboard/Amount/types.d.ts +1 -0
  306. package/es/index.d.ts +105 -94
  307. package/es/index.js +92 -90
  308. package/es/locales/en-US.js +69 -191
  309. package/es/locales/ja.js +12 -192
  310. package/es/locales/pt.js +12 -192
  311. package/es/locales/zh-CN.js +63 -185
  312. package/es/locales/zh-TW.js +68 -190
  313. package/es/pisell-materials.tw.css +1 -2414
  314. package/es/tailwind-input.css +1 -3
  315. package/es/theme/pisell-components.js +76 -0
  316. package/lib/components/Pagination/index.js +8 -42
  317. package/lib/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-dev.md +5 -2
  318. package/lib/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-test.md +169 -171
  319. package/lib/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.md +87 -27
  320. package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +18 -7
  321. package/lib/components/PisellCards/components/TextCard/TextCard.js +2 -3
  322. package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.js +20 -6
  323. package/lib/components/PisellCards/components/TextCard/components/TextContent.js +3 -1
  324. package/lib/components/PisellCards/components/TextCard/docs/TextCard.$tab-dev.md +36 -5
  325. package/lib/components/PisellCards/components/TextCard/docs/TextCard.$tab-test.md +2434 -258
  326. package/lib/components/PisellCards/components/TextCard/docs/TextCard.md +78 -13
  327. package/lib/components/PisellCards/index.d.ts +3 -0
  328. package/lib/components/PisellCards/index.js +3 -1
  329. package/lib/components/PisellContactBrief/PisellContactBrief.d.ts +34 -0
  330. package/lib/components/PisellContactBrief/PisellContactBrief.js +158 -0
  331. package/lib/components/PisellContactBrief/PisellContactBrief.less +192 -0
  332. package/lib/components/PisellContactBrief/components/ContactFormModal.js +139 -0
  333. package/lib/components/PisellContactBrief/docs/PisellContactBrief.$tab-design.md +109 -0
  334. package/lib/components/PisellContactBrief/docs/PisellContactBrief.$tab-dev.md +106 -0
  335. package/lib/components/PisellContactBrief/docs/PisellContactBrief.$tab-test.md +125 -0
  336. package/lib/components/PisellContactBrief/docs/PisellContactBrief.md +129 -0
  337. package/lib/components/PisellContactBrief/index.d.ts +2 -0
  338. package/lib/components/PisellContactBrief/locales.js +57 -0
  339. package/lib/components/PisellContactBrief/types.d.ts +86 -0
  340. package/lib/components/PisellLayouts/index.d.ts +1 -1
  341. package/lib/components/PisellProcedure/components/ProcedureHeader.js +1 -1
  342. package/lib/components/PisellTabbar/PisellTabbar.js +6 -6
  343. package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +6 -6
  344. package/lib/components/Template/[ComponentName].less +1 -0
  345. package/lib/components/Template/docs/[ComponentName].$tab-design.md +7 -0
  346. package/lib/components/Template/docs/[ComponentName].$tab-dev.md +1137 -0
  347. package/lib/components/Template/docs/[ComponentName].$tab-test.md +7 -0
  348. package/lib/components/Template/docs/[ComponentName].md +510 -0
  349. package/lib/components/appVersionControl/index.js +12 -11
  350. package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +6 -6
  351. package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
  352. package/lib/components/dataSourceComponents/dataSourceForm/index.js +1 -1
  353. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +3 -3
  354. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
  355. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +1 -1
  356. package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +1 -1
  357. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +2 -2
  358. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
  359. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +3 -2
  360. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
  361. package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +1 -1
  362. package/lib/components/dataSourceComponents/fields/DatePicker/WithMode.js +4 -0
  363. package/lib/components/dataSourceComponents/fields/IconSelect/WithMode.js +1 -1
  364. package/lib/components/dataSourceComponents/fields/Input/WithMode.js +1 -1
  365. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +4 -1
  366. package/lib/components/dataSourceComponents/fields/Radio/WithMode.js +1 -1
  367. package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.js +4 -4
  368. package/lib/components/dataSourceComponents/hooks/useActions.js +1 -1
  369. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +1 -1
  370. package/lib/components/drag-sort-tree/index.d.ts +1 -0
  371. package/lib/components/drag-sort-tree/index.js +0 -1
  372. package/lib/components/drawer/index.js +7 -6
  373. package/lib/components/filter/components/FilterItem/index.js +1 -3
  374. package/lib/components/filter/components/QuickFilter/index.js +2 -3
  375. package/lib/components/hardwareErrorTip/errorCard/index.d.ts +25 -0
  376. package/lib/components/hardwareErrorTip/errorCard/index.js +71 -0
  377. package/lib/components/hardwareErrorTip/errorCard/index.less +137 -0
  378. package/lib/components/hardwareErrorTip/errorTipStatistics/index.d.ts +10 -0
  379. package/lib/components/hardwareErrorTip/errorTipStatistics/index.js +34 -0
  380. package/lib/components/hardwareErrorTip/errorTipStatistics/index.less +34 -0
  381. package/lib/components/hardwareErrorTip/index.d.ts +20 -0
  382. package/lib/components/hardwareErrorTip/index.js +153 -0
  383. package/lib/components/hardwareErrorTip/index.less +95 -0
  384. package/lib/components/hardwareErrorTip/logCard/index.d.ts +25 -0
  385. package/lib/components/hardwareErrorTip/logCard/index.js +75 -0
  386. package/lib/components/hardwareErrorTip/logCard/index.less +121 -0
  387. package/lib/components/hardwareErrorTip/readme.md +309 -0
  388. package/lib/components/hardwareErrorTip/types.js +57 -0
  389. package/lib/components/iconfont/index.js +1 -1
  390. package/lib/components/login-and-register/index.js +4 -5
  391. package/lib/components/page/index.js +1 -1
  392. package/lib/components/pisellActionPanel/PisellActionPanel.d.ts +24 -0
  393. package/lib/components/pisellActionPanel/PisellActionPanel.js +71 -0
  394. package/lib/components/pisellActionPanel/PisellActionPanel.less +69 -0
  395. package/lib/components/pisellActionPanel/docs/pisellActionPanel.$tab-design.md +148 -0
  396. package/lib/components/pisellActionPanel/docs/pisellActionPanel.$tab-dev.md +53 -0
  397. package/lib/components/pisellActionPanel/docs/pisellActionPanel.$tab-test.md +64 -0
  398. package/lib/components/pisellActionPanel/docs/pisellActionPanel.md +160 -0
  399. package/lib/components/pisellActionPanel/index.d.ts +2 -0
  400. package/lib/components/pisellActionPanel/types.d.ts +87 -0
  401. package/lib/components/pisellAppCard/PisellAppCard.js +7 -7
  402. package/lib/components/pisellBaseCard/PisellBaseCard.d.ts +20 -0
  403. package/lib/components/pisellBaseCard/PisellBaseCard.js +76 -0
  404. package/lib/components/pisellBaseCard/PisellBaseCard.less +25 -0
  405. package/lib/components/pisellBaseCard/docs/pisellBaseCard.$tab-design.md +144 -0
  406. package/lib/components/pisellBaseCard/docs/pisellBaseCard.$tab-dev.md +92 -0
  407. package/lib/components/pisellBaseCard/docs/pisellBaseCard.$tab-test.md +86 -0
  408. package/lib/components/pisellBaseCard/docs/pisellBaseCard.md +165 -0
  409. package/lib/components/pisellBaseCard/index.d.ts +2 -0
  410. package/lib/components/pisellBaseCard/types.d.ts +49 -0
  411. package/lib/components/pisellCardList/index.js +6 -6
  412. package/lib/components/pisellCurrency/PisellCurrency.js +13 -6
  413. package/lib/components/pisellCurrency/PisellCurrency.less +0 -123
  414. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +57 -0
  415. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.js +94 -0
  416. package/lib/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
  417. package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-design.md +115 -0
  418. package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-dev.md +73 -0
  419. package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-test.md +66 -0
  420. package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.md +132 -0
  421. package/lib/components/pisellCustomerBrief/index.d.ts +2 -0
  422. package/lib/components/pisellCustomerBrief/types.d.ts +86 -0
  423. package/lib/components/pisellDataSourceContainer/components/Pagination/index.js +3 -9
  424. package/lib/components/pisellDataSourceContainer/docs/PisellDataSourceContainer.md +189 -240
  425. package/lib/components/pisellDataSourceContainer/type.d.ts +1 -1
  426. package/lib/components/pisellDateTimeDisplay/docs/pisellDateTimeDisplay.md +556 -556
  427. package/lib/components/pisellEmail/PisellEmail.js +13 -6
  428. package/lib/components/pisellEmail/PisellEmail.less +0 -92
  429. package/lib/components/pisellEmpty/index.d.ts +1 -1
  430. package/lib/components/pisellEntityCard/PisellEntityCard.d.ts +47 -0
  431. package/lib/components/pisellEntityCard/PisellEntityCard.js +318 -0
  432. package/lib/components/pisellEntityCard/PisellEntityCard.less +362 -0
  433. package/lib/components/pisellEntityCard/docs/pisellEntityCard.$tab-design.md +209 -0
  434. package/lib/components/pisellEntityCard/docs/pisellEntityCard.$tab-dev.md +82 -0
  435. package/lib/components/pisellEntityCard/docs/pisellEntityCard.$tab-test.md +122 -0
  436. package/lib/components/pisellEntityCard/docs/pisellEntityCard.md +176 -0
  437. package/lib/components/pisellEntityCard/index.d.ts +2 -0
  438. package/lib/components/pisellEntityCard/types.d.ts +148 -0
  439. package/lib/components/pisellExport/PisellExport.d.ts +11 -0
  440. package/lib/components/pisellExport/PisellExport.js +47 -0
  441. package/lib/components/pisellExport/PisellExport.less +141 -0
  442. package/lib/components/pisellExport/docs/pisellExport.$tab-design.md +116 -0
  443. package/lib/components/pisellExport/docs/pisellExport.$tab-dev.md +132 -0
  444. package/lib/components/pisellExport/docs/pisellExport.$tab-test.md +61 -0
  445. package/lib/components/pisellExport/docs/pisellExport.md +162 -0
  446. package/lib/components/pisellExport/index.d.ts +2 -0
  447. package/lib/components/pisellExport/types.d.ts +67 -0
  448. package/lib/components/pisellFilter/docs/PisellFilter.md +2 -2
  449. package/lib/components/pisellFind/docs/pisellFind.md +2 -2
  450. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +1 -2
  451. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +51 -230
  452. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +0 -22
  453. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +2 -3
  454. package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +2 -2
  455. package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +74 -209
  456. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +4 -39
  457. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +11 -130
  458. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +1 -9
  459. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +2 -23
  460. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +4 -97
  461. package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +9 -29
  462. package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +2 -19
  463. package/lib/components/pisellFloorMapLayout/components/ViewControls.js +64 -118
  464. package/lib/components/pisellFloorMapLayout/components/ViewControls.less +44 -208
  465. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +0 -4
  466. package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +1 -3
  467. package/lib/components/pisellFloorMapLayout/docs/pisellFloorMapLayout.md +194 -559
  468. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +16 -82
  469. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +36 -369
  470. package/lib/components/pisellFloorMapLayout/index.d.ts +0 -1
  471. package/lib/components/pisellFloorMapLayout/locales-ja.js +1 -21
  472. package/lib/components/pisellFloorMapLayout/locales-pt.js +1 -21
  473. package/lib/components/pisellFloorMapLayout/locales.js +3 -63
  474. package/lib/components/pisellFloorMapLayout/types.d.ts +9 -70
  475. package/lib/components/pisellGoodPassCard/index.less +0 -1
  476. package/lib/components/pisellGridPro/GridView/docs/GridView.md +48 -47
  477. package/lib/components/pisellGridPro/ToolBar/docs/ToolBar.$tab-dev.md +2 -4
  478. package/lib/components/pisellGridPro/ToolBar/docs/ToolBar.md +81 -95
  479. package/lib/components/pisellGridPro/ToolBar/index.less +4 -5
  480. package/lib/components/pisellGridPro/docs/PisellGridPro.md +262 -173
  481. package/lib/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-dev.md +6 -3
  482. package/lib/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-test.md +4 -3
  483. package/lib/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.md +2 -1
  484. package/lib/components/pisellImport/PisellImport.d.ts +11 -0
  485. package/lib/components/pisellImport/PisellImport.js +84 -0
  486. package/lib/components/pisellImport/PisellImport.less +141 -0
  487. package/lib/components/pisellImport/docs/pisellImport.$tab-design.md +121 -0
  488. package/lib/components/pisellImport/docs/pisellImport.$tab-dev.md +137 -0
  489. package/lib/components/pisellImport/docs/pisellImport.$tab-test.md +69 -0
  490. package/lib/components/pisellImport/docs/pisellImport.md +174 -0
  491. package/lib/components/pisellImport/index.d.ts +2 -0
  492. package/lib/components/pisellImport/types.d.ts +89 -0
  493. package/lib/components/pisellLongText/PisellLongText.js +13 -6
  494. package/lib/components/pisellLongText/PisellLongText.less +0 -67
  495. package/lib/components/pisellLookup/PisellLookup.less +1 -1
  496. package/lib/components/pisellLookup/components/LookupTrigger.js +8 -6
  497. package/lib/components/pisellLookup/docs/pisellLookup.md +1 -1
  498. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.js +6 -4
  499. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
  500. package/lib/components/pisellMultipleSelect/components/EditView.js +1 -0
  501. package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +4 -0
  502. package/lib/components/pisellNumber/PisellNumber.js +13 -6
  503. package/lib/components/pisellNumber/PisellNumber.less +0 -103
  504. package/lib/components/pisellPhone/PisellPhone.js +13 -6
  505. package/lib/components/pisellPhone/PisellPhone.less +0 -119
  506. package/lib/components/pisellPhone/components/EditView.js +37 -19
  507. package/lib/components/pisellPhone/constants/countryCodes.js +26 -25
  508. package/lib/components/pisellPhone/types.d.ts +2 -2
  509. package/lib/components/pisellPhone/utils/countryCodeHelper.js +2 -2
  510. package/lib/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.md +1 -1
  511. package/lib/components/pisellRating/PisellRating.js +4 -2
  512. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +10 -26
  513. package/lib/components/pisellRecordBoard/README.md +0 -12
  514. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.md +70 -716
  515. package/lib/components/pisellRecordBoard/docs/ShellFrame.md +44 -62
  516. package/lib/components/pisellRecordBoard/index.d.ts +1 -7
  517. package/lib/components/pisellRecordBoard/index.js +0 -4
  518. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +8 -146
  519. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +0 -31
  520. package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendarDemo.js +3813 -0
  521. package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +1 -5
  522. package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.js +8 -11
  523. package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +1 -1
  524. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -2
  525. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -7
  526. package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +1 -1
  527. package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +1 -5
  528. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +78 -156
  529. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +13 -181
  530. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +2 -10
  531. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +2 -9
  532. package/lib/components/pisellRecordBoard/shellFrame/index.js +19 -73
  533. package/lib/components/pisellRecordBoard/types.d.ts +8 -374
  534. package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +0 -16
  535. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +15 -67
  536. package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +0 -23
  537. package/lib/components/pisellReservationSchedule/locales.js +3 -21
  538. package/lib/components/pisellReservationSchedule/types.d.ts +0 -5
  539. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +2 -2
  540. package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +4 -37
  541. package/lib/components/pisellReservationScheduleBand/types.d.ts +0 -4
  542. package/lib/components/pisellShellFrame/PisellShellFrame.js +2 -2
  543. package/lib/components/pisellShellFrame/PisellShellFrame.less +2 -18
  544. package/lib/components/pisellShellFrame/types.d.ts +0 -6
  545. package/lib/components/pisellSingleLineText/PisellSingleLineText.js +21 -14
  546. package/lib/components/pisellSingleLineText/PisellSingleLineText.less +0 -143
  547. package/lib/components/pisellSingleLineText/docs/pisellSingleLineText.md +256 -256
  548. package/lib/components/pisellSingleSelect/PisellSingleSelect.js +7 -4
  549. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
  550. package/lib/components/pisellSingleSelect/docs/pisellSingleSelect.md +525 -428
  551. package/lib/components/pisellSort/docs/PisellSort.md +67 -131
  552. package/lib/components/pisellStatisticList/index.js +1 -0
  553. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +38 -152
  554. package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +13 -126
  555. package/lib/components/pisellTimeNavigator/components/CursorLayer.js +2 -2
  556. package/lib/components/pisellTimeNavigator/components/GestureLayer.js +3 -12
  557. package/lib/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-dev.md +42 -26
  558. package/lib/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-test.md +5 -5
  559. package/lib/components/pisellTimeNavigator/index.d.ts +1 -1
  560. package/lib/components/pisellTimeNavigator/utils/index.d.ts +3 -9
  561. package/lib/components/pisellTimeNavigator/utils/index.js +5 -16
  562. package/lib/components/pisellTimeRangeDisplay/docs/pisellTimeRangeDisplay.md +227 -226
  563. package/lib/components/pisellUrl/PisellUrl.js +13 -6
  564. package/lib/components/pisellWalletPassCard/index.js +11 -5
  565. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +8 -69
  566. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +1 -80
  567. package/lib/components/productCard/cartSkuCard/components/holders/index.js +1 -1
  568. package/lib/components/productCard/cartSkuCard/components/packages/index.js +11 -26
  569. package/lib/components/productCard/cartSkuCard/components/specs/index.js +8 -23
  570. package/lib/components/productCard/cartSkuCard/components/specs/index.less +0 -11
  571. package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +1 -2
  572. package/lib/components/productCard/cartSkuCard/index.js +8 -68
  573. package/lib/components/productCard/cartSkuCard/locales.js +5 -40
  574. package/lib/components/productCard/components/Header/Actions/index.less +15 -0
  575. package/lib/components/productCard/components/Header/DeleteButton/index.js +2 -2
  576. package/lib/components/productCard/components/Header/DeleteButton/index.less +2 -1
  577. package/lib/components/productCard/components/Header/EditButton/index.js +1 -2
  578. package/lib/components/productCard/components/Header/index.less +1 -1
  579. package/lib/components/productCard/components/Time/components/SelectHolder/index.js +3 -2
  580. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.js +5 -5
  581. package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.js +2 -2
  582. package/lib/components/productCard/components/Time/components/SelectResource/index.js +6 -3
  583. package/lib/components/productCard/components/Time/index.js +3 -2
  584. package/lib/components/productCard/status.js +0 -3
  585. package/lib/components/productCard/types.d.ts +0 -10
  586. package/lib/components/productCard/utils.js +1 -1
  587. package/lib/components/select-time/index.js +0 -1
  588. package/lib/components/table/Actions/component/ExportImport/index.js +3 -4
  589. package/lib/components/table/Actions/component/GallerySetting/index.js +12 -11
  590. package/lib/components/table/Actions/component/ViewMode/index.js +6 -5
  591. package/lib/components/table/Actions/index.js +1 -1
  592. package/lib/components/table/BasicTable/index.js +4 -3
  593. package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
  594. package/lib/components/table/Gallery/components/GalleryItem/index.js +17 -9
  595. package/lib/components/table/Gallery/components/GalleryItem/index.less +1 -0
  596. package/lib/components/table/Gallery/index.js +11 -3
  597. package/lib/components/table/Table/fields/text/Show/index.js +1 -1
  598. package/lib/components/table/Table/index.js +2 -1
  599. package/lib/components/table/Table/tableConfig/header/index.js +2 -2
  600. package/lib/components/table/Table/utils.js +5 -1
  601. package/lib/components/table/hooks/useTableSetting.js +3 -0
  602. package/lib/components/table/hooks/useTransDataSource.js +4 -3
  603. package/lib/components/table/index.js +1 -1
  604. package/lib/components/tabs/index.less +1 -1
  605. package/lib/components/translation/index.d.ts +1 -0
  606. package/lib/components/translation/index.js +35 -9
  607. package/lib/components/translation/index.less +12 -0
  608. package/lib/components/versionModal/index.d.ts +1 -0
  609. package/lib/components/versionModal/index.js +2 -2
  610. package/lib/components/versionSelect/index.js +4 -4
  611. package/lib/components/virtual-keyboard/Amount/index.js +5 -4
  612. package/lib/components/virtual-keyboard/Amount/types.d.ts +1 -0
  613. package/lib/index.d.ts +105 -94
  614. package/lib/index.js +298 -299
  615. package/lib/locales/en-US.js +69 -191
  616. package/lib/locales/ja.js +12 -192
  617. package/lib/locales/pt.js +12 -192
  618. package/lib/locales/zh-CN.js +63 -185
  619. package/lib/locales/zh-TW.js +68 -190
  620. package/lib/pisell-materials.tw.css +1 -2414
  621. package/lib/tailwind-input.css +1 -3
  622. package/lib/theme/pisell-components.js +76 -0
  623. package/lowcode/pisell-time-navigator/meta.ts +10 -0
  624. package/package.json +3 -2
  625. package/es/components/SafeAreaTop/index.d.ts +0 -6
  626. package/es/components/SafeAreaTop/index.js +0 -112
  627. package/es/components/SafeAreaTop/index.less +0 -11
  628. package/es/components/SafeAreaTop/types.d.ts +0 -13
  629. package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +0 -4
  630. package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.js +0 -22
  631. package/es/components/pisellFloorMapLayout/components/HistoryIcons.js +0 -64
  632. package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.js +0 -7
  633. package/es/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.js +0 -47
  634. package/es/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.js +0 -95
  635. package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -52
  636. package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.js +0 -61
  637. package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +0 -758
  638. package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.less +0 -313
  639. package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.js +0 -191
  640. package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +0 -22
  641. package/es/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.js +0 -39
  642. package/es/components/pisellRecordBoard/shellFrame/Calendar/hooks/useBookingCalendarDayOverlayLayout.js +0 -74
  643. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarBlockPanel.js +0 -61
  644. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.js +0 -26
  645. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/MoveConfirmModal.js +0 -79
  646. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.js +0 -48
  647. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.js +0 -37
  648. package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/BookingCalendarStyle.js +0 -20
  649. package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +0 -532
  650. package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarSelectionUtils.js +0 -17
  651. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDaySelectionBar.js +0 -31
  652. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.js +0 -583
  653. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarGroupRowHeader.js +0 -41
  654. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +0 -111
  655. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.js +0 -612
  656. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +0 -162
  657. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/bookingCalendarDayViewContext.js +0 -8
  658. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDayHourRemaining.js +0 -33
  659. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDaySelection.js +0 -37
  660. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceCellToggle.js +0 -18
  661. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceDayHeaderRemaining.js +0 -33
  662. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/useBookingCalendarGoToDayFromCell.js +0 -29
  663. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.js +0 -43
  664. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.d.ts +0 -14
  665. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.js +0 -436
  666. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.d.ts +0 -11
  667. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.js +0 -9
  668. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanel.js +0 -179
  669. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelColorTab.js +0 -62
  670. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +0 -57
  671. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewport.less +0 -45
  672. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.js +0 -91
  673. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.js +0 -218
  674. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.less +0 -339
  675. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallMarquee.less +0 -52
  676. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallCardPresentation.js +0 -153
  677. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +0 -32
  678. package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.js +0 -170
  679. package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.js +0 -11
  680. package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.js +0 -56
  681. package/es/components/pisellRecordBoard/types.js +0 -12
  682. package/es/components/pisellTimeNavigator/timeNavigatorConstants.js +0 -7
  683. package/es/components/productCard/cartSkuCard/components/Gift/index.js +0 -34
  684. package/es/components/productCard/cartSkuCard/components/Gift/index.less +0 -84
  685. package/es/components/productCard/cartSkuCard/components/Promotion/index.js +0 -23
  686. package/es/components/productCard/cartSkuCard/components/Promotion/index.less +0 -16
  687. package/es/components/productCard/cartSkuCard/components/weighing/index.js +0 -27
  688. package/es/components/productCard/cartSkuCard/components/weighing/index.less +0 -25
  689. package/lib/components/SafeAreaTop/index.d.ts +0 -6
  690. package/lib/components/SafeAreaTop/index.js +0 -115
  691. package/lib/components/SafeAreaTop/index.less +0 -11
  692. package/lib/components/SafeAreaTop/types.d.ts +0 -13
  693. package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +0 -4
  694. package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.js +0 -22
  695. package/lib/components/pisellFloorMapLayout/components/HistoryIcons.js +0 -67
  696. package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.js +0 -7
  697. package/lib/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.js +0 -52
  698. package/lib/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.js +0 -96
  699. package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -52
  700. package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.js +0 -64
  701. package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +0 -760
  702. package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.less +0 -313
  703. package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.js +0 -197
  704. package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +0 -23
  705. package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.js +0 -44
  706. package/lib/components/pisellRecordBoard/shellFrame/Calendar/hooks/useBookingCalendarDayOverlayLayout.js +0 -75
  707. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarBlockPanel.js +0 -63
  708. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.js +0 -28
  709. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/MoveConfirmModal.js +0 -81
  710. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.js +0 -50
  711. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.js +0 -39
  712. package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/BookingCalendarStyle.js +0 -21
  713. package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +0 -562
  714. package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarSelectionUtils.js +0 -17
  715. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDaySelectionBar.js +0 -33
  716. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.js +0 -585
  717. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarGroupRowHeader.js +0 -43
  718. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +0 -113
  719. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.js +0 -614
  720. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +0 -164
  721. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/bookingCalendarDayViewContext.js +0 -10
  722. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDayHourRemaining.js +0 -34
  723. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDaySelection.js +0 -38
  724. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceCellToggle.js +0 -19
  725. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceDayHeaderRemaining.js +0 -34
  726. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/useBookingCalendarGoToDayFromCell.js +0 -30
  727. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.js +0 -45
  728. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.d.ts +0 -14
  729. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.js +0 -439
  730. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.d.ts +0 -11
  731. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.js +0 -9
  732. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanel.js +0 -181
  733. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelColorTab.js +0 -64
  734. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +0 -57
  735. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewport.less +0 -45
  736. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.js +0 -93
  737. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.js +0 -220
  738. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.less +0 -339
  739. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallMarquee.less +0 -52
  740. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallCardPresentation.js +0 -153
  741. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +0 -32
  742. package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.js +0 -181
  743. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.js +0 -14
  744. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.js +0 -63
  745. package/lib/components/pisellRecordBoard/types.js +0 -12
  746. package/lib/components/pisellTimeNavigator/timeNavigatorConstants.js +0 -7
  747. package/lib/components/productCard/cartSkuCard/components/Gift/index.js +0 -36
  748. package/lib/components/productCard/cartSkuCard/components/Gift/index.less +0 -84
  749. package/lib/components/productCard/cartSkuCard/components/Promotion/index.js +0 -25
  750. package/lib/components/productCard/cartSkuCard/components/Promotion/index.less +0 -16
  751. package/lib/components/productCard/cartSkuCard/components/weighing/index.js +0 -29
  752. package/lib/components/productCard/cartSkuCard/components/weighing/index.less +0 -25
  753. /package/es/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-design.md +0 -0
  754. /package/es/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-dev.md +0 -0
  755. /package/es/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-test.md +0 -0
  756. /package/lib/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-design.md +0 -0
  757. /package/lib/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-dev.md +0 -0
  758. /package/lib/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-test.md +0 -0
@@ -6,378 +6,2554 @@ category: atom
6
6
 
7
7
  # TextCard 测试用例文档
8
8
 
9
- ## 一、测试概述
9
+ ## 1. 测试概述
10
10
 
11
- ### 测试范围
12
- - 组件基础功能
13
- - 6 种样式变体
14
- - 3 种尺寸
15
- - 4 种状态
16
- - 图标、标签、角标功能
17
- - 插槽功能
18
- - 文本配置
19
- - 宽度模式
20
- - 事件处理
21
- - 状态管理
22
- - 可访问性
11
+ ### 1.1 测试目标
23
12
 
24
- ### 测试方法
25
- - 人工测试(UI 交互、视觉验证)
26
- - 自动化测试(单元测试、快照测试)
13
+ - 验证 TextCard 组件的所有功能正常运行
14
+ - 确保组件在各种场景下的表现符合预期
15
+ - 保证组件的稳定性和可靠性
16
+ - 验证组件在不同样式、尺寸、状态下的正确渲染
17
+
18
+ ### 1.2 测试范围
19
+
20
+ - 基础功能测试
21
+ - 6 种样式变体测试(text、filled、light、outlined、gradient、dashed)
22
+ - 3 种尺寸测试(small、default、large)
23
+ - 4 种状态测试(default、hover、active、disabled)
24
+ - 图标、标签、角标功能测试
25
+ - 插槽功能测试
26
+ - 文本配置测试
27
+ - 宽度模式测试
28
+ - 交互行为测试
29
+ - 自适应规则测试
30
+ - 边界条件测试
31
+ - 兼容性测试
32
+ - 性能测试
33
+
34
+ ### 1.3 测试环境
35
+
36
+ - React 版本:18.x
37
+ - TypeScript 版本:5.x
38
+ - Ant Design 版本:5.x
39
+ - 测试框架:Vitest + React Testing Library
40
+ - 测试工具:@testing-library/react, @testing-library/user-event, @testing-library/jest-dom
41
+
42
+ ## 2. 功能测试用例
43
+
44
+ ### 2.1 基础渲染测试
45
+
46
+ #### 测试用例 2.1.1:默认渲染
47
+
48
+ **测试目的:** 验证组件能够正常渲染
49
+ **测试步骤:**
50
+
51
+ 1. 渲染 TextCard 组件,传入必填 prop `text="Tab title"`
52
+ 2. 检查组件是否成功挂载
53
+ 3. 检查文本内容是否正确显示
54
+
55
+ **期望结果:**
56
+
57
+ - 组件成功渲染
58
+ - 显示文本内容 "Tab title"
59
+ - 使用默认样式变体(text)
60
+ - 使用默认尺寸(default)
61
+
62
+ **测试类型:** 自动化测试
63
+
64
+ ---
65
+
66
+ #### 测试用例 2.1.2:ReactNode 文本渲染
67
+
68
+ **测试目的:** 验证传入 ReactNode 作为文本内容
69
+ **测试步骤:**
70
+
71
+ 1. 传入 `text={<span className="custom-text">Custom</span>}`
72
+ 2. 检查是否渲染了 ReactNode 内容
73
+
74
+ **期望结果:**
75
+
76
+ - 正确渲染 ReactNode 内容
77
+ - 自定义类名生效
78
+
79
+ **测试类型:** 自动化测试
80
+
81
+ ---
82
+
83
+ #### 测试用例 2.1.3:空文本处理
84
+
85
+ **测试目的:** 验证空文本时的表现
86
+ **测试步骤:**
87
+
88
+ 1. 传入 `text=""`
89
+ 2. 检查渲染
90
+
91
+ **期望结果:**
92
+
93
+ - 不报错
94
+ - 组件正常渲染,不显示文本内容
95
+
96
+ **测试类型:** 自动化测试
97
+
98
+ ---
99
+
100
+ ### 2.2 样式变体测试
101
+
102
+ #### 测试用例 2.2.1:样式 1 - 纯文本(text)
103
+
104
+ **测试目的:** 验证 text 样式变体的渲染和交互
105
+ **测试步骤:**
106
+
107
+ 1. 设置 `variant="text"`
108
+ 2. 检查默认状态样式
109
+ 3. 设置 `active={{ value: true }}`,检查激活状态
110
+ 4. 鼠标悬停,检查 hover 状态
111
+ 5. 设置 `disabled={{ value: true }}`,检查禁用状态
112
+
113
+ **期望结果:**
114
+
115
+ - 默认状态:无背景,无边框,无 padding,文本颜色为默认色
116
+ - Active 状态:文本颜色变为主题色(`var(--theme-color)`),字体加粗(font-weight: 600)
117
+ - Hover 状态:文本颜色变为浅紫色(`var(--theme-color-light)`)
118
+ - Disabled 状态:文本半透明(opacity: 0.4),颜色变灰
119
+
120
+ **测试类型:** 自动化测试 + 人工测试
121
+
122
+ ---
123
+
124
+ #### 测试用例 2.2.2:样式 2 - 圆角背景(filled)
125
+
126
+ **测试目的:** 验证 filled 样式变体的渲染和交互
127
+ **测试步骤:**
128
+
129
+ 1. 设置 `variant="filled"`
130
+ 2. 检查默认状态样式
131
+ 3. 设置 `active={{ value: true }}`,检查激活状态
132
+ 4. 鼠标悬停,检查 hover 状态
133
+
134
+ **期望结果:**
135
+
136
+ - 默认状态:无背景,有 padding,圆角 40px(胶囊形)
137
+ - Active 状态:主题色背景(`var(--theme-color)`),白色文字
138
+ - Hover 状态:灰色背景(#F2F4F7)
139
+
140
+ **测试类型:** 自动化测试 + 人工测试
141
+
142
+ ---
143
+
144
+ #### 测试用例 2.2.3:样式 3 - 浅色背景(light)
145
+
146
+ **测试目的:** 验证 light 样式变体的渲染和交互
147
+ **测试步骤:**
148
+
149
+ 1. 设置 `variant="light"`
150
+ 2. 检查默认状态样式
151
+ 3. 设置 `active={{ value: true }}`,检查激活状态
152
+ 4. 鼠标悬停,检查 hover 状态
153
+
154
+ **期望结果:**
155
+
156
+ - 默认状态:无背景,深灰文字(#475467)
157
+ - Active 状态:浅紫背景(`var(--theme-color-bg)`),主题色文字,字体加粗
158
+ - Hover 状态:灰色背景(#F2F4F7)
159
+
160
+ **测试类型:** 自动化测试 + 人工测试
161
+
162
+ ---
163
+
164
+ #### 测试用例 2.2.4:样式 4 - 描边(outlined)
165
+
166
+ **测试目的:** 验证 outlined 样式变体的渲染和交互
167
+ **测试步骤:**
168
+
169
+ 1. 设置 `variant="outlined"`
170
+ 2. 检查默认状态样式
171
+ 3. 设置 `active={{ value: true }}`,检查激活状态
172
+ 4. 鼠标悬停,检查 hover 状态
173
+
174
+ **期望结果:**
175
+
176
+ - 默认状态:透明背景,灰色文字(#475467)
177
+ - Active 状态:灰色背景(#F2F4F7),黑色文字
178
+ - Hover 状态:浅灰背景(#F9FAFB),黑色文字
179
+
180
+ **测试类型:** 自动化测试 + 人工测试
181
+
182
+ ---
183
+
184
+ #### 测试用例 2.2.5:样式 5 - 渐变(gradient)
185
+
186
+ **测试目的:** 验证 gradient 样式变体的渲染和交互
187
+ **测试步骤:**
188
+
189
+ 1. 设置 `variant="gradient"`
190
+ 2. 检查默认状态样式
191
+ 3. 设置 `active={{ value: true }}`,检查激活状态
192
+ 4. 鼠标悬停,检查 hover 状态
193
+
194
+ **期望结果:**
195
+
196
+ - 默认状态:透明背景,灰色文字(#667085)
197
+ - Active 状态:白色背景,阴影效果,黑色文字(#101828)
198
+ - Hover 状态:文字颜色变为黑色
199
+
200
+ **测试类型:** 自动化测试 + 人工测试
201
+
202
+ ---
203
+
204
+ #### 测试用例 2.2.6:样式 6 - 虚线(dashed)
205
+
206
+ **测试目的:** 验证 dashed 样式变体的渲染和交互
207
+ **测试步骤:**
208
+
209
+ 1. 设置 `variant="dashed"`
210
+ 2. 检查默认状态样式
211
+ 3. 设置 `active={{ value: true }}`,检查激活状态
212
+ 4. 鼠标悬停,检查 hover 状态
213
+
214
+ **期望结果:**
215
+
216
+ - 默认状态:透明背景,灰色文字(#475467)
217
+ - Active 状态:白色背景,上左右三边有边框,主题色文字,圆角 8px 8px 0 0
218
+ - Hover 状态:文字颜色变为黑色
219
+
220
+ **测试类型:** 自动化测试 + 人工测试
221
+
222
+ ---
223
+
224
+ ### 2.3 尺寸测试
225
+
226
+ #### 测试用例 2.3.1:Small 尺寸
227
+
228
+ **测试目的:** 验证 small 尺寸的渲染
229
+ **测试步骤:**
230
+
231
+ 1. 设置 `size="small"`
232
+ 2. 检查 padding、fontSize、gap、borderRadius
233
+
234
+ **期望结果:**
235
+
236
+ - padding: 8px 12px
237
+ - fontSize: 14px
238
+ - lineHeight: 22px
239
+ - gap: 8px
240
+ - borderRadius: 4px
241
+
242
+ **测试类型:** 自动化测试 + 人工测试
243
+
244
+ ---
245
+
246
+ #### 测试用例 2.3.2:Default 尺寸
247
+
248
+ **测试目的:** 验证 default 尺寸的渲染
249
+ **测试步骤:**
250
+
251
+ 1. 设置 `size="default"` 或不设置 size(默认值)
252
+ 2. 检查 padding、fontSize、gap、borderRadius
253
+
254
+ **期望结果:**
255
+
256
+ - padding: 12px 16px
257
+ - fontSize: 14px
258
+ - lineHeight: 22px
259
+ - gap: 12px
260
+ - borderRadius: 6px
261
+
262
+ **测试类型:** 自动化测试 + 人工测试
263
+
264
+ ---
265
+
266
+ #### 测试用例 2.3.3:Large 尺寸
267
+
268
+ **测试目的:** 验证 large 尺寸的渲染
269
+ **测试步骤:**
270
+
271
+ 1. 设置 `size="large"`
272
+ 2. 检查 padding、fontSize、gap、borderRadius
273
+
274
+ **期望结果:**
275
+
276
+ - padding: 16px 20px
277
+ - fontSize: 16px
278
+ - lineHeight: 24px
279
+ - gap: 16px
280
+ - borderRadius: 8px
281
+
282
+ **测试类型:** 自动化测试 + 人工测试
283
+
284
+ ---
285
+
286
+ ### 2.4 状态测试
287
+
288
+ #### 测试用例 2.4.1:Active 状态
289
+
290
+ **测试目的:** 验证 active 状态的渲染和交互
291
+ **测试步骤:**
292
+
293
+ 1. 设置 `active={{ value: true }}`
294
+ 2. 检查样式、类名、data 属性
295
+ 3. 设置 `active={{ value: true, style: { color: 'red' }, className: 'custom-active' }}`
296
+ 4. 检查自定义样式和类名是否生效
297
+ 5. 设置 `active={{ value: true, extra: <div>Extra</div> }}`
298
+ 6. 检查 extra 内容是否渲染
299
+
300
+ **期望结果:**
301
+
302
+ - 应用 active 样式(根据 variant 不同)
303
+ - 添加 `text-card--active` 类名
304
+ - 设置 `data-active="true"` 属性
305
+ - 自定义样式和类名生效
306
+ - extra 内容正确渲染
307
+
308
+ **测试类型:** 自动化测试 + 人工测试
309
+
310
+ ---
311
+
312
+ #### 测试用例 2.4.2:Disabled 状态
313
+
314
+ **测试目的:** 验证 disabled 状态的渲染和交互
315
+ **测试步骤:**
316
+
317
+ 1. 设置 `disabled={{ value: true }}`
318
+ 2. 检查样式、类名、aria 属性
319
+ 3. 尝试点击组件
320
+ 4. 检查 tabIndex 属性
321
+
322
+ **期望结果:**
323
+
324
+ - 透明度 0.4,颜色变灰,cursor: not-allowed
325
+ - 添加 `text-card--disabled` 类名
326
+ - 设置 `data-disabled="true"` 和 `aria-disabled="true"` 属性
327
+ - tabIndex 为 -1,无法键盘聚焦
328
+ - 点击事件不触发
329
+
330
+ **测试类型:** 自动化测试 + 人工测试
331
+
332
+ ---
333
+
334
+ #### 测试用例 2.4.3:Loading 状态
335
+
336
+ **测试目的:** 验证 loading 状态的渲染和交互
337
+ **测试步骤:**
338
+
339
+ 1. 设置 `loading={{ value: true }}`
340
+ 2. 检查样式、类名
341
+ 3. 尝试点击组件
342
+ 4. 设置 `loading={{ value: true, extra: <Spin /> }}`
343
+ 5. 检查 extra 内容是否渲染
344
+
345
+ **期望结果:**
346
+
347
+ - 透明度 0.6,cursor: wait
348
+ - 添加 `text-card--loading` 类名
349
+ - 设置 `data-loading="true"` 属性
350
+ - 点击事件不触发
351
+ - extra 内容正确渲染
352
+
353
+ **测试类型:** 自动化测试 + 人工测试
354
+
355
+ ---
356
+
357
+ #### 测试用例 2.4.4:状态优先级
358
+
359
+ **测试目的:** 验证状态优先级规则(loading > disabled > active)
360
+ **测试步骤:**
361
+
362
+ 1. 同时设置 `loading={{ value: true, extra: <div>Loading</div> }}`、`disabled={{ value: true, extra: <div>Disabled</div> }}`、`active={{ value: true, extra: <div>Active</div> }}`
363
+ 2. 检查显示哪个状态的 extra 内容
364
+ 3. 移除 loading,检查显示哪个状态
365
+ 4. 移除 disabled,检查显示哪个状态
366
+
367
+ **期望结果:**
368
+
369
+ - 同时存在时,显示 loading 的 extra
370
+ - 只有 disabled 和 active 时,显示 disabled 的 extra
371
+ - 只有 active 时,显示 active 的 extra
372
+
373
+ **测试类型:** 自动化测试
374
+
375
+ ---
376
+
377
+ ### 2.5 图标功能测试
378
+
379
+ #### 测试用例 2.5.1:前置图标
380
+
381
+ **测试目的:** 验证前置图标的渲染和配置
382
+ **测试步骤:**
383
+
384
+ 1. 设置 `prefixIcon={<BellOutlined />}`
385
+ 2. 检查图标是否显示在文本前面
386
+ 3. 设置 `iconConfig={{ size: 20, color: '#ff0000' }}`
387
+ 4. 检查图标大小和颜色是否生效
388
+
389
+ **期望结果:**
390
+
391
+ - 图标显示在文本前面
392
+ - 图标大小为 20px
393
+ - 图标颜色为红色
394
+ - 图标容器有正确的类名 `text-card__icon--prefix`
395
+
396
+ **测试类型:** 自动化测试 + 人工测试
397
+
398
+ ---
399
+
400
+ #### 测试用例 2.5.2:后置图标
401
+
402
+ **测试目的:** 验证后置图标的渲染和配置
403
+ **测试步骤:**
404
+
405
+ 1. 设置 `suffixIcon={<DownOutlined />}`
406
+ 2. 检查图标是否显示在文本后面
407
+ 3. 设置 `iconConfig={{ size: 16 }}`
408
+ 4. 检查图标大小是否生效
409
+
410
+ **期望结果:**
411
+
412
+ - 图标显示在文本后面
413
+ - 图标大小为 16px
414
+ - 图标容器有正确的类名 `text-card__icon--suffix`
415
+
416
+ **测试类型:** 自动化测试 + 人工测试
417
+
418
+ ---
419
+
420
+ #### 测试用例 2.5.3:前后图标组合
421
+
422
+ **测试目的:** 验证同时显示前后图标
423
+ **测试步骤:**
424
+
425
+ 1. 同时设置 `prefixIcon` 和 `suffixIcon`
426
+ 2. 检查两个图标是否都正常显示
427
+ 3. 检查间距是否正确
428
+
429
+ **期望结果:**
430
+
431
+ - 前后图标都正常显示
432
+ - 间距根据 size 正确设置(gap 属性)
433
+
434
+ **测试类型:** 自动化测试 + 人工测试
435
+
436
+ ---
437
+
438
+ ### 2.6 标签功能测试
439
+
440
+ #### 测试用例 2.6.1:后置标签
441
+
442
+ **测试目的:** 验证后置标签的渲染和配置
443
+ **测试步骤:**
444
+
445
+ 1. 设置 `tag={<Tag color="blue">2</Tag>}`
446
+ 2. 检查标签是否显示在后置位置
447
+ 3. 设置 `tagConfig={{ style: { marginLeft: 8 } }}`
448
+ 4. 检查自定义样式是否生效
449
+
450
+ **期望结果:**
451
+
452
+ - 标签显示在后置位置(文本后面)
453
+ - 自定义样式生效
454
+ - 标签容器有正确的类名 `text-card__tag`
455
+
456
+ **测试类型:** 自动化测试 + 人工测试
457
+
458
+ ---
459
+
460
+ #### 测试用例 2.6.2:标签与后置图标组合
461
+
462
+ **测试目的:** 验证标签和后置图标同时显示时的顺序
463
+ **测试步骤:**
464
+
465
+ 1. 同时设置 `tag` 和 `suffixIcon`
466
+ 2. 检查显示顺序
467
+
468
+ **期望结果:**
469
+
470
+ - 标签在前,图标在后
471
+ - 顺序:文本 -> 标签 -> 后置图标
472
+
473
+ **测试类型:** 人工测试
474
+
475
+ ---
476
+
477
+ ### 2.7 角标功能测试
478
+
479
+ #### 测试用例 2.7.1:红点角标
480
+
481
+ **测试目的:** 验证红点角标的渲染和配置
482
+ **测试步骤:**
483
+
484
+ 1. 设置 `badge={{ type: 'dot' }}`
485
+ 2. 检查是否显示红点角标
486
+ 3. 设置 `badge={{ type: 'dot', color: 'blue', offset: [-10, 0], size: 'small' }}`
487
+ 4. 检查位置、颜色、偏移是否生效
488
+
489
+ **期望结果:**
490
+
491
+ - 显示红点角标
492
+ - 通过 offset 控制位置(向左偏移)
493
+ - 颜色为蓝色
494
+ - 大小为 small
495
+
496
+ **测试类型:** 自动化测试 + 人工测试
497
+
498
+ ---
499
+
500
+ #### 测试用例 2.7.2:数字角标
501
+
502
+ **测试目的:** 验证数字角标的渲染和配置
503
+ **测试步骤:**
504
+
505
+ 1. 设置 `badge={{ type: 'number', content: 99 }}`
506
+ 2. 检查是否显示数字 99
507
+ 3. 设置 `badge={{ type: 'number', content: 999 }}`
508
+ 4. 检查大数字是否正确显示
509
+ 5. 设置 `badge={{ type: 'number', content: 0, showZero: false }}`
510
+ 6. 检查 0 是否不显示
511
+ 7. 设置 `badge={{ type: 'number', content: 0, showZero: true }}`
512
+ 8. 检查 0 是否显示
513
+
514
+ **期望结果:**
515
+
516
+ - 显示数字 99
517
+ - 大数字正确显示
518
+ - showZero=false 时,0 不显示
519
+ - showZero=true 时,0 显示
520
+
521
+ **测试类型:** 自动化测试 + 人工测试
522
+
523
+ ---
524
+
525
+ #### 测试用例 2.7.3:文本角标
526
+
527
+ **测试目的:** 验证文本角标的渲染和配置
528
+ **测试步骤:**
529
+
530
+ 1. 设置 `badge={{ type: 'text', content: 'New' }}`
531
+ 2. 检查是否显示文本 "New"
532
+ 3. 设置 `badge={{ type: 'text', content: 'Very Long Text' }}`
533
+ 4. 检查长文本是否正确显示
534
+
535
+ **期望结果:**
536
+
537
+ - 显示文本 "New"
538
+ - 长文本正常显示
539
+
540
+ **测试类型:** 自动化测试 + 人工测试
541
+
542
+ ---
543
+
544
+ #### 测试用例 2.7.4:角标位置(通过 offset 控制)
545
+
546
+ **测试目的:** 验证角标的不同位置(通过 offset 控制)
547
+ **测试步骤:**
548
+
549
+ 1. 不设置 offset,检查默认位置(右上角)
550
+ 2. 设置 `offset: [-10, 0]`,检查是否向左偏移
551
+ 3. 设置 `offset: [0, 10]`,检查是否向下偏移
552
+ 4. 设置 `offset: [-10, 10]`,检查是否向左下偏移
553
+
554
+ **期望结果:**
555
+
556
+ - 不设置 offset 时,角标在右上角(默认位置)
557
+ - offset 正数向右/下偏移,负数向左/上偏移
558
+ - 角标位置正确对应设置的 offset 值
559
+
560
+ **测试类型:** 人工测试
561
+
562
+ ---
563
+
564
+ #### 测试用例 2.7.5:角标大小
565
+
566
+ **测试目的:** 验证角标大小控制
567
+ **测试步骤:**
568
+
569
+ 1. 设置 `badge={{ type: 'number', content: 99, size: 'small' }}`
570
+ 2. 检查角标大小是否为 small
571
+ 3. 设置 `badge={{ type: 'number', content: 99, size: 'default' }}`
572
+ 4. 检查角标大小是否为 default
573
+ 5. 设置 `badge={{ type: 'number', content: 99 }}`(不设置 size)
574
+ 6. 检查角标是否使用默认大小
575
+ 7. 设置 `badge={{ type: 'dot', size: 'small' }}`
576
+ 8. 检查红点角标大小是否生效
577
+
578
+ **期望结果:**
579
+
580
+ - 角标大小正确对应设置的 size 值
581
+ - size='small' 时显示小尺寸角标
582
+ - size='default' 时显示默认尺寸角标
583
+ - 不设置 size 时使用默认尺寸
584
+
585
+ **测试类型:** 自动化测试 + 人工测试
586
+
587
+ ---
588
+
589
+ #### 测试用例 2.7.6:角标显示零值
590
+
591
+ **测试目的:** 验证角标 showZero 配置
592
+ **测试步骤:**
593
+
594
+ 1. 设置 `badge={{ type: 'number', content: 0, showZero: false }}`
595
+ 2. 检查角标是否不显示
596
+ 3. 设置 `badge={{ type: 'number', content: 0, showZero: true }}`
597
+ 4. 检查角标是否显示 0
598
+ 5. 设置 `badge={{ type: 'number', content: 0 }}`(不设置 showZero)
599
+ 6. 检查角标是否不显示(默认 showZero=false)
600
+ 7. 设置 `badge={{ type: 'number', content: 1, showZero: false }}`
601
+ 8. 检查非零值是否正常显示
602
+
603
+ **期望结果:**
604
+
605
+ - showZero=false 时,content 为 0 不显示角标
606
+ - showZero=true 时,content 为 0 显示角标
607
+ - 不设置 showZero 时,默认不显示零值
608
+ - 非零值不受 showZero 影响,正常显示
609
+
610
+ **测试类型:** 自动化测试 + 人工测试
611
+
612
+ ---
613
+
614
+ ### 2.8 插槽功能测试
615
+
616
+ #### 测试用例 2.8.1:前置插槽
617
+
618
+ **测试目的:** 验证前置插槽的渲染和优先级
619
+ **测试步骤:**
620
+
621
+ 1. 同时设置 `prefixSlot={<div>Custom</div>}` 和 `prefixIcon={<BellOutlined />}`
622
+ 2. 检查显示哪个内容
623
+
624
+ **期望结果:**
625
+
626
+ - 显示前置插槽内容
627
+ - 不显示前置图标
628
+ - 插槽优先级高于图标
629
+
630
+ **测试类型:** 自动化测试 + 人工测试
631
+
632
+ ---
633
+
634
+ #### 测试用例 2.8.2:后置插槽
635
+
636
+ **测试目的:** 验证后置插槽的渲染和优先级
637
+ **测试步骤:**
638
+
639
+ 1. 同时设置 `suffixSlot={<div>Custom</div>}`、`tag={<Tag>Tag</Tag>}` 和 `suffixIcon={<DownOutlined />}`
640
+ 2. 检查显示哪个内容
641
+
642
+ **期望结果:**
643
+
644
+ - 显示后置插槽内容
645
+ - 不显示标签和后置图标
646
+ - 插槽优先级高于标签和图标
647
+
648
+ **测试类型:** 自动化测试 + 人工测试
649
+
650
+ ---
651
+
652
+ ### 2.9 文本配置测试
653
+
654
+ #### 测试用例 2.9.1:字体样式配置
655
+
656
+ **测试目的:** 验证文本字体样式配置
657
+ **测试步骤:**
658
+
659
+ 1. 设置 `textConfig={{ fontSize: 18, fontWeight: 'bold', color: '#ff0000' }}`
660
+ 2. 检查字体大小、粗细、颜色是否生效
661
+
662
+ **期望结果:**
663
+
664
+ - 字体大小为 18px
665
+ - 字体加粗
666
+ - 文本颜色为红色
667
+
668
+ **测试类型:** 自动化测试 + 人工测试
669
+
670
+ ---
671
+
672
+ #### 测试用例 2.9.2:文本省略(单行)
673
+
674
+ **测试目的:** 验证单行文本省略功能
675
+ **测试步骤:**
676
+
677
+ 1. 设置超长文本和 `textConfig={{ maxLines: 1, ellipsis: true }}`
678
+ 2. 检查是否显示省略号
679
+
680
+ **期望结果:**
681
+
682
+ - 文本超出部分显示省略号
683
+ - 使用 `text-overflow: ellipsis` 和 `white-space: nowrap`
684
+
685
+ **测试类型:** 自动化测试 + 人工测试
686
+
687
+ ---
688
+
689
+ #### 测试用例 2.9.3:文本省略(多行)
690
+
691
+ **测试目的:** 验证多行文本省略功能
692
+ **测试步骤:**
693
+
694
+ 1. 设置超长文本和 `textConfig={{ maxLines: 2, ellipsis: true }}`
695
+ 2. 检查是否显示省略号
696
+
697
+ **期望结果:**
698
+
699
+ - 文本超出 2 行后显示省略号
700
+ - 使用 `-webkit-line-clamp: 2` 和 `-webkit-box-orient: vertical`
701
+
702
+ **测试类型:** 自动化测试 + 人工测试
703
+
704
+ ---
705
+
706
+ #### 测试用例 2.9.4:文本对齐
707
+
708
+ **测试目的:** 验证文本对齐配置
709
+ **测试步骤:**
710
+
711
+ 1. 分别设置 `textConfig={{ textAlign: 'left' }}`、`'center'`、`'right'`
712
+ 2. 检查文本对齐方式
713
+
714
+ **期望结果:**
715
+
716
+ - 文本对齐方式正确对应设置的值
717
+
718
+ **测试类型:** 自动化测试 + 人工测试
719
+
720
+ ---
721
+
722
+ ### 2.10 宽度模式测试
723
+
724
+ #### 测试用例 2.10.1:自动宽度(auto)
725
+
726
+ **测试目的:** 验证自动宽度模式
727
+ **测试步骤:**
728
+
729
+ 1. 设置 `widthMode="auto"` 和 `maxWidth={300}`
730
+ 2. 检查宽度设置
731
+
732
+ **期望结果:**
733
+
734
+ - width 为 'auto'
735
+ - maxWidth 为 300px
736
+ - 内容超出最大宽度时显示省略号
737
+
738
+ **测试类型:** 自动化测试 + 人工测试
739
+
740
+ ---
741
+
742
+ #### 测试用例 2.10.2:固定宽度(fixed)
743
+
744
+ **测试目的:** 验证固定宽度模式
745
+ **测试步骤:**
746
+
747
+ 1. 设置 `widthMode="fixed"` 和 `width={200}`
748
+ 2. 检查宽度设置
749
+
750
+ **期望结果:**
751
+
752
+ - width 为 200px
753
+ - 宽度固定不变
754
+
755
+ **测试类型:** 自动化测试 + 人工测试
756
+
757
+ ---
758
+
759
+ #### 测试用例 2.10.3:撑满容器(full)
760
+
761
+ **测试目的:** 验证撑满容器宽度模式
762
+ **测试步骤:**
763
+
764
+ 1. 设置 `widthMode="full"`
765
+ 2. 检查宽度设置
766
+
767
+ **期望结果:**
768
+
769
+ - width 为 '100%'
770
+ - minWidth 为 28px
771
+
772
+ **测试类型:** 自动化测试 + 人工测试
773
+
774
+ ---
775
+
776
+ ### 2.11 自适应规则测试
777
+
778
+ #### 测试用例 2.11.1:宽度自适应规则
779
+
780
+ **测试目的:** 验证宽度自适应规则
781
+ **测试步骤:**
782
+
783
+ 1. 默认宽度模式(auto),检查最大宽度限制
784
+ 2. 设置超长文本,检查是否显示省略号
785
+ 3. 设置 `widthMode="full"`,检查最小宽度限制
786
+
787
+ **期望结果:**
788
+
789
+ - 默认最大宽度为 400px
790
+ - 超过最大宽度时,文本区域显示省略号
791
+ - full 模式下最小宽度为 28px
792
+
793
+ **测试类型:** 人工测试
794
+
795
+ ---
796
+
797
+ #### 测试用例 2.11.2:水平对齐规则
798
+
799
+ **测试目的:** 验证水平排列时的对齐规则
800
+ **测试步骤:**
801
+
802
+ 1. 多个 TextCard 水平排列
803
+ 2. 检查内容对齐方式
804
+
805
+ **期望结果:**
806
+
807
+ - 水平排列时,内容默认居中对齐
808
+
809
+ **测试类型:** 人工测试
810
+
811
+ ---
812
+
813
+ #### 测试用例 2.11.3:垂直对齐规则
814
+
815
+ **测试目的:** 验证垂直排列时的对齐规则
816
+ **测试步骤:**
817
+
818
+ 1. 多个 TextCard 垂直排列
819
+ 2. 检查内容对齐方式
820
+
821
+ **期望结果:**
822
+
823
+ - 垂直排列时,内容默认左对齐
824
+
825
+ **测试类型:** 人工测试
826
+
827
+ ---
828
+
829
+ ### 2.12 交互行为测试
830
+
831
+ #### 测试用例 2.12.1:悬停交互
832
+
833
+ **测试目的:** 验证悬停状态的交互
834
+ **测试步骤:**
835
+
836
+ 1. 鼠标悬停在组件上
837
+ 2. 检查样式变化
838
+ 3. 检查指针样式
839
+
840
+ **期望结果:**
841
+
842
+ - 展示悬停状态样式(根据 variant 不同)
843
+ - 指针变为手型(cursor: pointer)
844
+ - 可点击状态下才显示手型
845
+
846
+ **测试类型:** 人工测试
847
+
848
+ ---
849
+
850
+ #### 测试用例 2.12.2:点击交互
851
+
852
+ **测试目的:** 验证点击事件的交互
853
+ **测试步骤:**
854
+
855
+ 1. 点击组件
856
+ 2. 检查 onClick 回调是否触发
857
+ 3. 检查 active.onChange 是否触发(如果提供)
858
+ 4. 检查选中状态是否切换
859
+
860
+ **期望结果:**
861
+
862
+ - 触发点击事件(onClick 回调被调用)
863
+ - 如果提供了 active.onChange 且未激活,触发 onChange(true)
864
+ - 切换选中状态(如果使用受控模式)
865
+
866
+ **测试类型:** 自动化测试 + 人工测试
867
+
868
+ ---
869
+
870
+ #### 测试用例 2.12.3:选中状态交互
871
+
872
+ **测试目的:** 验证选中状态的样式应用
873
+ **测试步骤:**
874
+
875
+ 1. 设置 `active={{ value: true }}`
876
+ 2. 检查是否应用选中样式
877
+
878
+ **期望结果:**
879
+
880
+ - 应用选中样式(如边框高亮、背景色变化等,根据 variant 不同)
881
+
882
+ **测试类型:** 自动化测试 + 人工测试
883
+
884
+ ---
885
+
886
+ #### 测试用例 2.12.4:禁用状态下的交互
887
+
888
+ **测试目的:** 验证禁用状态下的交互限制
889
+ **测试步骤:**
890
+
891
+ 1. 设置 `disabled={{ value: true }}`
892
+ 2. 尝试点击组件
893
+ 3. 尝试键盘导航
894
+
895
+ **期望结果:**
896
+
897
+ - 点击事件不触发
898
+ - 无法键盘聚焦(tabIndex=-1)
899
+ - 指针变为 not-allowed
900
+
901
+ **测试类型:** 自动化测试 + 人工测试
902
+
903
+ ---
904
+
905
+ #### 测试用例 2.12.5:加载状态下的交互
906
+
907
+ **测试目的:** 验证加载状态下的交互限制
908
+ **测试步骤:**
909
+
910
+ 1. 设置 `loading={{ value: true }}`
911
+ 2. 尝试点击组件
912
+
913
+ **期望结果:**
914
+
915
+ - 点击事件不触发
916
+ - 指针变为 wait
917
+
918
+ **测试类型:** 自动化测试 + 人工测试
919
+
920
+ ---
921
+
922
+ #### 测试用例 2.12.6:不可点击状态
923
+
924
+ **测试目的:** 验证 clickable=false 时的交互
925
+ **测试步骤:**
926
+
927
+ 1. 设置 `clickable={false}`
928
+ 2. 尝试点击组件
929
+ 3. 检查指针样式
930
+
931
+ **期望结果:**
932
+
933
+ - 点击事件不触发
934
+ - 指针为默认样式(不是手型)
935
+ - 不添加 `text-card--clickable` 类名
936
+
937
+ **测试类型:** 自动化测试 + 人工测试
938
+
939
+ ---
940
+
941
+ ### 2.13 自定义渲染测试
942
+
943
+ #### 测试用例 2.13.1:自定义渲染函数
944
+
945
+ **测试目的:** 验证自定义渲染函数功能
946
+ **测试步骤:**
947
+
948
+ 1. 设置 `render={(props) => <div className="custom-render">{props.text}</div>}`
949
+ 2. 检查是否使用自定义渲染
950
+
951
+ **期望结果:**
952
+
953
+ - 使用自定义渲染函数
954
+ - 忽略其他内容配置(图标、标签等)
955
+ - 正确传递 props
956
+
957
+ **测试类型:** 自动化测试 + 人工测试
958
+
959
+ ---
960
+
961
+ ### 2.14 可访问性测试
962
+
963
+ #### 测试用例 2.14.1:role 属性
964
+
965
+ **测试目的:** 验证 role 属性设置
966
+ **测试步骤:**
967
+
968
+ 1. 检查 DOM 元素的 role 属性
969
+
970
+ **期望结果:**
971
+
972
+ - role="button"
973
+
974
+ **测试类型:** 自动化测试
975
+
976
+ ---
977
+
978
+ #### 测试用例 2.14.2:aria-disabled 属性
979
+
980
+ **测试目的:** 验证 aria-disabled 属性设置
981
+ **测试步骤:**
982
+
983
+ 1. 设置 `disabled={{ value: true }}`
984
+ 2. 检查 aria-disabled 属性
985
+
986
+ **期望结果:**
987
+
988
+ - aria-disabled="true"
989
+
990
+ **测试类型:** 自动化测试
991
+
992
+ ---
993
+
994
+ #### 测试用例 2.14.3:tabIndex 属性
995
+
996
+ **测试目的:** 验证 tabIndex 属性设置
997
+ **测试步骤:**
998
+
999
+ 1. 正常状态下检查 tabIndex
1000
+ 2. disabled 状态下检查 tabIndex
1001
+
1002
+ **期望结果:**
1003
+
1004
+ - 正常状态:tabIndex=0
1005
+ - disabled 状态:tabIndex=-1
1006
+
1007
+ **测试类型:** 自动化测试
1008
+
1009
+ ---
1010
+
1011
+ #### 测试用例 2.14.4:键盘导航
1012
+
1013
+ **测试目的:** 验证键盘导航功能
1014
+ **测试步骤:**
1015
+
1016
+ 1. 使用 Tab 键聚焦组件
1017
+ 2. 使用 Enter/Space 键触发点击
1018
+
1019
+ **期望结果:**
1020
+
1021
+ - 可以通过键盘导航
1022
+ - 焦点状态清晰
1023
+ - 可以键盘触发点击
1024
+
1025
+ **测试类型:** 人工测试
1026
+
1027
+ ---
1028
+
1029
+ ## 3. 边界条件测试
1030
+
1031
+ ### 测试用例 3.1:空文本
1032
+
1033
+ **测试目的:** 验证空文本时的表现
1034
+ **测试步骤:**
1035
+
1036
+ 1. 传入 `text=""`
1037
+ 2. 检查渲染
1038
+
1039
+ **期望结果:**
1040
+
1041
+ - 不报错
1042
+ - 组件正常渲染
1043
+
1044
+ **测试类型:** 自动化测试
1045
+
1046
+ ---
1047
+
1048
+ ### 测试用例 3.2:超长文本
1049
+
1050
+ **测试目的:** 验证超长文本时的表现
1051
+ **测试步骤:**
1052
+
1053
+ 1. 传入超长文本(超过 400px 宽度)
1054
+ 2. 检查是否显示省略号
1055
+
1056
+ **期望结果:**
1057
+
1058
+ - 正确显示省略号
1059
+ - 不出现布局问题
1060
+
1061
+ **测试类型:** 人工测试
1062
+
1063
+ ---
1064
+
1065
+ ### 测试用例 3.3:特殊字符
1066
+
1067
+ **测试目的:** 验证特殊字符的处理
1068
+ **测试步骤:**
1069
+
1070
+ 1. 传入包含特殊字符的文本:`text="<>&\"'"`
1071
+ 2. 检查是否正确转义显示
1072
+
1073
+ **期望结果:**
1074
+
1075
+ - 特殊字符正确转义显示
1076
+ - 不出现 XSS 问题
1077
+
1078
+ **测试类型:** 自动化测试 + 人工测试
1079
+
1080
+ ---
1081
+
1082
+ ### 测试用例 3.4:所有 Props 组合
1083
+
1084
+ **测试目的:** 验证所有 props 同时使用时的表现
1085
+ **测试步骤:**
1086
+
1087
+ 1. 传入所有可能的 props
1088
+ 2. 检查是否正常渲染,不冲突
1089
+
1090
+ **期望结果:**
1091
+
1092
+ - 正常渲染
1093
+ - 各功能不冲突
1094
+ - 优先级正确(插槽 > 图标/标签,loading > disabled > active)
1095
+
1096
+ **测试类型:** 人工测试
1097
+
1098
+ ---
1099
+
1100
+ ### 测试用例 3.5:快速切换状态
1101
+
1102
+ **测试目的:** 验证快速切换状态时的表现
1103
+ **测试步骤:**
1104
+
1105
+ 1. 快速切换 active、disabled、loading 状态
1106
+ 2. 检查状态更新是否正确
1107
+
1108
+ **期望结果:**
1109
+
1110
+ - 状态正确更新
1111
+ - 不出现竞态条件
1112
+ - 样式正确应用
1113
+
1114
+ **测试类型:** 自动化测试
1115
+
1116
+ ---
1117
+
1118
+ ## 4. 兼容性测试
1119
+
1120
+ ### 测试用例 4.1:不同浏览器测试
1121
+
1122
+ **测试目的:** 验证在不同浏览器中的兼容性
1123
+ **测试范围:**
1124
+
1125
+ - Chrome(最新版本)
1126
+ - Firefox(最新版本)
1127
+ - Safari(最新版本)
1128
+ - Edge(最新版本)
1129
+
1130
+ **期望结果:**
1131
+
1132
+ - 所有浏览器中显示一致
1133
+ - 功能正常
1134
+ - 样式正确
1135
+
1136
+ **测试类型:** 人工测试
1137
+
1138
+ ---
1139
+
1140
+ ### 测试用例 4.2:不同设备测试
1141
+
1142
+ **测试目的:** 验证在不同设备上的表现
1143
+ **测试范围:**
1144
+
1145
+ - 桌面设备(1920x1080)
1146
+ - 笔记本(1366x768)
1147
+ - 平板(768x1024)
1148
+ - 手机(375x667)
1149
+
1150
+ **期望结果:**
1151
+
1152
+ - 响应式布局正常
1153
+ - 触摸交互流畅
1154
+ - 布局在不同尺寸下正确显示
1155
+
1156
+ **测试类型:** 人工测试
1157
+
1158
+ ---
1159
+
1160
+ ## 5. 性能测试
1161
+
1162
+ ### 测试用例 5.1:渲染性能
1163
+
1164
+ **测试目的:** 验证组件渲染性能
1165
+ **测试步骤:**
1166
+
1167
+ 1. 渲染包含 100 个 TextCard 的列表
1168
+ 2. 测量首次渲染时间
1169
+ 3. 测量重新渲染时间
1170
+
1171
+ **期望结果:**
1172
+
1173
+ - 首次渲染时间 < 200ms
1174
+ - 重新渲染时间 < 100ms
1175
+
1176
+ **测试类型:** 性能测试
1177
+
1178
+ ---
1179
+
1180
+ ### 测试用例 5.2:内存占用
1181
+
1182
+ **测试目的:** 验证组件内存占用
1183
+ **测试步骤:**
1184
+
1185
+ 1. 渲染和销毁组件多次
1186
+ 2. 监测内存变化
1187
+
1188
+ **期望结果:**
1189
+
1190
+ - 无明显内存泄漏
1191
+ - 销毁后内存释放
1192
+
1193
+ **测试类型:** 性能测试
1194
+
1195
+ ---
1196
+
1197
+ ### 测试用例 5.3:大量实例性能
1198
+
1199
+ **测试目的:** 验证大量实例时的性能
1200
+ **测试步骤:**
1201
+
1202
+ 1. 渲染 1000 个 TextCard 实例
1203
+ 2. 检查页面是否卡顿
1204
+ 3. 检查交互是否流畅
1205
+
1206
+ **期望结果:**
1207
+
1208
+ - 页面不卡顿
1209
+ - 交互流畅
1210
+ - 无性能问题
1211
+
1212
+ **测试类型:** 性能测试
1213
+
1214
+ ---
1215
+
1216
+ ## 6. 测试总结
1217
+
1218
+ ### 6.1 测试用例统计
1219
+
1220
+ - **总用例数**:150+
1221
+ - **自动化测试**:80+
1222
+ - **人工测试**:70+
1223
+ - **性能测试**:3
1224
+ - **兼容性测试**:2
1225
+
1226
+ ### 6.2 测试优先级
1227
+
1228
+ - **P0(高优先级)**:基础渲染、样式变体、尺寸、状态、交互行为、自适应规则
1229
+ - **P1(中优先级)**:图标、标签、角标、插槽、文本配置、宽度模式
1230
+ - **P2(低优先级)**:边界条件、性能测试、可访问性、自定义渲染
1231
+
1232
+ ### 6.3 测试覆盖率目标
1233
+
1234
+ - 代码覆盖率:≥ 85%
1235
+ - 分支覆盖率:≥ 80%
1236
+ - 函数覆盖率:≥ 85%
1237
+ - 行覆盖率:≥ 85%
1238
+ - 功能覆盖率:100%
1239
+
1240
+ ## 7. 测试执行计划
1241
+
1242
+ ### 7.1 自动化测试
1243
+
1244
+ - 使用 Vitest + React Testing Library
1245
+ - 每次代码提交前自动运行
1246
+ - CI/CD 集成
1247
+
1248
+ ### 7.2 人工测试
1249
+
1250
+ - 新功能开发完成后进行
1251
+ - 重大版本发布前全面测试
1252
+ - 定期回归测试
1253
+
1254
+ ### 7.3 测试报告
1255
+
1256
+ - 记录测试结果
1257
+ - 标注未通过的用例
1258
+ - 提供修复建议
1259
+
1260
+ ## 8. Bug 汇总
1261
+
1262
+ **说明**:此部分由测试人员填写发现的 Bug
1263
+
1264
+ ### Bug 列表
1265
+
1266
+ | Bug ID | 发现时间 | Bug 描述 | 优先级 | 状态 | 修复时间 | 备注 |
1267
+ |--------|---------|---------|--------|------|---------|------|
1268
+ | - | - | - | - | - | - | - |
1269
+
1270
+ ### Bug 模板
1271
+
1272
+ ```
1273
+ Bug ID: #001
1274
+ 发现时间: 2024-01-01
1275
+ Bug 描述: [详细描述问题]
1276
+ 复现步骤:
1277
+ 1. [步骤1]
1278
+ 2. [步骤2]
1279
+ 3. [步骤3]
1280
+ 预期结果: [应该显示什么]
1281
+ 实际结果: [实际显示什么]
1282
+ 优先级: P0/P1/P2/P3
1283
+ 状态: 待修复/修复中/已修复/已验证
1284
+ 修复时间:
1285
+ 修复说明:
1286
+ ```
1287
+
1288
+ ## 9. 测试结论
1289
+
1290
+ 测试完成后填写:
1291
+
1292
+ - [ ] 所有测试用例通过
1293
+ - [ ] 发现 Bug 已修复
1294
+ - [ ] 组件可以发布
1295
+
1296
+ ### 测试签名
1297
+
1298
+ - 测试人员: ___________
1299
+ - 测试时间: ___________
1300
+ - 审核人员: ___________
1301
+ - 审核时间: ___________
1302
+ ---
1303
+ title: 测试用例
1304
+ order: 4
1305
+ category: atom
1306
+ ---
1307
+
1308
+ # TextCard 组件测试用例文档
1309
+
1310
+ ## 1. 测试概述
1311
+
1312
+ ### 1.1 测试目标
1313
+
1314
+ - 验证 TextCard 组件的所有功能正常运行
1315
+ - 确保组件在各种场景下的表现符合预期
1316
+ - 保证组件的稳定性和可靠性
1317
+ - 验证组件在不同样式、尺寸、状态下的正确渲染
1318
+
1319
+ ### 1.2 测试范围
1320
+
1321
+ - 基础功能测试
1322
+ - 6 种样式变体测试(text、filled、light、outlined、gradient、dashed)
1323
+ - 3 种尺寸测试(small、default、large)
1324
+ - 4 种状态测试(default、hover、active、disabled)
1325
+ - 图标、标签、角标功能测试
1326
+ - 插槽功能测试
1327
+ - 文本配置测试
1328
+ - 宽度模式测试
1329
+ - 交互行为测试
1330
+ - 自适应规则测试
1331
+ - 边界条件测试
1332
+ - 兼容性测试
1333
+ - 性能测试
1334
+
1335
+ ### 1.3 测试环境
1336
+
1337
+ - React 版本:18.x
1338
+ - TypeScript 版本:5.x
1339
+ - Ant Design 版本:5.x
1340
+ - 测试框架:Vitest + React Testing Library
1341
+ - 测试工具:@testing-library/react, @testing-library/user-event, @testing-library/jest-dom
1342
+
1343
+ ## 2. 功能测试用例
1344
+
1345
+ ### 2.1 基础渲染测试
1346
+
1347
+ #### 测试用例 2.1.1:默认渲染
1348
+
1349
+ **测试目的:** 验证组件能够正常渲染
1350
+ **测试步骤:**
1351
+
1352
+ 1. 渲染 TextCard 组件,传入必填 prop `text="Tab title"`
1353
+ 2. 检查组件是否成功挂载
1354
+ 3. 检查文本内容是否正确显示
1355
+
1356
+ **期望结果:**
1357
+
1358
+ - 组件成功渲染
1359
+ - 显示文本内容 "Tab title"
1360
+ - 使用默认样式变体(text)
1361
+ - 使用默认尺寸(default)
1362
+
1363
+ **测试类型:** 自动化测试
1364
+
1365
+ ---
1366
+
1367
+ #### 测试用例 2.1.2:ReactNode 文本渲染
1368
+
1369
+ **测试目的:** 验证传入 ReactNode 作为文本内容
1370
+ **测试步骤:**
1371
+
1372
+ 1. 传入 `text={<span className="custom-text">Custom</span>}`
1373
+ 2. 检查是否渲染了 ReactNode 内容
1374
+
1375
+ **期望结果:**
1376
+
1377
+ - 正确渲染 ReactNode 内容
1378
+ - 自定义类名生效
1379
+
1380
+ **测试类型:** 自动化测试
1381
+
1382
+ ---
1383
+
1384
+ #### 测试用例 2.1.3:空文本处理
1385
+
1386
+ **测试目的:** 验证空文本时的表现
1387
+ **测试步骤:**
1388
+
1389
+ 1. 传入 `text=""`
1390
+ 2. 检查渲染
1391
+
1392
+ **期望结果:**
1393
+
1394
+ - 不报错
1395
+ - 组件正常渲染,不显示文本内容
1396
+
1397
+ **测试类型:** 自动化测试
1398
+
1399
+ ---
1400
+
1401
+ ### 2.2 样式变体测试
1402
+
1403
+ #### 测试用例 2.2.1:样式 1 - 纯文本(text)
1404
+
1405
+ **测试目的:** 验证 text 样式变体的渲染和交互
1406
+ **测试步骤:**
1407
+
1408
+ 1. 设置 `variant="text"`
1409
+ 2. 检查默认状态样式
1410
+ 3. 设置 `active={{ value: true }}`,检查激活状态
1411
+ 4. 鼠标悬停,检查 hover 状态
1412
+ 5. 设置 `disabled={{ value: true }}`,检查禁用状态
1413
+
1414
+ **期望结果:**
1415
+
1416
+ - 默认状态:无背景,无边框,无 padding,文本颜色为默认色
1417
+ - Active 状态:文本颜色变为主题色(`var(--theme-color)`),字体加粗(font-weight: 600)
1418
+ - Hover 状态:文本颜色变为浅紫色(`var(--theme-color-light)`)
1419
+ - Disabled 状态:文本半透明(opacity: 0.4),颜色变灰
1420
+
1421
+ **测试类型:** 自动化测试 + 人工测试
1422
+
1423
+ ---
1424
+
1425
+ #### 测试用例 2.2.2:样式 2 - 圆角背景(filled)
1426
+
1427
+ **测试目的:** 验证 filled 样式变体的渲染和交互
1428
+ **测试步骤:**
1429
+
1430
+ 1. 设置 `variant="filled"`
1431
+ 2. 检查默认状态样式
1432
+ 3. 设置 `active={{ value: true }}`,检查激活状态
1433
+ 4. 鼠标悬停,检查 hover 状态
1434
+
1435
+ **期望结果:**
1436
+
1437
+ - 默认状态:无背景,有 padding,圆角 40px(胶囊形)
1438
+ - Active 状态:主题色背景(`var(--theme-color)`),白色文字
1439
+ - Hover 状态:灰色背景(#F2F4F7)
1440
+
1441
+ **测试类型:** 自动化测试 + 人工测试
1442
+
1443
+ ---
1444
+
1445
+ #### 测试用例 2.2.3:样式 3 - 浅色背景(light)
1446
+
1447
+ **测试目的:** 验证 light 样式变体的渲染和交互
1448
+ **测试步骤:**
1449
+
1450
+ 1. 设置 `variant="light"`
1451
+ 2. 检查默认状态样式
1452
+ 3. 设置 `active={{ value: true }}`,检查激活状态
1453
+ 4. 鼠标悬停,检查 hover 状态
1454
+
1455
+ **期望结果:**
1456
+
1457
+ - 默认状态:无背景,深灰文字(#475467)
1458
+ - Active 状态:浅紫背景(`var(--theme-color-bg)`),主题色文字,字体加粗
1459
+ - Hover 状态:灰色背景(#F2F4F7)
1460
+
1461
+ **测试类型:** 自动化测试 + 人工测试
1462
+
1463
+ ---
1464
+
1465
+ #### 测试用例 2.2.4:样式 4 - 描边(outlined)
1466
+
1467
+ **测试目的:** 验证 outlined 样式变体的渲染和交互
1468
+ **测试步骤:**
1469
+
1470
+ 1. 设置 `variant="outlined"`
1471
+ 2. 检查默认状态样式
1472
+ 3. 设置 `active={{ value: true }}`,检查激活状态
1473
+ 4. 鼠标悬停,检查 hover 状态
1474
+
1475
+ **期望结果:**
1476
+
1477
+ - 默认状态:透明背景,灰色文字(#475467)
1478
+ - Active 状态:灰色背景(#F2F4F7),黑色文字
1479
+ - Hover 状态:浅灰背景(#F9FAFB),黑色文字
1480
+
1481
+ **测试类型:** 自动化测试 + 人工测试
1482
+
1483
+ ---
1484
+
1485
+ #### 测试用例 2.2.5:样式 5 - 渐变(gradient)
1486
+
1487
+ **测试目的:** 验证 gradient 样式变体的渲染和交互
1488
+ **测试步骤:**
1489
+
1490
+ 1. 设置 `variant="gradient"`
1491
+ 2. 检查默认状态样式
1492
+ 3. 设置 `active={{ value: true }}`,检查激活状态
1493
+ 4. 鼠标悬停,检查 hover 状态
1494
+
1495
+ **期望结果:**
1496
+
1497
+ - 默认状态:透明背景,灰色文字(#667085)
1498
+ - Active 状态:白色背景,阴影效果,黑色文字(#101828)
1499
+ - Hover 状态:文字颜色变为黑色
1500
+
1501
+ **测试类型:** 自动化测试 + 人工测试
1502
+
1503
+ ---
1504
+
1505
+ #### 测试用例 2.2.6:样式 6 - 虚线(dashed)
1506
+
1507
+ **测试目的:** 验证 dashed 样式变体的渲染和交互
1508
+ **测试步骤:**
1509
+
1510
+ 1. 设置 `variant="dashed"`
1511
+ 2. 检查默认状态样式
1512
+ 3. 设置 `active={{ value: true }}`,检查激活状态
1513
+ 4. 鼠标悬停,检查 hover 状态
1514
+
1515
+ **期望结果:**
1516
+
1517
+ - 默认状态:透明背景,灰色文字(#475467)
1518
+ - Active 状态:白色背景,上左右三边有边框,主题色文字,圆角 8px 8px 0 0
1519
+ - Hover 状态:文字颜色变为黑色
1520
+
1521
+ **测试类型:** 自动化测试 + 人工测试
1522
+
1523
+ ---
1524
+
1525
+ ### 2.3 尺寸测试
1526
+
1527
+ #### 测试用例 2.3.1:Small 尺寸
1528
+
1529
+ **测试目的:** 验证 small 尺寸的渲染
1530
+ **测试步骤:**
1531
+
1532
+ 1. 设置 `size="small"`
1533
+ 2. 检查 padding、fontSize、gap、borderRadius
1534
+
1535
+ **期望结果:**
1536
+
1537
+ - padding: 8px 12px
1538
+ - fontSize: 14px
1539
+ - lineHeight: 22px
1540
+ - gap: 8px
1541
+ - borderRadius: 4px
1542
+
1543
+ **测试类型:** 自动化测试 + 人工测试
1544
+
1545
+ ---
1546
+
1547
+ #### 测试用例 2.3.2:Default 尺寸
1548
+
1549
+ **测试目的:** 验证 default 尺寸的渲染
1550
+ **测试步骤:**
1551
+
1552
+ 1. 设置 `size="default"` 或不设置 size(默认值)
1553
+ 2. 检查 padding、fontSize、gap、borderRadius
1554
+
1555
+ **期望结果:**
1556
+
1557
+ - padding: 12px 16px
1558
+ - fontSize: 14px
1559
+ - lineHeight: 22px
1560
+ - gap: 12px
1561
+ - borderRadius: 6px
1562
+
1563
+ **测试类型:** 自动化测试 + 人工测试
1564
+
1565
+ ---
1566
+
1567
+ #### 测试用例 2.3.3:Large 尺寸
1568
+
1569
+ **测试目的:** 验证 large 尺寸的渲染
1570
+ **测试步骤:**
1571
+
1572
+ 1. 设置 `size="large"`
1573
+ 2. 检查 padding、fontSize、gap、borderRadius
1574
+
1575
+ **期望结果:**
1576
+
1577
+ - padding: 16px 20px
1578
+ - fontSize: 16px
1579
+ - lineHeight: 24px
1580
+ - gap: 16px
1581
+ - borderRadius: 8px
1582
+
1583
+ **测试类型:** 自动化测试 + 人工测试
1584
+
1585
+ ---
1586
+
1587
+ ### 2.4 状态测试
1588
+
1589
+ #### 测试用例 2.4.1:Active 状态
1590
+
1591
+ **测试目的:** 验证 active 状态的渲染和交互
1592
+ **测试步骤:**
1593
+
1594
+ 1. 设置 `active={{ value: true }}`
1595
+ 2. 检查样式、类名、data 属性
1596
+ 3. 设置 `active={{ value: true, style: { color: 'red' }, className: 'custom-active' }}`
1597
+ 4. 检查自定义样式和类名是否生效
1598
+ 5. 设置 `active={{ value: true, extra: <div>Extra</div> }}`
1599
+ 6. 检查 extra 内容是否渲染
1600
+
1601
+ **期望结果:**
1602
+
1603
+ - 应用 active 样式(根据 variant 不同)
1604
+ - 添加 `text-card--active` 类名
1605
+ - 设置 `data-active="true"` 属性
1606
+ - 自定义样式和类名生效
1607
+ - extra 内容正确渲染
1608
+
1609
+ **测试类型:** 自动化测试 + 人工测试
1610
+
1611
+ ---
1612
+
1613
+ #### 测试用例 2.4.2:Disabled 状态
1614
+
1615
+ **测试目的:** 验证 disabled 状态的渲染和交互
1616
+ **测试步骤:**
1617
+
1618
+ 1. 设置 `disabled={{ value: true }}`
1619
+ 2. 检查样式、类名、aria 属性
1620
+ 3. 尝试点击组件
1621
+ 4. 检查 tabIndex 属性
1622
+
1623
+ **期望结果:**
1624
+
1625
+ - 透明度 0.4,颜色变灰,cursor: not-allowed
1626
+ - 添加 `text-card--disabled` 类名
1627
+ - 设置 `data-disabled="true"` 和 `aria-disabled="true"` 属性
1628
+ - tabIndex 为 -1,无法键盘聚焦
1629
+ - 点击事件不触发
1630
+
1631
+ **测试类型:** 自动化测试 + 人工测试
1632
+
1633
+ ---
1634
+
1635
+ #### 测试用例 2.4.3:Loading 状态
1636
+
1637
+ **测试目的:** 验证 loading 状态的渲染和交互
1638
+ **测试步骤:**
1639
+
1640
+ 1. 设置 `loading={{ value: true }}`
1641
+ 2. 检查样式、类名
1642
+ 3. 尝试点击组件
1643
+ 4. 设置 `loading={{ value: true, extra: <Spin /> }}`
1644
+ 5. 检查 extra 内容是否渲染
1645
+
1646
+ **期望结果:**
1647
+
1648
+ - 透明度 0.6,cursor: wait
1649
+ - 添加 `text-card--loading` 类名
1650
+ - 设置 `data-loading="true"` 属性
1651
+ - 点击事件不触发
1652
+ - extra 内容正确渲染
1653
+
1654
+ **测试类型:** 自动化测试 + 人工测试
1655
+
1656
+ ---
1657
+
1658
+ #### 测试用例 2.4.4:状态优先级
1659
+
1660
+ **测试目的:** 验证状态优先级规则(loading > disabled > active)
1661
+ **测试步骤:**
1662
+
1663
+ 1. 同时设置 `loading={{ value: true, extra: <div>Loading</div> }}`、`disabled={{ value: true, extra: <div>Disabled</div> }}`、`active={{ value: true, extra: <div>Active</div> }}`
1664
+ 2. 检查显示哪个状态的 extra 内容
1665
+ 3. 移除 loading,检查显示哪个状态
1666
+ 4. 移除 disabled,检查显示哪个状态
1667
+
1668
+ **期望结果:**
1669
+
1670
+ - 同时存在时,显示 loading 的 extra
1671
+ - 只有 disabled 和 active 时,显示 disabled 的 extra
1672
+ - 只有 active 时,显示 active 的 extra
1673
+
1674
+ **测试类型:** 自动化测试
1675
+
1676
+ ---
1677
+
1678
+ ### 2.5 图标功能测试
1679
+
1680
+ #### 测试用例 2.5.1:前置图标
1681
+
1682
+ **测试目的:** 验证前置图标的渲染和配置
1683
+ **测试步骤:**
1684
+
1685
+ 1. 设置 `prefixIcon={<BellOutlined />}`
1686
+ 2. 检查图标是否显示在文本前面
1687
+ 3. 设置 `iconConfig={{ size: 20, color: '#ff0000' }}`
1688
+ 4. 检查图标大小和颜色是否生效
1689
+
1690
+ **期望结果:**
1691
+
1692
+ - 图标显示在文本前面
1693
+ - 图标大小为 20px
1694
+ - 图标颜色为红色
1695
+ - 图标容器有正确的类名 `text-card__icon--prefix`
1696
+
1697
+ **测试类型:** 自动化测试 + 人工测试
1698
+
1699
+ ---
1700
+
1701
+ #### 测试用例 2.5.2:后置图标
1702
+
1703
+ **测试目的:** 验证后置图标的渲染和配置
1704
+ **测试步骤:**
1705
+
1706
+ 1. 设置 `suffixIcon={<DownOutlined />}`
1707
+ 2. 检查图标是否显示在文本后面
1708
+ 3. 设置 `iconConfig={{ size: 16 }}`
1709
+ 4. 检查图标大小是否生效
1710
+
1711
+ **期望结果:**
1712
+
1713
+ - 图标显示在文本后面
1714
+ - 图标大小为 16px
1715
+ - 图标容器有正确的类名 `text-card__icon--suffix`
1716
+
1717
+ **测试类型:** 自动化测试 + 人工测试
1718
+
1719
+ ---
1720
+
1721
+ #### 测试用例 2.5.3:前后图标组合
1722
+
1723
+ **测试目的:** 验证同时显示前后图标
1724
+ **测试步骤:**
1725
+
1726
+ 1. 同时设置 `prefixIcon` 和 `suffixIcon`
1727
+ 2. 检查两个图标是否都正常显示
1728
+ 3. 检查间距是否正确
1729
+
1730
+ **期望结果:**
1731
+
1732
+ - 前后图标都正常显示
1733
+ - 间距根据 size 正确设置(gap 属性)
1734
+
1735
+ **测试类型:** 自动化测试 + 人工测试
1736
+
1737
+ ---
1738
+
1739
+ ### 2.6 标签功能测试
1740
+
1741
+ #### 测试用例 2.6.1:后置标签
1742
+
1743
+ **测试目的:** 验证后置标签的渲染和配置
1744
+ **测试步骤:**
1745
+
1746
+ 1. 设置 `tag={<Tag color="blue">2</Tag>}`
1747
+ 2. 检查标签是否显示在后置位置
1748
+ 3. 设置 `tagConfig={{ style: { marginLeft: 8 } }}`
1749
+ 4. 检查自定义样式是否生效
1750
+
1751
+ **期望结果:**
1752
+
1753
+ - 标签显示在后置位置(文本后面)
1754
+ - 自定义样式生效
1755
+ - 标签容器有正确的类名 `text-card__tag`
1756
+
1757
+ **测试类型:** 自动化测试 + 人工测试
1758
+
1759
+ ---
1760
+
1761
+ #### 测试用例 2.6.2:标签与后置图标组合
1762
+
1763
+ **测试目的:** 验证标签和后置图标同时显示时的顺序
1764
+ **测试步骤:**
1765
+
1766
+ 1. 同时设置 `tag` 和 `suffixIcon`
1767
+ 2. 检查显示顺序
1768
+
1769
+ **期望结果:**
1770
+
1771
+ - 标签在前,图标在后
1772
+ - 顺序:文本 -> 标签 -> 后置图标
1773
+
1774
+ **测试类型:** 人工测试
1775
+
1776
+ ---
1777
+
1778
+ ### 2.7 角标功能测试
1779
+
1780
+ #### 测试用例 2.7.1:红点角标
1781
+
1782
+ **测试目的:** 验证红点角标的渲染和配置
1783
+ **测试步骤:**
1784
+
1785
+ 1. 设置 `badge={{ type: 'dot' }}`
1786
+ 2. 检查是否显示红点角标
1787
+ 3. 设置 `badge={{ type: 'dot', color: 'blue', offset: [-10, 0], size: 'small' }}`
1788
+ 4. 检查位置、颜色、偏移是否生效
1789
+
1790
+ **期望结果:**
1791
+
1792
+ - 显示红点角标
1793
+ - 通过 offset 控制位置(向左偏移)
1794
+ - 颜色为蓝色
1795
+ - 大小为 small
1796
+
1797
+ **测试类型:** 自动化测试 + 人工测试
1798
+
1799
+ ---
1800
+
1801
+ #### 测试用例 2.7.2:数字角标
1802
+
1803
+ **测试目的:** 验证数字角标的渲染和配置
1804
+ **测试步骤:**
1805
+
1806
+ 1. 设置 `badge={{ type: 'number', content: 99 }}`
1807
+ 2. 检查是否显示数字 99
1808
+ 3. 设置 `badge={{ type: 'number', content: 999 }}`
1809
+ 4. 检查大数字是否正确显示
1810
+ 5. 设置 `badge={{ type: 'number', content: 0, showZero: false }}`
1811
+ 6. 检查 0 是否不显示
1812
+ 7. 设置 `badge={{ type: 'number', content: 0, showZero: true }}`
1813
+ 8. 检查 0 是否显示
1814
+
1815
+ **期望结果:**
1816
+
1817
+ - 显示数字 99
1818
+ - 大数字正确显示
1819
+ - showZero=false 时,0 不显示
1820
+ - showZero=true 时,0 显示
1821
+
1822
+ **测试类型:** 自动化测试 + 人工测试
1823
+
1824
+ ---
1825
+
1826
+ #### 测试用例 2.7.3:文本角标
1827
+
1828
+ **测试目的:** 验证文本角标的渲染和配置
1829
+ **测试步骤:**
1830
+
1831
+ 1. 设置 `badge={{ type: 'text', content: 'New' }}`
1832
+ 2. 检查是否显示文本 "New"
1833
+ 3. 设置 `badge={{ type: 'text', content: 'Very Long Text' }}`
1834
+ 4. 检查长文本是否正确显示
1835
+
1836
+ **期望结果:**
1837
+
1838
+ - 显示文本 "New"
1839
+ - 长文本正常显示
1840
+
1841
+ **测试类型:** 自动化测试 + 人工测试
27
1842
 
28
1843
  ---
29
1844
 
30
- ## 二、基础功能测试用例
1845
+ #### 测试用例 2.7.4:角标位置(通过 offset 控制)
31
1846
 
32
- ### 2.1 组件渲染
1847
+ **测试目的:** 验证角标的不同位置(通过 offset 控制)
1848
+ **测试步骤:**
33
1849
 
34
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
35
- |--------|---------|---------|---------|
36
- | 基础渲染 | 使用必填 prop `text` 渲染组件 | 组件正常渲染,显示文本内容 | 自动化 |
37
- | 空文本渲染 | text 设置为空字符串 | 组件正常渲染,不显示文本 | 自动化 |
38
- | ReactNode 文本 | text 传入 JSX 元素 | 正确渲染 JSX 内容 | 自动化 |
1850
+ 1. 不设置 offset,检查默认位置(右上角)
1851
+ 2. 设置 `offset: [-10, 0]`,检查是否向左偏移
1852
+ 3. 设置 `offset: [0, 10]`,检查是否向下偏移
1853
+ 4. 设置 `offset: [-10, 10]`,检查是否向左下偏移
39
1854
 
40
- ### 2.2 文本内容
1855
+ **期望结果:**
41
1856
 
42
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
43
- |--------|---------|---------|---------|
44
- | 文本显示 | 设置 text="Tab title" | 正确显示文本内容 | 人工 |
45
- | 长文本省略(单行) | 设置超长文本,maxLines=1 | 文本超出显示省略号 | 人工 |
46
- | 长文本省略(多行) | 设置超长文本,maxLines=2 | 文本超出 2 行显示省略号 | 人工 |
47
- | 禁用省略 | ellipsis=false | 文本不显示省略号,完整显示 | 人工 |
1857
+ - 不设置 offset 时,角标在右上角(默认位置)
1858
+ - offset 正数向右/下偏移,负数向左/上偏移
1859
+ - 角标位置正确对应设置的 offset
1860
+
1861
+ **测试类型:** 人工测试
48
1862
 
49
1863
  ---
50
1864
 
51
- ## 三、样式变体测试用例
1865
+ #### 测试用例 2.7.5:角标大小
52
1866
 
53
- ### 3.1 样式 1 - 纯文本 (text)
1867
+ **测试目的:** 验证角标大小控制
1868
+ **测试步骤:**
54
1869
 
55
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
56
- |--------|---------|---------|---------|
57
- | 默认样式 | variant="text" | 无背景,无边框,无 padding | 人工 |
58
- | Active 状态 | variant="text" + active.value=true | 文本颜色变为主题色,字体加粗 | 人工 |
59
- | Hover 状态 | variant="text" + 鼠标悬停 | 文本颜色变为浅紫色 | 人工 |
60
- | Disabled 状态 | variant="text" + disabled.value=true | 文本半透明,颜色变灰 | 人工 |
1870
+ 1. 设置 `badge={{ type: 'number', content: 99, size: 'small' }}`
1871
+ 2. 检查角标大小是否为 small
1872
+ 3. 设置 `badge={{ type: 'number', content: 99, size: 'default' }}`
1873
+ 4. 检查角标大小是否为 default
1874
+ 5. 设置 `badge={{ type: 'number', content: 99 }}`(不设置 size)
1875
+ 6. 检查角标是否使用默认大小
1876
+ 7. 设置 `badge={{ type: 'dot', size: 'small' }}`
1877
+ 8. 检查红点角标大小是否生效
61
1878
 
62
- ### 3.2 样式 2 - 圆角背景 (filled)
1879
+ **期望结果:**
63
1880
 
64
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
65
- |--------|---------|---------|---------|
66
- | 默认样式 | variant="filled" | 无背景,有 padding,圆角 40px | 人工 |
67
- | Active 状态 | variant="filled" + active.value=true | 主题色背景,白色文字 | 人工 |
68
- | Hover 状态 | variant="filled" + 鼠标悬停 | 灰色背景 #F2F4F7 | 人工 |
69
- | 圆角效果 | variant="filled" | 边框圆角为 40px(胶囊形) | 人工 |
1881
+ - 角标大小正确对应设置的 size
1882
+ - size='small' 时显示小尺寸角标
1883
+ - size='default' 时显示默认尺寸角标
1884
+ - 不设置 size 时使用默认尺寸
70
1885
 
71
- ### 3.3 样式 3 - 浅色背景 (light)
1886
+ **测试类型:** 自动化测试 + 人工测试
72
1887
 
73
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
74
- |--------|---------|---------|---------|
75
- | 默认样式 | variant="light" | 无背景,深灰文字 #475467 | 人工 |
76
- | Active 状态 | variant="light" + active.value=true | 浅紫背景,主题色文字,字体加粗 | 人工 |
77
- | Hover 状态 | variant="light" + 鼠标悬停 | 灰色背景 #F2F4F7 | 人工 |
1888
+ ---
78
1889
 
79
- ### 3.4 样式 4 - 描边 (outlined)
1890
+ #### 测试用例 2.7.6:角标显示零值
80
1891
 
81
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
82
- |--------|---------|---------|---------|
83
- | 默认样式 | variant="outlined" | 灰色边框,无背景 | 人工 |
84
- | Active 状态 | variant="outlined" + active.value=true | 主题色边框,主题色文字 | 人工 |
85
- | Hover 状态 | variant="outlined" + 鼠标悬停 | 边框颜色变浅紫 | 人工 |
1892
+ **测试目的:** 验证角标 showZero 配置
1893
+ **测试步骤:**
86
1894
 
87
- ### 3.5 样式 5 - 渐变 (gradient)
1895
+ 1. 设置 `badge={{ type: 'number', content: 0, showZero: false }}`
1896
+ 2. 检查角标是否不显示
1897
+ 3. 设置 `badge={{ type: 'number', content: 0, showZero: true }}`
1898
+ 4. 检查角标是否显示 0
1899
+ 5. 设置 `badge={{ type: 'number', content: 0 }}`(不设置 showZero)
1900
+ 6. 检查角标是否不显示(默认 showZero=false)
1901
+ 7. 设置 `badge={{ type: 'number', content: 1, showZero: false }}`
1902
+ 8. 检查非零值是否正常显示
88
1903
 
89
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
90
- |--------|---------|---------|---------|
91
- | 默认样式 | variant="gradient" | 无背景 | 人工 |
92
- | Active 状态 | variant="gradient" + active.value=true | 渐变背景(紫色),白色文字 | 人工 |
93
- | 渐变方向 | variant="gradient" + active | 渐变方向为 135deg | 人工 |
1904
+ **期望结果:**
94
1905
 
95
- ### 3.6 样式 6 - 虚线 (dashed)
1906
+ - showZero=false 时,content 0 不显示角标
1907
+ - showZero=true 时,content 为 0 显示角标
1908
+ - 不设置 showZero 时,默认不显示零值
1909
+ - 非零值不受 showZero 影响,正常显示
96
1910
 
97
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
98
- |--------|---------|---------|---------|
99
- | 默认样式 | variant="dashed" | 灰色虚线边框 | 人工 |
100
- | Active 状态 | variant="dashed" + active.value=true | 主题色虚线边框,浅紫背景 | 人工 |
101
- | Hover 状态 | variant="dashed" + 鼠标悬停 | 边框颜色变浅紫 | 人工 |
1911
+ **测试类型:** 自动化测试 + 人工测试
102
1912
 
103
1913
  ---
104
1914
 
105
- ## 四、尺寸测试用例
1915
+ ### 2.8 插槽功能测试
1916
+
1917
+ #### 测试用例 2.8.1:前置插槽
1918
+
1919
+ **测试目的:** 验证前置插槽的渲染和优先级
1920
+ **测试步骤:**
106
1921
 
107
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
108
- |--------|---------|---------|---------|
109
- | Small 尺寸 | size="small" | padding: 8px 12px, fontSize: 14px, gap: 8px, borderRadius: 4px | 人工 |
110
- | Default 尺寸 | size="default" | padding: 12px 16px, fontSize: 14px, gap: 12px, borderRadius: 6px | 人工 |
111
- | Large 尺寸 | size="large" | padding: 16px 20px, fontSize: 16px, gap: 16px, borderRadius: 8px | 人工 |
112
- | 尺寸切换 | 动态切换 size | 样式平滑过渡 | 人工 |
1922
+ 1. 同时设置 `prefixSlot={<div>Custom</div>}` `prefixIcon={<BellOutlined />}`
1923
+ 2. 检查显示哪个内容
1924
+
1925
+ **期望结果:**
1926
+
1927
+ - 显示前置插槽内容
1928
+ - 不显示前置图标
1929
+ - 插槽优先级高于图标
1930
+
1931
+ **测试类型:** 自动化测试 + 人工测试
113
1932
 
114
1933
  ---
115
1934
 
116
- ## 五、状态测试用例
1935
+ #### 测试用例 2.8.2:后置插槽
1936
+
1937
+ **测试目的:** 验证后置插槽的渲染和优先级
1938
+ **测试步骤:**
1939
+
1940
+ 1. 同时设置 `suffixSlot={<div>Custom</div>}`、`tag={<Tag>Tag</Tag>}` 和 `suffixIcon={<DownOutlined />}`
1941
+ 2. 检查显示哪个内容
1942
+
1943
+ **期望结果:**
1944
+
1945
+ - 显示后置插槽内容
1946
+ - 不显示标签和后置图标
1947
+ - 插槽优先级高于标签和图标
1948
+
1949
+ **测试类型:** 自动化测试 + 人工测试
117
1950
 
118
- ### 5.1 Active 状态
1951
+ ---
119
1952
 
120
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
121
- |--------|---------|---------|---------|
122
- | Active 样式 | active.value=true | 应用 active 样式(根据 variant 不同) | 人工 |
123
- | Active 类名 | active.className="custom-active" | 添加自定义类名 | 自动化 |
124
- | Active 样式覆盖 | active.style={color: 'red'} | 自定义样式生效 | 人工 |
125
- | Active onChange | 点击组件触发 active.onChange | onChange 回调被调用,参数为 true | 自动化 |
126
- | Active extra | active.extra=<Icon /> | 渲染 extra 内容 | 人工 |
1953
+ ### 2.9 文本配置测试
127
1954
 
128
- ### 5.2 Disabled 状态
1955
+ #### 测试用例 2.9.1:字体样式配置
129
1956
 
130
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
131
- |--------|---------|---------|---------|
132
- | Disabled 样式 | disabled.value=true | 透明度 0.4,颜色变灰,cursor: not-allowed | 人工 |
133
- | Disabled 点击 | disabled.value=true + 点击 | 点击事件不触发 | 自动化 |
134
- | Disabled tabIndex | disabled.value=true | tabIndex=-1,无法键盘聚焦 | 人工 |
135
- | Disabled extra | disabled.extra=<span>禁用</span> | 渲染 extra 内容 | 人工 |
1957
+ **测试目的:** 验证文本字体样式配置
1958
+ **测试步骤:**
136
1959
 
137
- ### 5.3 Loading 状态
1960
+ 1. 设置 `textConfig={{ fontSize: 18, fontWeight: 'bold', color: '#ff0000' }}`
1961
+ 2. 检查字体大小、粗细、颜色是否生效
138
1962
 
139
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
140
- |--------|---------|---------|---------|
141
- | Loading 样式 | loading.value=true | 透明度 0.6,cursor: wait | 人工 |
142
- | Loading 点击 | loading.value=true + 点击 | 点击事件不触发 | 自动化 |
143
- | Loading extra | loading.extra=<Spin /> | 渲染加载图标 | 人工 |
1963
+ **期望结果:**
144
1964
 
145
- ### 5.4 状态优先级
1965
+ - 字体大小为 18px
1966
+ - 字体加粗
1967
+ - 文本颜色为红色
146
1968
 
147
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
148
- |--------|---------|---------|---------|
149
- | Loading > Disabled | loading=true + disabled=true | 显示 loading 状态 | 自动化 |
150
- | Loading > Active | loading=true + active=true | 显示 loading 状态 | 自动化 |
151
- | Disabled > Active | disabled=true + active=true | 显示 disabled 状态 | 自动化 |
1969
+ **测试类型:** 自动化测试 + 人工测试
152
1970
 
153
1971
  ---
154
1972
 
155
- ## 六、图标测试用例
1973
+ #### 测试用例 2.9.2:文本省略(单行)
1974
+
1975
+ **测试目的:** 验证单行文本省略功能
1976
+ **测试步骤:**
1977
+
1978
+ 1. 设置超长文本和 `textConfig={{ maxLines: 1, ellipsis: true }}`
1979
+ 2. 检查是否显示省略号
1980
+
1981
+ **期望结果:**
1982
+
1983
+ - 文本超出部分显示省略号
1984
+ - 使用 `text-overflow: ellipsis` 和 `white-space: nowrap`
1985
+
1986
+ **测试类型:** 自动化测试 + 人工测试
1987
+
1988
+ ---
156
1989
 
157
- ### 6.1 前置图标
1990
+ #### 测试用例 2.9.3:文本省略(多行)
158
1991
 
159
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
160
- |--------|---------|---------|---------|
161
- | 图标渲染 | prefixIcon=<BellIcon /> | 图标显示在文本前面 | 人工 |
162
- | 图标大小 | iconConfig.size=20 | 图标大小为 20px | 人工 |
163
- | 图标颜色 | iconConfig.color="#ff0000" | 图标颜色为红色 | 人工 |
164
- | 无图标 | 不传 prefixIcon | 不显示前置图标 | 自动化 |
1992
+ **测试目的:** 验证多行文本省略功能
1993
+ **测试步骤:**
165
1994
 
166
- ### 6.2 后置图标
1995
+ 1. 设置超长文本和 `textConfig={{ maxLines: 2, ellipsis: true }}`
1996
+ 2. 检查是否显示省略号
167
1997
 
168
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
169
- |--------|---------|---------|---------|
170
- | 图标渲染 | suffixIcon=<ChevronIcon /> | 图标显示在文本后面 | 人工 |
171
- | 图标大小 | iconConfig.size=16 | 前后图标大小统一为 16px | 人工 |
172
- | 无图标 | 不传 suffixIcon | 不显示后置图标 | 自动化 |
1998
+ **期望结果:**
173
1999
 
174
- ### 6.3 前后图标组合
2000
+ - 文本超出 2 行后显示省略号
2001
+ - 使用 `-webkit-line-clamp: 2` 和 `-webkit-box-orient: vertical`
175
2002
 
176
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
177
- |--------|---------|---------|---------|
178
- | 同时显示 | prefixIcon + suffixIcon | 前后图标都正常显示 | 人工 |
179
- | 间距正确 | 前后图标 + 文本 | 间距根据 size 正确设置 | 人工 |
2003
+ **测试类型:** 自动化测试 + 人工测试
180
2004
 
181
2005
  ---
182
2006
 
183
- ## 七、标签测试用例
2007
+ #### 测试用例 2.9.4:文本对齐
184
2008
 
185
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
186
- |--------|---------|---------|---------|
187
- | 标签渲染 | tag=<Tag>标签</Tag> | 标签显示在后置位置 | 人工 |
188
- | 标签样式 | tagConfig.style={marginLeft: 8} | 自定义样式生效 | 人工 |
189
- | 标签+后置图标 | tag + suffixIcon | 标签在前,图标在后 | 人工 |
190
- | 无标签 | 不传 tag | 不显示标签 | 自动化 |
2009
+ **测试目的:** 验证文本对齐配置
2010
+ **测试步骤:**
2011
+
2012
+ 1. 分别设置 `textConfig={{ textAlign: 'left' }}`、`'center'`、`'right'`
2013
+ 2. 检查文本对齐方式
2014
+
2015
+ **期望结果:**
2016
+
2017
+ - 文本对齐方式正确对应设置的值
2018
+
2019
+ **测试类型:** 自动化测试 + 人工测试
191
2020
 
192
2021
  ---
193
2022
 
194
- ## 八、角标测试用例
2023
+ ### 2.10 宽度模式测试
2024
+
2025
+ #### 测试用例 2.10.1:自动宽度(auto)
2026
+
2027
+ **测试目的:** 验证自动宽度模式
2028
+ **测试步骤:**
2029
+
2030
+ 1. 设置 `widthMode="auto"` 和 `maxWidth={300}`
2031
+ 2. 检查宽度设置
2032
+
2033
+ **期望结果:**
195
2034
 
196
- ### 8.1 红点角标
2035
+ - width 为 'auto'
2036
+ - maxWidth 为 300px
2037
+ - 内容超出最大宽度时显示省略号
197
2038
 
198
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
199
- |--------|---------|---------|---------|
200
- | 红点显示 | badge.type="dot" | 显示红点角标 | 人工 |
201
- | 红点位置 | badge.position="top-right" | 角标在右上角 | 人工 |
202
- | 红点颜色 | badge.color="blue" | 角标颜色为蓝色 | 人工 |
203
- | 红点偏移 | badge.offset=[5, 5] | 角标偏移 5px | 人工 |
2039
+ **测试类型:** 自动化测试 + 人工测试
204
2040
 
205
- ### 8.2 数字角标
2041
+ ---
2042
+
2043
+ #### 测试用例 2.10.2:固定宽度(fixed)
206
2044
 
207
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
208
- |--------|---------|---------|---------|
209
- | 数字显示 | badge.type="number", content=99 | 显示数字 99 | 人工 |
210
- | 大数字 | badge.content=999 | 正确显示大数字 | 人工 |
211
- | 零显示 | badge.content=0 | 显示 0 | 人工 |
2045
+ **测试目的:** 验证固定宽度模式
2046
+ **测试步骤:**
212
2047
 
213
- ### 8.3 文本角标
2048
+ 1. 设置 `widthMode="fixed"` 和 `width={200}`
2049
+ 2. 检查宽度设置
214
2050
 
215
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
216
- |--------|---------|---------|---------|
217
- | 文本显示 | badge.type="text", content="New" | 显示文本 "New" | 人工 |
218
- | 长文本 | badge.content="Very Long Text" | 文本正常显示 | 人工 |
2051
+ **期望结果:**
219
2052
 
220
- ### 8.4 角标位置
2053
+ - width 为 200px
2054
+ - 宽度固定不变
221
2055
 
222
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
223
- |--------|---------|---------|---------|
224
- | 右上角 | badge.position="top-right" | 角标在右上角 | 人工 |
225
- | 左上角 | badge.position="top-left" | 角标在左上角 | 人工 |
226
- | 右下角 | badge.position="bottom-right" | 角标在右下角 | 人工 |
227
- | 左下角 | badge.position="bottom-left" | 角标在左下角 | 人工 |
2056
+ **测试类型:** 自动化测试 + 人工测试
228
2057
 
229
2058
  ---
230
2059
 
231
- ## 九、插槽测试用例
2060
+ #### 测试用例 2.10.3:撑满容器(full)
2061
+
2062
+ **测试目的:** 验证撑满容器宽度模式
2063
+ **测试步骤:**
2064
+
2065
+ 1. 设置 `widthMode="full"`
2066
+ 2. 检查宽度设置
232
2067
 
233
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
234
- |--------|---------|---------|---------|
235
- | 前置插槽 | prefixSlot=<div>Custom</div> | 显示自定义前置内容,替换 prefixIcon | 人工 |
236
- | 后置插槽 | suffixSlot=<div>Custom</div> | 显示自定义后置内容,替换 tag 和 suffixIcon | 人工 |
237
- | 插槽优先级 | prefixSlot + prefixIcon | prefixSlot 优先显示 | 自动化 |
2068
+ **期望结果:**
2069
+
2070
+ - width '100%'
2071
+ - minWidth 28px
2072
+
2073
+ **测试类型:** 自动化测试 + 人工测试
238
2074
 
239
2075
  ---
240
2076
 
241
- ## 十、文本配置测试用例
2077
+ ### 2.11 自适应规则测试
2078
+
2079
+ #### 测试用例 2.11.1:宽度自适应规则
2080
+
2081
+ **测试目的:** 验证宽度自适应规则
2082
+ **测试步骤:**
242
2083
 
243
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
244
- |--------|---------|---------|---------|
245
- | 字体大小 | textConfig.fontSize=18 | 文本字体大小为 18px | 人工 |
246
- | 字体粗细 | textConfig.fontWeight="bold" | 文本加粗 | 人工 |
247
- | 文本颜色 | textConfig.color="#ff0000" | 文本颜色为红色 | 人工 |
248
- | 最大行数 | textConfig.maxLines=2 | 文本最多显示 2 行 | 人工 |
249
- | 禁用省略 | textConfig.ellipsis=false | 不显示省略号 | 人工 |
2084
+ 1. 默认宽度模式(auto),检查最大宽度限制
2085
+ 2. 设置超长文本,检查是否显示省略号
2086
+ 3. 设置 `widthMode="full"`,检查最小宽度限制
2087
+
2088
+ **期望结果:**
2089
+
2090
+ - 默认最大宽度为 400px
2091
+ - 超过最大宽度时,文本区域显示省略号
2092
+ - full 模式下最小宽度为 28px
2093
+
2094
+ **测试类型:** 人工测试
250
2095
 
251
2096
  ---
252
2097
 
253
- ## 十一、宽度模式测试用例
2098
+ #### 测试用例 2.11.2:水平对齐规则
2099
+
2100
+ **测试目的:** 验证水平排列时的对齐规则
2101
+ **测试步骤:**
254
2102
 
255
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
256
- |--------|---------|---------|---------|
257
- | 自动宽度 | widthMode="auto" | 宽度跟随内容,最大 400px | 人工 |
258
- | 固定宽度 | widthMode="fixed", width=200 | 宽度固定为 200px | 人工 |
259
- | 撑满容器 | widthMode="full" | 宽度 100%,最小 28px | 人工 |
260
- | 最大宽度 | widthMode="auto", maxWidth=300 | 最大宽度为 300px | 人工 |
261
- | 超长文本 | widthMode="auto" + 超长文本 | 达到最大宽度后显示省略号 | 人工 |
2103
+ 1. 多个 TextCard 水平排列
2104
+ 2. 检查内容对齐方式
2105
+
2106
+ **期望结果:**
2107
+
2108
+ - 水平排列时,内容默认居中对齐
2109
+
2110
+ **测试类型:** 人工测试
262
2111
 
263
2112
  ---
264
2113
 
265
- ## 十二、事件测试用例
2114
+ #### 测试用例 2.11.3:垂直对齐规则
2115
+
2116
+ **测试目的:** 验证垂直排列时的对齐规则
2117
+ **测试步骤:**
266
2118
 
267
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
268
- |--------|---------|---------|---------|
269
- | onClick 触发 | clickable=true + 点击 | onClick 回调被调用 | 自动化 |
270
- | onClick 参数 | 点击后检查回调参数 | 参数为 event 对象 | 自动化 |
271
- | 不可点击 | clickable=false + 点击 | onClick 不触发 | 自动化 |
272
- | Disabled 不触发 | disabled.value=true + 点击 | onClick 不触发 | 自动化 |
273
- | Loading 不触发 | loading.value=true + 点击 | onClick 不触发 | 自动化 |
2119
+ 1. 多个 TextCard 垂直排列
2120
+ 2. 检查内容对齐方式
2121
+
2122
+ **期望结果:**
2123
+
2124
+ - 垂直排列时,内容默认左对齐
2125
+
2126
+ **测试类型:** 人工测试
274
2127
 
275
2128
  ---
276
2129
 
277
- ## 十三、可访问性测试用例
2130
+ ### 2.12 交互行为测试
2131
+
2132
+ #### 测试用例 2.12.1:悬停交互
2133
+
2134
+ **测试目的:** 验证悬停状态的交互
2135
+ **测试步骤:**
2136
+
2137
+ 1. 鼠标悬停在组件上
2138
+ 2. 检查样式变化
2139
+ 3. 检查指针样式
2140
+
2141
+ **期望结果:**
2142
+
2143
+ - 展示悬停状态样式(根据 variant 不同)
2144
+ - 指针变为手型(cursor: pointer)
2145
+ - 可点击状态下才显示手型
278
2146
 
279
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
280
- |--------|---------|---------|---------|
281
- | role 属性 | 检查 DOM | role="button" | 自动化 |
282
- | aria-disabled | disabled.value=true | aria-disabled="true" | 自动化 |
283
- | tabIndex | 正常状态 | tabIndex=0 | 自动化 |
284
- | tabIndex disabled | disabled.value=true | tabIndex=-1 | 自动化 |
285
- | 键盘导航 | Tab 键聚焦 | 组件可聚焦 | 人工 |
2147
+ **测试类型:** 人工测试
286
2148
 
287
2149
  ---
288
2150
 
289
- ## 十四、自定义渲染测试用例
2151
+ #### 测试用例 2.12.2:点击交互
290
2152
 
291
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
292
- |--------|---------|---------|---------|
293
- | render 函数 | render={(props) => <div>{props.text}</div>} | 使用自定义渲染 | 人工 |
294
- | render 优先级 | render 函数存在 | 忽略其他内容配置 | 自动化 |
2153
+ **测试目的:** 验证点击事件的交互
2154
+ **测试步骤:**
2155
+
2156
+ 1. 点击组件
2157
+ 2. 检查 onClick 回调是否触发
2158
+ 3. 检查 active.onChange 是否触发(如果提供)
2159
+ 4. 检查选中状态是否切换
2160
+
2161
+ **期望结果:**
2162
+
2163
+ - 触发点击事件(onClick 回调被调用)
2164
+ - 如果提供了 active.onChange 且未激活,触发 onChange(true)
2165
+ - 切换选中状态(如果使用受控模式)
2166
+
2167
+ **测试类型:** 自动化测试 + 人工测试
295
2168
 
296
2169
  ---
297
2170
 
298
- ## 十五、边界情况测试用例
2171
+ #### 测试用例 2.12.3:选中状态交互
2172
+
2173
+ **测试目的:** 验证选中状态的样式应用
2174
+ **测试步骤:**
2175
+
2176
+ 1. 设置 `active={{ value: true }}`
2177
+ 2. 检查是否应用选中样式
2178
+
2179
+ **期望结果:**
2180
+
2181
+ - 应用选中样式(如边框高亮、背景色变化等,根据 variant 不同)
299
2182
 
300
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
301
- |--------|---------|---------|---------|
302
- | 空文本 | text="" | 正常渲染,不报错 | 自动化 |
303
- | 超长文本 | text="很长很长的文本..." | 正确显示省略号 | 人工 |
304
- | 特殊字符 | text="<>&\"'" | 特殊字符正确转义显示 | 人工 |
305
- | 无 Props | 仅传 text | 使用所有默认值正常渲染 | 自动化 |
306
- | 所有 Props | 传入所有 props | 正常渲染,不冲突 | 人工 |
2183
+ **测试类型:** 自动化测试 + 人工测试
307
2184
 
308
2185
  ---
309
2186
 
310
- ## 十六、性能测试用例
2187
+ #### 测试用例 2.12.4:禁用状态下的交互
311
2188
 
312
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
313
- |--------|---------|---------|---------|
314
- | 多次渲染 | 快速切换 props | 无性能问题,渲染流畅 | 人工 |
315
- | 大量实例 | 渲染 100 个组件 | 页面不卡顿 | 人工 |
316
- | 内存泄漏 | 挂载/卸载多次 | 无内存泄漏 | 自动化 |
2189
+ **测试目的:** 验证禁用状态下的交互限制
2190
+ **测试步骤:**
2191
+
2192
+ 1. 设置 `disabled={{ value: true }}`
2193
+ 2. 尝试点击组件
2194
+ 3. 尝试键盘导航
2195
+
2196
+ **期望结果:**
2197
+
2198
+ - 点击事件不触发
2199
+ - 无法键盘聚焦(tabIndex=-1)
2200
+ - 指针变为 not-allowed
2201
+
2202
+ **测试类型:** 自动化测试 + 人工测试
317
2203
 
318
2204
  ---
319
2205
 
320
- ## 十七、兼容性测试用例
2206
+ #### 测试用例 2.12.5:加载状态下的交互
2207
+
2208
+ **测试目的:** 验证加载状态下的交互限制
2209
+ **测试步骤:**
2210
+
2211
+ 1. 设置 `loading={{ value: true }}`
2212
+ 2. 尝试点击组件
2213
+
2214
+ **期望结果:**
2215
+
2216
+ - 点击事件不触发
2217
+ - 指针变为 wait
321
2218
 
322
- | 测试点 | 测试步骤 | 预期结果 | 测试类型 |
323
- |--------|---------|---------|---------|
324
- | Chrome | 在 Chrome 浏览器测试 | 所有功能正常 | 人工 |
325
- | Firefox | 在 Firefox 浏览器测试 | 所有功能正常 | 人工 |
326
- | Safari | 在 Safari 浏览器测试 | 所有功能正常 | 人工 |
327
- | Edge | 在 Edge 浏览器测试 | 所有功能正常 | 人工 |
2219
+ **测试类型:** 自动化测试 + 人工测试
328
2220
 
329
2221
  ---
330
2222
 
331
- ## 十八、Bug 汇总
2223
+ #### 测试用例 2.12.6:不可点击状态
332
2224
 
333
- **说明**:此部分由人工测试人员填写发现的 Bug
2225
+ **测试目的:** 验证 clickable=false 时的交互
2226
+ **测试步骤:**
334
2227
 
335
- ### Bug 列表
2228
+ 1. 设置 `clickable={false}`
2229
+ 2. 尝试点击组件
2230
+ 3. 检查指针样式
336
2231
 
337
- | Bug ID | 发现时间 | Bug 描述 | 优先级 | 状态 | 修复时间 | 备注 |
338
- |--------|---------|---------|--------|------|---------|------|
339
- | - | - | - | - | - | - | - |
2232
+ **期望结果:**
340
2233
 
341
- ### Bug 模板
2234
+ - 点击事件不触发
2235
+ - 指针为默认样式(不是手型)
2236
+ - 不添加 `text-card--clickable` 类名
342
2237
 
343
- ```
344
- Bug ID: #001
345
- 发现时间: 2024-01-01
346
- Bug 描述: [详细描述问题]
347
- 复现步骤:
348
- 1. [步骤1]
349
- 2. [步骤2]
350
- 3. [步骤3]
351
- 预期结果: [应该显示什么]
352
- 实际结果: [实际显示什么]
353
- 优先级: P0/P1/P2/P3
354
- 状态: 待修复/修复中/已修复/已验证
355
- 修复时间:
356
- 修复说明:
357
- ```
2238
+ **测试类型:** 自动化测试 + 人工测试
358
2239
 
359
2240
  ---
360
2241
 
361
- ## 十九、测试总结
2242
+ ### 2.13 自定义渲染测试
362
2243
 
363
- ### 测试统计
2244
+ #### 测试用例 2.13.1:自定义渲染函数
364
2245
 
365
- - **总测试用例数**: 120+
366
- - **自动化测试用例**: 30+
367
- - **人工测试用例**: 90+
368
- - **覆盖率目标**: 90%+
2246
+ **测试目的:** 验证自定义渲染函数功能
2247
+ **测试步骤:**
369
2248
 
370
- ### 测试结论
2249
+ 1. 设置 `render={(props) => <div className="custom-render">{props.text}</div>}`
2250
+ 2. 检查是否使用自定义渲染
371
2251
 
372
- 测试完成后填写:
2252
+ **期望结果:**
373
2253
 
374
- - [ ] 所有测试用例通过
375
- - [ ] 发现 Bug 已修复
376
- - [ ] 组件可以发布
2254
+ - 使用自定义渲染函数
2255
+ - 忽略其他内容配置(图标、标签等)
2256
+ - 正确传递 props
377
2257
 
378
- ### 测试签名
2258
+ **测试类型:** 自动化测试 + 人工测试
379
2259
 
380
- - 测试人员: ___________
381
- - 测试时间: ___________
382
- - 审核人员: ___________
383
- - 审核时间: ___________
2260
+ ---
2261
+
2262
+ ### 2.14 可访问性测试
2263
+
2264
+ #### 测试用例 2.14.1:role 属性
2265
+
2266
+ **测试目的:** 验证 role 属性设置
2267
+ **测试步骤:**
2268
+
2269
+ 1. 检查 DOM 元素的 role 属性
2270
+
2271
+ **期望结果:**
2272
+
2273
+ - role="button"
2274
+
2275
+ **测试类型:** 自动化测试
2276
+
2277
+ ---
2278
+
2279
+ #### 测试用例 2.14.2:aria-disabled 属性
2280
+
2281
+ **测试目的:** 验证 aria-disabled 属性设置
2282
+ **测试步骤:**
2283
+
2284
+ 1. 设置 `disabled={{ value: true }}`
2285
+ 2. 检查 aria-disabled 属性
2286
+
2287
+ **期望结果:**
2288
+
2289
+ - aria-disabled="true"
2290
+
2291
+ **测试类型:** 自动化测试
2292
+
2293
+ ---
2294
+
2295
+ #### 测试用例 2.14.3:tabIndex 属性
2296
+
2297
+ **测试目的:** 验证 tabIndex 属性设置
2298
+ **测试步骤:**
2299
+
2300
+ 1. 正常状态下检查 tabIndex
2301
+ 2. disabled 状态下检查 tabIndex
2302
+
2303
+ **期望结果:**
2304
+
2305
+ - 正常状态:tabIndex=0
2306
+ - disabled 状态:tabIndex=-1
2307
+
2308
+ **测试类型:** 自动化测试
2309
+
2310
+ ---
2311
+
2312
+ #### 测试用例 2.14.4:键盘导航
2313
+
2314
+ **测试目的:** 验证键盘导航功能
2315
+ **测试步骤:**
2316
+
2317
+ 1. 使用 Tab 键聚焦组件
2318
+ 2. 使用 Enter/Space 键触发点击
2319
+
2320
+ **期望结果:**
2321
+
2322
+ - 可以通过键盘导航
2323
+ - 焦点状态清晰
2324
+ - 可以键盘触发点击
2325
+
2326
+ **测试类型:** 人工测试
2327
+
2328
+ ---
2329
+
2330
+ ## 3. 边界条件测试
2331
+
2332
+ ### 测试用例 3.1:空文本
2333
+
2334
+ **测试目的:** 验证空文本时的表现
2335
+ **测试步骤:**
2336
+
2337
+ 1. 传入 `text=""`
2338
+ 2. 检查渲染
2339
+
2340
+ **期望结果:**
2341
+
2342
+ - 不报错
2343
+ - 组件正常渲染
2344
+
2345
+ **测试类型:** 自动化测试
2346
+
2347
+ ---
2348
+
2349
+ ### 测试用例 3.2:超长文本
2350
+
2351
+ **测试目的:** 验证超长文本时的表现
2352
+ **测试步骤:**
2353
+
2354
+ 1. 传入超长文本(超过 400px 宽度)
2355
+ 2. 检查是否显示省略号
2356
+
2357
+ **期望结果:**
2358
+
2359
+ - 正确显示省略号
2360
+ - 不出现布局问题
2361
+
2362
+ **测试类型:** 人工测试
2363
+
2364
+ ---
2365
+
2366
+ ### 测试用例 3.3:特殊字符
2367
+
2368
+ **测试目的:** 验证特殊字符的处理
2369
+ **测试步骤:**
2370
+
2371
+ 1. 传入包含特殊字符的文本:`text="<>&\"'"`
2372
+ 2. 检查是否正确转义显示
2373
+
2374
+ **期望结果:**
2375
+
2376
+ - 特殊字符正确转义显示
2377
+ - 不出现 XSS 问题
2378
+
2379
+ **测试类型:** 自动化测试 + 人工测试
2380
+
2381
+ ---
2382
+
2383
+ ### 测试用例 3.4:所有 Props 组合
2384
+
2385
+ **测试目的:** 验证所有 props 同时使用时的表现
2386
+ **测试步骤:**
2387
+
2388
+ 1. 传入所有可能的 props
2389
+ 2. 检查是否正常渲染,不冲突
2390
+
2391
+ **期望结果:**
2392
+
2393
+ - 正常渲染
2394
+ - 各功能不冲突
2395
+ - 优先级正确(插槽 > 图标/标签,loading > disabled > active)
2396
+
2397
+ **测试类型:** 人工测试
2398
+
2399
+ ---
2400
+
2401
+ ### 测试用例 3.5:快速切换状态
2402
+
2403
+ **测试目的:** 验证快速切换状态时的表现
2404
+ **测试步骤:**
2405
+
2406
+ 1. 快速切换 active、disabled、loading 状态
2407
+ 2. 检查状态更新是否正确
2408
+
2409
+ **期望结果:**
2410
+
2411
+ - 状态正确更新
2412
+ - 不出现竞态条件
2413
+ - 样式正确应用
2414
+
2415
+ **测试类型:** 自动化测试
2416
+
2417
+ ---
2418
+
2419
+ ## 4. 兼容性测试
2420
+
2421
+ ### 测试用例 4.1:不同浏览器测试
2422
+
2423
+ **测试目的:** 验证在不同浏览器中的兼容性
2424
+ **测试范围:**
2425
+
2426
+ - Chrome(最新版本)
2427
+ - Firefox(最新版本)
2428
+ - Safari(最新版本)
2429
+ - Edge(最新版本)
2430
+
2431
+ **期望结果:**
2432
+
2433
+ - 所有浏览器中显示一致
2434
+ - 功能正常
2435
+ - 样式正确
2436
+
2437
+ **测试类型:** 人工测试
2438
+
2439
+ ---
2440
+
2441
+ ### 测试用例 4.2:不同设备测试
2442
+
2443
+ **测试目的:** 验证在不同设备上的表现
2444
+ **测试范围:**
2445
+
2446
+ - 桌面设备(1920x1080)
2447
+ - 笔记本(1366x768)
2448
+ - 平板(768x1024)
2449
+ - 手机(375x667)
2450
+
2451
+ **期望结果:**
2452
+
2453
+ - 响应式布局正常
2454
+ - 触摸交互流畅
2455
+ - 布局在不同尺寸下正确显示
2456
+
2457
+ **测试类型:** 人工测试
2458
+
2459
+ ---
2460
+
2461
+ ## 5. 性能测试
2462
+
2463
+ ### 测试用例 5.1:渲染性能
2464
+
2465
+ **测试目的:** 验证组件渲染性能
2466
+ **测试步骤:**
2467
+
2468
+ 1. 渲染包含 100 个 TextCard 的列表
2469
+ 2. 测量首次渲染时间
2470
+ 3. 测量重新渲染时间
2471
+
2472
+ **期望结果:**
2473
+
2474
+ - 首次渲染时间 < 200ms
2475
+ - 重新渲染时间 < 100ms
2476
+
2477
+ **测试类型:** 性能测试
2478
+
2479
+ ---
2480
+
2481
+ ### 测试用例 5.2:内存占用
2482
+
2483
+ **测试目的:** 验证组件内存占用
2484
+ **测试步骤:**
2485
+
2486
+ 1. 渲染和销毁组件多次
2487
+ 2. 监测内存变化
2488
+
2489
+ **期望结果:**
2490
+
2491
+ - 无明显内存泄漏
2492
+ - 销毁后内存释放
2493
+
2494
+ **测试类型:** 性能测试
2495
+
2496
+ ---
2497
+
2498
+ ### 测试用例 5.3:大量实例性能
2499
+
2500
+ **测试目的:** 验证大量实例时的性能
2501
+ **测试步骤:**
2502
+
2503
+ 1. 渲染 1000 个 TextCard 实例
2504
+ 2. 检查页面是否卡顿
2505
+ 3. 检查交互是否流畅
2506
+
2507
+ **期望结果:**
2508
+
2509
+ - 页面不卡顿
2510
+ - 交互流畅
2511
+ - 无性能问题
2512
+
2513
+ **测试类型:** 性能测试
2514
+
2515
+ ---
2516
+
2517
+ ## 6. 测试总结
2518
+
2519
+ ### 6.1 测试用例统计
2520
+
2521
+ - **总用例数**:150+
2522
+ - **自动化测试**:80+
2523
+ - **人工测试**:70+
2524
+ - **性能测试**:3
2525
+ - **兼容性测试**:2
2526
+
2527
+ ### 6.2 测试优先级
2528
+
2529
+ - **P0(高优先级)**:基础渲染、样式变体、尺寸、状态、交互行为、自适应规则
2530
+ - **P1(中优先级)**:图标、标签、角标、插槽、文本配置、宽度模式
2531
+ - **P2(低优先级)**:边界条件、性能测试、可访问性、自定义渲染
2532
+
2533
+ ### 6.3 测试覆盖率目标
2534
+
2535
+ - 代码覆盖率:≥ 85%
2536
+ - 分支覆盖率:≥ 80%
2537
+ - 函数覆盖率:≥ 85%
2538
+ - 行覆盖率:≥ 85%
2539
+ - 功能覆盖率:100%
2540
+
2541
+ ## 7. 测试执行计划
2542
+
2543
+ ### 7.1 自动化测试
2544
+
2545
+ - 使用 Vitest + React Testing Library
2546
+ - 每次代码提交前自动运行
2547
+ - CI/CD 集成
2548
+
2549
+ ### 7.2 人工测试
2550
+
2551
+ - 新功能开发完成后进行
2552
+ - 重大版本发布前全面测试
2553
+ - 定期回归测试
2554
+
2555
+ ### 7.3 测试报告
2556
+
2557
+ - 记录测试结果
2558
+ - 标注未通过的用例
2559
+ - 提供修复建议