@opentiny/vue-docs 2.2.7 → 2.2.9

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 (494) hide show
  1. package/demos/mobile/app/button/base.vue +42 -0
  2. package/demos/mobile/app/button/disabled.vue +42 -0
  3. package/demos/mobile/app/button/event.vue +46 -0
  4. package/demos/mobile/app/button/icon.vue +8 -7
  5. package/demos/mobile/app/button/loading.vue +21 -9
  6. package/demos/mobile/app/button/reset-time.vue +9 -16
  7. package/demos/mobile/app/button/size.vue +28 -11
  8. package/demos/mobile/app/button/webdoc/button.js +43 -98
  9. package/demos/mobile/app/file-upload/custom-upload-tip.vue +1 -1
  10. package/demos/mobile/app/switch/webdoc/switch.cn.md +3 -4
  11. package/demos/mobile-first/app/switch/webdoc/switch.cn.md +1 -1
  12. package/demos/mobile-first/app/switch/webdoc/switch.en.md +1 -1
  13. package/demos/pc/app/action-menu/webdoc/action-menu.js +2 -2
  14. package/demos/pc/app/alert/basic-usage-composition-api.vue +1 -0
  15. package/demos/pc/app/alert/basic-usage.vue +1 -0
  16. package/demos/pc/app/alert/custom-close.spec.ts +1 -1
  17. package/demos/pc/app/alert/icon-composition-api.vue +3 -2
  18. package/demos/pc/app/alert/icon.vue +4 -3
  19. package/demos/pc/app/alert/webdoc/alert.js +12 -2
  20. package/demos/pc/app/anchor/basic-usage-composition-api.vue +7 -7
  21. package/demos/pc/app/anchor/basic-usage.spec.ts +2 -2
  22. package/demos/pc/app/anchor/basic-usage.vue +7 -7
  23. package/demos/pc/app/anchor/change-composition-api.vue +7 -7
  24. package/demos/pc/app/anchor/change.spec.ts +2 -2
  25. package/demos/pc/app/anchor/change.vue +7 -7
  26. package/demos/pc/app/anchor/is-affix-composition-api.vue +7 -7
  27. package/demos/pc/app/anchor/is-affix.vue +7 -7
  28. package/demos/pc/app/anchor/webdoc/anchor.js +4 -4
  29. package/demos/pc/app/autocomplete/webdoc/autocomplete.js +2 -2
  30. package/demos/pc/app/badge/webdoc/badge.js +1 -1
  31. package/demos/pc/app/button/webdoc/button.js +1 -1
  32. package/demos/pc/app/button-group/basic-usage.spec.ts +1 -0
  33. package/demos/pc/app/button-group/slot-empty-composition-api.vue +25 -0
  34. package/demos/pc/app/button-group/slot-empty.spec.ts +11 -0
  35. package/demos/pc/app/button-group/slot-empty.vue +33 -0
  36. package/demos/pc/app/button-group/webdoc/button-group.js +9 -0
  37. package/demos/pc/app/calendar/basic-usage-composition-api.vue +1 -1
  38. package/demos/pc/app/calendar/basic-usage.spec.ts +33 -0
  39. package/demos/pc/app/calendar/basic-usage.vue +1 -1
  40. package/demos/pc/app/calendar/calendar-mode-composition-api.vue +1 -1
  41. package/demos/pc/app/calendar/calendar-mode.spec.ts +33 -0
  42. package/demos/pc/app/calendar/calendar-mode.vue +1 -1
  43. package/demos/pc/app/calendar/custom-calendar-toolbar-composition-api.vue +3 -3
  44. package/demos/pc/app/calendar/custom-calendar-toolbar.spec.ts +18 -0
  45. package/demos/pc/app/calendar/custom-calendar-toolbar.vue +3 -3
  46. package/demos/pc/app/calendar/custom-day-cell-composition-api.vue +1 -1
  47. package/demos/pc/app/calendar/custom-day-cell.spec.ts +10 -0
  48. package/demos/pc/app/calendar/custom-day-cell.vue +1 -1
  49. package/demos/pc/app/calendar/dynamic-add-schedule-composition-api.vue +1 -1
  50. package/demos/pc/app/calendar/dynamic-add-schedule.spec.ts +26 -0
  51. package/demos/pc/app/calendar/dynamic-add-schedule.vue +1 -1
  52. package/demos/pc/app/calendar/show-selected-date-composition-api.vue +1 -1
  53. package/demos/pc/app/calendar/show-selected-date.spec.ts +14 -0
  54. package/demos/pc/app/calendar/show-selected-date.vue +1 -1
  55. package/demos/pc/app/calendar/webdoc/calendar.js +22 -8
  56. package/demos/pc/app/calendar-view/basic-usage.spec.ts +18 -0
  57. package/demos/pc/app/calendar-view/calendar-day-mark.spec.ts +23 -0
  58. package/demos/pc/app/calendar-view/calendar-disabled-day-composition-api.vue +2 -2
  59. package/demos/pc/app/calendar-view/calendar-disabled-day.spec.ts +12 -0
  60. package/demos/pc/app/calendar-view/calendar-disabled-day.vue +1 -1
  61. package/demos/pc/app/calendar-view/calendar-event.spec.ts +25 -0
  62. package/demos/pc/app/calendar-view/calendar-mode.spec.ts +25 -0
  63. package/demos/pc/app/calendar-view/calendar-schedule-slot.spec.ts +18 -0
  64. package/demos/pc/app/calendar-view/calendar-timeline-range.spec.ts +11 -0
  65. package/demos/pc/app/calendar-view/calendar-timeline-slot.spec.ts +23 -0
  66. package/demos/pc/app/calendar-view/custom-calendar-toolbar.spec.ts +8 -0
  67. package/demos/pc/app/calendar-view/custom-day-bg-color.spec.ts +8 -0
  68. package/demos/pc/app/calendar-view/custom-header.spec.ts +11 -0
  69. package/demos/pc/app/calendar-view/multi-select-composition-api.vue +2 -2
  70. package/demos/pc/app/calendar-view/multi-select.spec.ts +13 -0
  71. package/demos/pc/app/calendar-view/multi-select.vue +1 -1
  72. package/demos/pc/app/calendar-view/set-working-day-composition-api.vue +3 -7
  73. package/demos/pc/app/calendar-view/set-working-day.spec.ts +22 -0
  74. package/demos/pc/app/calendar-view/set-working-day.vue +1 -1
  75. package/demos/pc/app/calendar-view/webdoc/calendar-view.js +1 -1
  76. package/demos/pc/app/carousel/autoplay-composition-api.vue +2 -2
  77. package/demos/pc/app/carousel/autoplay.spec.ts +2 -0
  78. package/demos/pc/app/carousel/autoplay.vue +2 -2
  79. package/demos/pc/app/carousel/basic-usage-composition-api.vue +2 -2
  80. package/demos/pc/app/carousel/basic-usage.spec.ts +1 -8
  81. package/demos/pc/app/carousel/basic-usage.vue +2 -2
  82. package/demos/pc/app/carousel/card-mode-composition-api.vue +2 -2
  83. package/demos/pc/app/carousel/card-mode.vue +2 -2
  84. package/demos/pc/app/carousel/carousel-arrow-always-composition-api.vue +2 -2
  85. package/demos/pc/app/carousel/carousel-arrow-always.vue +2 -2
  86. package/demos/pc/app/carousel/carousel-arrow-hover-composition-api.vue +2 -2
  87. package/demos/pc/app/carousel/carousel-arrow-hover.vue +2 -2
  88. package/demos/pc/app/carousel/carousel-arrow-never-composition-api.vue +2 -2
  89. package/demos/pc/app/carousel/carousel-arrow-never.vue +2 -2
  90. package/demos/pc/app/carousel/carousel-events-composition-api.vue +2 -2
  91. package/demos/pc/app/carousel/carousel-events.vue +2 -2
  92. package/demos/pc/app/carousel/close-loop-composition-api.vue +2 -2
  93. package/demos/pc/app/carousel/close-loop.vue +2 -2
  94. package/demos/pc/app/carousel/custom-height-composition-api.vue +2 -2
  95. package/demos/pc/app/carousel/custom-height.vue +2 -2
  96. package/demos/pc/app/carousel/indicator-trigger-composition-api.vue +2 -2
  97. package/demos/pc/app/carousel/indicator-trigger.vue +2 -2
  98. package/demos/pc/app/carousel/initial-index-composition-api.vue +2 -2
  99. package/demos/pc/app/carousel/initial-index.vue +2 -2
  100. package/demos/pc/app/carousel/manual-play-composition-api.vue +19 -8
  101. package/demos/pc/app/carousel/manual-play.vue +18 -8
  102. package/demos/pc/app/carousel/play-interval-composition-api.vue +2 -2
  103. package/demos/pc/app/carousel/play-interval.vue +2 -2
  104. package/demos/pc/app/carousel/show-title-composition-api.vue +2 -2
  105. package/demos/pc/app/carousel/show-title.vue +2 -2
  106. package/demos/pc/app/carousel/up-down-carousel-composition-api.vue +2 -2
  107. package/demos/pc/app/carousel/up-down-carousel.vue +2 -2
  108. package/demos/pc/app/chart/histogram/demo4-composition-api.vue +0 -2
  109. package/demos/pc/app/chart/histogram/demo4.vue +0 -2
  110. package/demos/pc/app/checkbox/checkbox-events-composition-api.vue +2 -3
  111. package/demos/pc/app/checkbox/checkbox-events.vue +2 -3
  112. package/demos/pc/app/checkbox/group-options-composition-api.vue +1 -1
  113. package/demos/pc/app/checkbox/group-options.vue +1 -1
  114. package/demos/pc/app/checkbox/size-composition-api.vue +0 -1
  115. package/demos/pc/app/checkbox/text-composition-api.vue +3 -2
  116. package/demos/pc/app/checkbox/text.vue +2 -1
  117. package/demos/pc/app/checkbox/webdoc/checkbox.js +3 -3
  118. package/demos/pc/app/collapse/title-composition-api.vue +3 -2
  119. package/demos/pc/app/collapse/title.vue +3 -2
  120. package/demos/pc/app/collapse/webdoc/collapse.js +11 -11
  121. package/demos/pc/app/config-provider/webdoc/config-provider.js +3 -3
  122. package/demos/pc/app/date-picker/align.spec.ts +11 -12
  123. package/demos/pc/app/date-picker/basic-usage.spec.ts +17 -23
  124. package/demos/pc/app/date-picker/clear.spec.ts +24 -5
  125. package/demos/pc/app/date-picker/date-range.spec.ts +63 -11
  126. package/demos/pc/app/date-picker/default-value.spec.ts +19 -4
  127. package/demos/pc/app/date-picker/events.spec.ts +24 -10
  128. package/demos/pc/app/date-picker/format.spec.ts +12 -11
  129. package/demos/pc/app/date-picker/shortcuts.spec.ts +6 -5
  130. package/demos/pc/app/dialog-box/basic-usage-composition-api.vue +1 -1
  131. package/demos/pc/app/dialog-box/basic-usage.vue +1 -1
  132. package/demos/pc/app/dialog-box/center-composition-api.vue +2 -2
  133. package/demos/pc/app/dialog-box/center.vue +2 -2
  134. package/demos/pc/app/dialog-box/close-on-click-modal-composition-api.vue +2 -2
  135. package/demos/pc/app/dialog-box/close-on-click-modal.vue +2 -2
  136. package/demos/pc/app/dialog-box/close-on-press-escape-composition-api.vue +2 -2
  137. package/demos/pc/app/dialog-box/close-on-press-escape.vue +2 -2
  138. package/demos/pc/app/dialog-box/custom-dialog-content-composition-api.vue +2 -2
  139. package/demos/pc/app/dialog-box/custom-dialog-content.vue +2 -2
  140. package/demos/pc/app/dialog-box/custom-dialog-footer-composition-api.vue +2 -2
  141. package/demos/pc/app/dialog-box/custom-dialog-footer.vue +4 -4
  142. package/demos/pc/app/dialog-box/custom-dialog-title-composition-api.vue +2 -2
  143. package/demos/pc/app/dialog-box/custom-dialog-title.vue +2 -2
  144. package/demos/pc/app/dialog-box/dialog-top-height-composition-api.vue +2 -2
  145. package/demos/pc/app/dialog-box/dialog-top-height.vue +2 -2
  146. package/demos/pc/app/dialog-box/dialog-width-composition-api.vue +3 -3
  147. package/demos/pc/app/dialog-box/dialog-width.vue +3 -3
  148. package/demos/pc/app/dialog-box/lock-scroll-composition-api.vue +2 -2
  149. package/demos/pc/app/dialog-box/lock-scroll.vue +2 -2
  150. package/demos/pc/app/dialog-box/webdoc/dialog-box.js +63 -63
  151. package/demos/pc/app/dialog-select/nest-grid-multi-composition-api.vue +9 -3
  152. package/demos/pc/app/dialog-select/nest-grid-multi.vue +8 -3
  153. package/demos/pc/app/dialog-select/nest-grid-single-composition-api.vue +3 -2
  154. package/demos/pc/app/dialog-select/nest-grid-single.vue +3 -2
  155. package/demos/pc/app/dialog-select/nest-tree-multi-composition-api.vue +3 -2
  156. package/demos/pc/app/dialog-select/nest-tree-multi.vue +3 -2
  157. package/demos/pc/app/dialog-select/nest-tree-single-composition-api.vue +3 -2
  158. package/demos/pc/app/dialog-select/nest-tree-single.vue +3 -2
  159. package/demos/pc/app/dialog-select/webdoc/dialog-select.js +90 -42
  160. package/demos/pc/app/drawer/confirm-event-composition-api.vue +1 -1
  161. package/demos/pc/app/drawer/confirm-event.vue +1 -1
  162. package/demos/pc/app/drawer/webdoc/drawer.cn.md +1 -1
  163. package/demos/pc/app/drawer/webdoc/drawer.en.md +7 -0
  164. package/demos/pc/app/drawer/webdoc/drawer.js +94 -47
  165. package/demos/pc/app/drawer/z-index-composition-api.vue +1 -1
  166. package/demos/pc/app/drawer/z-index.spec.ts +1 -1
  167. package/demos/pc/app/drawer/z-index.vue +1 -1
  168. package/demos/pc/app/drop-times/basic-usage-composition-api.vue +7 -1
  169. package/demos/pc/app/drop-times/basic-usage.spec.ts +1 -1
  170. package/demos/pc/app/drop-times/basic-usage.vue +8 -2
  171. package/demos/pc/app/drop-times/size-composition-api.vue +14 -4
  172. package/demos/pc/app/drop-times/size.spec.ts +5 -1
  173. package/demos/pc/app/drop-times/size.vue +14 -4
  174. package/demos/pc/app/drop-times/start-end-step-composition-api.vue +8 -13
  175. package/demos/pc/app/drop-times/start-end-step.spec.ts +1 -1
  176. package/demos/pc/app/drop-times/start-end-step.vue +10 -16
  177. package/demos/pc/app/drop-times/webdoc/drop-times.js +27 -17
  178. package/demos/pc/app/dropdown/webdoc/dropdown.js +2 -2
  179. package/demos/pc/app/fall-menu/webdoc/fall-menu.js +4 -10
  180. package/demos/pc/app/file-upload/abort-quest-composition-api.vue +1 -1
  181. package/demos/pc/app/file-upload/abort-quest.vue +1 -1
  182. package/demos/pc/app/file-upload/basic-usage.spec.ts +2 -2
  183. package/demos/pc/app/file-upload/{prevent-upload-file-composition-api.vue → before-upload-limit-composition-api.vue} +13 -5
  184. package/demos/pc/app/file-upload/{prevent-upload-file.spec.ts → before-upload-limit.spec.ts} +9 -4
  185. package/demos/pc/app/file-upload/{prevent-upload-file.vue → before-upload-limit.vue} +15 -5
  186. package/demos/pc/app/file-upload/custom-upload-tip-composition-api.vue +1 -1
  187. package/demos/pc/app/file-upload/custom-upload-tip.spec.ts +1 -1
  188. package/demos/pc/app/file-upload/custom-upload-tip.vue +1 -1
  189. package/demos/pc/app/file-upload/form-validation-composition-api.vue +10 -4
  190. package/demos/pc/app/file-upload/form-validation.vue +9 -3
  191. package/demos/pc/app/file-upload/multiple-file.spec.ts +3 -1
  192. package/demos/pc/app/file-upload/upload-events-composition-api.vue +8 -8
  193. package/demos/pc/app/file-upload/upload-events.vue +8 -8
  194. package/demos/pc/app/file-upload/upload-request-composition-api.vue +1 -1
  195. package/demos/pc/app/file-upload/upload-request.vue +1 -1
  196. package/demos/pc/app/file-upload/webdoc/file-upload.js +97 -96
  197. package/demos/pc/app/form/form-validation-composition-api.vue +2 -2
  198. package/demos/pc/app/form/form-validation.vue +1 -1
  199. package/demos/pc/app/form/label-position.spec.ts +3 -0
  200. package/demos/pc/app/form/popper-options.spec.ts +1 -0
  201. package/demos/pc/app/form/slot-label-composition-api.vue +1 -1
  202. package/demos/pc/app/form/validate-debounce-composition-api.vue +3 -3
  203. package/demos/pc/app/form/validate-debounce.vue +3 -3
  204. package/demos/pc/app/form/webdoc/form.js +10 -9
  205. package/demos/pc/app/grid/dynamically-columns/dynamically-columns-composition-api.vue +6 -4
  206. package/demos/pc/app/grid/dynamically-columns/dynamically-columns.vue +6 -4
  207. package/demos/pc/app/grid/dynamically-columns/reverse-row-composition-api.vue +3 -1
  208. package/demos/pc/app/grid/dynamically-columns/reverse-row.vue +3 -1
  209. package/demos/pc/app/grid/faq/grid-in-dialog-box-composition-api.vue +1 -1
  210. package/demos/pc/app/grid/faq/grid-in-dialog-box.spec.js +1 -1
  211. package/demos/pc/app/grid/faq/grid-in-dialog-box.vue +1 -1
  212. package/demos/pc/app/grid/filter/advanced-filter-composition-api.vue +0 -15
  213. package/demos/pc/app/grid/filter/advanced-filter.spec.js +1 -1
  214. package/demos/pc/app/grid/filter/advanced-filter.vue +0 -14
  215. package/demos/pc/app/grid/filter/custom-filter.spec.js +1 -1
  216. package/demos/pc/app/grid/filter/default-filter-composition-api.vue +1 -1
  217. package/demos/pc/app/grid/filter/default-filter.spec.ts +1 -1
  218. package/demos/pc/app/grid/filter/default-filter.vue +1 -1
  219. package/demos/pc/app/grid/filter/simple-default-value-filter-composition-api.vue +0 -14
  220. package/demos/pc/app/grid/filter/simple-default-value-filter.vue +0 -14
  221. package/demos/pc/app/grid/filter/simple-filter-composition-api.vue +0 -14
  222. package/demos/pc/app/grid/filter/simple-filter.vue +0 -14
  223. package/demos/pc/app/grid/footer/configuration-summary.spec.js +1 -1
  224. package/demos/pc/app/grid/highlight/set-current-row-composition-api.vue +4 -1
  225. package/demos/pc/app/grid/highlight/set-current-row.vue +4 -1
  226. package/demos/pc/app/grid/large-data/scroll-to-composition-api.vue +6 -3
  227. package/demos/pc/app/grid/large-data/scroll-to.vue +6 -3
  228. package/demos/pc/app/grid/pager/inner-pager-composition-api.vue +1 -1
  229. package/demos/pc/app/grid/pager/inner-pager.spec.js +1 -1
  230. package/demos/pc/app/grid/pager/inner-pager.vue +1 -1
  231. package/demos/pc/app/grid/sort/server-sort-composition-api.vue +3 -3
  232. package/demos/pc/app/grid/sort/server-sort.vue +2 -2
  233. package/demos/pc/app/grid/sort/sort-composition-api.vue +4 -1
  234. package/demos/pc/app/grid/sort/sort.spec.js +1 -1
  235. package/demos/pc/app/grid/sort/sort.vue +4 -1
  236. package/demos/pc/app/grid/toolbar/insert-delete-update-composition-api.vue +2 -1
  237. package/demos/pc/app/grid/toolbar/insert-delete-update.vue +2 -1
  238. package/demos/pc/app/grid/toolbar/toolbar-op-config-composition-api.vue +3 -2
  239. package/demos/pc/app/grid/toolbar/toolbar-op-config.vue +3 -2
  240. package/demos/pc/app/grid/validation/before-submit-validation-composition-api.vue +5 -5
  241. package/demos/pc/app/grid/validation/before-submit-validation.spec.js +2 -2
  242. package/demos/pc/app/grid/validation/before-submit-validation.vue +5 -5
  243. package/demos/pc/app/grid/webdoc/grid-appearance-settings.js +2 -2
  244. package/demos/pc/app/grid/webdoc/grid-context-menu.js +4 -4
  245. package/demos/pc/app/grid/webdoc/grid-custom-style.js +2 -2
  246. package/demos/pc/app/grid/webdoc/grid-custom.js +31 -31
  247. package/demos/pc/app/grid/webdoc/grid-drag.js +1 -1
  248. package/demos/pc/app/grid/webdoc/grid-dynamically-columns.js +4 -1
  249. package/demos/pc/app/grid/webdoc/grid-editor.js +2 -2
  250. package/demos/pc/app/grid/webdoc/grid-empty.js +4 -1
  251. package/demos/pc/app/grid/webdoc/grid-expand.js +3 -3
  252. package/demos/pc/app/grid/webdoc/grid-faq.js +4 -4
  253. package/demos/pc/app/grid/webdoc/grid-filter.js +4 -4
  254. package/demos/pc/app/grid/webdoc/grid-footer.js +1 -1
  255. package/demos/pc/app/grid/webdoc/grid-highlight.js +2 -2
  256. package/demos/pc/app/grid/webdoc/grid-import-export.js +5 -2
  257. package/demos/pc/app/grid/webdoc/grid-large-data.js +6 -5
  258. package/demos/pc/app/grid/webdoc/grid-mouse-keyboard.js +2 -2
  259. package/demos/pc/app/grid/webdoc/grid-pager.js +11 -2
  260. package/demos/pc/app/grid/webdoc/grid-renderer.js +11 -11
  261. package/demos/pc/app/grid/webdoc/grid-row-grouping.js +2 -2
  262. package/demos/pc/app/grid/webdoc/grid-size.js +6 -6
  263. package/demos/pc/app/grid/webdoc/grid-slot.js +16 -4
  264. package/demos/pc/app/grid/webdoc/grid-tip.js +3 -3
  265. package/demos/pc/app/grid/webdoc/grid-toolbar.js +17 -9
  266. package/demos/pc/app/grid/webdoc/grid-tree-table.js +9 -7
  267. package/demos/pc/app/grid/webdoc/grid-validation.js +6 -6
  268. package/demos/pc/app/grid/webdoc/grid.js +160 -85
  269. package/demos/pc/app/icon/iconGroups.js +1 -0
  270. package/demos/pc/app/icon/list-composition-api.vue +8 -0
  271. package/demos/pc/app/icon/list.vue +7 -0
  272. package/demos/pc/app/image/basic-usage.spec.ts +1 -1
  273. package/demos/pc/app/image/events.spec.ts +1 -1
  274. package/demos/pc/app/image/lazy.spec.ts +1 -1
  275. package/demos/pc/app/image/preview-in-dialog.spec.ts +1 -1
  276. package/demos/pc/app/image/preview.spec.ts +1 -1
  277. package/demos/pc/app/image/slot.spec.ts +1 -1
  278. package/demos/pc/app/image/webdoc/image.cn.md +3 -1
  279. package/demos/pc/app/image/webdoc/image.en.md +3 -1
  280. package/demos/pc/app/image/webdoc/image.js +34 -18
  281. package/demos/pc/app/input/method-addMemory-composition-api.vue +1 -0
  282. package/demos/pc/app/input/method-addMemory.spec.ts +11 -0
  283. package/demos/pc/app/input/method-addMemory.vue +1 -0
  284. package/demos/pc/app/input/webdoc/input.js +12 -2
  285. package/demos/pc/app/ip-address/webdoc/ip-address.cn.md +2 -2
  286. package/demos/pc/app/ip-address/webdoc/ip-address.js +2 -2
  287. package/demos/pc/app/link/webdoc/link.js +1 -1
  288. package/demos/pc/app/loading/webdoc/loading.js +1 -1
  289. package/demos/pc/app/milestone/show-number-composition-api.vue +1 -1
  290. package/demos/pc/app/milestone/show-number.vue +1 -1
  291. package/demos/pc/app/milestone/solid-style-composition-api.vue +1 -1
  292. package/demos/pc/app/milestone/solid-style.vue +1 -1
  293. package/demos/pc/app/milestone/webdoc/milestone.js +9 -9
  294. package/demos/pc/app/mind-map/basic-usage-composition-api.vue +14 -0
  295. package/demos/pc/app/mind-map/basic-usage.spec.ts +36 -0
  296. package/demos/pc/app/mind-map/basic-usage.vue +20 -0
  297. package/demos/pc/app/mind-map/event-composition-api.vue +125 -0
  298. package/demos/pc/app/mind-map/event.spec.ts +52 -0
  299. package/demos/pc/app/mind-map/event.vue +136 -0
  300. package/demos/pc/app/mind-map/export-data-composition-api.vue +108 -0
  301. package/demos/pc/app/mind-map/export-data.spec.ts +19 -0
  302. package/demos/pc/app/mind-map/export-data.vue +119 -0
  303. package/demos/pc/app/mind-map/webdoc/mind-map.cn.md +7 -0
  304. package/demos/pc/app/mind-map/webdoc/mind-map.en.md +7 -0
  305. package/demos/pc/app/mind-map/webdoc/mind-map.js +250 -0
  306. package/demos/pc/app/modal/webdoc/modal.js +47 -47
  307. package/demos/pc/app/nav-menu/custom-service-composition-api.vue +5 -5
  308. package/demos/pc/app/nav-menu/custom-service.vue +5 -5
  309. package/demos/pc/app/notify/webdoc/notify.js +9 -6
  310. package/demos/pc/app/numeric/webdoc/numeric.js +23 -23
  311. package/demos/pc/app/pager/before-page-change-composition-api.vue +1 -1
  312. package/demos/pc/app/pager/before-page-change.vue +1 -1
  313. package/demos/pc/app/pager/custom-layout-composition-api.vue +8 -6
  314. package/demos/pc/app/pager/custom-layout.vue +8 -6
  315. package/demos/pc/app/pager/custom-total-composition-api.vue +20 -18
  316. package/demos/pc/app/pager/custom-total.vue +20 -18
  317. package/demos/pc/app/pager/hide-on-single-page-composition-api.vue +1 -1
  318. package/demos/pc/app/pager/hide-on-single-page.spec.ts +1 -1
  319. package/demos/pc/app/pager/hide-on-single-page.vue +1 -1
  320. package/demos/pc/app/pager/pager-event-composition-api.vue +10 -5
  321. package/demos/pc/app/pager/pager-event.vue +10 -5
  322. package/demos/pc/app/pager/webdoc/pager.js +3 -3
  323. package/demos/pc/app/pop-upload/webdoc/pop-upload.js +3 -3
  324. package/demos/pc/app/popconfirm/webdoc/popconfirm.js +1 -1
  325. package/demos/pc/app/progress/custom-color-composition-api.vue +10 -5
  326. package/demos/pc/app/progress/custom-color.spec.ts +14 -1
  327. package/demos/pc/app/progress/custom-color.vue +10 -5
  328. package/demos/pc/app/progress/custom-status-composition-api.vue +30 -11
  329. package/demos/pc/app/progress/custom-status.vue +30 -11
  330. package/demos/pc/app/progress/webdoc/progress.js +7 -8
  331. package/demos/pc/app/qr-code/level-composition-api.vue +5 -8
  332. package/demos/pc/app/qr-code/style-composition-api.vue +1 -0
  333. package/demos/pc/app/qr-code/style.vue +1 -0
  334. package/demos/pc/app/qr-code/webdoc/qr-code.js +22 -10
  335. package/demos/pc/app/radio/group-options-composition-api.vue +13 -0
  336. package/demos/pc/app/radio/group-options.vue +20 -2
  337. package/demos/pc/app/radio/webdoc/radio.js +3 -3
  338. package/demos/pc/app/rate/webdoc/rate.js +8 -10
  339. package/demos/pc/app/search/events-composition-api.vue +4 -4
  340. package/demos/pc/app/search/events.vue +4 -4
  341. package/demos/pc/app/search/slot-prefix-composition-api.vue +1 -1
  342. package/demos/pc/app/search/slot-prefix.vue +1 -1
  343. package/demos/pc/app/search/webdoc/search.js +2 -2
  344. package/demos/pc/app/select/basic-usage-composition-api.vue +11 -6
  345. package/demos/pc/app/select/basic-usage.spec.ts +34 -9
  346. package/demos/pc/app/select/basic-usage.vue +11 -6
  347. package/demos/pc/app/select/clear-no-match-value-composition-api.vue +1 -1
  348. package/demos/pc/app/select/clear-no-match-value.vue +1 -1
  349. package/demos/pc/app/select/events-composition-api.vue +12 -6
  350. package/demos/pc/app/select/events.vue +10 -5
  351. package/demos/pc/app/select/is-drop-inherit-width-composition-api.vue +1 -2
  352. package/demos/pc/app/select/is-drop-inherit-width.vue +1 -2
  353. package/demos/pc/app/select/no-data-text-composition-api.vue +1 -1
  354. package/demos/pc/app/select/no-data-text.spec.ts +1 -1
  355. package/demos/pc/app/select/no-data-text.vue +1 -1
  356. package/demos/pc/app/select/optimization-composition-api.vue +5 -2
  357. package/demos/pc/app/select/optimization.vue +4 -1
  358. package/demos/pc/app/select/option-group-composition-api.vue +33 -11
  359. package/demos/pc/app/select/option-group.spec.ts +2 -2
  360. package/demos/pc/app/select/option-group.vue +34 -13
  361. package/demos/pc/app/select/slot-default-composition-api.vue +49 -13
  362. package/demos/pc/app/select/slot-default.spec.ts +5 -2
  363. package/demos/pc/app/select/slot-default.vue +50 -14
  364. package/demos/pc/app/select/slot-empty-composition-api.vue +16 -3
  365. package/demos/pc/app/select/slot-empty.spec.ts +1 -1
  366. package/demos/pc/app/select/slot-empty.vue +18 -4
  367. package/demos/pc/app/select/webdoc/select.js +89 -16
  368. package/demos/pc/app/slider/basic-usage-composition-api.vue +1 -1
  369. package/demos/pc/app/slider/basic-usage.vue +1 -1
  370. package/demos/pc/app/switch/before-change-composition-api.vue +4 -1
  371. package/demos/pc/app/switch/before-change.vue +4 -3
  372. package/demos/pc/app/switch/custom-true-false-value-composition-api.vue +1 -1
  373. package/demos/pc/app/switch/custom-true-false-value.spec.ts +2 -2
  374. package/demos/pc/app/switch/custom-true-false-value.vue +1 -1
  375. package/demos/pc/app/switch/event-change-composition-api.vue +1 -1
  376. package/demos/pc/app/switch/event-change.vue +1 -1
  377. package/demos/pc/app/switch/webdoc/switch.cn.md +1 -1
  378. package/demos/pc/app/switch/webdoc/switch.js +1 -1
  379. package/demos/pc/app/tabs/webdoc/tabs.js +3 -3
  380. package/demos/pc/app/tag/webdoc/tag.js +1 -1
  381. package/demos/pc/app/tag-group/basic-usage.vue +1 -1
  382. package/demos/pc/app/tag-group/webdoc/tag-group.js +2 -2
  383. package/demos/pc/app/time-select/basic-usage-composition-api.vue +10 -2
  384. package/demos/pc/app/time-select/basic-usage.spec.ts +6 -5
  385. package/demos/pc/app/time-select/basic-usage.vue +10 -2
  386. package/demos/pc/app/time-select/clear-icon-composition-api.vue +17 -9
  387. package/demos/pc/app/time-select/clear-icon.spec.ts +7 -5
  388. package/demos/pc/app/time-select/clear-icon.vue +17 -9
  389. package/demos/pc/app/time-select/default-value-composition-api.vue +10 -2
  390. package/demos/pc/app/time-select/default-value.spec.ts +3 -2
  391. package/demos/pc/app/time-select/default-value.vue +10 -2
  392. package/demos/pc/app/time-select/editable-composition-api.vue +10 -2
  393. package/demos/pc/app/time-select/editable.vue +10 -2
  394. package/demos/pc/app/time-select/event-blur-composition-api.vue +8 -2
  395. package/demos/pc/app/time-select/event-blur.spec.ts +2 -2
  396. package/demos/pc/app/time-select/event-blur.vue +10 -4
  397. package/demos/pc/app/time-select/focus-composition-api.vue +12 -3
  398. package/demos/pc/app/time-select/focus.spec.ts +5 -4
  399. package/demos/pc/app/time-select/focus.vue +12 -3
  400. package/demos/pc/app/time-select/picker-options-composition-api.vue +21 -13
  401. package/demos/pc/app/time-select/picker-options.spec.ts +1 -1
  402. package/demos/pc/app/time-select/picker-options.vue +21 -13
  403. package/demos/pc/app/time-select/range-placeholder-composition-api.vue +17 -3
  404. package/demos/pc/app/time-select/range-placeholder.spec.ts +16 -13
  405. package/demos/pc/app/time-select/range-placeholder.vue +17 -3
  406. package/demos/pc/app/time-select/size-medium-composition-api.vue +15 -2
  407. package/demos/pc/app/time-select/size-medium.spec.ts +5 -1
  408. package/demos/pc/app/time-select/size-medium.vue +15 -2
  409. package/demos/pc/app/time-select/suffix-icon-composition-api.vue +8 -2
  410. package/demos/pc/app/time-select/suffix-icon.vue +8 -2
  411. package/demos/pc/app/time-select/webdoc/time-select.js +57 -78
  412. package/demos/pc/app/toggle-menu/webdoc/toggle-menu.js +2 -2
  413. package/demos/pc/app/transfer/basic-usage.spec.ts +1 -1
  414. package/demos/pc/app/transfer/before-transfer.spec.ts +1 -1
  415. package/demos/pc/app/transfer/custom-btns.spec.ts +1 -1
  416. package/demos/pc/app/transfer/custom-filter.spec.ts +1 -1
  417. package/demos/pc/app/transfer/custom-footer.spec.ts +2 -1
  418. package/demos/pc/app/transfer/custom-render.spec.ts +1 -1
  419. package/demos/pc/app/transfer/custom-titles.spec.ts +1 -1
  420. package/demos/pc/app/transfer/default-checked.spec.ts +1 -1
  421. package/demos/pc/app/transfer/drop-config.spec.ts +1 -1
  422. package/demos/pc/app/transfer/nested-table.spec.ts +1 -1
  423. package/demos/pc/app/transfer/nested-tree.spec.ts +1 -1
  424. package/demos/pc/app/transfer/target-order.spec.ts +1 -1
  425. package/demos/pc/app/transfer/transfer-events.spec.ts +1 -1
  426. package/demos/pc/app/transfer/webdoc/transfer.cn.md +1 -1
  427. package/demos/pc/app/transfer/webdoc/transfer.en.md +3 -3
  428. package/demos/pc/app/transfer/webdoc/transfer.js +76 -43
  429. package/demos/pc/app/tree/basic-usage.spec.ts +1 -1
  430. package/demos/pc/app/tree/check-op.spec.ts +1 -1
  431. package/demos/pc/app/tree/checkbox.spec.ts +1 -1
  432. package/demos/pc/app/tree/contextmenu.spec.ts +1 -1
  433. package/demos/pc/app/tree/drag.spec.ts +1 -1
  434. package/demos/pc/app/tree/edit.spec.ts +1 -1
  435. package/demos/pc/app/tree/expand-control.spec.ts +1 -1
  436. package/demos/pc/app/tree/filter-view.spec.ts +1 -1
  437. package/demos/pc/app/tree/icons.spec.ts +1 -1
  438. package/demos/pc/app/tree/lazy.spec.ts +1 -1
  439. package/demos/pc/app/tree/node-hl.spec.ts +1 -1
  440. package/demos/pc/app/tree/node-op.spec.ts +1 -1
  441. package/demos/pc/app/tree/other.spec.ts +1 -1
  442. package/demos/pc/app/tree/props.spec.ts +1 -1
  443. package/demos/pc/app/tree/radio.spec.ts +1 -1
  444. package/demos/pc/app/tree/slot.spec.ts +1 -1
  445. package/demos/pc/app/tree/webdoc/tree.cn.md +1 -1
  446. package/demos/pc/app/tree/webdoc/tree.en.md +1 -1
  447. package/demos/pc/app/tree/webdoc/tree.js +67 -19
  448. package/demos/pc/app/tree-menu/custom-icon.spec.ts +1 -0
  449. package/demos/pc/app/tree-menu/only-check-children.spec.ts +24 -2
  450. package/demos/pc/app/tree-menu/props.spec.ts +22 -2
  451. package/demos/pc/app/tree-menu/show-expand.spec.ts +36 -4
  452. package/demos/pc/app/tree-menu/show-filter.spec.ts +54 -3
  453. package/demos/pc/app/tree-menu/show-number.spec.ts +14 -1
  454. package/demos/pc/app/tree-menu/webdoc/tree-menu.js +4 -4
  455. package/demos/pc/app/user-head/image-user-head-composition-api.vue +1 -1
  456. package/demos/pc/app/user-head/image-user-head.vue +1 -1
  457. package/demos/pc/app/user-head/webdoc/user-head.js +17 -17
  458. package/demos/pc/app/watermark/webdoc/watermark.js +32 -16
  459. package/demos/pc/menus.js +6 -1
  460. package/demos/pc/webdoc/form-valid-en.md +9 -3
  461. package/demos/pc/webdoc/form-valid.md +3 -1
  462. package/demos/pc/webdoc/theme-en.md +10 -8
  463. package/package.json +9 -8
  464. package/playground/App.vue +9 -0
  465. package/demos/mobile/app/button/event-click.vue +0 -40
  466. package/demos/mobile/app/button/native-type.vue +0 -105
  467. package/demos/mobile/app/button/plain.vue +0 -33
  468. package/demos/mobile/app/button/round.vue +0 -34
  469. package/demos/mobile/app/button/text.vue +0 -38
  470. package/demos/pc/app/calendar-view/hide-mode-composition-api.vue +0 -7
  471. package/demos/pc/app/calendar-view/hide-mode.vue +0 -13
  472. package/demos/pc/app/calendar-view/mode-combination-composition-api.vue +0 -7
  473. package/demos/pc/app/calendar-view/mode-combination.vue +0 -14
  474. package/demos/pc/app/file-upload/upload-limit-composition-api.vue +0 -22
  475. package/demos/pc/app/file-upload/upload-limit.spec.ts +0 -20
  476. package/demos/pc/app/file-upload/upload-limit.vue +0 -32
  477. package/demos/pc/app/time-select/default-time-composition-api.vue +0 -11
  478. package/demos/pc/app/time-select/default-time.vue +0 -19
  479. package/demos/pc/app/time-select/disabled-composition-api.vue +0 -10
  480. package/demos/pc/app/time-select/disabled.spec.ts +0 -8
  481. package/demos/pc/app/time-select/disabled.vue +0 -18
  482. package/demos/pc/app/time-select/event-change-composition-api.vue +0 -16
  483. package/demos/pc/app/time-select/event-change.vue +0 -25
  484. package/demos/pc/app/time-select/popper-class-composition-api.vue +0 -27
  485. package/demos/pc/app/time-select/popper-class.spec.ts +0 -9
  486. package/demos/pc/app/time-select/popper-class.vue +0 -35
  487. package/demos/pc/app/time-select/size-mini-composition-api.vue +0 -10
  488. package/demos/pc/app/time-select/size-mini.spec.ts +0 -8
  489. package/demos/pc/app/time-select/size-mini.vue +0 -18
  490. package/demos/pc/app/time-select/size-small-composition-api.vue +0 -10
  491. package/demos/pc/app/time-select/size-small.spec.ts +0 -8
  492. package/demos/pc/app/time-select/size-small.vue +0 -18
  493. package/demos/pc/resource/user-group-2.png +0 -0
  494. package/demos/pc/resource/user-group.png +0 -0
