@opentiny/vue-docs 2.2.19 → 2.2.21

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 (438) hide show
  1. package/demos/apis/action-menu.js +11 -0
  2. package/demos/apis/cascader.js +10 -0
  3. package/demos/apis/config-provider.js +1 -1
  4. package/demos/apis/date-picker.js +1 -1
  5. package/demos/apis/float-button.js +22 -22
  6. package/demos/apis/form.js +21 -0
  7. package/demos/apis/hui.js +49 -0
  8. package/demos/apis/image.js +32 -7
  9. package/demos/apis/mind-map.js +36 -41
  10. package/demos/apis/numeric.js +24 -0
  11. package/demos/apis/popeditor.js +1 -1
  12. package/demos/apis/roles.js +13 -0
  13. package/demos/apis/select.js +34 -0
  14. package/demos/apis/skeleton.js +10 -10
  15. package/demos/apis/statistic.js +144 -0
  16. package/demos/apis/tag.js +17 -7
  17. package/demos/apis/time-line.js +2 -1
  18. package/demos/mobile/app/alert/basic-usage.spec.ts +36 -0
  19. package/demos/mobile/app/alert/center.spec.ts +11 -0
  20. package/demos/mobile/app/alert/custom-close.spec.ts +45 -0
  21. package/demos/mobile/app/alert/custom-close.vue +6 -3
  22. package/demos/mobile/app/alert/icon.spec.ts +11 -0
  23. package/demos/mobile/app/alert/size.spec.ts +17 -0
  24. package/demos/mobile/app/alert/size.vue +1 -2
  25. package/demos/mobile/app/alert/slot-default.spec.ts +12 -0
  26. package/demos/mobile/app/alert/target.spec.ts +8 -0
  27. package/demos/mobile/app/alert/webdoc/alert.js +4 -4
  28. package/demos/mobile/app/input/basic-usage.spec.ts +25 -0
  29. package/demos/mobile/app/input/clearable.spec.ts +13 -0
  30. package/demos/mobile/app/input/counter.spec.ts +19 -0
  31. package/demos/mobile/app/input/counter.vue +1 -1
  32. package/demos/mobile/app/input/disabled.spec.ts +17 -0
  33. package/demos/mobile/app/input/events.spec.ts +24 -0
  34. package/demos/mobile/app/input/methods.spec.ts +23 -0
  35. package/demos/mobile/app/input/native-attributes.spec.ts +14 -0
  36. package/demos/mobile/app/input/native-attributes.vue +0 -5
  37. package/demos/mobile/app/input/prefix-suffix-icon.spec.ts +12 -0
  38. package/demos/mobile/app/input/show-password.spec.ts +16 -0
  39. package/demos/mobile/app/input/slots.spec.ts +32 -0
  40. package/demos/mobile/app/input/slots.vue +7 -7
  41. package/demos/mobile/app/input/textarea-rows-cols.spec.ts +11 -0
  42. package/demos/mobile/app/input/textarea-rows-cols.vue +3 -3
  43. package/demos/mobile/app/input/textarea-scalable.spec.ts +25 -0
  44. package/demos/mobile/app/input/textarea-scalable.vue +21 -10
  45. package/demos/mobile/app/input/type-select.spec.ts +20 -0
  46. package/demos/mobile/app/input/type.spec.ts +20 -0
  47. package/demos/mobile/app/input/validate-event.spec.ts +22 -0
  48. package/demos/mobile/app/input/webdoc/input.js +36 -36
  49. package/demos/mobile-first/app/numeric/empty-value-composition-api.vue +15 -0
  50. package/demos/mobile-first/app/numeric/empty-value.vue +24 -0
  51. package/demos/mobile-first/app/numeric/webdoc/numeric.js +14 -0
  52. package/demos/mobile-first/app/select/collapse-tags.vue +1 -1
  53. package/demos/mobile-first/app/select/webdoc/select.js +3 -2
  54. package/demos/pc/app/action-menu/card-mode-composition-api.vue +31 -0
  55. package/demos/pc/app/action-menu/card-mode.spec.ts +16 -0
  56. package/demos/pc/app/action-menu/card-mode.vue +39 -0
  57. package/demos/pc/app/action-menu/webdoc/action-menu.js +14 -0
  58. package/demos/pc/app/button/ghost-composition-api.vue +6 -6
  59. package/demos/pc/app/button/ghost.spec.ts +13 -6
  60. package/demos/pc/app/button/ghost.vue +6 -6
  61. package/demos/pc/app/calendar-view/calendar-event-composition-api.vue +5 -0
  62. package/demos/pc/app/calendar-view/calendar-event.spec.ts +5 -0
  63. package/demos/pc/app/calendar-view/calendar-event.vue +5 -1
  64. package/demos/pc/app/calendar-view/set-working-day-composition-api.vue +3 -0
  65. package/demos/pc/app/calendar-view/set-working-day.vue +3 -0
  66. package/demos/pc/app/calendar-view/webdoc/calendar-view.js +43 -20
  67. package/demos/pc/app/cascader/slot-composition-api.vue +226 -0
  68. package/demos/pc/app/cascader/slot.spec.ts +16 -0
  69. package/demos/pc/app/cascader/slot.vue +234 -0
  70. package/demos/pc/app/cascader/webdoc/cascader.js +18 -0
  71. package/demos/pc/app/chart/amap/amap.spec.ts +6 -0
  72. package/demos/pc/app/chart/amap/amap.spec.ts-snapshots/base-chromium-win32.png +0 -0
  73. package/demos/pc/app/chart/bar/bar.spec.ts +43 -0
  74. package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/base-chromium-win32.png +0 -0
  75. package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  76. package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  77. package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  78. package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  79. package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
  80. package/demos/pc/app/chart/bar/bar.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
  81. package/demos/pc/app/chart/bmap/bmap.spec.ts +7 -0
  82. package/demos/pc/app/chart/bmap/bmap.spec.ts-snapshots/base-chromium-win32.png +0 -0
  83. package/demos/pc/app/chart/boxplot/boxplot.spec.ts +19 -0
  84. package/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/base-chromium-win32.png +0 -0
  85. package/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/multiple-chromium-win32.png +0 -0
  86. package/demos/pc/app/chart/boxplot/boxplot.spec.ts-snapshots/vertical-chromium-win32.png +0 -0
  87. package/demos/pc/app/chart/candle/candle.spec.ts +43 -0
  88. package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/base-chromium-win32.png +0 -0
  89. package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  90. package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  91. package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  92. package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  93. package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
  94. package/demos/pc/app/chart/candle/candle.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
  95. package/demos/pc/app/chart/funnel/funnel.spec.ts +43 -0
  96. package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/base-chromium-win32.png +0 -0
  97. package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  98. package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  99. package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  100. package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  101. package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
  102. package/demos/pc/app/chart/funnel/funnel.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
  103. package/demos/pc/app/chart/gauge/gauge.spec.ts +37 -0
  104. package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/base-chromium-win32.png +0 -0
  105. package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  106. package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  107. package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  108. package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  109. package/demos/pc/app/chart/gauge/gauge.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
  110. package/demos/pc/app/chart/graph/graph.spec.ts +19 -0
  111. package/demos/pc/app/chart/graph/graph.spec.ts-snapshots/base-chromium-win32.png +0 -0
  112. package/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  113. package/demos/pc/app/chart/graph/graph.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  114. package/demos/pc/app/chart/heatmap/heatmap.spec.ts +31 -0
  115. package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/base-chromium-win32.png +0 -0
  116. package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  117. package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  118. package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  119. package/demos/pc/app/chart/heatmap/heatmap.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  120. package/demos/pc/app/chart/histogram/histogram.spec.ts +49 -0
  121. package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/base-chromium-win32.png +0 -0
  122. package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  123. package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  124. package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  125. package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  126. package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
  127. package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
  128. package/demos/pc/app/chart/histogram/histogram.spec.ts-snapshots/demo8-chromium-win32.png +0 -0
  129. package/demos/pc/app/chart/line/line.spec.ts +55 -0
  130. package/demos/pc/app/chart/line/line.spec.ts-snapshots/base-chromium-win32.png +0 -0
  131. package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  132. package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  133. package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  134. package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  135. package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
  136. package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
  137. package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo8-chromium-win32.png +0 -0
  138. package/demos/pc/app/chart/line/line.spec.ts-snapshots/demo9-chromium-win32.png +0 -0
  139. package/demos/pc/app/chart/liquidfill/liquidfill.spec.ts +7 -0
  140. package/demos/pc/app/chart/liquidfill/liquidfill.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  141. package/demos/pc/app/chart/map/base-composition-api.vue +7 -2
  142. package/demos/pc/app/chart/map/base.vue +3 -2
  143. package/demos/pc/app/chart/map/map.spec.ts +7 -0
  144. package/demos/pc/app/chart/map/map.spec.ts-snapshots/base-chromium-win32.png +0 -0
  145. package/demos/pc/app/chart/pie/pie.spec.ts +43 -0
  146. package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/base-chromium-win32.png +0 -0
  147. package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  148. package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  149. package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  150. package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  151. package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
  152. package/demos/pc/app/chart/pie/pie.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
  153. package/demos/pc/app/chart/process/base-composition-api.vue +29 -0
  154. package/demos/pc/app/chart/process/base.vue +37 -0
  155. package/demos/pc/app/chart/process/demo2-composition-api.vue +32 -0
  156. package/demos/pc/app/chart/process/demo2.vue +40 -0
  157. package/demos/pc/app/chart/process/demo3-composition-api.vue +71 -0
  158. package/demos/pc/app/chart/process/demo3.vue +79 -0
  159. package/demos/pc/app/chart/process/demo4-composition-api.vue +29 -0
  160. package/demos/pc/app/chart/process/demo4.vue +37 -0
  161. package/demos/pc/app/chart/process/demo5-composition-api.vue +28 -0
  162. package/demos/pc/app/chart/process/demo5.vue +36 -0
  163. package/demos/pc/app/chart/process/demo6-composition-api.vue +44 -0
  164. package/demos/pc/app/chart/process/demo6.vue +52 -0
  165. package/demos/pc/app/chart/radar/radar.spec.ts +19 -0
  166. package/demos/pc/app/chart/radar/radar.spec.ts-snapshots/base-chromium-win32.png +0 -0
  167. package/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  168. package/demos/pc/app/chart/radar/radar.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  169. package/demos/pc/app/chart/ring/ring.spec.ts +43 -0
  170. package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/base-chromium-win32.png +0 -0
  171. package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  172. package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  173. package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  174. package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  175. package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
  176. package/demos/pc/app/chart/ring/ring.spec.ts-snapshots/ring-title-chromium-win32.png +0 -0
  177. package/demos/pc/app/chart/sankey/sankey.spec.ts +13 -0
  178. package/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/base-chromium-win32.png +0 -0
  179. package/demos/pc/app/chart/sankey/sankey.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  180. package/demos/pc/app/chart/scatter/scatter.spec.ts +49 -0
  181. package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/base-chromium-win32.png +0 -0
  182. package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  183. package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  184. package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  185. package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  186. package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo6-chromium-win32.png +0 -0
  187. package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo7-chromium-win32.png +0 -0
  188. package/demos/pc/app/chart/scatter/scatter.spec.ts-snapshots/demo8-chromium-win32.png +0 -0
  189. package/demos/pc/app/chart/sunburst/sunburst.spec.ts +19 -0
  190. package/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/base-chromium-win32.png +0 -0
  191. package/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  192. package/demos/pc/app/chart/sunburst/sunburst.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  193. package/demos/pc/app/chart/tree/tree.spec.ts +31 -0
  194. package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/base-chromium-win32.png +0 -0
  195. package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  196. package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  197. package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  198. package/demos/pc/app/chart/tree/tree.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  199. package/demos/pc/app/chart/waterfall/waterfall.spec.ts +31 -0
  200. package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/base-chromium-win32.png +0 -0
  201. package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  202. package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  203. package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  204. package/demos/pc/app/chart/waterfall/waterfall.spec.ts-snapshots/demo5-chromium-win32.png +0 -0
  205. package/demos/pc/app/chart/webdoc/chart-process.cn.md +7 -0
  206. package/demos/pc/app/chart/webdoc/chart-process.en.md +7 -0
  207. package/demos/pc/app/chart/webdoc/chart-process.js +55 -0
  208. package/demos/pc/app/chart/webdoc/chart-process.json.cn.md +7 -0
  209. package/demos/pc/app/chart/webdoc/chart-process.json.en.md +7 -0
  210. package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts +25 -0
  211. package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/base-chromium-win32.png +0 -0
  212. package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo2-chromium-win32.png +0 -0
  213. package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo3-chromium-win32.png +0 -0
  214. package/demos/pc/app/chart/wordcloud/wordcloud.spec.ts-snapshots/demo4-chromium-win32.png +0 -0
  215. package/demos/pc/app/company/custom-service.spec.ts +2 -1
  216. package/demos/pc/app/country/custom-service.spec.js +1 -1
  217. package/demos/pc/app/date-picker/basic-usage-composition-api.vue +2 -0
  218. package/demos/pc/app/date-picker/basic-usage.vue +2 -0
  219. package/demos/pc/app/date-picker/default-value.spec.ts +2 -2
  220. package/demos/pc/app/date-picker/events.spec.ts +3 -3
  221. package/demos/pc/app/date-picker/format.spec.ts +2 -2
  222. package/demos/pc/app/dropdown/options.spec.ts +3 -0
  223. package/demos/pc/app/dropdown/trigger.spec.ts +2 -2
  224. package/demos/pc/app/file-upload/http-request-composition-api.vue +5 -3
  225. package/demos/pc/app/file-upload/http-request.vue +4 -2
  226. package/demos/pc/app/float-button/backTop.spec.ts +14 -0
  227. package/demos/pc/app/float-button/basic-usage.spec.ts +34 -0
  228. package/demos/pc/app/float-button/icon.spec.ts +10 -0
  229. package/demos/pc/app/float-button/jump.spec.ts +8 -0
  230. package/demos/pc/app/float-button/reset-time.spec.ts +18 -0
  231. package/demos/pc/app/float-button/trigger.spec.ts +16 -0
  232. package/demos/pc/app/form/error-slot-composition-api.vue +62 -0
  233. package/demos/pc/app/form/error-slot.spec.ts +15 -0
  234. package/demos/pc/app/form/error-slot.vue +71 -0
  235. package/demos/pc/app/form/extra-tip-composition-api.vue +48 -0
  236. package/demos/pc/app/form/extra-tip.spec.ts +15 -0
  237. package/demos/pc/app/form/extra-tip.vue +57 -0
  238. package/demos/pc/app/form/webdoc/form.js +34 -4
  239. package/demos/pc/app/grid/filter/simple-date-filter.spec.ts +2 -1
  240. package/demos/pc/app/grid/fixed/group-header-fixed-composition-api.vue +212 -0
  241. package/demos/pc/app/grid/fixed/group-header-fixed.vue +232 -0
  242. package/demos/pc/app/grid/large-data/column-anchor-clear-active-composition-api.vue +190 -0
  243. package/demos/pc/app/grid/large-data/column-anchor-clear-active.vue +199 -0
  244. package/demos/pc/app/grid/large-data/column-anchor-composition-api.vue +124 -0
  245. package/demos/pc/app/grid/large-data/scroll-to.spec.js +1 -1
  246. package/demos/pc/app/grid/renderer/inner-renderer-rate-composition-api.vue +50 -0
  247. package/demos/pc/app/grid/renderer/inner-renderer-rate.spec.js +12 -0
  248. package/demos/pc/app/grid/renderer/inner-renderer-rate.vue +60 -0
  249. package/demos/pc/app/grid/size/grid-size.spec.js +2 -2
  250. package/demos/pc/app/grid/tree-table/set-tree-expansion-composition-api.vue +2 -2
  251. package/demos/pc/app/grid/tree-table/set-tree-expansion.vue +2 -2
  252. package/demos/pc/app/grid/tree-table/tree-grid-index-composition-api.vue +2 -2
  253. package/demos/pc/app/grid/tree-table/tree-grid-index.spec.js +16 -4
  254. package/demos/pc/app/grid/tree-table/tree-grid-index.vue +2 -2
  255. package/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update-composition-api.vue +7 -2
  256. package/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update.spec.js +6 -2
  257. package/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update.vue +5 -2
  258. package/demos/pc/app/grid/webdoc/grid-custom-style.js +1 -1
  259. package/demos/pc/app/grid/webdoc/grid-editor.js +1 -1
  260. package/demos/pc/app/grid/webdoc/grid-fixed.js +11 -0
  261. package/demos/pc/app/grid/webdoc/grid-large-data.js +24 -0
  262. package/demos/pc/app/grid/webdoc/grid-renderer.js +11 -0
  263. package/demos/pc/app/grid/webdoc/grid-toolbar.js +1 -1
  264. package/demos/pc/app/image/count-slot-composition-api.vue +32 -0
  265. package/demos/pc/app/image/count-slot.spec.ts +16 -0
  266. package/demos/pc/app/image/count-slot.vue +40 -0
  267. package/demos/pc/app/image/index-change-composition-api.vue +29 -0
  268. package/demos/pc/app/image/index-change.spec.ts +16 -0
  269. package/demos/pc/app/image/index-change.vue +37 -0
  270. package/demos/pc/app/image/keep-style-composition-api.vue +24 -0
  271. package/demos/pc/app/image/keep-style.spec.ts +56 -0
  272. package/demos/pc/app/image/keep-style.vue +32 -0
  273. package/demos/pc/app/image/preview-composition-api.vue +1 -1
  274. package/demos/pc/app/image/preview.vue +1 -1
  275. package/demos/pc/app/image/webdoc/image.js +73 -11
  276. package/demos/pc/app/mind-map/basic-usage-composition-api.vue +4 -4
  277. package/demos/pc/app/mind-map/basic-usage.vue +4 -4
  278. package/demos/pc/app/mind-map/event-composition-api.vue +13 -45
  279. package/demos/pc/app/mind-map/event.spec.ts +11 -8
  280. package/demos/pc/app/mind-map/event.vue +27 -57
  281. package/demos/pc/app/mind-map/export-data-composition-api.vue +7 -9
  282. package/demos/pc/app/mind-map/export-data.vue +13 -13
  283. package/demos/pc/app/mind-map/webdoc/mind-map.js +38 -10
  284. package/demos/pc/app/numeric/controls-composition-api.vue +10 -4
  285. package/demos/pc/app/numeric/controls.vue +10 -4
  286. package/demos/pc/app/numeric/empty-value-composition-api.vue +15 -0
  287. package/demos/pc/app/numeric/empty-value.spec.ts +15 -0
  288. package/demos/pc/app/numeric/empty-value.vue +24 -0
  289. package/demos/pc/app/numeric/mouse-wheel.spec.ts +1 -1
  290. package/demos/pc/app/numeric/precision-composition-api.vue +10 -4
  291. package/demos/pc/app/numeric/precision.vue +10 -4
  292. package/demos/pc/app/numeric/string-mode-composition-api.vue +10 -0
  293. package/demos/pc/app/numeric/string-mode.spec.ts +17 -0
  294. package/demos/pc/app/numeric/string-mode.vue +19 -0
  295. package/demos/pc/app/numeric/webdoc/numeric.js +52 -26
  296. package/demos/pc/app/popconfirm/trigger.spec.ts +8 -6
  297. package/demos/pc/app/popconfirm/type.spec.ts +6 -5
  298. package/demos/pc/app/popeditor/condition-layout-composition-api.vue +3 -2
  299. package/demos/pc/app/popeditor/condition-layout.vue +3 -2
  300. package/demos/pc/app/popeditor/slot-footer-composition-api.vue +2 -2
  301. package/demos/pc/app/popeditor/slot-footer.vue +2 -2
  302. package/demos/pc/app/popeditor/webdoc/popeditor.js +11 -12
  303. package/demos/pc/app/radio/dynamic-disable-composition-api.vue +7 -4
  304. package/demos/pc/app/radio/dynamic-disable.vue +8 -5
  305. package/demos/pc/app/roles/base-composition-api.vue +2 -2
  306. package/demos/pc/app/roles/base.vue +2 -2
  307. package/demos/pc/app/select/collapse-tags-composition-api.vue +7 -1
  308. package/demos/pc/app/select/collapse-tags.spec.ts +50 -29
  309. package/demos/pc/app/select/collapse-tags.vue +10 -3
  310. package/demos/pc/app/select/copy-multi.spec.ts +1 -0
  311. package/demos/pc/app/select/copy-single.spec.ts +1 -0
  312. package/demos/pc/app/select/disabled-composition-api.vue +2 -2
  313. package/demos/pc/app/select/disabled.spec.ts +3 -3
  314. package/demos/pc/app/select/disabled.vue +2 -2
  315. package/demos/pc/app/select/events-composition-api.vue +0 -1
  316. package/demos/pc/app/select/events.spec.ts +3 -4
  317. package/demos/pc/app/select/events.vue +0 -1
  318. package/demos/pc/app/select/multiple.vue +1 -1
  319. package/demos/pc/app/select/nest-grid-remote-composition-api.vue +120 -0
  320. package/demos/pc/app/select/nest-grid-remote.spec.ts +135 -0
  321. package/demos/pc/app/select/nest-grid-remote.vue +136 -0
  322. package/demos/pc/app/select/size.spec.ts +4 -2
  323. package/demos/pc/app/select/webdoc/select.js +10 -24
  324. package/demos/pc/app/skeleton/animation-composition-api.vue +25 -0
  325. package/demos/pc/app/skeleton/animation.spec.ts +19 -0
  326. package/demos/pc/app/skeleton/animation.vue +36 -0
  327. package/demos/pc/app/skeleton/custom-layout-composition-api.vue +19 -3
  328. package/demos/pc/app/skeleton/custom-layout.spec.ts +4 -7
  329. package/demos/pc/app/skeleton/custom-layout.vue +19 -3
  330. package/demos/pc/app/skeleton/custom-paragraph-width-composition-api.vue +1 -1
  331. package/demos/pc/app/skeleton/custom-paragraph-width.spec.ts +1 -1
  332. package/demos/pc/app/skeleton/custom-paragraph-width.vue +1 -1
  333. package/demos/pc/app/skeleton/custom-rows.spec.ts +1 -1
  334. package/demos/pc/app/skeleton/fine-grained-mode-composition-api.vue +5 -22
  335. package/demos/pc/app/skeleton/fine-grained-mode.spec.ts +4 -40
  336. package/demos/pc/app/skeleton/fine-grained-mode.vue +6 -23
  337. package/demos/pc/app/skeleton/loading-completed-composition-api.vue +3 -13
  338. package/demos/pc/app/skeleton/loading-completed.spec.ts +1 -12
  339. package/demos/pc/app/skeleton/loading-completed.vue +4 -10
  340. package/demos/pc/app/skeleton/size-composition-api.vue +16 -0
  341. package/demos/pc/app/skeleton/size.spec.ts +14 -0
  342. package/demos/pc/app/skeleton/size.vue +23 -0
  343. package/demos/pc/app/skeleton/webdoc/skeleton.js +42 -21
  344. package/demos/pc/app/statistic/basic-usage-composition-api.vue +26 -0
  345. package/demos/pc/app/statistic/basic-usage.spec.ts +20 -0
  346. package/demos/pc/app/statistic/basic-usage.vue +38 -0
  347. package/demos/pc/app/statistic/statistic-slot-composition-api.vue +39 -0
  348. package/demos/pc/app/statistic/statistic-slot.spec.ts +13 -0
  349. package/demos/pc/app/statistic/statistic-slot.vue +51 -0
  350. package/demos/pc/app/statistic/statistic-style-composition-api.vue +29 -0
  351. package/demos/pc/app/statistic/statistic-style.spec.ts +7 -0
  352. package/demos/pc/app/statistic/statistic-style.vue +41 -0
  353. package/demos/pc/app/statistic/webdoc/statistic.cn.md +7 -0
  354. package/demos/pc/app/statistic/webdoc/statistic.en.md +7 -0
  355. package/demos/pc/app/statistic/webdoc/statistic.js +46 -0
  356. package/demos/pc/app/tabs/tabs-events-close.spec.ts +1 -1
  357. package/demos/pc/app/tag/color3-composition-api.vue +19 -1
  358. package/demos/pc/app/tag/color3.spec.ts +7 -11
  359. package/demos/pc/app/tag/color3.vue +19 -1
  360. package/demos/pc/app/tag/webdoc/tag.js +4 -4
  361. package/demos/pc/app/time-line/custom-field-composition-api.vue +4 -1
  362. package/demos/pc/app/time-line/custom-field.spec.ts +1 -0
  363. package/demos/pc/app/time-line/custom-field.vue +4 -1
  364. package/demos/pc/app/time-line/custom-icon-composition-api.vue +21 -0
  365. package/demos/pc/app/time-line/custom-icon.spec.ts +14 -0
  366. package/demos/pc/app/time-line/custom-icon.vue +34 -0
  367. package/demos/pc/app/time-line/status-composition-api.vue +24 -3
  368. package/demos/pc/app/time-line/status.spec.ts +53 -11
  369. package/demos/pc/app/time-line/status.vue +14 -3
  370. package/demos/pc/app/time-line/webdoc/time-line.js +57 -44
  371. package/demos/pc/app/time-picker/default-value.spec.ts +6 -4
  372. package/demos/pc/app/time-picker/disabled.spec.ts +2 -7
  373. package/demos/pc/app/time-picker/editable.spec.ts +4 -1
  374. package/demos/pc/app/time-picker/format.spec.ts +6 -8
  375. package/demos/pc/app/time-picker/is-range.spec.ts +1 -1
  376. package/demos/pc/app/time-picker/picker-options.spec.ts +16 -14
  377. package/demos/pc/app/tree-menu/lazy-load-composition-api.vue +1 -1
  378. package/demos/pc/app/tree-menu/lazy-load.vue +1 -1
  379. package/demos/pc/menus.js +73 -68
  380. package/demos/pc/webdoc/aui-adapter-en.md +207 -0
  381. package/demos/pc/webdoc/aui-adapter.md +207 -0
  382. package/demos/pc/webdoc/changelog.md +67 -3
  383. package/demos/saas/menus.js +2 -3
  384. package/index.html +1 -1
  385. package/package.json +11 -11
  386. package/src/tools/useApiMode.js +1 -1
  387. package/src/tools/useTheme.js +2 -1
  388. package/src/views/components/components.vue +17 -6
  389. package/src/views/layout/layout.vue +3 -4
  390. package/src/views/overview.vue +9 -5
  391. package/demos/apis/credit-card-form.js +0 -98
  392. package/demos/apis/detail-page.js +0 -126
  393. package/demos/apis/slide-bar.js +0 -104
  394. package/demos/pc/app/credit-card-form/background-image-composition-api.vue +0 -17
  395. package/demos/pc/app/credit-card-form/background-image.vue +0 -25
  396. package/demos/pc/app/credit-card-form/basic-usage-composition-api.vue +0 -16
  397. package/demos/pc/app/credit-card-form/basic-usage.vue +0 -24
  398. package/demos/pc/app/credit-card-form/credit-card-form-events-composition-api.vue +0 -51
  399. package/demos/pc/app/credit-card-form/credit-card-form-events.vue +0 -55
  400. package/demos/pc/app/credit-card-form/webdoc/credit-card-form.cn.md +0 -7
  401. package/demos/pc/app/credit-card-form/webdoc/credit-card-form.en.md +0 -7
  402. package/demos/pc/app/credit-card-form/webdoc/credit-card-form.js +0 -46
  403. package/demos/pc/app/detail-page/basic-usage-composition-api.vue +0 -32
  404. package/demos/pc/app/detail-page/basic-usage.spec.ts +0 -29
  405. package/demos/pc/app/detail-page/basic-usage.vue +0 -40
  406. package/demos/pc/app/detail-page/custom-show-text-composition-api.vue +0 -41
  407. package/demos/pc/app/detail-page/custom-show-text.spec.ts +0 -16
  408. package/demos/pc/app/detail-page/custom-show-text.vue +0 -49
  409. package/demos/pc/app/detail-page/webdoc/detail-page.cn.md +0 -7
  410. package/demos/pc/app/detail-page/webdoc/detail-page.en.md +0 -7
  411. package/demos/pc/app/detail-page/webdoc/detail-page.js +0 -38
  412. package/demos/pc/app/select/nest-grid-remote-multi-composition-api.vue +0 -106
  413. package/demos/pc/app/select/nest-grid-remote-multi.spec.ts +0 -68
  414. package/demos/pc/app/select/nest-grid-remote-multi.vue +0 -118
  415. package/demos/pc/app/select/nest-grid-remote-single-composition-api.vue +0 -230
  416. package/demos/pc/app/select/nest-grid-remote-single.spec.ts +0 -62
  417. package/demos/pc/app/select/nest-grid-remote-single.vue +0 -238
  418. package/demos/pc/app/slide-bar/basic-usage-composition-api.vue +0 -21
  419. package/demos/pc/app/slide-bar/basic-usage.spec.ts +0 -12
  420. package/demos/pc/app/slide-bar/basic-usage.vue +0 -29
  421. package/demos/pc/app/slide-bar/custom-content-composition-api.vue +0 -26
  422. package/demos/pc/app/slide-bar/custom-content.spec.ts +0 -10
  423. package/demos/pc/app/slide-bar/custom-content.vue +0 -34
  424. package/demos/pc/app/slide-bar/custom-tag-composition-api.vue +0 -93
  425. package/demos/pc/app/slide-bar/custom-tag.spec.ts +0 -10
  426. package/demos/pc/app/slide-bar/custom-tag.vue +0 -101
  427. package/demos/pc/app/slide-bar/slide-bar-events-composition-api.vue +0 -37
  428. package/demos/pc/app/slide-bar/slide-bar-events.spec.ts +0 -11
  429. package/demos/pc/app/slide-bar/slide-bar-events.vue +0 -45
  430. package/demos/pc/app/slide-bar/webdoc/slide-bar.cn.md +0 -7
  431. package/demos/pc/app/slide-bar/webdoc/slide-bar.en.md +0 -7
  432. package/demos/pc/app/slide-bar/webdoc/slide-bar.js +0 -72
  433. package/demos/pc/app/slide-bar/wheel-blocks-composition-api.vue +0 -21
  434. package/demos/pc/app/slide-bar/wheel-blocks.spec.ts +0 -13
  435. package/demos/pc/app/slide-bar/wheel-blocks.vue +0 -29
  436. package/demos/pc/overviewimage/credit-card-form.svg +0 -91
  437. package/demos/pc/overviewimage/detail-page.svg +0 -90
  438. package/demos/pc/overviewimage/slide-bar.svg +0 -96
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <div>
3
+ <tiny-layout>
4
+ <tiny-row :flex="true" class="row-bg">
5
+ <tiny-col :span="3">
6
+ <tiny-statistic :value="10010258" :precision="0">
7
+ <template #title> 活跃度 </template>
8
+ </tiny-statistic>
9
+ </tiny-col>
10
+ <tiny-col :span="3">
11
+ <tiny-statistic :value="num" :precision="2" :title="msg"> </tiny-statistic>
12
+ </tiny-col>
13
+ <tiny-col :span="3">
14
+ <tiny-statistic :value="num" :precision="2" :title="money">
15
+ <template #title:data="{ scoped }">{{ scoped }}</template>
16
+ </tiny-statistic>
17
+ </tiny-col>
18
+ <tiny-col :span="3">
19
+ <tiny-statistic :value="num" :precision="0" title="点赞数量">
20
+ <template #prefix> Like:</template>
21
+ </tiny-statistic>
22
+ </tiny-col>
23
+ <tiny-col :span="3">
24
+ <tiny-statistic :value="600" :precision="0" title="队伍比分">
25
+ <template #suffix>/220</template>
26
+ </tiny-statistic>
27
+ </tiny-col>
28
+ </tiny-row>
29
+ </tiny-layout>
30
+ </div>
31
+ </template>
32
+
33
+ <script setup lang="jsx">
34
+ import { Statistic as TinyStatistic, Layout as TinyLayout, Row as TinyRow, Col as TinyCol } from '@opentiny/vue'
35
+
36
+ const num = 306526.23
37
+ const msg = { value: '额度' }
38
+ const money = { value: '存款' }
39
+ </script>
@@ -0,0 +1,13 @@
1
+ import { test, expect } from '@playwright/test'
2
+
3
+ test('插槽用法', async ({ page }) => {
4
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
5
+ await page.goto('statistic#statistic-slot')
6
+ await page.locator('div').filter({ hasText: /^10,010,258$/ })
7
+ await page
8
+ .locator('div')
9
+ .filter({ hasText: /^306,526\.23$/ })
10
+ .first()
11
+ await page.getByText('Like:306,526').click()
12
+ await page.getByText('600/').click()
13
+ })
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <div>
3
+ <tiny-layout>
4
+ <tiny-row :flex="true" class="row-bg">
5
+ <tiny-col :span="3">
6
+ <tiny-statistic :value="10010258" :precision="0">
7
+ <template #title> 活跃度 </template>
8
+ </tiny-statistic>
9
+ </tiny-col>
10
+ <tiny-col :span="3">
11
+ <tiny-statistic :value="num" :precision="2" :title="msg"> </tiny-statistic>
12
+ </tiny-col>
13
+ <tiny-col :span="3">
14
+ <tiny-statistic :value="num" :precision="2" :title="money">
15
+ <template #title:data="{ scoped }">{{ scoped }}</template>
16
+ </tiny-statistic>
17
+ </tiny-col>
18
+ <tiny-col :span="3">
19
+ <tiny-statistic :value="num" :precision="0" title="点赞数量">
20
+ <template #prefix> Like:</template>
21
+ </tiny-statistic>
22
+ </tiny-col>
23
+ <tiny-col :span="3">
24
+ <tiny-statistic :value="600" :precision="0" title="队伍比分">
25
+ <template #suffix>/220</template>
26
+ </tiny-statistic>
27
+ </tiny-col>
28
+ </tiny-row>
29
+ </tiny-layout>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ import { Statistic, Layout, Row, Col } from '@opentiny/vue'
35
+
36
+ export default {
37
+ components: {
38
+ TinyStatistic: Statistic,
39
+ TinyLayout: Layout,
40
+ TinyRow: Row,
41
+ TinyCol: Col
42
+ },
43
+ data() {
44
+ return {
45
+ num: 306526.23,
46
+ msg: { value: '额度' },
47
+ money: { value: '存款' }
48
+ }
49
+ }
50
+ }
51
+ </script>
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <div>
3
+ <tiny-layout>
4
+ <tiny-row :flex="true" class="row-bg">
5
+ <tiny-col :span="6">
6
+ <tiny-statistic :value="num" :value-style="{ color: '#b12220' }" :precision="0" title="点赞数量">
7
+ <template #prefix> Like:</template>
8
+ </tiny-statistic>
9
+ </tiny-col>
10
+ <tiny-col :span="6">
11
+ <tiny-statistic :value="num" :value-style="{ 'color': '#3ac295' }" :precision="0" title="点赞数量">
12
+ <template #prefix> Like:</template>
13
+ </tiny-statistic>
14
+ </tiny-col>
15
+ <tiny-col :span="6">
16
+ <tiny-statistic :value="num" :value-style="[{ 'color': '#e37d29' }]" :precision="0" title="点赞数量">
17
+ <template #prefix> Like:</template>
18
+ </tiny-statistic>
19
+ </tiny-col>
20
+ </tiny-row>
21
+ </tiny-layout>
22
+ </div>
23
+ </template>
24
+
25
+ <script setup lang="jsx">
26
+ import { Statistic as TinyStatistic, Layout as TinyLayout, Row as TinyRow, Col as TinyCol } from '@opentiny/vue'
27
+
28
+ const num = 306526.23
29
+ </script>
@@ -0,0 +1,7 @@
1
+ import { test, expect } from '@playwright/test'
2
+
3
+ test('样式用法', async ({ page }) => {
4
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
5
+ await page.goto('statistic#statistic-style')
6
+ await expect(page.getByText('Like:306,526').first()).toHaveClass(/tiny-statistic__slots/)
7
+ })
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <div>
3
+ <tiny-layout>
4
+ <tiny-row :flex="true" class="row-bg">
5
+ <tiny-col :span="6">
6
+ <tiny-statistic :value="num" :value-style="{ color: '#b12220' }" :precision="0" title="点赞数量">
7
+ <template #prefix> Like:</template>
8
+ </tiny-statistic>
9
+ </tiny-col>
10
+ <tiny-col :span="6">
11
+ <tiny-statistic :value="num" :value-style="{ 'color': '#3ac295' }" :precision="0" title="点赞数量">
12
+ <template #prefix> Like:</template>
13
+ </tiny-statistic>
14
+ </tiny-col>
15
+ <tiny-col :span="6">
16
+ <tiny-statistic :value="num" :value-style="[{ 'color': '#e37d29' }]" :precision="0" title="点赞数量">
17
+ <template #prefix> Like:</template>
18
+ </tiny-statistic>
19
+ </tiny-col>
20
+ </tiny-row>
21
+ </tiny-layout>
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ import { Statistic, Layout, Row, Col } from '@opentiny/vue'
27
+
28
+ export default {
29
+ components: {
30
+ TinyStatistic: Statistic,
31
+ TinyLayout: Layout,
32
+ TinyRow: Row,
33
+ TinyCol: Col
34
+ },
35
+ data() {
36
+ return {
37
+ num: 306526.23
38
+ }
39
+ }
40
+ }
41
+ </script>
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: Statistic 统计组件
3
+ ---
4
+
5
+ # Statistic 统计组件
6
+
7
+ 显示统计。
@@ -0,0 +1,7 @@
1
+ ---
2
+ title: Statistics component
3
+ ---
4
+
5
+ # Statistics component
6
+
7
+ Display statistical data.
@@ -0,0 +1,46 @@
1
+ export default {
2
+ column: '2',
3
+ owner: '',
4
+ demos: [
5
+ {
6
+ demoId: 'basic-usage',
7
+ name: {
8
+ 'zh-CN': '基本用法',
9
+ 'en-US': 'Basic Usage'
10
+ },
11
+ desc: {
12
+ 'zh-CN':
13
+ '通过<code>value</code>设置数字内容,<code>precision</code>设置数字精度值,<code>title</code>设置数字内容标题,<code>prefix</code>设置数字内容前置插槽,<code>suffix</code>设置数字内容后置插槽。',
14
+ 'en-US':
15
+ 'Set digital content through<code>value</code>,<code>precision</code>set digital precision value,<code>title</code>set digital content title,<code>prefix</code>set digital content front slot, and<code>suffix</code>set digital content rear slot.'
16
+ },
17
+ codeFiles: ['basic-usage.vue']
18
+ },
19
+ {
20
+ demoId: 'statistic-slot',
21
+ name: {
22
+ 'zh-CN': '插槽用法',
23
+ 'en-US': 'Slot Usage'
24
+ },
25
+ desc: {
26
+ 'zh-CN':
27
+ '通过<code>title</code>设置标题插槽,<code>prefix</code>设置数字前缀插槽,<code>suffix</code>设置数字后缀插槽。',
28
+ 'en-US':
29
+ 'Set the title slot through<code>title</code>, set the number prefix slot through<code>prefix</code>, and set the number suffix slot through<code>suffix</code>.'
30
+ },
31
+ codeFiles: ['statistic-slot.vue']
32
+ },
33
+ {
34
+ demoId: 'statistic-style',
35
+ name: {
36
+ 'zh-CN': '样式用法',
37
+ 'en-US': 'Style Usage'
38
+ },
39
+ desc: {
40
+ 'zh-CN': '通过<code>value-style</code>设置数字样式。',
41
+ 'en-US': 'Set the number style through<code>value style</code>.'
42
+ },
43
+ codeFiles: ['statistic-style.vue']
44
+ }
45
+ ]
46
+ }
@@ -5,7 +5,7 @@ test('删除事件', async ({ page }) => {
5
5
  await page.goto('tabs#tabs-events-close')
6
6
 
7
7
  const tabs = page.locator('.tiny-tabs')
8
- const tabItem = tabs.getByRole('tab', { name: '表单组件' })
8
+ const tabItem = tabs.getByRole('tab', { name: '其他组件' })
9
9
  const close = tabItem.locator('.tiny-tabs__icon-close')
10
10
  const modal = page.locator('.tiny-modal').first()
11
11
 
@@ -1,13 +1,31 @@
1
1
  <template>
2
2
  <div class="tiny-tag-demo">
3
- <tiny-tag color="rgba(82,196,26,0.8)" hit>自定义背景色</tiny-tag>
3
+ <div class="mb5">hit:</div>
4
+ <tiny-tag hit>标签一</tiny-tag>
4
5
  <tiny-tag type="success" hit>标签二</tiny-tag>
5
6
  <tiny-tag type="info" hit>标签三</tiny-tag>
6
7
  <tiny-tag type="warning" hit>标签四</tiny-tag>
7
8
  <tiny-tag type="danger" hit>标签五</tiny-tag>
9
+ <div class="mb5">color 预设值:</div>
10
+ <tiny-tag color="red">red标签</tiny-tag>
11
+ <tiny-tag color="orange">orange标签</tiny-tag>
12
+ <tiny-tag color="green">green标签</tiny-tag>
13
+ <tiny-tag color="blue">blue标签</tiny-tag>
14
+ <tiny-tag color="purple">purple标签</tiny-tag>
15
+ <tiny-tag color="brown">brown标签</tiny-tag>
16
+ <tiny-tag color="grey">grey标签</tiny-tag>
17
+ <div class="mb5">自定义 color 值:</div>
18
+ <tiny-tag color="rgba(82,196,26,0.8)" hit>自定义背景色</tiny-tag>
19
+ <tiny-tag :color="['linear-gradient(to right, #e8cda4, #f8eddb)', '#8f3c00']" hit>自定义背景色和文本色</tiny-tag>
8
20
  </div>
9
21
  </template>
10
22
 
11
23
  <script setup lang="jsx">
12
24
  import { Tag as TinyTag } from '@opentiny/vue'
13
25
  </script>
26
+
27
+ <style scoped>
28
+ .tiny-tag {
29
+ border-radius: 0px 8px 0px 8px;
30
+ }
31
+ </style>
@@ -5,16 +5,12 @@ test('边框和自定义背景色', async ({ page }) => {
5
5
  await page.goto('tag#color3')
6
6
 
7
7
  const tags = page.locator('.all-demos-container').locator('.tiny-tag')
8
- const first = tags.nth(0)
8
+ const first = tags.getByText('标签一')
9
+ const red = tags.getByText('red标签')
10
+ const custom = tags.getByText('自定义背景色', { exact: true })
9
11
 
10
- await expect(tags).toHaveClass([
11
- /tiny-tag/,
12
- /tiny-tag--success/,
13
- /tiny-tag--info/,
14
- /tiny-tag--warning/,
15
- /tiny-tag--danger/
16
- ])
17
- await expect(tags).toHaveClass([/is-hit/, /is-hit/, /is-hit/, /is-hit/, /is-hit/])
18
- await expect(first).toHaveCSS('background-color', 'rgba(82, 196, 26, 0.8)')
19
- await expect(first).toHaveCSS('border-color', 'rgb(87, 93, 108)')
12
+ await expect(first).toHaveClass(/is-hit/)
13
+ await expect(red).toHaveClass(/tiny-tag--red/)
14
+ await expect(custom).toHaveCSS('background-color', 'rgba(82, 196, 26, 0.8)')
15
+ await expect(custom).toHaveCSS('border-color', 'rgb(87, 93, 108)')
20
16
  })
@@ -1,10 +1,22 @@
1
1
  <template>
2
2
  <div class="tiny-tag-demo">
3
- <tiny-tag color="rgba(82,196,26,0.8)" hit>自定义背景色</tiny-tag>
3
+ <div class="mb5">hit:</div>
4
+ <tiny-tag hit>标签一</tiny-tag>
4
5
  <tiny-tag type="success" hit>标签二</tiny-tag>
5
6
  <tiny-tag type="info" hit>标签三</tiny-tag>
6
7
  <tiny-tag type="warning" hit>标签四</tiny-tag>
7
8
  <tiny-tag type="danger" hit>标签五</tiny-tag>
9
+ <div class="mb5">color 预设值:</div>
10
+ <tiny-tag color="red">red标签</tiny-tag>
11
+ <tiny-tag color="orange">orange标签</tiny-tag>
12
+ <tiny-tag color="green">green标签</tiny-tag>
13
+ <tiny-tag color="blue">blue标签</tiny-tag>
14
+ <tiny-tag color="purple">purple标签</tiny-tag>
15
+ <tiny-tag color="brown">brown标签</tiny-tag>
16
+ <tiny-tag color="grey">grey标签</tiny-tag>
17
+ <div class="mb5">自定义 color 值:</div>
18
+ <tiny-tag color="rgba(82,196,26,0.8)" hit>自定义背景色</tiny-tag>
19
+ <tiny-tag :color="['linear-gradient(to right, #e8cda4, #f8eddb)', '#8f3c00']" hit>自定义背景色和文本色</tiny-tag>
8
20
  </div>
9
21
  </template>
10
22
 
@@ -17,3 +29,9 @@ export default {
17
29
  }
18
30
  }
19
31
  </script>
32
+
33
+ <style scoped>
34
+ .tiny-tag {
35
+ border-radius: 0px 8px 0px 8px;
36
+ }
37
+ </style>
@@ -29,12 +29,12 @@ export default {
29
29
  {
30
30
  demoId: 'color3',
31
31
  name: {
32
- 'zh-CN': '背景色与边框',
33
- 'en-US': 'Background color and border'
32
+ 'zh-CN': '颜色与边框',
33
+ 'en-US': 'Color and border'
34
34
  },
35
35
  desc: {
36
- 'zh-CN': '通过 <code>color</code> 设置背景色, <code>hit</code> 设置边框。',
37
- 'en-US': 'Set the size through <code>size</code> , with optional values: <code>(medium/small/mini)</code> .'
36
+ 'zh-CN': `通过 <code>hit</code> 设置边框;<code>color</code> 设置颜色,可使用预设值,也可自定义颜色值;当自定义颜色值为字符串则只能设置背景色;若为数组则第一个值为背景色,第二个为文本色。`,
37
+ 'en-US': `Use <code>hit</code> to set the border. <code>color</code> Set the color. You can use the preset value or customize the color value. If the value of Custom Color is a character string, only the background color can be set. If it is an array, the first value is the background color and the second is the text color.`
38
38
  },
39
39
  codeFiles: ['color3.vue']
40
40
  },
@@ -5,6 +5,7 @@
5
5
  @click="click"
6
6
  name-field="content"
7
7
  time-field="timestamp"
8
+ auto-color-field="icon"
8
9
  vertical
9
10
  ></tiny-time-line>
10
11
  </template>
@@ -12,6 +13,7 @@
12
13
  <script setup>
13
14
  import { ref } from 'vue'
14
15
  import { TimeLine as TinyTimeLine } from '@opentiny/vue'
16
+ import { iconLoading } from '@opentiny/vue-icon'
15
17
 
16
18
  const active = ref(1)
17
19
  const data = ref([
@@ -21,7 +23,8 @@ const data = ref([
21
23
  },
22
24
  {
23
25
  content: '通过审核',
24
- timestamp: '2018-04-13'
26
+ timestamp: '2018-04-13',
27
+ icon: iconLoading()
25
28
  },
26
29
  {
27
30
  content: '创建成功',
@@ -12,5 +12,6 @@ test('自定义字段', async ({ page }) => {
12
12
  await expect(nodes.first().locator('.date-time .time')).toHaveText('00:00')
13
13
  await expect(nodes.first().locator('.name')).toHaveText('提交审批')
14
14
  await expect(nodes.nth(1).locator('.date-time .date')).toHaveText('2018-04-13')
15
+ await expect(nodes.nth(1).locator('.icon-custom')).toBeVisible()
15
16
  await expect(nodes.nth(2).locator('.name')).toHaveText('创建成功')
16
17
  })
@@ -5,12 +5,14 @@
5
5
  @click="click"
6
6
  name-field="content"
7
7
  time-field="timestamp"
8
+ auto-color-field="icon"
8
9
  vertical
9
10
  ></tiny-time-line>
10
11
  </template>
11
12
 
12
13
  <script>
13
14
  import { TimeLine } from '@opentiny/vue'
15
+ import { iconLoading } from '@opentiny/vue-icon'
14
16
 
15
17
  export default {
16
18
  components: {
@@ -26,7 +28,8 @@ export default {
26
28
  },
27
29
  {
28
30
  content: '通过审核',
29
- timestamp: '2018-04-13'
31
+ timestamp: '2018-04-13',
32
+ icon: iconLoading()
30
33
  },
31
34
  {
32
35
  content: '创建成功',
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <tiny-time-line :data="data" :active="active" @click="onClick"></tiny-time-line>
3
+ </template>
4
+
5
+ <script setup>
6
+ import { ref, reactive } from 'vue'
7
+ import { TimeLine as TinyTimeLine } from '@opentiny/vue'
8
+ import { iconCheckOut, iconCalendar, iconLoading, iconEnd } from '@opentiny/vue-icon'
9
+
10
+ const active = ref(1)
11
+ const data = reactive([
12
+ { name: '立项', time: '2022-11-12 10:00', autoColor: iconCheckOut() },
13
+ { name: '开发', time: '2022-11-15 20:00', autoColor: iconCalendar() },
14
+ { name: '交付', time: '2022-12-10 20:00', autoColor: iconLoading() },
15
+ { name: '结项', time: '2022-12-15 00:00', autoColor: iconEnd() }
16
+ ])
17
+
18
+ const onClick = (index) => {
19
+ active.value = index
20
+ }
21
+ </script>
@@ -0,0 +1,14 @@
1
+ import { test, expect } from '@playwright/test'
2
+
3
+ test('自定义图标', async ({ page }) => {
4
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
5
+
6
+ await page.goto('time-line#custom-icon')
7
+
8
+ const timeline = page.locator('#custom-icon .tiny-timeline')
9
+ const timelineItems = await timeline.locator('.tiny-timeline-item').all()
10
+
11
+ for (const node of timelineItems) {
12
+ await expect(node.locator('.icon-custom .fixicons')).toBeVisible()
13
+ }
14
+ })
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <tiny-time-line :data="data" :active="active" @click="click"></tiny-time-line>
3
+ </template>
4
+
5
+ <script>
6
+ import { TimeLine, Modal } from '@opentiny/vue'
7
+ import { iconCheckOut, iconCalendar, iconLoading, iconEnd } from '@opentiny/vue-icon'
8
+
9
+ export default {
10
+ components: {
11
+ TinyTimeLine: TimeLine
12
+ },
13
+ data() {
14
+ return {
15
+ active: 2,
16
+ data: [
17
+ { name: '立项', time: '2022-11-12 10:00', autoColor: iconCheckOut() },
18
+ { name: '开发', time: '2022-11-15 20:00', autoColor: iconCalendar() },
19
+ { name: '交付', time: '2022-12-10 20:00', autoColor: iconLoading() },
20
+ { name: '结项', time: '2022-12-15 00:00', autoColor: iconEnd() }
21
+ ]
22
+ }
23
+ },
24
+ methods: {
25
+ click(index, node) {
26
+ this.active = index
27
+ Modal.message({
28
+ message: 'click 事件,当前 index:' + index + ' 节点信息:' + node.name + ',' + node.time,
29
+ status: 'info'
30
+ })
31
+ }
32
+ }
33
+ }
34
+ </script>
@@ -1,11 +1,16 @@
1
1
  <template>
2
2
  <div class="demo-timeline">
3
+ <p>
4
+ (1)
5
+ <code>autoColor</code>
6
+ 可选状态值:<code>success</code>:成功;<code>warning</code>:警告;<code>error</code>:失败。
7
+ </p>
3
8
  <tiny-time-line :data="data1"></tiny-time-line>
4
9
  <br />
5
10
 
6
11
  <p>
7
- 竖式时间线可以通过 <code>type</code> 属性指定节点类型,可选值有 <code>primary</code>|<code>success</code>
8
- |<code>warning</code>|<code>danger</code>|<code>info</code>
12
+ (2) 当<code>shape</code> = 'dot' 时,可以通过 <code>type</code> 属性指定节点类型,可选值有
13
+ <code>primary</code>|<code>success</code> |<code>warning</code>|<code>danger</code>|<code>info</code>
9
14
  </p>
10
15
  <tiny-time-line :data="data2" vertical shape="dot"></tiny-time-line>
11
16
  </div>
@@ -15,7 +20,13 @@
15
20
  import { reactive } from 'vue'
16
21
  import { TimeLine as TinyTimeLine } from '@opentiny/vue'
17
22
 
18
- const data1 = reactive([{ name: '默认状态' }, { name: '异常状态', error: true }, { name: '禁用状态', disabled: true }])
23
+ const data1 = reactive([
24
+ { name: '默认状态' },
25
+ { name: '成功状态', autoColor: 'success' },
26
+ { name: '警告状态', autoColor: 'warning' },
27
+ { name: '异常状态', error: true }, // 也可以使用 autoColor: 'error'
28
+ { name: '禁用状态', disabled: true }
29
+ ])
19
30
  const data2 = reactive([
20
31
  { name: '基本 / primary', time: '2019-11-10 00:00:00', type: 'primary' },
21
32
  { name: '成功 / success', time: '2019-11-11 00:01:30', type: 'success' },
@@ -24,3 +35,13 @@ const data2 = reactive([
24
35
  { name: '信息 / info', time: '2019-11-14 20:45:50', type: 'info' }
25
36
  ])
26
37
  </script>
38
+
39
+ <style scoped>
40
+ code {
41
+ color: #476582;
42
+ padding: 4px 8px;
43
+ margin: 0 4px;
44
+ border-radius: 3px;
45
+ background-color: rgba(27, 31, 35, 0.05);
46
+ }
47
+ </style>
@@ -1,14 +1,56 @@
1
1
  import { test, expect } from '@playwright/test'
2
2
 
3
- test('节点状态', async ({ page }) => {
4
- page.on('pageerror', (exception) => expect(exception).toBeNull())
5
- await page.goto('time-line#status')
6
-
7
- const timeline = page.locator('#status .tiny-steps-timeline')
8
- const timelineItems = timeline.locator('.tiny-timeline-item')
9
- await expect(timelineItems.first()).toHaveClass(/timeline-item--primary/)
10
- await expect(timelineItems.nth(1)).toHaveClass(/timeline-item--success/)
11
- await expect(timelineItems.nth(2)).toHaveClass(/timeline-item--warning/)
12
- await expect(timelineItems.nth(3)).toHaveClass(/timeline-item--danger/)
13
- await expect(timelineItems.nth(4)).toHaveClass(/timeline-item--info/)
3
+ test.describe('节点状态', () => {
4
+ test('autoColor属性设置节点状态', async ({ page }) => {
5
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
6
+ await page.goto('time-line#status')
7
+
8
+ const timeline = page.locator('#status .tiny-timeline').first()
9
+ const timelineItems = timeline.locator('.tiny-timeline-item')
10
+
11
+ // 默认状态
12
+ await expect(timelineItems.first()).toHaveClass(/process-wait/)
13
+ await expect(timelineItems.first().locator('.icon')).toHaveCSS('border-color', 'rgb(87, 93, 108)')
14
+ await expect(timelineItems.first().locator('.icon .number')).toHaveCSS('color', 'rgb(87, 93, 108)')
15
+
16
+ // 成功状态
17
+ await expect(timelineItems.nth(1)).toBeVisible()
18
+ await expect(timelineItems.nth(1).locator('.icon')).toHaveCSS('border-color', 'rgb(94, 124, 224)')
19
+ await expect(timelineItems.nth(1).locator('.icon .icon-yes')).toHaveCSS('fill', 'rgb(94, 124, 224)')
20
+
21
+ // 警告状态
22
+ await expect(timelineItems.nth(2).locator('.icon.icon-warning')).toBeVisible()
23
+ await expect(timelineItems.nth(2).locator('.icon')).toHaveCSS('background-color', 'rgb(250, 152, 65)')
24
+ await expect(timelineItems.nth(2).locator('.icon .icon-warning')).toHaveCSS('fill', 'rgb(255, 255, 255)')
25
+
26
+ // 异常状态
27
+ await expect(timelineItems.nth(3).locator('.icon')).toBeVisible()
28
+ await expect(timelineItems.nth(3).locator('.icon')).toHaveCSS('border-color', 'rgb(246, 111, 106)')
29
+ await expect(timelineItems.nth(3).locator('.icon .icon-error')).toHaveCSS('fill', 'rgb(222, 80, 78)')
30
+
31
+ // 禁用状态
32
+ await expect(timelineItems.nth(4)).toHaveClass(/process-disabled/)
33
+ await expect(timelineItems.nth(4).locator('.icon')).toHaveCSS('background-color', 'rgb(245, 245, 246)')
34
+ await expect(timelineItems.nth(4).locator('.icon .number')).toHaveCSS('color', 'rgb(173, 176, 184)')
35
+ })
36
+
37
+ test('type属性设置节点状态', async ({ page }) => {
38
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
39
+ await page.goto('time-line#status')
40
+
41
+ const timeline = page.locator('#status .tiny-timeline').nth(1)
42
+ const timelineItems = timeline.locator('.tiny-timeline-item')
43
+
44
+ await expect(timelineItems.first()).toHaveClass(/timeline-item--primary/)
45
+ await expect(timelineItems.first().locator('.dot')).toHaveCSS('background-color', 'rgb(223, 225, 230)')
46
+ await expect(timelineItems.nth(1)).toHaveClass(/timeline-item--success/)
47
+ await expect(timelineItems.nth(1).locator('.dot')).toHaveCSS('background-color', 'rgb(80, 212, 171)')
48
+
49
+ await expect(timelineItems.nth(2)).toHaveClass(/timeline-item--warning/)
50
+ await expect(timelineItems.nth(2).locator('.dot')).toHaveCSS('background-color', 'rgb(250, 152, 65)')
51
+ await expect(timelineItems.nth(3)).toHaveClass(/timeline-item--danger/)
52
+ await expect(timelineItems.nth(3).locator('.dot')).toHaveCSS('background-color', 'rgb(246, 111, 106)')
53
+ await expect(timelineItems.nth(4)).toHaveClass(/timeline-item--info/)
54
+ await expect(timelineItems.nth(4).locator('.dot')).toHaveCSS('background-color', 'rgb(94, 124, 224)')
55
+ })
14
56
  })