@opentiny/vue-docs 3.28.1 → 3.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/demos/apis/action-menu.js +22 -0
  2. package/demos/apis/alert.js +19 -22
  3. package/demos/apis/button-group.js +15 -0
  4. package/demos/apis/calendar-view.js +5 -5
  5. package/demos/apis/cascader-view.js +5 -5
  6. package/demos/apis/dialog-box.js +39 -38
  7. package/demos/apis/drawer.js +31 -0
  8. package/demos/apis/dropdown.js +39 -1
  9. package/demos/apis/filter-panel.js +21 -1
  10. package/demos/apis/fluent-editor.js +30 -0
  11. package/demos/apis/form.js +11 -0
  12. package/demos/apis/fullscreen.js +10 -11
  13. package/demos/apis/grid.js +131 -16
  14. package/demos/apis/guide.js +14 -0
  15. package/demos/apis/link.js +11 -0
  16. package/demos/apis/message.js +48 -22
  17. package/demos/apis/modal.js +34 -31
  18. package/demos/apis/notify.js +13 -13
  19. package/demos/apis/rate.js +15 -0
  20. package/demos/apis/search-box.js +343 -0
  21. package/demos/apis/select.js +14 -2
  22. package/demos/apis/tag-input.js +182 -0
  23. package/demos/apis/tree.js +23 -23
  24. package/demos/mobile-first/app/button-group/display-mode.vue +31 -0
  25. package/demos/mobile-first/app/button-group/webdoc/button-group.js +13 -0
  26. package/demos/mobile-first/app/calendar-view/webdoc/calendar-view.js +5 -4
  27. package/demos/mobile-first/app/modal/webdoc/modal.js +2 -1
  28. package/demos/pc/app/alert/center.spec.ts +8 -0
  29. package/demos/pc/app/alert/custom-close.spec.ts +39 -9
  30. package/demos/pc/app/alert/icon.spec.ts +18 -7
  31. package/demos/pc/app/alert/show-icon.spec.ts +1 -1
  32. package/demos/pc/app/anchor/webdoc/anchor.js +1 -0
  33. package/demos/pc/app/base-select/copy-multi.spec.ts +1 -1
  34. package/demos/pc/app/button-group/display-mode-composition-api.vue +23 -0
  35. package/demos/pc/app/button-group/display-mode.spec.ts +0 -0
  36. package/demos/pc/app/button-group/display-mode.vue +31 -0
  37. package/demos/pc/app/button-group/sup-composition-api.vue +1 -0
  38. package/demos/pc/app/button-group/sup.vue +1 -0
  39. package/demos/pc/app/button-group/webdoc/button-group.js +14 -0
  40. package/demos/pc/app/calendar-view/calendar-event.spec.ts +1 -1
  41. package/demos/pc/app/calendar-view/custom-day-bg-color.vue +10 -0
  42. package/demos/pc/app/calendar-view/webdoc/calendar-view.js +4 -4
  43. package/demos/pc/app/cascader/filter-mode-composition-api.vue +2 -3
  44. package/demos/pc/app/checkbox/checked-composition-api.vue +3 -3
  45. package/demos/pc/app/checkbox/checked.vue +3 -3
  46. package/demos/pc/app/date-picker/align.spec.ts +10 -13
  47. package/demos/pc/app/date-picker/clear.spec.ts +3 -3
  48. package/demos/pc/app/date-picker/default-value.spec.ts +4 -4
  49. package/demos/pc/app/date-picker/events.spec.ts +2 -2
  50. package/demos/pc/app/date-picker/format.spec.ts +3 -3
  51. package/demos/pc/app/date-picker/now.spec.ts +4 -4
  52. package/demos/pc/app/date-picker/shortcuts.spec.ts +1 -1
  53. package/demos/pc/app/date-picker/slot.spec.ts +5 -5
  54. package/demos/pc/app/dialog-box/basic-usage.spec.ts +5 -5
  55. package/demos/pc/app/dialog-box/form-in-dialog.spec.ts +1 -2
  56. package/demos/pc/app/drawer/basic-usage.spec.ts +4 -3
  57. package/demos/pc/app/drawer/close-on-press-escape.spec.ts +4 -2
  58. package/demos/pc/app/drawer/placement.spec.ts +4 -4
  59. package/demos/pc/app/drawer/show-header.spec.ts +3 -2
  60. package/demos/pc/app/drawer/webdoc/drawer.js +3 -2
  61. package/demos/pc/app/dropdown/show-icon-composition-api.vue +1 -1
  62. package/demos/pc/app/dropdown/show-icon.vue +1 -1
  63. package/demos/pc/app/dropdown/tip-composition-api.vue +5 -2
  64. package/demos/pc/app/dropdown/tip.vue +5 -2
  65. package/demos/pc/app/dropdown/webdoc/dropdown.js +2 -2
  66. package/demos/pc/app/filter-panel/size-composition-api.vue +58 -0
  67. package/demos/pc/app/filter-panel/size.spec.ts +23 -0
  68. package/demos/pc/app/filter-panel/size.vue +68 -0
  69. package/demos/pc/app/filter-panel/webdoc/filter-panel.js +13 -0
  70. package/demos/pc/app/flowchart/basic-usage-composition-api.vue +10 -260
  71. package/demos/pc/app/flowchart/basic-usage.spec.ts +2 -1
  72. package/demos/pc/app/flowchart/basic-usage.vue +4 -249
  73. package/demos/pc/app/flowchart/slots-composition-api.vue +182 -0
  74. package/demos/pc/app/flowchart/slots.spec.ts +24 -0
  75. package/demos/pc/app/flowchart/slots.vue +193 -0
  76. package/demos/pc/app/flowchart/webdoc/flowchart.js +14 -2
  77. package/demos/pc/app/form/basic-usage.spec.ts +6 -4
  78. package/demos/pc/app/form/custom-validation-string-length-composition-api.vue +38 -0
  79. package/demos/pc/app/form/custom-validation-string-length.spec.ts +18 -0
  80. package/demos/pc/app/form/custom-validation-string-length.vue +28 -13
  81. package/demos/pc/app/form/group-form-composition-api.vue +2 -2
  82. package/demos/pc/app/form/group-form.vue +2 -2
  83. package/demos/pc/app/grid/filter/advanced-filter-composition-api.vue +1 -1
  84. package/demos/pc/app/grid/filter/advanced-filter.spec.js +1 -0
  85. package/demos/pc/app/grid/filter/advanced-filter.vue +1 -1
  86. package/demos/pc/app/grid/filter/custom-filter-composition-api.vue +46 -23
  87. package/demos/pc/app/grid/filter/custom-filter.spec.js +1 -1
  88. package/demos/pc/app/grid/filter/custom-filter.vue +47 -24
  89. package/demos/pc/app/grid/filter/default-filter-composition-api.vue +5 -1
  90. package/demos/pc/app/grid/filter/default-filter.spec.ts +1 -0
  91. package/demos/pc/app/grid/filter/default-filter.vue +4 -1
  92. package/demos/pc/app/grid/filter/filter-label-value-composition-api.vue +71 -0
  93. package/demos/pc/app/grid/filter/filter-label-value.spec.ts +27 -0
  94. package/demos/pc/app/grid/filter/filter-label-value.vue +78 -0
  95. package/demos/pc/app/grid/filter/input-filter-custom-component-composition-api.vue +116 -0
  96. package/demos/pc/app/grid/filter/input-filter-custom-component.spec.ts +20 -0
  97. package/demos/pc/app/grid/filter/input-filter-custom-component.vue +126 -0
  98. package/demos/pc/app/grid/filter/layout-order-filter-composition-api.vue +114 -0
  99. package/demos/pc/app/grid/filter/layout-order-filter.spec.ts +31 -0
  100. package/demos/pc/app/grid/filter/layout-order-filter.vue +123 -0
  101. package/demos/pc/app/grid/toolbar/custom-toolbar.spec.js +1 -1
  102. package/demos/pc/app/grid/webdoc/grid-filter.js +89 -40
  103. package/demos/pc/app/guide/show-close-composition-api.vue +77 -0
  104. package/demos/pc/app/guide/show-close.spec.ts +37 -0
  105. package/demos/pc/app/guide/show-close.vue +84 -0
  106. package/demos/pc/app/guide/webdoc/guide.js +12 -0
  107. package/demos/pc/app/icon/advance-icons.js +108 -2
  108. package/demos/pc/app/icon/advance-usage-composition-api.vue +26 -1
  109. package/demos/pc/app/icon/advance-usage.vue +27 -1
  110. package/demos/pc/app/icon/webdoc/icon.js +5 -3
  111. package/demos/pc/app/input/resize.spec.ts +2 -2
  112. package/demos/pc/app/link/custom-icon-composition-api.vue +1 -1
  113. package/demos/pc/app/link/custom-icon.vue +1 -1
  114. package/demos/pc/app/link/target-composition-api.vue +24 -0
  115. package/demos/pc/app/link/target.spec.ts +41 -0
  116. package/demos/pc/app/link/target.vue +30 -0
  117. package/demos/pc/app/link/webdoc/link.js +14 -0
  118. package/demos/pc/app/message/basic-usage-composition-api.vue +48 -0
  119. package/demos/pc/app/message/basic-usage.spec.ts +27 -0
  120. package/demos/pc/app/message/basic-usage.vue +50 -0
  121. package/demos/pc/app/message/message-close-composition-api.vue +25 -0
  122. package/demos/pc/app/message/message-close.spec.ts +9 -0
  123. package/demos/pc/app/message/message-close.vue +32 -0
  124. package/demos/pc/app/message/message-duration-composition-api.vue +25 -0
  125. package/demos/pc/app/message/message-duration.spec.ts +9 -0
  126. package/demos/pc/app/message/message-duration.vue +32 -0
  127. package/demos/pc/app/message/prevent-duplicate-composition-api.vue +25 -0
  128. package/demos/pc/app/message/prevent-duplicate.spec.ts +9 -0
  129. package/demos/pc/app/message/prevent-duplicate.vue +32 -0
  130. package/demos/pc/app/message/webdoc/message.cn.md +7 -0
  131. package/demos/pc/app/message/webdoc/message.en.md +7 -0
  132. package/demos/pc/app/message/webdoc/message.js +56 -0
  133. package/demos/pc/app/modal/basic-usage.spec.ts +3 -3
  134. package/demos/pc/app/modal/modal-footer-composition-api.vue +3 -3
  135. package/demos/pc/app/modal/modal-footer.spec.ts +9 -4
  136. package/demos/pc/app/modal/modal-footer.vue +3 -3
  137. package/demos/pc/app/modal/modal-header.spec.ts +2 -2
  138. package/demos/pc/app/modal/modal-size.spec.ts +2 -2
  139. package/demos/pc/app/modal/status.spec.ts +22 -15
  140. package/demos/pc/app/nav-menu/overflow.spec.ts +1 -1
  141. package/demos/pc/app/popconfirm/custom-class.spec.ts +0 -1
  142. package/demos/pc/app/popconfirm/slot-message.spec.ts +10 -2
  143. package/demos/pc/app/popconfirm/trigger.spec.ts +16 -12
  144. package/demos/pc/app/popover/basic-usage.spec.js +3 -8
  145. package/demos/pc/app/popover/custom-popper.spec.js +2 -2
  146. package/demos/pc/app/popover/delay.spec.js +2 -2
  147. package/demos/pc/app/popover/disabled.spec.js +2 -2
  148. package/demos/pc/app/popover/events.spec.js +1 -1
  149. package/demos/pc/app/popover/ignore-boundaries.spec.js +2 -3
  150. package/demos/pc/app/popover/offset.spec.js +17 -31
  151. package/demos/pc/app/radio/dynamic-disable-composition-api.vue +3 -3
  152. package/demos/pc/app/radio/dynamic-disable.vue +2 -2
  153. package/demos/pc/app/rate/clearable-composition-api.vue +20 -0
  154. package/demos/pc/app/rate/clearable.spec.js +74 -0
  155. package/demos/pc/app/rate/clearable.vue +28 -0
  156. package/demos/pc/app/rate/webdoc/rate.js +12 -0
  157. package/demos/pc/app/search/events.spec.ts +1 -1
  158. package/demos/pc/app/search-box/append-to-body-composition-api.vue +300 -0
  159. package/demos/pc/app/search-box/append-to-body.vue +308 -0
  160. package/demos/pc/app/search-box/auto-match-composition-api.vue +162 -0
  161. package/demos/pc/app/search-box/auto-match.vue +170 -0
  162. package/demos/pc/app/search-box/basic-usage-composition-api.vue +269 -0
  163. package/demos/pc/app/search-box/basic-usage.vue +277 -0
  164. package/demos/pc/app/search-box/custom-panel-composition-api.vue +63 -0
  165. package/demos/pc/app/search-box/custom-panel.vue +72 -0
  166. package/demos/pc/app/search-box/default-field-composition-api.vue +163 -0
  167. package/demos/pc/app/search-box/default-field.vue +171 -0
  168. package/demos/pc/app/search-box/editable-composition-api.vue +311 -0
  169. package/demos/pc/app/search-box/editable.vue +320 -0
  170. package/demos/pc/app/search-box/empty-placeholder-composition-api.vue +162 -0
  171. package/demos/pc/app/search-box/empty-placeholder.vue +170 -0
  172. package/demos/pc/app/search-box/events-composition-api.vue +169 -0
  173. package/demos/pc/app/search-box/events.vue +173 -0
  174. package/demos/pc/app/search-box/group-key-composition-api.vue +257 -0
  175. package/demos/pc/app/search-box/group-key.vue +266 -0
  176. package/demos/pc/app/search-box/help-composition-api.vue +166 -0
  177. package/demos/pc/app/search-box/help.vue +175 -0
  178. package/demos/pc/app/search-box/id-map-key-composition-api.vue +131 -0
  179. package/demos/pc/app/search-box/id-map-key.vue +140 -0
  180. package/demos/pc/app/search-box/item-placeholder-composition-api.vue +119 -0
  181. package/demos/pc/app/search-box/item-placeholder.vue +127 -0
  182. package/demos/pc/app/search-box/max-length-composition-api.vue +29 -0
  183. package/demos/pc/app/search-box/max-length.vue +38 -0
  184. package/demos/pc/app/search-box/max-time-length-composition-api.vue +53 -0
  185. package/demos/pc/app/search-box/max-time-length.vue +62 -0
  186. package/demos/pc/app/search-box/merge-tag-composition-api.vue +59 -0
  187. package/demos/pc/app/search-box/merge-tag.vue +68 -0
  188. package/demos/pc/app/search-box/panel-max-height-composition-api.vue +162 -0
  189. package/demos/pc/app/search-box/panel-max-height.vue +170 -0
  190. package/demos/pc/app/search-box/potential-match-composition-api.vue +193 -0
  191. package/demos/pc/app/search-box/potential-match.vue +201 -0
  192. package/demos/pc/app/search-box/settings-composition-api.vue +163 -0
  193. package/demos/pc/app/search-box/settings.vue +171 -0
  194. package/demos/pc/app/search-box/size-composition-api.vue +162 -0
  195. package/demos/pc/app/search-box/size.vue +170 -0
  196. package/demos/pc/app/search-box/split-input-value-composition-api.vue +162 -0
  197. package/demos/pc/app/search-box/split-input-value.vue +170 -0
  198. package/demos/pc/app/search-box/suffix-icon-composition-api.vue +209 -0
  199. package/demos/pc/app/search-box/suffix-icon.vue +219 -0
  200. package/demos/pc/app/search-box/v-model-composition-api.vue +174 -0
  201. package/demos/pc/app/search-box/v-model.vue +182 -0
  202. package/demos/pc/app/search-box/webdoc/search-box.cn.md +7 -0
  203. package/demos/pc/app/search-box/webdoc/search-box.en.md +7 -0
  204. package/demos/pc/app/search-box/webdoc/search-box.js +257 -0
  205. package/demos/pc/app/select/copy-multi.spec.ts +1 -1
  206. package/demos/pc/app/select-wrapper/copy-multi.spec.ts +2 -1
  207. package/demos/pc/app/tabs/basic-usage.spec.ts +2 -2
  208. package/demos/pc/app/tabs/more-show-all.spec.ts +2 -1
  209. package/demos/pc/app/tabs/tabs-events-close-composition-api.vue +8 -2
  210. package/demos/pc/app/tabs/tabs-events-close.vue +8 -2
  211. package/demos/pc/app/tag/basic-usage.spec.ts +1 -1
  212. package/demos/pc/app/tag/color-border.spec.ts +2 -2
  213. package/demos/pc/app/tag/max-width.spec.ts +1 -1
  214. package/demos/pc/app/tag/size.spec.ts +3 -3
  215. package/demos/pc/app/tag/slot-default.spec.ts +3 -3
  216. package/demos/pc/app/tag-group/basic-usage.spec.js +5 -5
  217. package/demos/pc/app/tag-group/tag-group-effect.spec.js +10 -10
  218. package/demos/pc/app/tag-group/tag-group-event.spec.js +1 -1
  219. package/demos/pc/app/tag-input/basic-usage-composition-api.vue +29 -0
  220. package/demos/pc/app/tag-input/basic-usage.spec.ts +0 -0
  221. package/demos/pc/app/tag-input/basic-usage.vue +38 -0
  222. package/demos/pc/app/tag-input/clearable-tag-composition-api.vue +20 -0
  223. package/demos/pc/app/tag-input/clearable-tag.vue +27 -0
  224. package/demos/pc/app/tag-input/collapsed-tag-composition-api.vue +20 -0
  225. package/demos/pc/app/tag-input/collapsed-tag.vue +28 -0
  226. package/demos/pc/app/tag-input/disabled-readonly-composition-api.vue +20 -0
  227. package/demos/pc/app/tag-input/disabled-readonly.vue +29 -0
  228. package/demos/pc/app/tag-input/draggable-tag-composition-api.vue +12 -0
  229. package/demos/pc/app/tag-input/draggable-tag.spec.ts +0 -0
  230. package/demos/pc/app/tag-input/draggable-tag.vue +20 -0
  231. package/demos/pc/app/tag-input/max-composition-api.vue +20 -0
  232. package/demos/pc/app/tag-input/max.vue +28 -0
  233. package/demos/pc/app/tag-input/prefix-suffix-composition-api.vue +26 -0
  234. package/demos/pc/app/tag-input/prefix-suffix.vue +34 -0
  235. package/demos/pc/app/tag-input/separator-tag-composition-api.vue +20 -0
  236. package/demos/pc/app/tag-input/separator-tag.vue +28 -0
  237. package/demos/pc/app/tag-input/webdoc/tag-input.cn.md +7 -0
  238. package/demos/pc/app/tag-input/webdoc/tag-input.en.md +7 -0
  239. package/demos/pc/app/tag-input/webdoc/tag-input.js +107 -0
  240. package/demos/pc/app/time-picker/basic-usage.spec.ts +5 -4
  241. package/demos/pc/app/time-picker/clearable.spec.ts +5 -4
  242. package/demos/pc/app/time-picker/default-value.spec.ts +2 -2
  243. package/demos/pc/app/time-picker/disabled.spec.ts +4 -3
  244. package/demos/pc/app/time-picker/format.spec.ts +8 -11
  245. package/demos/pc/app/time-picker/is-range.spec.ts +4 -3
  246. package/demos/pc/app/time-picker/name.spec.ts +1 -1
  247. package/demos/pc/app/time-picker/placeholder.spec.ts +3 -3
  248. package/demos/pc/app/time-picker/popper-class.spec.ts +1 -1
  249. package/demos/pc/app/time-picker/size.spec.ts +2 -1
  250. package/demos/pc/app/time-select/basic-usage.spec.ts +1 -1
  251. package/demos/pc/app/time-select/clear-icon.spec.ts +1 -2
  252. package/demos/pc/app/time-select/focus.spec.ts +1 -1
  253. package/demos/pc/app/time-select/picker-options.spec.ts +2 -1
  254. package/demos/pc/app/time-select/range-placeholder.spec.ts +2 -2
  255. package/demos/pc/app/time-select/size-medium.spec.ts +3 -3
  256. package/demos/pc/app/tooltip/delay.spec.js +7 -9
  257. package/demos/pc/app/tooltip/offset.spec.js +0 -2
  258. package/demos/pc/app/tooltip/popper-options.spec.js +2 -1
  259. package/demos/pc/menus.js +6 -4
  260. package/demos/pc/webdoc/changelog-en.md +209 -86
  261. package/demos/pc/webdoc/changelog.md +176 -257
  262. package/demos/pc/webdoc/develop-demo-en.md +13 -13
  263. package/demos/pc/webdoc/import-components.md +1 -1
  264. package/demos/pc/webdoc/introduce.md +2 -0
  265. package/demos/pc/webdoc/skills-en.md +107 -0
  266. package/demos/pc/webdoc/skills.md +107 -0
  267. package/demos/pc/webdoc/theme-en.md +82 -79
  268. package/demos/pc/webdoc/v3.28.0-release-article.md +943 -0
  269. package/demos/saas/menus.js +1 -0
  270. package/package.json +21 -20
  271. package/playground/App.vue +6 -4
  272. package/playground/shims/vue-search-box.mjs +154 -0
  273. package/public/static/css/mobile-dark-theme.css +1 -0
  274. package/src/i18n/index.js +1 -2
  275. package/src/main.js +8 -5
  276. package/src/style.css +5 -0
  277. package/src/views/components-doc/common.vue +0 -25
  278. package/src/views/components-doc/mobile.vue +49 -2
  279. package/vite.config.ts +3 -2
  280. package/vite.extend.ts +65 -0
  281. package/demos/pc/app/grid/webdoc/grid-ai-agent.js +0 -23
  282. package/demos/pc/webdoc/mcp-en.md +0 -101
  283. package/demos/pc/webdoc/mcp.md +0 -101
  284. package/src/components/mcp-docs.vue +0 -33
  285. package/src/composable/useTinyRemoter.ts +0 -176