@@ -3,14 +3,15 @@
3
3
  <tiny-alert :icon="TinyIconBoat" description="自定义图标"></tiny-alert>
4
4
  <tiny-alert description="默认图标"></tiny-alert>
5
5
  <tiny-alert type="success" description="type 为 success 的默认图标"></tiny-alert>
6
- <tiny-alert type="warning" description="type 为 warning 的默认图标"></tiny-alert>
6
+ <tiny-alert :icon="TinyIconWarningTriangle" type="warning" description="type 为 warning 的默认图标"></tiny-alert>
7
7
  <tiny-alert type="error" description="type 为 error 的默认图标"></tiny-alert>
8
8
  </div>
9
9
  </template>
10
10
 
11
11
  <script setup>
12
12
  import { Alert as TinyAlert } from '@opentiny/vue'
13
- import { iconBoat } from '@opentiny/vue-icon'
13
+ import { iconBoat, iconWarningTriangle } from '@opentiny/vue-icon'
14
14
 
15
15
  const TinyIconBoat = iconBoat()
16
+ const TinyIconWarningTriangle = iconWarningTriangle()
16
17
  </script>
@@ -3,14 +3,14 @@
3
3
  <tiny-alert :icon="TinyIconBoat" description="自定义图标"></tiny-alert>
