@opentiny/vue-docs 2.2.4 → 2.2.6

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 (414) hide show
  1. package/demos/mobile/app/container/basic-usage.vue +105 -0
  2. package/demos/mobile/app/container/custom-width.vue +93 -0
  3. package/demos/mobile/app/container/webdoc/container.cn.md +7 -0
  4. package/demos/mobile/app/container/webdoc/container.en.md +7 -0
  5. package/demos/mobile/app/container/webdoc/container.js +80 -0
  6. package/demos/mobile/app/pull-refresh/animation-duration.vue +58 -12
  7. package/demos/mobile/app/pull-refresh/base.vue +32 -18
  8. package/demos/mobile/app/pull-refresh/disabled-pull-down.vue +66 -0
  9. package/demos/mobile/app/pull-refresh/disabled-pull-up.vue +67 -0
  10. package/demos/mobile/app/pull-refresh/{hasmore.vue → event.vue} +21 -20
  11. package/demos/mobile/app/pull-refresh/{enhance.vue → has-more.vue} +20 -25
  12. package/demos/mobile/app/pull-refresh/loosing-text.vue +55 -12
  13. package/demos/mobile/app/pull-refresh/pull-refresh-slot.vue +64 -15
  14. package/demos/mobile/app/pull-refresh/pull-up-distance.vue +74 -0
  15. package/demos/mobile/app/pull-refresh/pulling-text.vue +56 -12
  16. package/demos/mobile/app/pull-refresh/webdoc/pull-refresh.js +98 -120
  17. package/demos/mobile/app/tabs/before-leave.vue +3 -3
  18. package/demos/mobile/app/tabs/tabs-events.vue +7 -7
  19. package/demos/mobile/menus.js +4 -1
  20. package/demos/mobile-first/app/tabs/basic-usage.vue +3 -3
  21. package/demos/mobile-first/app/tabs/before-leave.vue +3 -3
  22. package/demos/mobile-first/app/tabs/change-title.vue +2 -2
  23. package/demos/mobile-first/app/tabs/custom-tab-content.vue +3 -3
  24. package/demos/mobile-first/app/tabs/custom-tab-title.vue +3 -3
  25. package/demos/mobile-first/app/tabs/position-bottom.vue +10 -10
  26. package/demos/mobile-first/app/tabs/position-left.vue +10 -10
  27. package/demos/mobile-first/app/tabs/position-right.vue +10 -10
  28. package/demos/mobile-first/app/tabs/position.vue +10 -10
  29. package/demos/mobile-first/app/tabs/prevent-tab-switching.vue +3 -3
  30. package/demos/mobile-first/app/tabs/stretch-wh.vue +3 -3
  31. package/demos/mobile-first/app/tabs/tab-style-bordercard.vue +10 -10
  32. package/demos/mobile-first/app/tabs/tab-style-card.vue +10 -10
  33. package/demos/mobile-first/app/tabs/tabdata-title.vue +4 -4
  34. package/demos/mobile-first/app/tabs/tabs-draggable.vue +1 -1
  35. package/demos/mobile-first/app/tabs/tabs-events-add.vue +3 -3
  36. package/demos/mobile-first/app/tabs/tabs-events-click.vue +3 -3
  37. package/demos/mobile-first/app/tabs/tabs-events-close.vue +4 -4
  38. package/demos/mobile-first/app/tabs/tabs-events-edit.vue +4 -4
  39. package/demos/mobile-first/app/tabs/tabs-separator.vue +8 -8
  40. package/demos/mobile-first/app/tabs/tabs-size.vue +3 -3
  41. package/demos/mobile-first/app/tabs/tabs-tabs.vue +2 -2
  42. package/demos/mobile-first/app/tabs/with-add.vue +1 -1
  43. package/demos/pc/app/action-menu/disabled.vue +2 -1
  44. package/demos/pc/app/action-menu/icon-composition-api.vue +73 -0
  45. package/demos/pc/app/action-menu/icon.vue +79 -0
  46. package/demos/pc/app/action-menu/popper-class.spec.ts +2 -1
  47. package/demos/pc/app/action-menu/webdoc/action-menu.js +42 -1
  48. package/demos/pc/app/autocomplete/webdoc/autocomplete.js +30 -16
  49. package/demos/pc/app/breadcrumb/webdoc/breadcrumb.js +3 -3
  50. package/demos/pc/app/button/basic-usage-composition-api.vue +2 -0
  51. package/demos/pc/app/button/basic-usage.vue +2 -0
  52. package/demos/pc/app/button/click-composition-api.vue +1 -1
  53. package/demos/pc/app/button/click.vue +1 -1
  54. package/demos/pc/app/button/dynamic-disabled-composition-api.vue +10 -1
  55. package/demos/pc/app/button/{dynamic-disabled.spec.js → dynamic-disabled.spec.ts} +4 -0
  56. package/demos/pc/app/button/dynamic-disabled.vue +12 -3
  57. package/demos/pc/app/button/ghost-composition-api.vue +26 -0
  58. package/demos/pc/app/button/ghost.spec.ts +69 -0
  59. package/demos/pc/app/button/ghost.vue +32 -0
  60. package/demos/pc/app/button/icon-composition-api.vue +2 -0
  61. package/demos/pc/app/button/icon.vue +2 -0
  62. package/demos/pc/app/button/loading-composition-api.vue +2 -0
  63. package/demos/pc/app/button/loading.vue +2 -0
  64. package/demos/pc/app/button/size-composition-api.vue +2 -0
  65. package/demos/pc/app/button/size.vue +2 -0
  66. package/demos/pc/app/button/text-composition-api.vue +1 -1
  67. package/demos/pc/app/button/text.vue +1 -1
  68. package/demos/pc/app/button/webdoc/button.js +28 -1
  69. package/demos/pc/app/button-group/button-group-multiple-composition-api.vue +9 -9
  70. package/demos/pc/app/button-group/button-group-multiple.vue +9 -9
  71. package/demos/pc/app/button-group/change-event-composition-api.vue +1 -1
  72. package/demos/pc/app/button-group/change-event.vue +1 -1
  73. package/demos/pc/app/button-group/show-edit-composition-api.vue +1 -1
  74. package/demos/pc/app/button-group/show-edit.vue +1 -1
  75. package/demos/pc/app/button-group/webdoc/button-group.js +2 -3
  76. package/demos/pc/app/carousel/webdoc/carousel.js +82 -49
  77. package/demos/pc/app/cascader/auto-load-checkStrictly-composition-api.vue +2 -1
  78. package/demos/pc/app/cascader/auto-load-checkStrictly.vue +2 -1
  79. package/demos/pc/app/cascader/auto-load-composition-api.vue +3 -1
  80. package/demos/pc/app/cascader/auto-load.vue +2 -1
  81. package/demos/pc/app/cascader/events-composition-api.vue +1 -1
  82. package/demos/pc/app/cascader/expand-trigger-composition-api.vue +195 -2
  83. package/demos/pc/app/cascader/show-all-levels-composition-api.vue +197 -2
  84. package/demos/pc/app/cascader/webdoc/cascader.js +27 -13
  85. package/demos/pc/app/cascader-panel/basic-usage-composition-api.vue +3 -1
  86. package/demos/pc/app/cascader-panel/basic-usage.vue +2 -1
  87. package/demos/pc/app/cascader-panel/cascader-panel-props-composition-api.vue +3 -1
  88. package/demos/pc/app/cascader-panel/cascader-panel-props.vue +3 -1
  89. package/demos/pc/app/cascader-panel/change-composition-api.vue +1 -2
  90. package/demos/pc/app/cascader-panel/change.vue +1 -1
  91. package/demos/pc/app/cascader-panel/webdoc/cascader-panel.js +5 -5
  92. package/demos/pc/app/color-picker/webdoc/color-picker.js +36 -18
  93. package/demos/pc/app/color-select-panel/webdoc/color-select-panel.js +32 -19
  94. package/demos/pc/app/config-provider/basic.spec.ts +9 -0
  95. package/demos/pc/app/config-provider/tag.spec.ts +12 -0
  96. package/demos/pc/app/config-provider/text-direct.spec.ts +11 -0
  97. package/demos/pc/app/config-provider/webdoc/config-provider.en.md +7 -0
  98. package/demos/pc/app/config-provider/webdoc/config-provider.js +27 -12
  99. package/demos/pc/app/container/basic-usage.spec.js +47 -2
  100. package/demos/pc/app/container/custom-with-height.spec.js +10 -2
  101. package/demos/pc/app/crop/webdoc/crop.js +53 -49
  102. package/demos/pc/app/dialog-box/webdoc/dialog-box.js +82 -83
  103. package/demos/pc/app/divider/webdoc/divider.js +25 -21
  104. package/demos/pc/app/dropdown/events-composition-api.vue +1 -1
  105. package/demos/pc/app/dropdown/events.spec.ts +1 -0
  106. package/demos/pc/app/dropdown/multi-level-composition-api.vue +4 -8
  107. package/demos/pc/app/dropdown/multi-level.spec.ts +16 -9
  108. package/demos/pc/app/dropdown/multi-level.vue +3 -7
  109. package/demos/pc/app/dropdown/show-icon-composition-api.vue +44 -21
  110. package/demos/pc/app/dropdown/show-icon.vue +42 -12
  111. package/demos/pc/app/dropdown/webdoc/dropdown.js +29 -8
  112. package/demos/pc/app/fall-menu/custom-menuitem.spec.ts +6 -9
  113. package/demos/pc/app/fall-menu/custom-slider-icon.spec.ts +10 -21
  114. package/demos/pc/app/fall-menu/data-resource.spec.ts +6 -9
  115. package/demos/pc/app/file-upload/abort-quest.spec.ts +6 -5
  116. package/demos/pc/app/file-upload/accept-file-image.spec.ts +9 -4
  117. package/demos/pc/app/file-upload/custom-trigger.spec.ts +1 -1
  118. package/demos/pc/app/file-upload/disabled.spec.ts +4 -5
  119. package/demos/pc/app/file-upload/drag-upload.spec.ts +1 -1
  120. package/demos/pc/app/file-upload/file-picture-card.spec.ts +7 -6
  121. package/demos/pc/app/file-upload/form-validation.spec.ts +2 -2
  122. package/demos/pc/app/file-upload/image-size.spec.ts +2 -2
  123. package/demos/pc/app/file-upload/max-file-count.spec.ts +6 -6
  124. package/demos/pc/app/file-upload/paste-upload-composition-api.vue +2 -2
  125. package/demos/pc/app/file-upload/paste-upload.spec.ts +19 -2
  126. package/demos/pc/app/file-upload/picture-card.spec.ts +6 -5
  127. package/demos/pc/app/file-upload/picture-list.spec.ts +2 -3
  128. package/demos/pc/app/file-upload/prevent-delete-file.spec.ts +1 -1
  129. package/demos/pc/app/file-upload/prevent-upload-file.spec.ts +1 -1
  130. package/demos/pc/app/file-upload/upload-events.spec.ts +6 -4
  131. package/demos/pc/app/file-upload/upload-file-list-slot.spec.ts +18 -0
  132. package/demos/pc/app/file-upload/upload-file-list-thumb-composition-api.vue +4 -3
  133. package/demos/pc/app/file-upload/upload-file-list-thumb.spec.ts +2 -2
  134. package/demos/pc/app/file-upload/upload-file-list-thumb.vue +4 -3
  135. package/demos/pc/app/file-upload/upload-file-list.spec.ts +9 -9
  136. package/demos/pc/app/file-upload/upload-limit.spec.ts +5 -8
  137. package/demos/pc/app/file-upload/upload-request.spec.ts +1 -1
  138. package/demos/pc/app/file-upload/upload-user-head.spec.ts +1 -1
  139. package/demos/pc/app/file-upload/webdoc/file-upload.js +4 -4
  140. package/demos/pc/app/file-upload//346/265/213/350/257/225.txt +1 -0
  141. package/demos/pc/app/form/custom-validation-rule-composition-api.vue +2 -14
  142. package/demos/pc/app/form/custom-validation-rule.vue +2 -8
  143. package/demos/pc/app/form/form-validate-field.vue +2 -2
  144. package/demos/pc/app/form/size.spec.ts +26 -6
  145. package/demos/pc/app/grid/custom-style/body-style-composition-api.vue +1 -1
  146. package/demos/pc/app/grid/custom-style/footer-style-composition-api.vue +64 -19
  147. package/demos/pc/app/grid/drag/row-drag-ctrl-composition-api.vue +4 -4
  148. package/demos/pc/app/grid/edit/trigger-mode-hm-editing-composition-api.vue +2 -2
  149. package/demos/pc/app/grid/edit/trigger-mode-hm-editing.vue +1 -1
  150. package/demos/pc/app/grid/event/cell-mouse-event-composition-api.vue +1 -1
  151. package/demos/pc/app/grid/event/context-menu-event-composition-api.vue +1 -0
  152. package/demos/pc/app/grid/event/edit-event-composition-api.vue +1 -1
  153. package/demos/pc/app/grid/expand/set-row-expansion-composition-api.vue +9 -4
  154. package/demos/pc/app/grid/loading/{grid-loading-off-tip-composition-api.vue → grid-custom-loading-composition-api.vue} +29 -4
  155. package/demos/pc/app/grid/loading/grid-custom-loading.spec.js +7 -0
  156. package/demos/pc/app/grid/loading/{grid-loading-off-tip.vue → grid-custom-loading.vue} +27 -1
  157. package/demos/pc/app/grid/operation-column/clear-and-set-radio-row-composition-api.vue +5 -1
  158. package/demos/pc/app/grid/operation-column/selection-operation-composition-api.vue +32 -0
  159. package/demos/pc/app/grid/size/grid-size-composition-api.vue +17 -0
  160. package/demos/pc/app/grid/slot/editor-slot-composition-api.vue +13 -7
  161. package/demos/pc/app/grid/sort/combinations-sort-composition-api.vue +3 -3
  162. package/demos/pc/app/grid/sort/combinations-sort.spec.js +3 -0
  163. package/demos/pc/app/grid/sort/combinations-sort.vue +3 -3
  164. package/demos/pc/app/grid/toolbar/insert-remove-rows-composition-api.vue +1 -1
  165. package/demos/pc/app/grid/toolbar/insert-remove-rows.vue +1 -1
  166. package/demos/pc/app/grid/toolbar/refresh-grid-composition-api.vue +105 -0
  167. package/demos/pc/app/grid/tree-table/set-tree-expansion-composition-api.vue +4 -4
  168. package/demos/pc/app/grid/validation/before-submit-validation-composition-api.vue +19 -2
  169. package/demos/pc/app/grid/validation/before-submit-validation.spec.js +5 -2
  170. package/demos/pc/app/grid/validation/before-submit-validation.vue +19 -2
  171. package/demos/pc/app/grid/webdoc/grid-loading.js +9 -5
  172. package/demos/pc/app/grid/webdoc/grid-size.js +2 -2
  173. package/demos/pc/app/grid/webdoc/grid-validation.js +1 -1
  174. package/demos/pc/app/grid/webdoc/grid.js +8 -1
  175. package/demos/pc/app/guide/callback-composition-api.vue +2 -2
  176. package/demos/pc/app/guide/callback.vue +2 -2
  177. package/demos/pc/app/guide/highlight-box-composition-api.vue +9 -8
  178. package/demos/pc/app/guide/highlight-box.vue +8 -2
  179. package/demos/pc/app/guide/offset-composition-api.vue +7 -2
  180. package/demos/pc/app/guide/offset.vue +7 -2
  181. package/demos/pc/app/guide/size-composition-api.vue +3 -8
  182. package/demos/pc/app/guide/size.vue +3 -8
  183. package/demos/pc/app/guide/webdoc/guide.js +2 -2
  184. package/demos/pc/app/image/basic-usage.spec.ts +9 -2
  185. package/demos/pc/app/image/events.spec.ts +3 -1
  186. package/demos/pc/app/image/lazy-composition-api.vue +2 -2
  187. package/demos/pc/app/image/lazy.spec.ts +7 -4
  188. package/demos/pc/app/image/lazy.vue +2 -2
  189. package/demos/pc/app/image/preview-in-dialog.spec.ts +15 -1
  190. package/demos/pc/app/image/preview.spec.ts +28 -13
  191. package/demos/pc/app/image/slot.spec.ts +3 -0
  192. package/demos/pc/app/input/webdoc/input.js +11 -11
  193. package/demos/pc/app/link/basic-usage-composition-api.vue +1 -1
  194. package/demos/pc/app/link/basic-usage.spec.ts +1 -1
  195. package/demos/pc/app/link/basic-usage.vue +1 -1
  196. package/demos/pc/app/link/config-href.spec.ts +2 -2
  197. package/demos/pc/app/link/custom-icon.spec.ts +5 -5
  198. package/demos/pc/app/link/dynamic-disable.spec.ts +11 -11
  199. package/demos/pc/app/link/focus-no-underline.spec.ts +3 -3
  200. package/demos/pc/app/link/link-style-composition-api.vue +6 -6
  201. package/demos/pc/app/link/link-style.spec.ts +36 -7
  202. package/demos/pc/app/link/link-style.vue +6 -6
  203. package/demos/pc/app/link/webdoc/link.js +20 -22
  204. package/demos/pc/app/link-menu/webdoc/link-menu.js +22 -22
  205. package/demos/pc/app/milestone/basic-usage-composition-api.vue +6 -6
  206. package/demos/pc/app/milestone/basic-usage.spec.ts +1 -1
  207. package/demos/pc/app/milestone/basic-usage.vue +6 -6
  208. package/demos/pc/app/milestone/line-style-composition-api.vue +6 -6
  209. package/demos/pc/app/milestone/line-style.vue +6 -6
  210. package/demos/pc/app/milestone/show-number-composition-api.vue +9 -7
  211. package/demos/pc/app/milestone/show-number.spec.ts +7 -7
  212. package/demos/pc/app/milestone/show-number.vue +9 -7
  213. package/demos/pc/app/milestone/solid-style-composition-api.vue +7 -7
  214. package/demos/pc/app/milestone/solid-style.spec.ts +7 -7
  215. package/demos/pc/app/milestone/solid-style.vue +7 -7
  216. package/demos/pc/app/milestone/webdoc/milestone.js +31 -12
  217. package/demos/pc/app/modal/webdoc/modal.js +80 -76
  218. package/demos/pc/app/nav-menu/basic-usage.spec.ts +2 -2
  219. package/demos/pc/app/nav-menu/before-skip-prevent.spec.ts +1 -1
  220. package/demos/pc/app/nav-menu/before-skip.spec.ts +1 -1
  221. package/demos/pc/app/nav-menu/custom-service.spec.ts +1 -2
  222. package/demos/pc/app/nav-menu/overflow.spec.ts +2 -2
  223. package/demos/pc/app/nav-menu/slot-logo.spec.ts +1 -1
  224. package/demos/pc/app/nav-menu/slot-toolbar.spec.ts +2 -2
  225. package/demos/pc/app/numeric/webdoc/numeric.js +33 -32
  226. package/demos/pc/app/search/basic-usage.spec.ts +1 -1
  227. package/demos/pc/app/search/clearable.spec.ts +1 -1
  228. package/demos/pc/app/search/events-composition-api.vue +6 -0
  229. package/demos/pc/app/search/events.spec.ts +9 -6
  230. package/demos/pc/app/search/events.vue +5 -0
  231. package/demos/pc/app/search/webdoc/search.js +14 -4
  232. package/demos/pc/app/slide-bar/webdoc/slide-bar.js +18 -12
  233. package/demos/pc/app/slider/webdoc/slider.js +23 -18
  234. package/demos/pc/app/steps/advanced-steps.spec.ts +3 -2
  235. package/demos/pc/app/steps/click-composition-api.vue +0 -1
  236. package/demos/pc/app/steps/click.spec.ts +1 -12
  237. package/demos/pc/app/steps/custom-steps-item.spec.ts +1 -1
  238. package/demos/pc/app/steps/node-status-composition-api.vue +1 -1
  239. package/demos/pc/app/steps/node-status.spec.ts +1 -1
  240. package/demos/pc/app/steps/node-status.vue +1 -1
  241. package/demos/pc/app/steps/normal-steps-composition-api.vue +1 -1
  242. package/demos/pc/app/steps/normal-steps.spec.ts +2 -2
  243. package/demos/pc/app/steps/normal-steps.vue +1 -1
  244. package/demos/pc/app/steps/only-number-composition-api.vue +1 -1
  245. package/demos/pc/app/steps/only-number.spec.ts +1 -1
  246. package/demos/pc/app/steps/only-number.vue +1 -1
  247. package/demos/pc/app/steps/show-divider-composition-api.vue +1 -1
  248. package/demos/pc/app/steps/show-divider.spec.ts +1 -1
  249. package/demos/pc/app/steps/show-divider.vue +1 -1
  250. package/demos/pc/app/steps/size-composition-api.vue +6 -9
  251. package/demos/pc/app/steps/size.spec.ts +1 -4
  252. package/demos/pc/app/steps/size.vue +4 -4
  253. package/demos/pc/app/steps/slot-active-node-desc-composition-api.vue +3 -1
  254. package/demos/pc/app/steps/slot-active-node-desc.spec.ts +1 -1
  255. package/demos/pc/app/steps/slot-active-node-desc.vue +3 -1
  256. package/demos/pc/app/steps/slot-description-composition-api.vue +6 -6
  257. package/demos/pc/app/steps/slot-description.spec.ts +1 -1
  258. package/demos/pc/app/steps/slot-description.vue +5 -5
  259. package/demos/pc/app/steps/slot-item-composition-api.vue +0 -1
  260. package/demos/pc/app/steps/slot-item.spec.ts +1 -7
  261. package/demos/pc/app/steps/slot-item.vue +0 -1
  262. package/demos/pc/app/steps/space.spec.ts +1 -1
  263. package/demos/pc/app/steps/text-position-composition-api.vue +1 -1
  264. package/demos/pc/app/steps/text-position.spec.ts +1 -4
  265. package/demos/pc/app/steps/text-position.vue +1 -1
  266. package/demos/pc/app/steps/vertical-steps.spec.ts +13 -19
  267. package/demos/pc/app/steps/webdoc/steps.js +18 -17
  268. package/demos/pc/app/tabs/basic-usage-composition-api.vue +4 -4
  269. package/demos/pc/app/tabs/basic-usage.vue +4 -4
  270. package/demos/pc/app/tabs/before-leave-composition-api.vue +3 -3
  271. package/demos/pc/app/tabs/before-leave.vue +3 -3
  272. package/demos/pc/app/tabs/custom-more-icon-composition-api.vue +1 -1
  273. package/demos/pc/app/tabs/custom-more-icon.vue +1 -1
  274. package/demos/pc/app/tabs/custom-tab-content-composition-api.vue +3 -3
  275. package/demos/pc/app/tabs/custom-tab-content.vue +3 -3
  276. package/demos/pc/app/tabs/custom-tab-title-composition-api.vue +3 -3
  277. package/demos/pc/app/tabs/custom-tab-title.vue +3 -3
  278. package/demos/pc/app/tabs/lazy-composition-api.vue +5 -3
  279. package/demos/pc/app/tabs/lazy.vue +5 -3
  280. package/demos/pc/app/tabs/position-composition-api.vue +22 -17
  281. package/demos/pc/app/tabs/position.spec.ts +4 -4
  282. package/demos/pc/app/tabs/position.vue +19 -18
  283. package/demos/pc/app/tabs/prevent-tab-switching-composition-api.vue +3 -3
  284. package/demos/pc/app/tabs/prevent-tab-switching.vue +3 -3
  285. package/demos/pc/app/tabs/stretch-wh-composition-api.vue +3 -3
  286. package/demos/pc/app/tabs/stretch-wh.vue +3 -3
  287. package/demos/pc/app/tabs/tab-style-bordercard-composition-api.vue +10 -10
  288. package/demos/pc/app/tabs/tab-style-bordercard.vue +10 -10
  289. package/demos/pc/app/tabs/tab-style-card-composition-api.vue +1 -1
  290. package/demos/pc/app/tabs/tab-style-card.vue +1 -1
  291. package/demos/pc/app/tabs/tabs-draggable-composition-api.vue +1 -1
  292. package/demos/pc/app/tabs/tabs-draggable.spec.ts +1 -7
  293. package/demos/pc/app/tabs/tabs-draggable.vue +1 -1
  294. package/demos/pc/app/tabs/tabs-events-click-composition-api.vue +3 -3
  295. package/demos/pc/app/tabs/tabs-events-click.vue +3 -3
  296. package/demos/pc/app/tabs/tabs-events-close-composition-api.vue +4 -4
  297. package/demos/pc/app/tabs/tabs-events-close.vue +4 -4
  298. package/demos/pc/app/tabs/tabs-events-edit-composition-api.vue +4 -4
  299. package/demos/pc/app/tabs/tabs-events-edit.vue +4 -4
  300. package/demos/pc/app/tabs/tabs-separator-composition-api.vue +7 -7
  301. package/demos/pc/app/tabs/tabs-separator.vue +7 -7
  302. package/demos/pc/app/tabs/tabs-size-composition-api.vue +3 -3
  303. package/demos/pc/app/tabs/tabs-size.vue +3 -3
  304. package/demos/pc/app/tabs/tooltip-composition-api.vue +17 -13
  305. package/demos/pc/app/tabs/tooltip.vue +17 -13
  306. package/demos/pc/app/tabs/webdoc/tabs.js +35 -35
  307. package/demos/pc/app/tabs/with-add-composition-api.vue +1 -1
  308. package/demos/pc/app/tabs/with-add.vue +1 -1
  309. package/demos/pc/app/tag/{before-delete-composition-api.vue → delete-composition-api.vue} +6 -16
  310. package/demos/pc/app/tag/delete.spec.ts +19 -0
  311. package/demos/pc/app/tag/{closable.vue → delete.vue} +22 -5
  312. package/demos/pc/app/tag/webdoc/tag.js +15 -7
  313. package/demos/pc/app/time-line/webdoc/time-line.js +12 -12
  314. package/demos/pc/app/toggle-menu/webdoc/toggle-menu.js +64 -55
  315. package/demos/pc/app/tooltip/content.spec.js +1 -1
  316. package/demos/pc/app/tooltip/custom-popper.spec.js +4 -4
  317. package/demos/pc/app/transfer/basic-usage.spec.ts +7 -20
  318. package/demos/pc/app/transfer/custom-btns.spec.ts +11 -19
  319. package/demos/pc/app/transfer/custom-filter.spec.ts +6 -4
  320. package/demos/pc/app/transfer/custom-footer.spec.ts +1 -2
  321. package/demos/pc/app/transfer/custom-render.spec.ts +7 -5
  322. package/demos/pc/app/transfer/custom-titles.spec.ts +5 -3
  323. package/demos/pc/app/transfer/default-checked.spec.ts +5 -9
  324. package/demos/pc/app/transfer/drop-config.spec.ts +21 -16
  325. package/demos/pc/app/transfer/manual-clear-query.spec.ts +2 -2
  326. package/demos/pc/app/transfer/nested-table.spec.ts +12 -35
  327. package/demos/pc/app/transfer/nested-tree.spec.ts +3 -30
  328. package/demos/pc/app/transfer/target-order.spec.ts +2 -1
  329. package/demos/pc/app/transfer/transfer-events.spec.ts +2 -1
  330. package/demos/pc/app/tree/basic-usage.spec.ts +26 -16
  331. package/demos/pc/app/tree/check-op.spec.ts +37 -19
  332. package/demos/pc/app/tree/checkbox.spec.ts +23 -18
  333. package/demos/pc/app/tree/contextmenu.spec.ts +9 -8
  334. package/demos/pc/app/tree/drag.spec.ts +10 -18
  335. package/demos/pc/app/tree/edit.spec.ts +24 -103
  336. package/demos/pc/app/tree/expand-control.spec.ts +22 -18
  337. package/demos/pc/app/tree/filter-view.spec.ts +16 -18
  338. package/demos/pc/app/tree/icons.spec.ts +20 -18
  339. package/demos/pc/app/tree/lazy.spec.ts +10 -18
  340. package/demos/pc/app/tree/node-hl.spec.ts +27 -18
  341. package/demos/pc/app/tree/node-op-composition-api.vue +12 -6
  342. package/demos/pc/app/tree/node-op.spec.ts +32 -19
  343. package/demos/pc/app/tree/other.spec.ts +5 -18
  344. package/demos/pc/app/tree/props.spec.ts +7 -18
  345. package/demos/pc/app/tree/radio.spec.ts +10 -18
  346. package/demos/pc/app/tree/slot.spec.ts +12 -18
  347. package/demos/pc/app/tree/webdoc/tree.js +2 -2
  348. package/demos/pc/app/tree-menu/accordion.spec.ts +3 -1
  349. package/demos/pc/app/tree-menu/basic-usage.spec.ts +4 -2
  350. package/demos/pc/app/tree-menu/current-node-composition-api.vue +7 -3
  351. package/demos/pc/app/tree-menu/current-node.spec.ts +20 -13
  352. package/demos/pc/app/tree-menu/current-node.vue +8 -6
  353. package/demos/pc/app/tree-menu/custom-icon.spec.ts +12 -2
  354. package/demos/pc/app/tree-menu/data-resource.spec.ts +33 -21
  355. package/demos/pc/app/tree-menu/default-expand-all.spec.ts +25 -8
  356. package/demos/pc/app/tree-menu/default-expanded-keys-highlight.spec.ts +6 -4
  357. package/demos/pc/app/tree-menu/default-expanded-keys.spec.ts +11 -7
  358. package/demos/pc/app/tree-menu/draggable.spec.ts +11 -4
  359. package/demos/pc/app/tree-menu/empty-text.spec.ts +1 -1
  360. package/demos/pc/app/tree-menu/event-allow-draggable.spec.ts +4 -1
  361. package/demos/pc/app/tree-menu/events.spec.ts +56 -28
  362. package/demos/pc/app/tree-menu/expand-on-click-node.spec.ts +32 -3
  363. package/demos/pc/app/tree-menu/filter-node-method.spec.ts +9 -6
  364. package/demos/pc/app/tree-menu/filter-node-method.vue +0 -4
  365. package/demos/pc/app/tree-menu/indent.spec.ts +9 -4
  366. package/demos/pc/app/tree-menu/lazy-load.spec.ts +8 -4
  367. package/demos/pc/app/tree-menu/menu-collapsible.spec.ts +5 -2
  368. package/demos/pc/app/tree-menu/show-checkbox.spec.ts +79 -41
  369. package/demos/pc/app/tree-menu/text-ellipsis.spec.ts +7 -4
  370. package/demos/pc/app/tree-menu/tree-menu-slot.spec.ts +4 -3
  371. package/demos/pc/app/tree-menu/webdoc/tree-menu.cn.md +1 -1
  372. package/demos/pc/app/tree-menu/webdoc/tree-menu.en.md +1 -1
  373. package/demos/pc/app/tree-menu/webdoc/tree-menu.js +3 -3
  374. package/demos/pc/app/user-contact/webdoc/user-contact.js +21 -13
  375. package/demos/pc/app/user-head/icon-user-head.spec.ts +3 -3
  376. package/demos/pc/app/user-head/image-user-head.spec.ts +2 -2
  377. package/demos/pc/app/user-head/webdoc/user-head.js +44 -28
  378. package/demos/pc/webdoc/changelog.md +1 -0
  379. package/demos/pc/webdoc/import-components.md +2 -4
  380. package/demos/pc/webdoc/theme-en.md +8 -4
  381. package/demos/pc/webdoc/theme.md +10 -3
  382. package/package.json +6 -6
  383. package/src/App.vue +0 -2
  384. package/src/i18n/index.js +3 -3
  385. package/src/main.js +2 -7
  386. package/src/menus.jsx +1 -1
  387. package/src/tools/useApiMode.js +2 -2
  388. package/src/tools/useBulletin.jsx +2 -2
  389. package/src/tools/utils.js +2 -2
  390. package/src/views/components/VersionTip.vue +14 -8
  391. package/src/views/components/components.vue +48 -47
  392. package/src/views/components/demo.vue +11 -11
  393. package/src/views/docs/docs.vue +2 -3
  394. package/src/views/layout/layout.vue +17 -19
  395. package/src/views/overview.vue +16 -13
  396. package/vite.config.ts +10 -4
  397. package/demos/mobile/app/pull-refresh/disabled.vue +0 -57
  398. package/demos/mobile/app/pull-refresh/head-height.vue +0 -31
  399. package/demos/mobile/app/pull-refresh/result-text.vue +0 -46
  400. package/demos/mobile/app/pull-refresh/success-duration.vue +0 -31
  401. package/demos/mobile/app/pull-refresh/success-text.vue +0 -27
  402. package/demos/pc/app/grid/loading/grid-loading-off-tip.spec.js +0 -8
  403. package/demos/pc/app/tag/before-delete.vue +0 -64
  404. package/demos/pc/app/tag/closable-composition-api.vue +0 -25
  405. package/demos/pc/app/tag/closable.spec.ts +0 -14
  406. /package/demos/pc/app/button/{autofocus.spec.js → autofocus.spec.ts} +0 -0
  407. /package/demos/pc/app/button/{basic-usage.spec.js → basic-usage.spec.ts} +0 -0
  408. /package/demos/pc/app/button/{click.spec.js → click.spec.ts} +0 -0
  409. /package/demos/pc/app/button/{icon.spec.js → icon.spec.ts} +0 -0
  410. /package/demos/pc/app/button/{image.spec.js → image.spec.ts} +0 -0
  411. /package/demos/pc/app/button/{loading.spec.js → loading.spec.ts} +0 -0
  412. /package/demos/pc/app/button/{reset-time.spec.js → reset-time.spec.ts} +0 -0
  413. /package/demos/pc/app/button/{size.spec.js → size.spec.ts} +0 -0
  414. /package/demos/pc/app/button/{text.spec.js → text.spec.ts} +0 -0