@@ -23,7 +23,7 @@ export default {
23
23
  desc: {
24
24
  'zh-CN': '禁止添加的节点 key 值列表,也可通过 setAddDisabledKeys 方法设置',
25
25
  'en-US':
26
- 'List of key values of nodes that cannot be added. You can also use the setAddDisabledKeys method to set the key values.'
26
+ 'List of key values of nodes that cannot be added. You can also use the setAddDisabledKeys method to set the key values'
27
27
  },
28
28
  mode: ['pc'],
29
29
  pcDemo: 'edit-control'
@@ -45,7 +45,7 @@ export default {
45
45
  defaultValue: '',
46
46
  desc: {
47
47
  'zh-CN': '判断节点能否被拖拽',
48
- 'en-US': 'Whether a node can be dragged.'
48
+ 'en-US': 'Whether a node can be dragged'
49
49
  },
50
50
  mode: ['pc'],
51
51
  pcDemo: 'drag'
@@ -58,7 +58,7 @@ export default {
58
58
  'zh-CN':
59
59
  "拖拽时判定目标节点能否被放置。type 参数有三种情况:'prev'、'inner' 和 'next',分别表示放置在目标节点前、插入至目标节点和放置在目标节点后",
60
60
  'en-US':
61
- "Whether the target node can be placed during dragging. The type parameter has three situations: 'prev',' inner', and'next', which indicate that it is placed before the target node, inserted into the target node, and placed after the target node respectively"
61
+ "Whether the target node can be placed during dragging. The type parameter has three situations: 'prev', 'inner', and 'next', which indicate that it is placed before the target node, inserted into the target node, and placed after the target node respectively"
62
62
  },
63
63
  mode: ['pc'],
64
64
  pcDemo: 'drag'
@@ -137,7 +137,7 @@ export default {
137
137
  desc: {
138
138
  'zh-CN': '默认展开节点的keys。当属性变化时,会自动收起全部并重新展开指定的数据项。 ',
139
139
  'en-US':
140
- 'The keys of the node are expanded by default.When the property changes, it automatically collapses all and reexpands the specified data item.'
140
+ 'The keys of the node are expanded by default. When the property changes, it automatically collapses all and reexpands the specified data item'
141
141
  },
142
142
  mode: ['pc'],
143
143
  pcDemo: 'expand-control'
@@ -149,7 +149,7 @@ export default {
149
149
  desc: {
150
150
  'zh-CN': '禁止删除的节点 key 值列表,也可通过 setDeleteDisabledKeys 方法设置',
151
151
  'en-US':
152
- 'Indicates the list of key values of nodes that cannot be deleted. You can also use the setDeleteDisabledKeys method to set the key values.'
152
+ 'Indicates the list of key values of nodes that cannot be deleted. You can also use the setDeleteDisabledKeys method to set the key values'
153
153
  },
154
154
  mode: ['pc'],
155
155
  pcDemo: 'edit-control'
@@ -161,7 +161,7 @@ export default {
161
161
  desc: {
162
162
  'zh-CN': '删除节点的装置钩子函数,若返回 false 或者返回 Promise 且被 reject,则停止删除。 ',
163
163
  'en-US':
164
- 'Device hook function for deleting a node. If false is returned or Promise is returned and rejected, the deletion is stopped.'
164
+ 'Device hook function for deleting a node. If false is returned or Promise is returned and rejected, the deletion is stopped'
165
165
  },
166
166
  mode: ['pc'],
167
167
  pcDemo: 'edit-control'
@@ -184,7 +184,7 @@ export default {
184
184
  desc: {
185
185
  'zh-CN': '禁止编辑的节点 key 值列表,也可通过 setEditDisabledKeys 方法设置',
186
186
  'en-US':
187
- 'List of key values of nodes that cannot be edited. You can also use the setEditDisabledKeys method to set the key values.'
187
+ 'List of key values of nodes that cannot be edited. You can also use the setEditDisabledKeys method to set the key values'
188
188
  },
189
189
  mode: ['pc'],
190
190
  pcDemo: 'edit-control'
@@ -284,7 +284,7 @@ export default {
284
284
  defaultValue: '18',
285
285
  desc: {
286
286
  'zh-CN': '相邻级节点间的水平缩进,单位为像素',
287
- 'en-US': 'horizontal indentation between adjacent nodes, in pixels.'
287
+ 'en-US': 'horizontal indentation between adjacent nodes, in pixels'
288
288
  },
289
289
  mode: ['pc'],
290
290
  pcDemo: 'basic-usage'
@@ -308,7 +308,7 @@ export default {
308
308
  'zh-CN':
309
309
  '加载子树数据的方法。点击节点后,组件开始调用load方法,只有在load函数内调用resolve(data),才表示返回下级的数据成功。',
310
310
  'en-US':
311
- 'Method of loading subtree data. After the node is clicked, the component starts to call the load method. Only when resolve(data) is called in the load function, the data at the lower level is successfully returned.'
311
+ 'Method of loading subtree data. After the node is clicked, the component starts to call the load method. Only when resolve(data) is called in the load function, the data at the lower level is successfully returned'
312
312
  },
313
313
  mode: ['pc'],
314
314
  pcDemo: 'lazy'
@@ -387,7 +387,7 @@ export default {
387
387
  desc: {
388
388
  'zh-CN': '在严格模式时,是否显示勾选父节点时,自动勾选子节点的功能区域',
389
389
  'en-US':
390
- 'In strict mode, when the parent node is displayed, the function area of the child node is automatically selected.'
390
+ 'In strict mode, when the parent node is displayed, the function area of the child node is automatically selected'
391
391
  },
392
392
  mode: ['pc'],
393
393
  pcDemo: 'other'
@@ -453,7 +453,7 @@ export default {
453
453
  defaultValue: '',
454
454
  desc: {
455
455
  'zh-CN': '指示收缩的图标色',
456
- 'en-US': 'Icon indicating shrink color'
456
+ 'en-US': 'Icon indicating shrink color'
457
457
  },
458
458
  mode: ['pc'],
459
459
  pcDemo: 'icons'
@@ -488,7 +488,7 @@ export default {
488
488
  desc: {
489
489
  'zh-CN': '用于编辑模式下参数配置,指示新增节点的 id ,是否显示 id 重复的警告等',
490
490
  'en-US':
491
- 'Used for parameter configuration in editing mode, indicating the ID of a new node and whether to display a warning indicating duplicate IDs.'
491
+ 'Used for parameter configuration in editing mode, indicating the ID of a new node and whether to display a warning indicating duplicate IDs'
492
492
  },
493
493
  mode: ['pc'],
494
494
  pcDemo: 'edit'
@@ -499,7 +499,7 @@ export default {
499
499
  defaultValue: 'false',
500
500
  desc: {
501
501
  'zh-CN': '通过 <code> highlightQuery </code> 属性,是否在匹配的节点中,高亮搜索文字。',
502
- 'en-US': 'Indicates whether to highlight the search text in the matched node.'
502
+ 'en-US': 'Indicates whether to highlight the search text in the matched node'
503
503
  },
504
504
  mode: ['pc'],
505
505
  pcDemo: 'filter-view'
@@ -512,7 +512,7 @@ export default {
512
512
  'zh-CN':
513
513
  '通过设置 <code> showCheckedMark </code> 属性为true,且非多选模式时,可以在选中行的最右边显示 <code> √ </code> 号。',
514
514
  'en-US':
515
- 'By setting the <code> showCheckedMark </code> property to true, you can display the <code> √ </code> number on the far right when a line is selected.'
515
+ 'By setting the <code> showCheckedMark </code> property to true, you can display the <code> √ </code> number on the far right when a line is selected'
516
516
  },
517
517
  mode: ['pc'],
518
518
  pcDemo: ''
@@ -564,7 +564,7 @@ export default {
564
564
  'zh-CN':
565
565
  '平铺模式下,勾选或取消勾选节点的事件,需要设置show-checkbox为true才生效。<br>参数说明:{ plainNode: 被点击的节点数据, value: 复选框是否选中,取值true或false }',
566
566
  'en-US':
567
- 'In tile mode, select or deselect node events to take effect only when show-checkbox is set to true. <br> Parameter description: {plainNode: indicates the node data to be clicked. value: indicates whether the check box is selected. The value can be true or false.'
567
+ 'In tile mode, select or deselect node events to take effect only when show-checkbox is set to true. <br> Parameter description: {plainNode: indicates the node data to be clicked. value: indicates whether the check box is selected. The value can be true or false}'
568
568
  },
569
569
  mode: ['pc'],
570
570
  pcDemo: ''
@@ -874,7 +874,7 @@ export default {
874
874
  desc: {
875
875
  'zh-CN': '返回目前被选中的节点的 key 所组成的数组。当参数:leafOnly 为true时,只返回被选中的叶子节点。',
876
876
  'en-US':
877
- 'Returns an array of keys for the currently selected node. If the parameter: leafOnly is true, only the selected leaf nodes are returned.'
877
+ 'Returns an array of keys for the currently selected node. If the parameter: leafOnly is true, only the selected leaf nodes are returned'
878
878
  },
879
879
  mode: ['pc'],
880
880
  pcDemo: 'check-op'
@@ -929,7 +929,7 @@ export default {
929
929
  defaultValue: '',
930
930
  desc: {
931
931
  'zh-CN': '返回目前半选中的节点所组成的数组',
932
- 'en-US': 'Returns an array of currently half-selected nodes.'
932
+ 'en-US': 'Returns an array of currently half-selected nodes'
933
933
  },
934
934
  mode: ['pc'],
935
935
  pcDemo: 'check-op'
@@ -984,7 +984,7 @@ export default {
984
984
  defaultValue: '',
985
985
  desc: {
986
986
  'zh-CN': '在一个节点的前面增加一个节点',
987
- 'en-US': 'Add a node before a tree node.'
987
+ 'en-US': 'Add a node before a tree node'
988
988
  },
989
989
  mode: ['pc'],
990
990
  pcDemo: 'node-op'
@@ -1007,7 +1007,7 @@ export default {
1007
1007
  desc: {
1008
1008
  'zh-CN': '删除节点。当参数:isSaveChildNode为true时,当前节点的子元素上移至删除节点的父节点中去。',
1009
1009
  'en-US':
1010
- 'Delete a node. When isSaveChildNode is true, the child elements of the current node are moved up to the parent node of the deleted node.'
1010
+ 'Delete a node. When isSaveChildNode is true, the child elements of the current node are moved up to the parent node of the deleted node'
1011
1011
  },
1012
1012
  mode: ['pc'],
1013
1013
  pcDemo: 'node-op'
@@ -1040,7 +1040,7 @@ export default {
1040
1040
  defaultValue: '',
1041
1041
  desc: {
1042
1042
  'zh-CN': '设置禁止添加的节点 key 值列表',
1043
- 'en-US': 'Sets the list of key values of nodes that cannot be added.'
1043
+ 'en-US': 'Sets the list of key values of nodes that cannot be added'
1044
1044
  },
1045
1045
  mode: ['pc'],
1046
1046
  pcDemo: 'edit-control'
@@ -1129,7 +1129,7 @@ export default {
1129
1129
  defaultValue: '',
1130
1130
  desc: {
1131
1131
  'zh-CN': '设置禁止删除的节点 key 值列表',
1132
- 'en-US': 'Sets the list of key values of nodes that cannot be delete.'
1132
+ 'en-US': 'Sets the list of key values of nodes that cannot be delete'
1133
1133
  },
1134
1134
  mode: ['pc'],
1135
1135
  pcDemo: 'edit-control'
@@ -1140,7 +1140,7 @@ export default {
1140
1140
  defaultValue: '',
1141
1141
  desc: {
1142
1142
  'zh-CN': '设置禁止编辑的节点 key 值列表',
1143
- 'en-US': 'Sets the list of key values of nodes that cannot be edit.'
1143
+ 'en-US': 'Sets the list of key values of nodes that cannot be edit'
1144
1144
  },
1145
1145
  mode: ['pc'],
1146
1146
  pcDemo: 'edit-control'
@@ -1224,7 +1224,7 @@ export default {
1224
1224
  desc: {
1225
1225
  'zh-CN': '在严格模式显示自动勾选子节点的功能时,自定义开关右侧的内容',
1226
1226
  'en-US':
1227
- 'When the function of automatically selecting subnodes is displayed in strict mode, the content on the right of the customized switch is displayed.'
1227
+ 'When the function of automatically selecting subnodes is displayed in strict mode, the content on the right of the customized switch is displayed'
1228
1228
  },
1229
1229
  mode: ['pc'],
1230
1230
  pcDemo: 'other'
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <div>
3
+ <!-- 默认模式 -->
4
+ <tiny-button-group :data="groupData" v-model="checkedVal" />
5
+ <br>
6
+ <br>
7
+
8
+ <!-- 圆角合并模式 -->
9
+ <tiny-button-group :data="groupData" v-model="checkedVal" display-mode="merged" />
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+ import { TinyButtonGroup } from "@opentiny/vue";
15
+
16
+ export default {
17
+ components: {
18
+ TinyButtonGroup,
19
+ },
20
+ data() {
21
+ return {
22
+ checkedVal: "Button1",
23
+ groupData: [
24
+ { text: "Button1", value: "Button1" },
25
+ { text: "Button2", value: "Button2" },
26
+ { text: "Button3", value: "Button3" },
27
+ ],
28
+ };
29
+ },
30
+ };
31
+ </script>
@@ -52,6 +52,19 @@ export default {
52
52
  'en-US': '<p>bbutton click</p>'
53
53
  },
54
54
  codeFiles: ['enumeration.vue']
55
+ },
56
+ {
57
+ demoId: 'display-mode',
58
+ name: {
59
+ 'zh-CN': '按钮组显示模式',
60
+ 'en-US': 'button mode'
61
+ },
62
+ desc: {
63
+ 'zh-CN':
64
+ '<p>通过 <code>display-mode</code> 属性设置按钮组显示模式,可选值有 <code>default</code>(默认)和 <code>merged</code>(选块合并)。</p>',
65
+ 'en-US': '<p>button mode</p>'
66
+ },
67
+ codeFiles: ['display-mode.vue']
55
68
  }
56
69
  ]
57
70
  }
@@ -71,7 +71,7 @@ export default {
71
71
  'en-US': ''
72
72
  },
73
73
  desc: {
74
- 'zh-CN': '<p>通过dayTimes属性配置时间线模式下所展示的时间范围,默认为[8,18],可配范围[0,23]。</p>\n',
74
+ 'zh-CN': '<p>通过 dayTimes 属性配置时间线模式下所展示的时间范围,默认为 [8,18],可配范围 [0,23]。</p>\n',
75
75
  'en-US': '<p></p>\n'
76
76
  },
77
77
  codeFiles: ['calendar-timeline-range.vue']
@@ -96,7 +96,7 @@ export default {
96
96
  },
97
97
  desc: {
98
98
  'zh-CN':
99
- '<p>通过showMark回调函数来标记某些日期,markColor属性设置标记的颜色,此功能只在时间线模式和日程模式生效。markColor可选颜色同 theme</p>\n',
99
+ '<p>通过 showMark 回调函数来标记某些日期,markColor 属性设置标记的颜色,此功能只在时间线模式和日程模式生效。markColor 可选颜色同 theme</p>\n',
100
100
  'en-US': '<p></p>\n'
101
101
  },
102
102
  codeFiles: ['calendar-day-mark.vue']
@@ -133,8 +133,9 @@ export default {
133
133
  },
134
134
  desc: {
135
135
  'zh-CN':
136
- '<p>自定义日期单元格背景色。</p>\n<p>目前只支持预置的颜色,可选颜色blue、green、red、yellow、purple、cyan、grey</p>\n',
137
- 'en-US': '<p></p>\n'
136
+ '<p>自定义日期单元格背景色。</p>\n<p>目前支持预置的颜色,可选颜色 blue、green、red、yellow、purple、cyan、grey 和使用十六进制、rgb、rgba 的是自定义颜色</p>\n',
137
+ 'en-US':
138
+ '<p>Customize the background color of date cells.</p>\n<p>Currently supports both preset colors (options include blue, green, red, yellow, purple, cyan, and grey) and custom colors defined using hexadecimal, RGB, or RGBA values.</p>'
138
139
  },
139
140
  codeFiles: ['custom-day-bg-color.vue']
140
141
  },
@@ -58,7 +58,8 @@ export default {
58
58
  'en-US': 'events'
59
59
  },
60
60
  desc: {
61
- 'zh-CN': '<p>可通过 `duration` 属性设置自动关闭的延迟时间,只对 type=message 有效。<p>',
61
+ 'zh-CN':
62
+ '<p>可通过 `duration` 属性设置自动关闭的延迟时间,只对 type=message 有效,如果设置为0则窗口不会自动关闭。<p>',
62
63
  'en-US': '<p>bbutton click</p>'
63
64
  },
64
65
  codeFiles: ['duration.vue']
@@ -4,8 +4,16 @@ test('文字居中', async ({ page }) => {
4
4
  page.on('pageerror', (exception) => expect(exception).toBeNull())
5
5
  await page.goto('alert#center')
6
6
 
7
+ // 等待网络空闲,确保页面完全加载
8
+ await page.waitForLoadState('networkidle')
9
+
7
10
  const alert = page.locator('.tiny-alert')
8
11
 
12
+ // 首先验证基础类存在
13
+ await expect(alert).toHaveClass(/tiny-alert--info/)
14
+ await expect(alert).toHaveClass(/tiny-alert--normal/)
15
+
16
+ // 然后验证居中类
9
17
  await expect(alert).toHaveClass(/is-center/)
10
18
  await expect(alert).toHaveCSS('justify-content', 'center')
11
19
  })
@@ -1,5 +1,36 @@
1
1
  import { test, expect } from '@playwright/test'
2
2
 
3
+ // 测试所有 Alert 自定义图标
4
+ test('测试所有 Alert 自定义图标', async ({ page }) => {
5
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
6
+ await page.goto('alert#icon')
7
+
8
+ // 定义预期的图标路径
9
+ const expectedPaths = [
10
+ 'M8 1C4.13 1 1 4.13 1 8s3.13 7 7 7 7-3.14 7-7-3.14-7-7-7Z',
11
+ 'M8 1C4.13 1 1 4.13 1 8s3.13 7 7 7 7-3.14 7-7-3.14-7-7-7Z',
12
+ 'M8 1C4.13 1 1 4.13 1 8s3.13 7 7 7 7-3.14 7-7-3.14-7-7-7Z',
13
+ 'M8 1C4.13 1 1 4.13 1 8s3.13 7 7 7 7-3.14 7-7-3.14-7-7-7Z'
14
+ ]
15
+
16
+ // 获取页面上所有的 Alert 组件
17
+ const alerts = page.locator('.tiny-alert')
18
+
19
+ // 计算 Alert 组件的数量
20
+ const count = await alerts.count()
21
+
22
+ // 遍历所有 Alert 组件并验证图标路径
23
+ for (let i = 0; i < count; i++) {
24
+ // 定位第 i 个 Alert 组件
25
+ const alert = alerts.nth(i)
26
+ // 定位图标路径元素
27
+ const iconPath = alert.locator('.tiny-alert__icon path')
28
+ // 验证图标路径
29
+ await expect(iconPath).toHaveAttribute('d', expectedPaths[i])
30
+ }
31
+ })
32
+
33
+ // 测试关闭按钮
3
34
  test('关闭按钮', async ({ page }) => {
4
35
  page.on('pageerror', (exception) => expect(exception).toBeNull())
5
36
  await page.goto('alert#custom-close')
@@ -27,31 +58,30 @@ test('关闭按钮', async ({ page }) => {
27
58
  await expect(customAlert).toBeVisible()
28
59
  })
29
60
 
61
+ // 测试自定义关闭按钮文本
30
62
  test('自定义关闭按钮文本', async ({ page }) => {
31
63
  page.on('pageerror', (exception) => expect(exception).toBeNull())
32
64
  await page.goto('alert#custom-close')
33
65
 
34
- const alertError = page.locator('.tiny-alert').nth(1)
35
- const closeText = alertError.locator('.tiny-alert__close')
66
+ const closeText = await await page.getByLabel('Close', { exact: true })
36
67
 
37
- // 自定义按钮文字
38
- await expect(closeText).not.toBeVisible()
39
- await expect(alertError.locator('.is-custom').getByText('关闭')).toBeVisible()
68
+ await expect(closeText).toHaveText(/关闭/)
40
69
  })
41
70
 
71
+ // 测试关闭按钮事件
42
72
  test('关闭按钮事件', async ({ page }) => {
43
73
  page.on('pageerror', (exception) => expect(exception).toBeNull())
44
74
  await page.goto('alert#custom-close')
45
-
46
- const alertWarning = page.locator('.tiny-alert--warning')
75
+ const demo = page.locator('#custom-close')
76
+ const alertWarning = demo.locator('.tiny-alert--warning')
47
77
  const close = alertWarning.locator('.tiny-alert__close')
48
78
 
49
- // 点击关闭后警告消失,自定义事件 modalBox 提示出现
50
79
  await close.click()
80
+ // 点击关闭后警告消失
51
81
  await expect(alertWarning).not.toBeVisible()
52
- await expect(page.locator('.tiny-notify__content').getByText('触发关闭事件')).toBeVisible()
53
82
  })
54
83
 
84
+ // 测试不可关闭警告
55
85
  test('不可关闭警告', async ({ page }) => {
56
86
  page.on('pageerror', (exception) => expect(exception).toBeNull())
57
87
  await page.goto('alert#custom-close')
@@ -1,14 +1,25 @@
1
1
  import { test, expect } from '@playwright/test'
2
2
 
3
- test('测试 Alert 自定义图标', async ({ page }) => {
3
+ test('测试所有 Alert 自定义图标', async ({ page }) => {
4
4
  page.on('pageerror', (exception) => expect(exception).toBeNull())
5
5
  await page.goto('alert#icon')
6
6
 
7
- // 自定义图标和默认图标不同
8
- const iconCustomAlert = page.locator('.tiny-alert').nth(0)
7
+ const expectedPaths = [
8
+ 'M8 1C4.13 1 1 4.13 1 8s3.13 7 7 7 7-3.14 7-7-3.14-7-7-7Z',
9
+ 'M8 1C4.13 1 1 4.13 1 8s3.13 7 7 7 7-3.14 7-7-3.14-7-7-7Z',
10
+ 'M8 1C4.13 1 1 4.13 1 8s3.13 7 7 7 7-3.14 7-7-3.14-7-7-7Z',
11
+ 'M8 1C4.13 1 1 4.13 1 8s3.13 7 7 7 7-3.14 7-7-3.14-7-7-7Z'
12
+ ]
9
13
 
10
- await expect(iconCustomAlert.locator('.tiny-alert__icon:nth-child(1) path')).toHaveAttribute(
11
- 'd',
12
- /M13 3v1h-2V3h2zm-1.+1h2v-2h-2c-1\.4 0-2\.8-\.5-4-1\.3z/
13
- )
14
+ // 获取页面上所有的 Alert 组件
15
+ const alerts = page.locator('.tiny-alert')
16
+
17
+ // 计算 Alert 组件的数量
18
+ const count = await alerts.count()
19
+
20
+ for (let i = 0; i < count; i++) {
21
+ const alert = alerts.nth(i)
22
+ const iconPath = alert.locator('.tiny-alert__icon path')
23
+ await expect(iconPath).toHaveAttribute('d', expectedPaths[i])
24
+ }
14
25
  })
@@ -5,5 +5,5 @@ test('测试 Alert 不显示图标', async ({ page }) => {
5
5
  await page.goto('alert#show-icon')
6
6
 
7
7
  const noIconAlert = page.locator('.tiny-alert').nth(1)
8
- await expect(noIconAlert.locator('.tiny-alert__icon')).toHaveCount(1)
8
+ await expect(noIconAlert.locator('.tiny-alert__icon')).toHaveCount(0)
9
9
  })
@@ -10,6 +10,7 @@ export default {
10
10
  'zh-CN': '基本用法',
11
11
  'en-US': 'Basic Usage'
12
12
  },
13
+ hideSaas: true,
13
14
  desc: {
14
15
  'zh-CN': '通过 <code>links</code> 设置导航数据, <code>type</code> 设置类型。',
15
16
  'en-US': 'Set navigation data through <code>links</code> , and <code>type</code> to set the type.'
@@ -10,7 +10,7 @@ test('多选复制单个标签', async ({ page }) => {
10
10
 
11
11
  await expect(tag).toContainText('北京')
12
12
  await page.waitForTimeout(200)
13
- const tagBox = await tag.locator('span').boundingBox()
13
+ const tagBox = await tag.locator('span > span').boundingBox()
14
14
  const x = tagBox.x + tagBox.width
15
15
  const y = tagBox.y + tagBox.height - 5
16
16
 
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div>
3
+ <!-- 默认模式 -->
4
+ <tiny-button-group :data="groupData" v-model="checkedVal" />
5
+ <br />
6
+ <br />
7
+
8
+ <!-- 圆角合并模式 -->
9
+ <tiny-button-group :data="groupData" v-model="checkedVal" display-mode="merged" />
10
+ </div>
11
+ </template>
12
+
13
+ <script setup>
14
+ import { ref } from 'vue'
15
+ import { TinyButtonGroup } from '@opentiny/vue'
16
+
17
+ const checkedVal = ref('Button1')
18
+ const groupData = ref([
19
+ { text: 'Button1', value: 'Button1' },
20
+ { text: 'Button2', value: 'Button2' },
21
+ { text: 'Button3', value: 'Button3' }
22
+ ])
23
+ </script>
File without changes
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <div>
3
+ <!-- 默认模式 -->
4
+ <tiny-button-group :data="groupData" v-model="checkedVal" />
5
+ <br />
6
+ <br />
7
+
8
+ <!-- 圆角合并模式 -->
9
+ <tiny-button-group :data="groupData" v-model="checkedVal" display-mode="merged" />
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+ import { TinyButtonGroup } from '@opentiny/vue'
15
+
16
+ export default {
17
+ components: {
18
+ TinyButtonGroup
19
+ },
20
+ data() {
21
+ return {
22
+ checkedVal: 'Button1',
23
+ groupData: [
24
+ { text: 'Button1', value: 'Button1' },
25
+ { text: 'Button2', value: 'Button2' },
26
+ { text: 'Button3', value: 'Button3' }
27
+ ]
28
+ }
29
+ }
30
+ }
31
+ </script>
@@ -105,6 +105,7 @@ const groupDataTag = ref([
105
105
  }
106
106
 
107
107
  .tiny-button-group :deep(.sup-slot) {
108
+ display: flex;
108
109
  line-height: 1;
109
110
  padding: 0 4px;
110
111
  border-top-left-radius: 4px;
@@ -115,6 +115,7 @@ export default {
115
115
  }
116
116
 
117
117
  .tiny-button-group :deep(.sup-slot) {
118
+ display: flex;
118
119
  line-height: 1;
119
120
  padding: 0 4px;
120
121
  border-top-left-radius: 4px;
@@ -149,6 +149,20 @@ export default {
149
149
  'en-US': '<p>The <code>change</code> event is triggered when the selected button is changed. </p>'
150
150
  },
151
151
  codeFiles: ['change-event.vue']
152
+ },
153
+ {
154
+ demoId: 'display-mode',
155
+ name: {
156
+ 'zh-CN': '按钮组显示模式',
157
+ 'en-US': 'Button Group Display Mode'
158
+ },
159
+ desc: {
160
+ 'zh-CN':
161
+ '<p>通过 <code>display-mode</code> 属性设置按钮组显示模式,可选值有 <code>default</code>(默认)和 <code>merged</code>(选块合并)。</p>',
162
+ 'en-US':
163
+ '<p>Set the display mode of the button group through the <code>display-mode</code> attribute. The optional values are: <code>default</code> (default) and <code>merged</code> (merged).</p>'
164
+ },
165
+ codeFiles: ['display-mode.vue']
152
166
  }
153
167
  ],
154
168
  features: [
@@ -4,7 +4,7 @@ test('事件', async ({ page }) => {
4
4
  page.on('pageerror', (exception) => expect(exception).toBeNull())
5
5
  await page.goto('calendar-view#calendar-event')
6
6
  const timeInput = page.locator('.tiny-calendar-view').locator('.tiny-input__inner')
7
- const timeBtn = page.getByRole('textbox', { name: '年 05 月' })
7
+ const timeBtn = page.getByRole('combobox', { name: '年 05 月' })
8
8
  const leftYear = page.getByRole('button', { name: '前一年' })
9
9
  const month6 = page.getByText('6 月')
10
10
  const leftSvg = page.locator('.header-left > .tiny-svg')
@@ -19,6 +19,16 @@ export default {
19
19
  setDayBgColor(date) {
20
20
  if (date.split('-')[2] === '10') {
21
21
  return 'red'
22
+ }else if (date.split('-')[2] === '15') {
23
+ return '#00FF00'
24
+ } else if (date.split('-')[2] === '20') {
25
+ return 'rgb(0,0,255)'
26
+ }else if (date.split('-')[2] === '25') {
27
+ return 'rgba(255,0,0,0.5)'
28
+ }else if( date.split('-')[2] === '5'){
29
+ return 'yellow'
30
+ }else if ( date.split('-')[2] === '8'){
31
+ return 'green'
22
32
  }
23
33
  return ''
24
34
  }
@@ -139,9 +139,9 @@ export default {
139
139
  },
140
140
  desc: {
141
141
  'zh-CN':
142
- '<p>自定义日期单元格背景色。</p>\n<p>目前只支持预置的颜色,可选颜色 blue、green、red、yellow、purple、cyan、grey</p>\n',
142
+ '<p>自定义日期单元格背景色。</p>\n<p>目前支持预置的颜色,可选颜色 blue、green、red、yellow、purple、cyan、grey 和使用十六进制、rgb、rgba 的是自定义颜色</p>\n',
143
143
  'en-US':
144
- '<p>Customize the background color of the date cell. </p>\n<p>Currently, only preset colors are supported. The options are blue, green, red, yellow, purple, cyan, and grey.</p>'
144
+ '<p>Customize the background color of date cells.</p>\n<p>Currently supports both preset colors (options include blue, green, red, yellow, purple, cyan, and grey) and custom colors defined using hexadecimal, RGB, or RGBA values.</p>'
145
145
  },
146
146
  codeFiles: ['custom-day-bg-color.vue']
147
147
  },
@@ -178,7 +178,7 @@ export default {
178
178
  '<p>mode-change:模式切换事件</p>',
179
179
  'en-US':
180
180
  '<p>Calendar throws the following events:</p>\n' +
181
- '<p>date-click:日期点击事件: Date click event</p>\n' +
181
+ '<p>date-click:日期点击事件:Date click event</p>\n' +
182
182
  '<p>new-schedule: Add a schedule button click event</p>\n' +
183
183
  '<p>selected-date-change: selected date change event</p>\n' +
184
184
  '<p>prev-week-click: button click event of the last week</p>\n' +
@@ -346,7 +346,7 @@ export default {
346
346
  value: true
347
347
  },
348
348
  description:
349
- '自定义日期单元格背景色,目前只支持预置的颜色,可选颜色 blue、green、red、yellow、purple、cyan、grey',
349
+ '自定义日期单元格背景色,目前支持预置的颜色,可选颜色 blue、green、red、yellow、purple、cyan、grey 和使用十六进制、rgb、rgba 的是自定义颜色。',
350
350
  cloud: {
351
351
  value: false
352
352
  },
@@ -19,6 +19,8 @@
19
19
  import { ref } from 'vue'
20
20
  import { TinyCascader } from '@opentiny/vue'
21
21
 
22
+ const value = ref('anzhuangcli')
23
+
22
24
  const options = ref([
23
25
  {
24
26
  value: 'zhinan',
@@ -167,7 +169,4 @@ const options = ref([
167
169
  ]
168
170
  }
169
171
  ])
170
-
171
- // 使用 ref 创建响应式引用,这样才能用于 v-model 双向绑定
172
- const value = ref('anzhuangcli')
173
172
  </script>
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <tiny-checkbox-group v-model="checkedData">
3
- <tiny-checkbox label="复选框 1" name="name1"></tiny-checkbox>
4
- <tiny-checkbox label="复选框 2" name="name2" checked></tiny-checkbox>
5
- <tiny-checkbox label="复选框 3" name="name3"></tiny-checkbox>
3
+ <tiny-checkbox label="复选框 1" name="name1" style="margin-bottom: 8px"></tiny-checkbox>
4
+ <tiny-checkbox label="复选框 2" name="name2" checked style="margin-bottom: 8px"></tiny-checkbox>
5
+ <tiny-checkbox label="复选框 3" name="name3" style="margin-bottom: 8px"></tiny-checkbox>
6
6
  </tiny-checkbox-group>
7
7
  </template>
8
8