4
4
  <tiny-alert description="默认图标"></tiny-alert>
5
5
  <tiny-alert type="success" description="type 为 success 的默认图标"></tiny-alert>
6
- <tiny-alert type="warning" description="type 为 warning 的默认图标"></tiny-alert>
6
+ <tiny-alert :icon="TinyIconWarningTriangle" type="warning" description="type 为 warning 的默认图标"></tiny-alert>
7
7
  <tiny-alert type="error" description="type 为 error 的默认图标"></tiny-alert>
8
8
  </div>
9
9
  </template>
10
10
 
11
11
  <script>
12
12
  import { Alert } from '@opentiny/vue'
13
- import { iconBoat } from '@opentiny/vue-icon'
13
+ import { iconBoat, iconWarningTriangle } from '@opentiny/vue-icon'
14
14
 
15
15
  export default {
16
16
  components: {
@@ -18,7 +18,8 @@ export default {
18
18
  },
19
19
  data() {
20
20
  return {
21
- TinyIconBoat: iconBoat()
21
+ TinyIconBoat: iconBoat(),
22
+ TinyIconWarningTriangle: iconWarningTriangle()
22
23
  }
23
24
  }
24
25
  }
@@ -132,7 +132,7 @@ export default {
132
132
  },
133
133
  {
134
134
  'name': 'icon',
135
- 'type': 'VueComponent',
135
+ 'type': 'Component',
136
136
  'defaultValue': '--',
137
137
  'desc': {
138
138
  'zh-CN': '传入图标组件自定义警告的图标,默认会根据 type 值自动使用对应图标',
@@ -174,7 +174,8 @@ export default {
174
174
  },
175
175
  {
176
176
  'name': 'type',
177
- 'type': "'success' | 'warning' | 'info' | 'error'",
177
+ 'type': 'IType',
178
+ 'typeAnchorName': 'IType',
178
179
  'defaultValue': "'info'",
179
180
  'desc': {
180
181
  'zh-CN': '警告的类型',
@@ -238,5 +239,14 @@ export default {
238
239
  }
239
240
  ]
240
241
  }
242
+ ],
243
+ types: [
244
+ {
245
+ name: 'IType',
246
+ type: 'type',
247
+ code: `
248
+ type IType = 'success' | 'warning' | 'info' | 'error' | 'simple'
249
+ `
250
+ }
241
251
  ]
242
252
  }
@@ -19,29 +19,29 @@ const links = ref([
19
19
  {
20
20
  key: 'basic-usage',
21
21
  link: '#basic-usage',
22
- title: 'Basic Usage'
22
+ title: '基本用法'
23
23
  },
24
24
  {
25
25
  key: 'is-affix',
26
26
  link: '#is-affix',
27
- title: 'Is Affix'
27
+ title: '固定模式'
28
28
  },
29
29
  {
30
30
  key: 'set-container',
31
31
  link: '#set-container',
32
- title: 'Set Container'
32
+ title: '滚动容器'
33
33
  },
34
34
  {
35
35
  key: 'on-change',
36
- link: '#on-change',
37
- title: 'On Change'
36
+ link: '#change',
37
+ title: 'change 事件'
38
38
  }
39
39
  ]
40
40
  },
41
41
  {
42
42
  key: 'api',
43
- link: '#api',
44
- title: 'Api'
43
+ link: '#API',
44
+ title: 'API'
45
45
  }
46
46
  ])