@@ -6,8 +6,8 @@ export default {
6
6
  'demoId': 'basic-usage',
7
7
  'name': { 'zh-CN': '基础用法', 'en-US': 'Basic Usage' },
8
8
  'desc': {
9
- 'zh-CN': '',
10
- 'en-US': ''
9
+ 'zh-CN': '<p>通过设置 <code>fetch-suggestions</code> 方法设置输入建议。</p>',
10
+ 'en-US': '<p> Set input suggestions by setting the <code>fetch-suggestions</code> method.'
11
11
  },
12
12
  'codeFiles': ['basic-usage.vue']
13
13
  },
@@ -43,8 +43,10 @@ export default {
43
43
  'demoId': 'slot',
44
44
  'name': { 'zh-CN': '插槽', 'en-US': 'slot' },
45
45
  'desc': {
46
- 'zh-CN': '<p>分别配置 <code>prepend</code>、<code>append</code>、<code>prefix</code>、<code>suffix</code>、<code>default</code> 插槽。</p>',
47
- 'en-US': '<p>Configure <code>prepend</code>, <code>append</code>, <code>prefix</code>, <code>default</code>, and <code>suffix</code> slots.</p>'
46
+ 'zh-CN':
47
+ '<p>分别配置 <code>prepend</code>、<code>append</code>、<code>prefix</code>、<code>suffix</code>、<code>default</code> 插槽。</p>',
48
+ 'en-US':
49
+ '<p>Configure <code>prepend</code>, <code>append</code>, <code>prefix</code>, <code>default</code>, and <code>suffix</code> slots.</p>'
48
50
  },
49
51
  'codeFiles': ['slot.vue']
50
52
  },