47
47
 
@@ -6,7 +6,7 @@ test('基本用法', async ({ page }) => {
6
6
 
7
7
  const anchor = page.locator('.tiny-anchor')
8
8
  const link1 = anchor.getByRole('link', { name: '演示' })
9
- const link2 = anchor.getByRole('link', { name: 'On Change' })
9
+ const link2 = anchor.getByRole('link', { name: 'change 事件' })
10
10
  const hash1 = await page.evaluate(() => window.location.hash)
11
11
 
12
12
  await link1.click()
@@ -18,5 +18,5 @@ test('基本用法', async ({ page }) => {
18
18
  await link2.click()
19
19
  const hash3 = await page.evaluate(() => window.location.hash)
20
20
 
21
- await expect(hash3).toContain('#on-change')
21
+ await expect(hash3).toContain('#change')
22
22
  })
@@ -27,29 +27,29 @@ export default {
27
27
  {
28
28
  key: 'basic-usage',
29
29
  link: '#basic-usage',
30
- title: 'Basic Usage'
30
+ title: '基本用法'
31
31
  },
32
32
  {
33
33
  key: 'is-affix',
34
34
  link: '#is-affix',
35
- title: 'Is Affix'
35
+ title: '固定模式'
36
36
  },
37
37
  {
38
38
  key: 'set-container',
39
39
  link: '#set-container',
40
- title: 'Set Container'
40
+ title: '滚动容器'
41
41
  },
42
42
  {
43
43
  key: 'on-change',
44
- link: '#on-change',
45
- title: 'On Change'
44
+ link: '#change',
45
+ title: 'change 事件'
46
46
  }
47
47
  ]
48
48
  },
49
49
  {
50
50
  key: 'api',
51
- link: '#api',
52
- title: 'Api'
51
+ link: '#API',
52
+ title: 'API'
53
53
  }
54
54
  ],
55
55
  type: 'dot'
@@ -15,29 +15,29 @@ const links = ref([
15
15
  {
16
16
  key: 'basic-usage',
17
17
  link: '#basic-usage',
18
- title: 'Basic Usage'
18
+ title: '基本用法'
19
19
  },
20
20
  {
21
21
  key: 'is-affix',
22
22
  link: '#is-affix',
23
- title: 'Is Affix'
23
+ title: '固定模式'
24
24
  },
25
25
  {
26
26
  key: 'set-container',
27
27
  link: '#set-container',
28
- title: 'Set Container'
28
+ title: '滚动容器'
29
29
  },
30
30
  {
31
31
  key: 'on-change',
32
- link: '#on-change',
33
- title: 'On Change'
32
+ link: '#change',
33
+ title: 'change 事件'
34
34
  }
35
35
  ]
36
36
  },
37
37
  {
38
38
  key: 'api',
39
- link: '#api',
40
- title: 'Api'
39
+ link: '#API',
40
+ title: 'API'
41
41
  }
42
42
  ])
43
43
 
@@ -6,12 +6,12 @@ test('change事件', async ({ page }) => {
6
6
 
7
7
  const anchor = page.locator('.tiny-anchor')
8
8
  const link1 = anchor.getByRole('link', { name: '演示' })
9
- const link2 = anchor.getByRole('link', { name: 'On Change' })
9
+ const link2 = anchor.getByRole('link', { name: 'change 事件' })
10
10
  const modal = page.locator('.tiny-modal')
11
11
 
12
12
  await link1.click()
13
13
  await expect(modal).toHaveCount(1)
14
14
  await link2.click()
15
15
  await expect(modal).toHaveCount(2)
16
- await expect(modal.last()).toHaveText(/#on-change/)
16
+ await expect(modal.last()).toHaveText(/#change/)
17
17
  })
@@ -20,29 +20,29 @@ export default {
20
20
  {
21
21
  key: 'basic-usage',
22
22
  link: '#basic-usage',
23
- title: 'Basic Usage'
23
+ title: '基本用法'
24
24
  },
25
25
  {
26
26
  key: 'is-affix',
27
27
  link: '#is-affix',
28
- title: 'Is Affix'
28
+ title: '固定模式'
29
29
  },
30
30
  {
31
31
  key: 'set-container',
32
32
  link: '#set-container',
33
- title: 'Set Container'
33
+ title: '滚动容器'
34
34
  },
35
35
  {
36
36
  key: 'on-change',
37
- link: '#on-change',
38
- title: 'On Change'
37
+ link: '#change',
38
+ title: 'change 事件'
39
39
  }
40
40
  ]
41
41
  },
42
42
  {
43
43
  key: 'api',
44
- link: '#api',
45
- title: 'Api'
44
+ link: '#API',
45
+ title: 'API'
46
46
  }
47
47
  ]