@@ -113,8 +115,7 @@ export default {
113
115
  'demoId': 'placement',
114
116
  'name': { 'zh-CN': '菜单弹出位置', 'en-US': 'Menu Pop-up Position' },
115
117
  'desc': {
116
- 'zh-CN':
117
- '<p><code>placement</code> 属性可以设置菜单弹出位置,默认为 <code>bottom-start</code>。</p>\n',
118
+ 'zh-CN': '<p><code>placement</code> 属性可以设置菜单弹出位置,默认为 <code>bottom-start</code>。</p>\n',
118
119
  'en-US':
119
120
  '<p><code>placement</code> property can be used to set the menu pop-up position. The default value is <code>bottom-start</code>. </p>\n'
120
121
  },
@@ -182,7 +183,7 @@ export default {
182
183
  {
183
184
  'name': 'value-key',
184
185
  'type': 'string',
185
- 'defaultValue': 'value',
186
+ 'defaultValue': `'value'`,
186
187
  'desc': {
187
188
  'zh-CN': '在输入建议对象中,用于显示和匹配输入的键名',
188
189
  'en-US': 'In the Input Suggestion object, key names for displaying and matching inputs'
@@ -210,8 +211,7 @@ export default {
210
211
  'defaultValue': `'bottom-start'`,
211
212
  'desc': {
212
213
  'zh-CN': '菜单弹出位置',
213
- 'en-US':
214
- 'Menu pop-up position'
214
+ 'en-US': 'Menu pop-up position'
215
215
  },
216
216
  'demoId': 'placement'
217
217
  },
@@ -249,7 +249,7 @@ export default {
249
249
  'name': 'name',
250
250
  'type': 'string',
251
251
  'defaultValue': '',
252
- 'desc': { 'zh-CN': 'input元素的原生属性', 'en-US': 'Native attributes of the input element' }
252
+ 'desc': { 'zh-CN': 'input 元素的原生属性', 'en-US': 'Native attributes of the input element' }
253
253
  },
254
254
  {
255
255
  'name': 'select-when-unmatched',
@@ -271,14 +271,14 @@ export default {
271
271
  },
272
272
  {
273
273
  'name': 'prefix-icon',
274
- 'type': 'Component',
274
+ 'type': 'VueComponent',
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': 'Component',
281
+ 'type': 'VueComponent',
282
282
  'defaultValue': '',
283
283
  'desc': { 'zh-CN': '输入框尾部图标', 'en-US': 'Icon at the end of the text box' },
284
284
  'demoId': 'custom-icon'
@@ -330,10 +330,11 @@ export default {
330
330
  'events': [
331
331
  {
332
332
  'name': 'select',
333
- 'type': '(selection: object) => void',
333
+ 'type': '(selection: IAutocompleteSuggestionItem) => void',
334
+ 'typeAnchorName': 'IAutocompleteSuggestionItem',
334
335
  'defaultValue': '',
335
336
  'desc': {
336
- 'zh-CN': '点击选中建议项时触发,回调参数为fetch-suggestions中传入的项',
337
+ 'zh-CN': '点击选中建议项时触发,回调参数为 fetch-suggestions 中传入的项',
337
338
  'en-US':
338
339
  'Triggered when you click to select a suggestion item. The callback parameter is the item passed in fetch-suggestions'
339
340
  },
@@ -373,13 +374,26 @@ export default {
373
374
  'name': 'default',
374
375
  'type': '',
375
376
  'defaultValue': '',
376
- 'desc': { 'zh-CN': '下拉列表项插槽,插槽参数: arg: { slotScope: object }, 其中object是fetch-suggestions中传入的项', 'en-US': 'Drop-down list item slot, slot parameter: arg: {slotScope: object}, where object is the item passed in fetch-suggestions' },
377
+ 'desc': {
378
+ 'zh-CN':
379
+ '下拉列表项插槽,插槽参数: arg: { slotScope: IAutocompleteSuggestionItem }, 其中 slotScope 是 fetch-suggestions 中传入的项',
380
+ 'en-US':
381
+ 'Drop-down list item slot, slot parameter: arg: { slotScope: IAutocompleteSuggestionItem }, where slotScope is the item passed in fetch-suggestions'
382
+ },
377
383
  'demoId': 'slot'
378
384
  }
379
385
  ]
380
386
  }
381
387
  ],
382
388
  types: [
389
+ {
390
+ name: 'IAutocompleteSuggestionItem',
391
+ type: 'type',
392
+ code: `interface IAutocompleteSuggestionItem {
393
+ [key: string]: string | undefined
394
+ value?: string
395
+ }`
396
+ },
383
397
  {
384
398
  name: 'IAutocompletePlacement',
385
399
  type: 'type',
@@ -388,7 +402,7 @@ export default {
388
402
  {
389
403
  name: 'IAutocompleteFetchSuggestions',
390
404
  type: 'type',
391
- code: 'type IAutocompleteFetchSuggestions = (queryString: string, callback: (suggestions: object[]) => void) => void'
405
+ code: 'type IAutocompleteFetchSuggestions = (queryString: string, callback: (suggestions: IAutocompleteSuggestionItem[]) => void) => void'
392
406
  }
393
407
  ]
394
408
  }
@@ -6,8 +6,8 @@ export default {
6
6
  'demoId': 'base',
7
7
  'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' },
8
8
  'desc': {
9
- 'zh-CN': `<code>Breadcrumb</code>:通过 <code>select</code> 监听面包屑选中事件;<br/>
10
- <code>BreadcrumbItem</code>:通过 <code>to</code> 设置选项路由跳转对象,<code></code> 设置选项名称,<code>select</code> 监听选项选中事件。`,
9
+ 'zh-CN': `<code>Breadcrumb</code>:通过 <code>select</code> 监听面包屑选中事件。<br/>
10
+ <code>BreadcrumbItem</code>:通过 <code>to</code> 设置选项路由跳转对象,<code>label</code> 设置选项名称,<code>select</code> 监听选项选中事件。`,
11
11
  'en-US': `<code>Breadcrumb</code>: Listen for breadcrumb selection events through<code>select</code>; <br/>
12
12
  <code>BreadcrumbItem</code>: Route the jump object through the <code>to</code>setting option,<code></code>setting option name,<code>select</code>listening for option selection events.`
13
13
  },
@@ -71,7 +71,7 @@ export default {
71
71
  },
72
72
  {
73
73
  'name': 'separator-icon',
74
- 'type': 'VueComponent',
74
+ 'type': 'vueComponent',
75
75
  'defaultValue': '',
76
76
  'desc': { 'zh-CN': '图标分隔符', 'en-US': 'Icon separator' },
77
77
  'demoId': 'separator'
@@ -53,5 +53,7 @@ const IconSearch = iconSearch()
53
53
  }
54
54
  .tiny-button {
55
55
  margin-bottom: 10px;
56
+ margin-left: 0;
57
+ margin-right: 8px;
56
58
  }
57
59
  </style>
@@ -64,5 +64,7 @@ export default {
64
64
  }
65
65
  .tiny-button {
66
66
  margin-bottom: 10px;
67
+ margin-left: 0;
68
+ margin-right: 8px;
67
69
  }
68
70
  </style>
@@ -6,6 +6,6 @@
6
6
  import { Button as TinyButton, Modal } from '@opentiny/vue'
7
7
 
8
8
  function click() {
9
- Modal.message('click')
9
+ Modal.message({ message: 'click', status: 'info' })
10
10
  }
11
11
  </script>
@@ -11,7 +11,7 @@ export default {
11
11
  },
12
12
  methods: {
13
13
  click() {
14
- Modal.message('click')
14
+ Modal.message({ message: 'click', status: 'info' })
15
15
  }
16
16
  }
17
17
  }
@@ -18,6 +18,13 @@
18
18
  <tiny-button type="warning" :disabled="disabled" plain>警告按钮</tiny-button>
19
19
  <tiny-button type="danger" :disabled="disabled" plain>危险按钮</tiny-button>
20
20
  </tiny-row>
21
+
22
+ <tiny-row>
23
+ <tiny-button :disabled="disabled" ghost>幽灵按钮</tiny-button>
24
+ <tiny-button :icon="TinyIconSearch" :disabled="disabled">图标按钮</tiny-button>
25
+ <tiny-button :icon="TinyIconSearch" :disabled="disabled"> </tiny-button>
26
+ <tiny-button :icon="TinyIconSearch" :disabled="disabled" circle> </tiny-button>
27
+ </tiny-row>
21
28
  </tiny-layout>
22
29
  </template>
23
30
 
@@ -27,7 +34,7 @@ import { Button as TinyButton, Layout as TinyLayout, Row as TinyRow, Switch as T
27
34
  import { iconSearch } from '@opentiny/vue-icon'
28
35
 
29
36
  const disabled = ref(false)
30
- const IconSearch = iconSearch()
37
+ const TinyIconSearch = iconSearch()
31
38
  </script>
32
39
 
33
40
  <style scoped>
@@ -37,5 +44,7 @@ const IconSearch = iconSearch()
37
44
 
38
45
  .tiny-button {
39
46
  margin-bottom: 10px;
47
+ margin-left: 0;
48
+ margin-right: 8px;
40
49
  }
41
50
  </style>
@@ -6,6 +6,7 @@ test('测试禁用状态是否生效', async ({ page }) => {
6
6
 
7
7
  const demo = page.locator('#dynamic-disabled')
8
8
  const switchBtn = demo.locator('.tiny-switch')
9
+ const ghostBtn = demo.getByRole('button', { name: '幽灵按钮' })
9
10
 
10
11
  await switchBtn.click()
11
12
  await expect(demo.locator('.tiny-button').first()).toBeDisabled()
@@ -15,6 +16,9 @@ test('测试禁用状态是否生效', async ({ page }) => {
15
16
  await expect(demo.getByRole('button', { name: '默认按钮' }).first()).toBeDisabled()
16
17
  await expect(demo.getByRole('button', { name: '主要按钮' }).first()).toBeDisabled()
17
18
  await expect(demo.getByRole('button', { name: '成功按钮' }).first()).toBeDisabled()
19
+ await expect(ghostBtn).toHaveCSS('color', 'rgb(173, 176, 184)')
20
+ await expect(ghostBtn).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
21
+ await expect(ghostBtn).toHaveCSS('border-bottom-color', 'rgb(173, 176, 184)')
18
22
 
19
23
  await switchBtn.click()
20
24
  await expect(demo.locator('.tiny-button').first()).not.toBeDisabled()
@@ -11,19 +11,26 @@
11
11
  </tiny-row>
12
12
 
13
13
  <tiny-row>
14
- <tiny-button :disabled="disabled" plain>默认按钮</tiny-button>
14
+ <tiny-button :disabled="disabled" plain>朴素按钮</tiny-button>
15
15
  <tiny-button type="primary" :disabled="disabled" plain>主要按钮</tiny-button>
16
16
  <tiny-button type="success" :disabled="disabled" plain>成功按钮</tiny-button>
17
17
  <tiny-button type="info" :disabled="disabled" plain>信息按钮</tiny-button>
18
18
  <tiny-button type="warning" :disabled="disabled" plain>警告按钮</tiny-button>
19
19
  <tiny-button type="danger" :disabled="disabled" plain>危险按钮</tiny-button>
20
20
  </tiny-row>
21
+
22
+ <tiny-row>
23
+ <tiny-button :disabled="disabled" ghost>幽灵按钮</tiny-button>
24
+ <tiny-button :icon="TinyIconSearch" :disabled="disabled">图标按钮</tiny-button>
25
+ <tiny-button :icon="TinyIconSearch" :disabled="disabled"> </tiny-button>
26
+ <tiny-button :icon="TinyIconSearch" :disabled="disabled" circle> </tiny-button>
27
+ </tiny-row>
21
28
  </tiny-layout>
22
29
  </template>
23
30
 
24
31
  <script>
25
32
  import { Button, Layout, Row, Switch } from '@opentiny/vue'
26
- import { IconSearch } from '@opentiny/vue-icon'
33
+ import { iconSearch } from '@opentiny/vue-icon'
27
34
 
28
35
  export default {
29
36
  components: {
@@ -35,7 +42,7 @@ export default {
35
42
  data() {
36
43
  return {
37
44
  disabled: false,
38
- IconSearch: IconSearch()
45
+ TinyIconSearch: iconSearch()
39
46
  }
40
47
  }
41
48
  }
@@ -47,5 +54,7 @@ export default {
47
54
  }
48
55
  .tiny-button {
49
56
  margin-bottom: 10px;
57
+ margin-left: 0;
58
+ margin-right: 8px;
50
59
  }
51
60
  </style>
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div class="gray-bg">
3
+ <tiny-button ghost>幽灵按钮</tiny-button>
4
+ <tiny-button ghost type="primary">主要按钮</tiny-button>
5
+ <tiny-button ghost type="success">成功按钮</tiny-button>
6
+ <tiny-button ghost type="info">信息按钮</tiny-button>
7
+ <tiny-button ghost type="warning">告警按钮</tiny-button>
8
+ <tiny-button ghost type="danger">危险按钮</tiny-button>
9
+ </div>
10
+ </template>
11
+
12
+ <script setup>
13
+ import { Button as TinyButton } from '@opentiny/vue'
14
+ </script>
15
+
16
+ <style scoped>
17
+ .gray-bg {
18
+ background: #ccc;
19
+ padding: 20px 10px 10px;
20
+ }
21
+ .tiny-button {
22
+ margin-bottom: 10px;
23
+ margin-left: 0;
24
+ margin-right: 8px;
25
+ }
26
+ </style>
@@ -0,0 +1,69 @@
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#ghost')
6
+
7
+ const demo = page.locator('#ghost')
8
+ const getGhostBtn = (index: number) => demo.locator('.tiny-button').nth(index)
9
+
10
+ // 默认幽灵按钮
11
+ await expect(getGhostBtn(0)).toHaveCSS('color', 'rgb(37, 43, 58)')
12
+ await expect(getGhostBtn(0)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
13
+ await expect(getGhostBtn(0)).toHaveCSS('border-bottom-color', 'rgb(173, 176, 184)')
14
+ await page.waitForTimeout(200)
15
+ await getGhostBtn(0).hover()
16
+ await expect(getGhostBtn(0)).toHaveCSS('color', 'rgb(94, 124, 224)')
17
+ await expect(getGhostBtn(0)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
18
+ await expect(getGhostBtn(0)).toHaveCSS('border-bottom-color', 'rgb(94, 124, 224)')
19
+
20
+ // 主要幽灵按钮
21
+ await expect(getGhostBtn(1)).toHaveCSS('color', 'rgb(94, 124, 224)')
22
+ await expect(getGhostBtn(1)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
23
+ await expect(getGhostBtn(1)).toHaveCSS('border-bottom-color', 'rgb(94, 124, 224)')
24
+ await page.waitForTimeout(200)
25
+ await getGhostBtn(1).hover()
26
+ await expect(getGhostBtn(1)).toHaveCSS('color', 'rgb(118, 147, 245)')
27
+ await expect(getGhostBtn(1)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
28
+ await expect(getGhostBtn(1)).toHaveCSS('border-bottom-color', 'rgb(118, 147, 245)')
29
+
30
+ // 成功幽灵按钮
31
+ await expect(getGhostBtn(2)).toHaveCSS('color', 'rgb(80, 212, 171)')
32
+ await expect(getGhostBtn(2)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
33
+ await expect(getGhostBtn(2)).toHaveCSS('border-bottom-color', 'rgb(80, 212, 171)')
34
+ await page.waitForTimeout(200)
35
+ await getGhostBtn(2).hover()
36
+ await expect(getGhostBtn(2)).toHaveCSS('color', 'rgb(172, 242, 220)')
37
+ await expect(getGhostBtn(2)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
38
+ await expect(getGhostBtn(2)).toHaveCSS('border-bottom-color', 'rgb(172, 242, 220)')
39
+
40
+ // 信息幽灵按钮
41
+ await expect(getGhostBtn(3)).toHaveCSS('color', 'rgb(37, 43, 58)')
42
+ await expect(getGhostBtn(3)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
43
+ await expect(getGhostBtn(3)).toHaveCSS('border-bottom-color', 'rgb(37, 43, 58)')
44
+ await page.waitForTimeout(200)
45
+ await getGhostBtn(3).hover()
46
+ await expect(getGhostBtn(3)).toHaveCSS('color', 'rgb(92, 97, 115)')
47
+ await expect(getGhostBtn(3)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
48
+ await expect(getGhostBtn(3)).toHaveCSS('border-bottom-color', 'rgb(92, 97, 115)')
49
+
50
+ // 告警幽灵按钮
51
+ await expect(getGhostBtn(4)).toHaveCSS('color', 'rgb(250, 152, 65)')
52
+ await expect(getGhostBtn(4)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
53
+ await expect(getGhostBtn(4)).toHaveCSS('border-bottom-color', 'rgb(250, 152, 65)')
54
+ await page.waitForTimeout(200)
55
+ await getGhostBtn(4).hover()
56
+ await expect(getGhostBtn(4)).toHaveCSS('color', 'rgb(250, 194, 10)')
57
+ await expect(getGhostBtn(4)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
58
+ await expect(getGhostBtn(4)).toHaveCSS('border-bottom-color', 'rgb(250, 194, 10)')
59
+
60
+ // 危险幽灵按钮
61
+ await expect(getGhostBtn(5)).toHaveCSS('color', 'rgb(199, 0, 11)')
62
+ await expect(getGhostBtn(5)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
63
+ await expect(getGhostBtn(5)).toHaveCSS('border-bottom-color', 'rgb(199, 0, 11)')
64
+ await page.waitForTimeout(200)
65
+ await getGhostBtn(5).hover()
66
+ await expect(getGhostBtn(5)).toHaveCSS('color', 'rgb(214, 74, 82)')
67
+ await expect(getGhostBtn(5)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
68
+ await expect(getGhostBtn(5)).toHaveCSS('border-bottom-color', 'rgb(214, 74, 82)')
69
+ })
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div class="gray-bg">
3
+ <tiny-button ghost>幽灵按钮</tiny-button>
4
+ <tiny-button ghost type="primary">主要按钮</tiny-button>
5
+ <tiny-button ghost type="success">成功按钮</tiny-button>
6
+ <tiny-button ghost type="info">信息按钮</tiny-button>
7
+ <tiny-button ghost type="warning">告警按钮</tiny-button>
8
+ <tiny-button ghost type="danger">危险按钮</tiny-button>
9
+ </div>
10
+ </template>
11
+
12
+ <script>
13
+ import { Button } from '@opentiny/vue'
14
+
15
+ export default {
16
+ components: {
17
+ TinyButton: Button
18
+ }
19
+ }
20
+ </script>
21
+
22
+ <style scoped>
23
+ .gray-bg {
24
+ background: #ccc;
25
+ padding: 20px 10px 10px;
26
+ }
27
+ .tiny-button {
28
+ margin-bottom: 10px;
29
+ margin-left: 0;
30
+ margin-right: 8px;
31
+ }
32
+ </style>
@@ -39,5 +39,7 @@ const TinyIconSearch = iconSearch()
39
39
  }
40
40
  .tiny-button {
41
41
  margin-bottom: 10px;
42
+ margin-left: 0;
43
+ margin-right: 8px;
42
44
  }
43
45
  </style>
@@ -50,5 +50,7 @@ export default {
50
50
  }
51
51
  .tiny-button {
52
52
  margin-bottom: 10px;
53
+ margin-left: 0;
54
+ margin-right: 8px;
53
55
  }
54
56
  </style>
@@ -16,5 +16,7 @@ import { Button as TinyButton } from '@opentiny/vue'
16
16
  <style scoped>
17
17
  .tiny-button {
18
18
  margin-bottom: 10px;
19
+ margin-left: 0;
20
+ margin-right: 8px;
19
21
  }
20
22
  </style>
@@ -22,5 +22,7 @@ export default {
22
22
  <style scoped>
23
23
  .tiny-button {
24
24
  margin-bottom: 10px;
25
+ margin-left: 0;
26
+ margin-right: 8px;
25
27
  }
26
28
  </style>
@@ -68,5 +68,7 @@ const TinyIconEdit = iconEdit()
68
68
 
69
69
  .tiny-button {
70
70
  margin-bottom: 10px;
71
+ margin-left: 0;
72
+ margin-right: 8px;
71
73
  }
72
74
  </style>
@@ -79,5 +79,7 @@ export default {
79
79
 
80
80
  .tiny-button {
81
81
  margin-bottom: 10px;
82
+ margin-left: 0;
83
+ margin-right: 8px;
82
84
  }
83
85
  </style>
@@ -24,7 +24,7 @@ const TinyIconMail = iconMail()
24
24
  <style scoped>
25
25
  .title {
26
26
  margin-top: 16px;
27
- padding: 10px 0 6px 10px;
27
+ padding: 10px 0 6px 0;
28
28
  font-size: 16px;
29
29
  font-weight: bold;
30
30
  }
@@ -33,7 +33,7 @@ export default {
33
33
  <style scoped>
34
34
  .title {
35
35
  margin-top: 16px;
36
- padding: 10px 0 6px 10px;
36
+ padding: 10px 0 6px 0;
37
37
  font-size: 16px;
38
38
  font-weight: bold;
39
39
  }
@@ -13,6 +13,15 @@ export default {
13
13
  },
14
14
  'codeFiles': ['basic-usage.vue']
15
15
  },
16
+ {
17
+ 'demoId': 'ghost',
18
+ 'name': { 'zh-CN': '幽灵按钮', 'en-US': 'Ghost button' },
19
+ 'desc': {
20
+ 'zh-CN': '<p>通过 <code>ghost</code> 设置幽灵按钮。</p>',
21
+ 'en-US': '<p>Set up ghost buttons via <code>ghost</code>.</p>'
22
+ },
23
+ 'codeFiles': ['ghost.vue']
24
+ },
16
25
  {
17
26
  'demoId': 'dynamic-disabled',
18
27
  'name': { 'zh-CN': '动态禁用按钮', 'en-US': 'Dynamic Disable Button' },
@@ -139,6 +148,16 @@ export default {
139
148
  },
140
149
  'demoId': 'dynamic-disabled'
141
150
  },
151
+ {
152
+ 'name': 'ghost',
153
+ 'type': 'boolean',
154
+ 'defaultValue': 'false',
155
+ 'desc': {
156
+ 'zh-CN': '是否幽灵按钮',
157
+ 'en-US': 'Is ghost button'
158
+ },
159
+ 'demoId': 'ghost'
160
+ },
142
161
  {
143
162
  'name': 'icon',
144
163
  'type': 'VueComponent',
@@ -221,7 +240,8 @@ export default {
221
240
  },
222
241
  {
223
242
  'name': 'type',
224
- 'type': "'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'",
243
+ 'type': 'IButtonType',
244
+ 'typeAnchorName': 'IButtonType',
225
245
  'defaultValue': '--',
226
246
  'desc': {
227
247
  'zh-CN': '展示按钮不同的状态,设置为text则展示为文本按钮',
@@ -255,5 +275,12 @@ export default {
255
275
  }
256
276
  ]
257
277
  }
278
+ ],
279
+ types: [
280
+ {
281
+ name: 'IButtonType',
282
+ type: 'interface',
283
+ code: `type IButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'`
284
+ }
258
285
  ]
259
286
  }
@@ -10,15 +10,15 @@ import { ButtonGroup as TinyButtonGroup } from '@opentiny/vue'
10
10
 
11
11
  const checkedVal = ref('Button1')
12
12
  const groupData = ref([
13
- { text: 'Button1', value: 'Button1' },
14
- { text: 'Button2', value: 'Button2' },
15
- { text: 'Button3', value: 'Button3' },
16
- { text: 'Button4', value: 'Button4' },
17
- { text: 'Button5', value: 'Button5' },
18
- { text: 'Button6', value: 'Button6' },
19
- { text: 'Button7', value: 'Button7' },
20
- { text: 'Button8', value: 'Button8' },
21
- { text: 'Button9', value: 'Button9' },
13
+ { text: 'Button01', value: 'Button01' },
14
+ { text: 'Button02', value: 'Button02' },
15
+ { text: 'Button03', value: 'Button03' },
16
+ { text: 'Button04', value: 'Button04' },
17
+ { text: 'Button05', value: 'Button05' },
18
+ { text: 'Button06', value: 'Button06' },
19
+ { text: 'Button07', value: 'Button07' },
20
+ { text: 'Button08', value: 'Button08' },
21
+ { text: 'Button09', value: 'Button09' },
22
22
  { text: 'Button10', value: 'Button10' },
23
23
  { text: 'Button11', value: 'Button11' },
24
24
  { text: 'Button12', value: 'Button12' }
@@ -15,15 +15,15 @@ export default {
15
15
  return {
16
16
  checkedVal: 'Button1',
17
17
  groupData: [
18
- { text: 'Button1', value: 'Button1' },
19
- { text: 'Button2', value: 'Button2' },
20
- { text: 'Button3', value: 'Button3' },
21
- { text: 'Button4', value: 'Button4' },
22
- { text: 'Button5', value: 'Button5' },
23
- { text: 'Button6', value: 'Button6' },
24
- { text: 'Button7', value: 'Button7' },
25
- { text: 'Button8', value: 'Button8' },
26
- { text: 'Button9', value: 'Button9' },
18
+ { text: 'Button01', value: 'Button01' },
19
+ { text: 'Button02', value: 'Button02' },
20
+ { text: 'Button03', value: 'Button03' },
21
+ { text: 'Button04', value: 'Button04' },
22
+ { text: 'Button05', value: 'Button05' },
23
+ { text: 'Button06', value: 'Button06' },
24
+ { text: 'Button07', value: 'Button07' },
25
+ { text: 'Button08', value: 'Button08' },
26
+ { text: 'Button09', value: 'Button09' },
27
27
  { text: 'Button10', value: 'Button10' },
28
28
  { text: 'Button11', value: 'Button11' },
29
29
  { text: 'Button12', value: 'Button12' }
@@ -16,6 +16,6 @@ const groupData = ref([
16
16
  ])
17
17
 
18
18
  function handleChange(val) {
19
- Modal.message(`change事件触发了,选中值为${val}`)
19
+ Modal.message({ message: `change事件触发了,选中值为${val}`, status: 'info' })
20
20
  }
21
21
  </script>
@@ -23,7 +23,7 @@ export default {
23
23
  },
24
24
  methods: {
25
25
  handleChange(val) {
26
- Modal.message(`change事件触发了,选中值为${val}`)
26
+ Modal.message({ message: `change事件触发了,选中值为${val}`, status: 'info' })
27
27
  }
28
28
  }
29
29
  }
@@ -24,6 +24,6 @@ const groupData = ref([
24
24
  ])
25
25
 
26
26
  function handleEdit() {
27
- Modal.message('edit事件触发了')
27
+ Modal.message({ message: 'edit事件触发了', status: 'info' })
28
28
  }
29
29
  </script>
@@ -31,7 +31,7 @@ export default {
31
31
  },
32
32
  methods: {
33
33
  handleEdit() {
34
- Modal.message('edit事件触发了')
34
+ Modal.message({ message: 'edit事件触发了', status: 'info' })
35
35
  }
36
36
  }
37
37
  }
@@ -6,10 +6,9 @@ export default {
6
6
  'demoId': 'basic-usage',
7
7
  'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' },
8
8
  'desc': {
9
- 'zh-CN':
10
- '<p>通过 <code>data</code> 设置按钮组数据,类型为 <a href="#IButtonGroupData">IButtonGroupData</a> ,通过 <code>v-model</code> 设置绑定值。</p>',
9
+ 'zh-CN': '<p>通过 <code>data</code> 设置按钮组数据,<code>v-model</code> 设置绑定值。</p>',
11
10
  'en-US':
12
- '<p>Set the button group data to type <a="# IButtonGroupData">IButtonGroupData</a> through <code>data</code> , and set the binding value through <code>v model</code> .</p>'
11
+ '<p>Set the button group data through <code>data</code> , and set the binding value through <code>v model</code> .</p>'
13
12
  },
14
13
  'codeFiles': ['basic-usage.vue']
15
14
  },