48
48
  }
@@ -22,29 +22,29 @@ const links = ref([
22
22
  {
23
23
  key: 'basic-usage',
24
24
  link: '#basic-usage',
25
- title: 'Basic Usage'
25
+ title: '基本用法'
26
26
  },
27
27
  {
28
28
  key: 'is-affix',
29
29
  link: '#is-affix',
30
- title: 'Is Affix'
30
+ title: '固定模式'
31
31
  },
32
32
  {
33
33
  key: 'set-container',
34
34
  link: '#set-container',
35
- title: 'Set Container'
35
+ title: '滚动容器'
36
36
  },
37
37
  {
38
38
  key: 'on-change',
39
- link: '#on-change',
40
- title: 'On Change'
39
+ link: '#change',
40
+ title: 'change 事件'
41
41
  }
42
42
  ]
43
43
  },
44
44
  {
45
45
  key: 'api',
46
- link: '#api',
47
- title: 'Api'
46
+ link: '#API',
47
+ title: 'API'
48
48
  }
49
49
  ])
50
50
  </script>
@@ -28,29 +28,29 @@ export default {
28
28
  {
29
29
  key: 'basic-usage',
30
30
  link: '#basic-usage',
31
- title: 'Basic Usage'
31
+ title: '基本用法'
32
32
  },
33
33
  {
34
34
  key: 'is-affix',
35
35
  link: '#is-affix',
36
- title: 'Is Affix'
36
+ title: '固定模式'
37
37
  },
38
38
  {
39
39
  key: 'set-container',
40
40
  link: '#set-container',
41
- title: 'Set Container'
41
+ title: '滚动容器'
42
42
  },
43
43
  {
44
44
  key: 'on-change',
45
- link: '#on-change',
46
- title: 'On Change'
45
+ link: '#change',
46
+ title: 'change 事件'
47
47
  }
48
48
  ]
49
49
  },
50
50
  {
51
51
  key: 'api',
52
- link: '#api',
53
- title: 'Api'
52
+ link: '#API',
53
+ title: 'API'
54
54
  }
55
55
  ]
56
56
  }
@@ -52,7 +52,7 @@ export default {
52
52
  'defaultValue': '',
53
53
  'desc': {
54
54
  'zh-CN':
55
- '用于单页面 hash 路由模式时指定滚动容器的id值,id为空时则滚动容器默认为 HTML 文档的根节点 body 元素',
55
+ '用于单页面 hash 路由模式时指定滚动容器的 id 值,id 为空时则滚动容器默认为 HTML 文档的根节点 body 元素',
56
56
  'en-US':
57
57
  'When used in single page hash routing mode, specify the id value of the scrolling container. If the id is empty, the scrolling container defaults to the body element of the root node of the HTML document'
58
58
  },
@@ -71,7 +71,7 @@ export default {
71
71
  'typeAnchorName': 'ILink',
72
72
  'defaultValue': '',
73
73
  'desc': {
74
- 'zh-CN': '导航数据配置项,可通过children嵌套',
74
+ 'zh-CN': '导航数据配置项,可通过 children 嵌套',
75
75
  'en-US': 'Navigation data configuration items can be nested through children'
76
76
  },
77
77
  'demoId': 'basic-usage'
@@ -89,7 +89,7 @@ export default {
89
89
  {
90
90
  'name': 'type',
91
91
  'type': '"line" | "dot"',
92
- 'defaultValue': '"line"',
92
+ 'defaultValue': `'line'`,
93
93
  'desc': {
94
94
  'zh-CN': '锚点类型',
95
95
  'en-US': 'Anchor type'
@@ -113,7 +113,7 @@ export default {
113
113
  'type': '(hash: string) => void',
114
114
  'defaultValue': '',
115
115
  'desc': {
116
- 'zh-CN': '使用change代替;[deprecated v3.12.0废弃,v3.17.0移除;移除原因:命名规范]',
116
+ 'zh-CN': '使用 change 代替;[deprecated v3.12.0 废弃,v3.17.0 移除;移除原因:命名规范]',
117
117
  'en-US':
118
118
  'use change instead [deprecated v3.12.0 abandoned, v3.17.0 removed; reason for removal: naming convention]'
119
119
  },
@@ -271,14 +271,14 @@ export default {
271
271
  },
272
272
  {
273
273
  'name': 'prefix-icon',
274
- 'type': 'VueComponent',
274
+ 'type': 'Component',
275
275
  'defaultValue': '',
276
276
  'desc': { 'zh-CN': '输入框头部图标', 'en-US': 'Icon on the header of the text box' },
277
277
  'demoId': 'custom-icon'
278
278
  },
279
279
  {
280
280
  'name': 'suffix-icon',
281
- 'type': 'VueComponent',
281
+ 'type': 'Component',
282
282
  'defaultValue': '',
283
283
  'desc': { 'zh-CN': '输入框尾部图标', 'en-US': 'Icon at the end of the text box' },
284
284
  'demoId': 'custom-icon'
@@ -142,7 +142,7 @@ export default {
142
142
  'zh-CN': '指定跳转的目标页面地址',
143
143
  'en-US': 'Specify the URL of the target page.'
144
144
  },
145
- 'demoId': 'target'
145
+ 'demoId': 'link'
146
146
  },
147
147
  {
148
148
  'name': 'is-dot',
@@ -160,7 +160,7 @@ export default {
160
160
  },
161
161
  {
162
162
  'name': 'icon',
163
- 'type': 'VueComponent',
163
+ 'type': 'Component',
164
164
  'defaultValue': '--',
165
165
  'desc': {
166
166
  'zh-CN': '按钮左侧展示的图标,接收为Icon组件',
@@ -10,6 +10,7 @@ test('按钮组基本示例', async ({ page }) => {
10
10
  const button3 = demo.getByRole('button', { name: 'Button3' })
11
11
 
12
12
  await button3.click()
13
+ await demo.getByRole('button', { name: 'Button2' }).hover()
13
14
  await expect(buttonGroup.locator('li').nth(2)).toHaveClass('active')
14
15
  await expect(button3).toHaveCSS('background-color', 'rgb(94, 124, 224)')
15
16
  await expect(button3).toHaveCSS('border-bottom-color', 'rgb(94, 124, 224)')
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <div>
3
+ <tiny-button-group :data="groupData" v-model="checkedVal"></tiny-button-group>
4
+ <tiny-button-group :data="groupData" v-model="checkedVal">
5
+ <span class="custom-empty">自定义空数据</span>
6
+ </tiny-button-group>
7
+ </div>
8
+ </template>
9
+
10
+ <script setup>
11
+ import { ref } from 'vue'
12
+ import { ButtonGroup as TinyButtonGroup } from '@opentiny/vue'
13
+
14
+ const checkedVal = ref('')
15
+ const groupData = ref([])
16
+ </script>
17
+
18
+ <style scoped>
19
+ .custom-empty {
20
+ color: #fac20a;
21
+ }
22
+ .tiny-button-group + .tiny-button-group {
23
+ margin-left: 20px;
24
+ }
25
+ </style>
@@ -0,0 +1,11 @@
1
+ import { test, expect } from '@playwright/test'
2
+
3
+ test('空数据插槽', async ({ page }) => {
4
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
5
+ await page.goto('button-group#slot-empty')
6
+
7
+ const demo = page.locator('#slot-empty')
8
+ const emptySlot = demo.locator('.tiny-button-group .tiny-button-group--empty')
9
+ await expect(emptySlot.first()).toHaveCSS('color', 'rgb(173, 176, 184)')
10
+ await expect(demo.locator('.tiny-button-group .custom-empty')).toHaveCSS('color', 'rgb(250, 194, 10)')
11
+ })
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div>
3
+ <tiny-button-group :data="groupData" v-model="checkedVal"></tiny-button-group>
4
+ <tiny-button-group :data="groupData" v-model="checkedVal">
5
+ <span class="custom-empty">自定义空数据</span>
6
+ </tiny-button-group>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ import { ButtonGroup } from '@opentiny/vue'
12
+
13
+ export default {
14
+ components: {
15
+ TinyButtonGroup: ButtonGroup
16
+ },
17
+ data() {
18
+ return {
19
+ checkedVal: '',
20
+ groupData: []
21
+ }
22
+ }
23
+ }
24
+ </script>
25
+
26
+ <style scoped>
27
+ .custom-empty {
28
+ color: #fac20a;
29
+ }
30
+ .tiny-button-group + .tiny-button-group {
31
+ margin-left: 20px;
32
+ }
33
+ </style>
@@ -86,6 +86,15 @@ export default {
86
86
  },
87
87
  'codeFiles': ['slot-default.vue']
88
88
  },
89
+ {
90
+ 'demoId': 'slot-empty',
91
+ 'name': { 'zh-CN': '空数据插槽', 'en-US': 'Empty slot' },
92
+ 'desc': {
93
+ 'zh-CN': '<p>当数据为空时,默认会显示暂无数据,通过默认插槽自定义内容。</p>',
94
+ 'en-US': '<p>When the data is empty, customize the content via the <code>empty</code> slot.</p>'
95
+ },
96
+ 'codeFiles': ['slot-empty.vue']
97
+ },
89
98
  {
90
99
  'demoId': 'button-group-multiple',
91
100
  'name': { 'zh-CN': '多行按钮组', 'en-US': 'Button Group Multiple' },
@@ -2,6 +2,6 @@
2
2
  <tiny-calendar></tiny-calendar>
3
3
  </template>
4
4
 
5
- <script setup lang="jsx">
5
+ <script setup>
6
6
  import { Calendar as TinyCalendar } from '@opentiny/vue'
7
7
  </script>
@@ -0,0 +1,33 @@
1
+ import { test, expect } from '@playwright/test'
2
+
3
+ test('基本用法', async ({ page }) => {
4
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
5
+ await page.goto('calendar#basic-usage')
6
+ const pcDemo = page.locator('.pc-demo')
7
+ const nowMonth = new Date().getMonth() + 1
8
+ const today = page.locator('.today')
9
+ const selectedDay = page.getByRole('cell', { name: '14' }).locator('div').first()
10
+ const selectedMonth = page.getByRole('cell', { name: '7 月' }).locator('div').first()
11
+ // 校验日期,查看页面显示是否是月
12
+ await pcDemo.getByRole('listitem').filter({ hasText: '月' }).nth(2).click()
13
+ await expect(pcDemo.locator('.tiny-calendar > div').last()).toHaveClass(/month/)
14
+ // 校验日期选择,选中的样式有selected
15
+ await selectedDay.click()
16
+ await expect(selectedDay).toHaveClass(/selected/)
17
+ // 校验今天按钮,选中的样式有selected today
18
+ await pcDemo.getByRole('button', { name: '今天' }).click()
19
+ await expect(today).toHaveClass(/selected/)
20
+
21
+ // 校验年里的月份代码逻辑一致
22
+ await pcDemo.getByRole('listitem').filter({ hasText: '年' }).nth(2).click()
23
+ await expect(pcDemo.locator('.tiny-calendar > div').last()).toHaveClass(/year/)
24
+ await selectedMonth.click()
25
+ await expect(selectedMonth).toHaveClass(/selected/)
26
+ await pcDemo.getByRole('button', { name: '本月' }).click()
27
+ await expect(
28
+ pcDemo
29
+ .getByRole('cell', { name: `${nowMonth}` + ' 月' })
30
+ .locator('div')
31
+ .first()
32
+ ).toHaveClass(/selected/)
33
+ })
@@ -2,7 +2,7 @@
2
2
  <tiny-calendar></tiny-calendar>
3
3
  </template>
4
4
 
5
- <script lang="jsx">
5
+ <script>
6
6
  import { Calendar } from '@opentiny/vue'
7
7
 
8
8
  export default {
@@ -2,6 +2,6 @@
2
2
  <tiny-calendar mode="year"></tiny-calendar>
3
3
  </template>
4
4
 
5
- <script setup lang="jsx">
5
+ <script setup>
6
6
  import { Calendar as TinyCalendar } from '@opentiny/vue'
7
7
  </script>
@@ -0,0 +1,33 @@
1
+ import { test, expect } from '@playwright/test'
2
+
3
+ test('显示模式', async ({ page }) => {
4
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
5
+ await page.goto('calendar#calendar-mode')
6
+ const pcDemo = page.locator('.pc-demo')
7
+ const nowMonth = new Date().getMonth() + 1
8
+ const today = page.locator('.today')
9
+ const selectedDay = page.getByRole('cell', { name: '14' }).locator('div').first()
10
+ const selectedMonth = page.getByRole('cell', { name: '7 月' }).locator('div').first()
11
+ // 校验日期,查看页面显示是否是月
12
+ await pcDemo.getByRole('listitem').filter({ hasText: '月' }).nth(2).click()
13
+ await expect(pcDemo.locator('.tiny-calendar > div').last()).toHaveClass(/month/)
14
+ // 校验日期选择,选中的样式有selected
15
+ await selectedDay.click()
16
+ await expect(selectedDay).toHaveClass(/selected/)
17
+ // 校验今天按钮,选中的样式有selected today
18
+ await pcDemo.getByRole('button', { name: '今天' }).click()
19
+ await expect(today).toHaveClass(/selected/)
20
+
21
+ // 校验年里的月份代码逻辑一致
22
+ await pcDemo.getByRole('listitem').filter({ hasText: '年' }).nth(2).click()
23
+ await expect(pcDemo.locator('.tiny-calendar > div').last()).toHaveClass(/year/)
24
+ await selectedMonth.click()
25
+ await expect(selectedMonth).toHaveClass(/selected/)
26
+ await pcDemo.getByRole('button', { name: '本月' }).click()
27
+ await expect(
28
+ pcDemo
29
+ .getByRole('cell', { name: `${nowMonth}` + ' 月' })
30
+ .locator('div')
31
+ .first()
32
+ ).toHaveClass(/selected/)
33
+ })
@@ -2,7 +2,7 @@
2
2
  <tiny-calendar mode="year"></tiny-calendar>
3
3
  </template>
4
4
 
5
- <script lang="jsx">
5
+ <script>
6
6
  import { Calendar } from '@opentiny/vue'
7
7
 
8
8
  export default {
@@ -6,13 +6,13 @@
6
6
  </tiny-calendar>
7
7
  </template>
8
8
 
9
- <script setup lang="jsx">
9
+ <script setup>
10
10
  import { Calendar as TinyCalendar, Button as TinyButton } from '@opentiny/vue'
11
11
 
12
12
  function toToday(scope) {
13
13
  let year = new Date().getFullYear()
14
- let month = new Date().getMonth() + 1
14
+ let month = new Date().getMonth()
15
15
  let day = new Date().getDate()
16
- scope.selectedDate = new Date(year + '-' + month + '-' + day).valueOf()
16
+ scope.selectedDate = new Date(year, month, day).valueOf()
17
17
  }
18
18
  </script>