@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
@@ -0,0 +1,84 @@
1
+ <template>
2
+ <div>
3
+ <tiny-button plain class="show-close-btn" @click="stepStart">新手引导显示关闭按钮</tiny-button>
4
+ <tiny-guide :show-step="showStep" :dom-data="domData" :show-close="true"></tiny-guide>
5
+
6
+ <tiny-button plain class="hide-close-btn" style="margin-top: 20px" @click="stepStartWithoutClose"
7
+ >新手引导隐藏关闭按钮</tiny-button
8
+ >
9
+ <tiny-guide :show-step="showStepWithoutClose" :dom-data="domDataWithoutClose" :show-close="false"></tiny-guide>
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+ import { TinyGuide, TinyButton } from '@opentiny/vue'
15
+
16
+ export default {
17
+ components: {
18
+ TinyGuide,
19
+ TinyButton
20
+ },
21
+ data() {
22
+ return {
23
+ showStep: false,
24
+ showStepWithoutClose: false,
25
+ domData: [
26
+ {
27
+ title: '新手引导标题 1',
28
+ text: '这里是可以关闭的新手引导,点击右上角的关闭按钮可直接退出引导',
29
+ domElement: '.show-close-btn',
30
+ button: [
31
+ {
32
+ text: '下一步',
33
+ action: 'next'
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ title: '新手引导标题 2',
39
+ text: '这个引导步骤展示了关闭按钮功能',
40
+ domElement: '.show-close-btn',
41
+ button: [
42
+ {
43
+ text: '完成',
44
+ action: 'complete'
45
+ }
46
+ ]
47
+ }
48
+ ],
49
+ domDataWithoutClose: [
50
+ {
51
+ title: '新手引导标题 1',
52
+ text: '这里是不显示关闭按钮的新手引导,无法通过关闭按钮退出引导',
53
+ domElement: '.hide-close-btn',
54
+ button: [
55
+ {
56
+ text: '下一步',
57
+ action: 'next'
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ title: '新手引导标题 2',
63
+ text: '这个引导没有关闭按钮,只能通过底部按钮操作',
64
+ domElement: '.hide-close-btn',
65
+ button: [
66
+ {
67
+ text: '完成',
68
+ action: 'complete'
69
+ }
70
+ ]
71
+ }
72
+ ]
73
+ }
74
+ },
75
+ methods: {
76
+ stepStart() {
77
+ this.showStep = !this.showStep
78
+ },
79
+ stepStartWithoutClose() {
80
+ this.showStepWithoutClose = !this.showStepWithoutClose
81
+ }
82
+ }
83
+ }
84
+ </script>
@@ -128,6 +128,18 @@ export default {
128
128
  'en-US': ''
129
129
  },
130
130
  codeFiles: ['callback.vue']
131
+ },
132
+ {
133
+ demoId: 'show-close',
134
+ name: {
135
+ 'zh-CN': '关闭按钮',
136
+ 'en-US': ''
137
+ },
138
+ desc: {
139
+ 'zh-CN': '<p>通过添加 <code>showClose</code> 来自定义是否显示关闭按钮。默认值为 <code>false</code> </p>',
140
+ 'en-US': ''
141
+ },
142
+ codeFiles: ['show-close.vue']
131
143
  }
132
144
  ],
133
145
  features: [
@@ -307,7 +307,7 @@ export const batch3Icons = [
307
307
  'IconEquipment',
308
308
  'IconExchangerate',
309
309
  'IconFastCode',
310
- 'IconGeneralAi',
310
+ 'IconAIGeneral',
311
311
  'IconGeneralPageIndigo',
312
312
  'IconIndicatorArtifactConfiguration',
313
313
  'IconInspectionPlan',
@@ -402,7 +402,6 @@ export const batch3Icons = [
402
402
  'IconTermination',
403
403
  'IconTimezone',
404
404
  'IconTrain',
405
- 'IconTransfer',
406
405
  'IconTransferInventoryList',
407
406
  'IconTransferringInventoryListsAcrossOrganizations',
408
407
  'IconTransportation',
@@ -410,3 +409,110 @@ export const batch3Icons = [
410
409
  'IconWaybill',
411
410
  'IconWorkOvertime'
412
411
  ]
412
+
413
+ export const batch4Icons = [
414
+ 'IconAIAbout',
415
+ 'IconAIApplication',
416
+ 'IconAIBrowsingHistory',
417
+ 'IconAICalendar',
418
+ 'IconAIComputingPowerAIPolicy',
419
+ 'IconAIConferenceManagement',
420
+ 'IconAIDocument',
421
+ 'IconAIDocumentQA',
422
+ 'IconAIExternalKnowledgeAnswer',
423
+ 'IconAIFindRecords',
424
+ 'IconAIFollowUp',
425
+ 'IconAIGCPainting',
426
+ 'IconAIImageBasedTextRecognition',
427
+ 'IconAIInformation',
428
+ 'IconAIInternalKnowledgeAnswers',
429
+ 'IconAIITServiceQA',
430
+ 'IconAILabelExtraction',
431
+ 'IconAIMemorySpace',
432
+ 'IconAIOfficeDataSearch',
433
+ 'IconAIOrganization',
434
+ 'IconAIPosting',
435
+ 'IconAIProcessQA',
436
+ 'IconAIQuestion',
437
+ 'IconAIReading',
438
+ 'IconAISearch',
439
+ 'IconAISearchPeople',
440
+ 'IconAISearchQA',
441
+ 'IconAISmartLookup',
442
+ 'IconAISmartNotes',
443
+ 'IconAISmartTranslation',
444
+ 'IconAITakingPhotos',
445
+ 'IconAITechnicalInsightsQA',
446
+ 'IconAITerminologyQA',
447
+ 'IconAITranslation',
448
+ 'IconAIUCDSearch',
449
+ 'IconAIWebQA',
450
+ 'IconAIWrite',
451
+ 'IconAIWriting',
452
+ 'IconAnalysisTypeContainer',
453
+ 'IconAnchor',
454
+ 'IconApprovalFlow',
455
+ 'IconAvatar',
456
+ 'IconBadge',
457
+ 'IconButton',
458
+ 'IconButtonBar',
459
+ 'IconCalendarView',
460
+ 'IconCardGroup',
461
+ 'IconCardTemplate',
462
+ 'IconCarousel',
463
+ 'IconCascader',
464
+ 'IconChart',
465
+ 'IconCheckbox',
466
+ 'IconChooser',
467
+ 'IconCreatePage',
468
+ 'IconDetailsTemplatePage',
469
+ 'IconDialogBox',
470
+ 'IconDialogSelect',
471
+ 'IconFavorites',
472
+ 'IconFilterView',
473
+ 'IconFloating',
474
+ 'IconFlowchart',
475
+ 'IconFoldingPanelContainers',
476
+ 'IconForm',
477
+ 'IconGeneralPage',
478
+ 'IconGrid',
479
+ 'IconImage',
480
+ 'IconInput',
481
+ 'IconListSheet',
482
+ 'IconMetAlert',
483
+ 'IconMultiColumnContainer',
484
+ 'IconMultipleContainerGroups',
485
+ 'IconNavigationContainer',
486
+ 'IconNumber',
487
+ 'IconNumeric',
488
+ 'IconObjectInfo',
489
+ 'IconPageLoader',
490
+ 'IconPager',
491
+ 'IconProcessOverview',
492
+ 'IconProgress',
493
+ 'IconPromptBox',
494
+ 'IconRadio',
495
+ 'IconRecord',
496
+ 'IconRuleBuilder',
497
+ 'IconSelection',
498
+ 'IconSelectView',
499
+ 'IconShortcut',
500
+ 'IconSlider',
501
+ 'IconSliderButton',
502
+ 'IconSplitPanelContainer',
503
+ 'IconSpreadGrid',
504
+ 'IconStandardList',
505
+ 'IconSteps',
506
+ 'IconSwitch',
507
+ 'IconSwitchCard',
508
+ 'IconTabContainer',
509
+ 'IconTabs',
510
+ 'IconTag',
511
+ 'IconTagGroup',
512
+ 'IconTimeLine',
513
+ 'IconTimePicker',
514
+ 'IconTitleContainer',
515
+ 'IconTransfer',
516
+ 'IconTree',
517
+ 'IconTreeMenuContainer'
518
+ ]
@@ -29,6 +29,7 @@
29
29
  <tiny-input v-model="underlay.scale" clearable autofocus size="small" style="width: 120px"></tiny-input>
30
30
  </tiny-form-item>
31
31
  </tiny-form>
32
+ <h3>第一批次图标</h3>
32
33
  <div class="svgs-wrapper">
33
34
  <div
34
35
  v-for="name in advanceIcons"
@@ -51,6 +52,7 @@
51
52
  </div>
52
53
  </div>
53
54
  <hr />
55
+ <h3>第二批次图标</h3>
54
56
  <div class="svgs-wrapper">
55
57
  <div
56
58
  v-for="name in batch3Icons"
@@ -72,13 +74,36 @@
72
74
  <span class="svgs-text" :title="name">{{ name }}</span>
73
75
  </div>
74
76
  </div>
77
+ <hr />
78
+ <h3>第三批次图标</h3>
79
+ <div class="svgs-wrapper">
80
+ <div
81
+ v-for="name in batch4Icons"
82
+ :key="name"
83
+ :class="{
84
+ 'svg-visible': searchName === '' || name.toLowerCase().includes(searchName.toLowerCase()),
85
+ 'svgs-item': true
86
+ }"
87
+ @click="click(name)"
88
+ >
89
+ <component
90
+ :is="Svgs[name] && Svgs[name]()"
91
+ class="svgs-icon"
92
+ :first-color="firstColor"
93
+ :second-color="secondColor"
94
+ :shape="shape"
95
+ :underlay="isUnderlay ? underlay : null"
96
+ ></component>
97
+ <span class="svgs-text" :title="name">{{ name }}</span>
98
+ </div>
99
+ </div>
75
100
  </div>
76
101
  </template>
77
102
 
78
103
  <script setup lang="js">
79
104
  import Svgs from '@opentiny/vue-icon'
80
105
  import { TinyForm, TinyFormItem, TinyModal, TinyInput, TinyRadioGroup, TinyRadio, TinySwitch } from '@opentiny/vue'
81
- import { advanceIcons, batch3Icons } from './advance-icons.js'
106
+ import { advanceIcons, batch3Icons, batch4Icons } from './advance-icons.js'
82
107
  import { getCurrentInstance, ref, watch } from 'vue'
83
108
 
84
109
  const searchName = ref('')
@@ -29,6 +29,7 @@
29
29
  <tiny-input v-model="underlay.scale" clearable autofocus size="small" style="width: 120px"></tiny-input>
30
30
  </tiny-form-item>
31
31
  </tiny-form>
32
+ <h3>第一批次图标</h3>
32
33
  <div class="svgs-wrapper">
33
34
  <div
34
35
  v-for="name in advanceIcons"
@@ -51,6 +52,7 @@
51
52
  </div>
52
53
  </div>
53
54
  <hr />
55
+ <h3>第二批次图标</h3>
54
56
  <div class="svgs-wrapper">
55
57
  <div
56
58
  v-for="name in batch3Icons"
@@ -72,6 +74,29 @@
72
74
  <span class="svgs-text" :title="name">{{ name }}</span>
73
75
  </div>
74
76
  </div>
77
+ <hr />
78
+ <h3>第三批次图标</h3>
79
+ <div class="svgs-wrapper">
80
+ <div
81
+ v-for="name in batch4Icons"
82
+ :key="name"
83
+ :class="{
84
+ 'svg-visible': searchName === '' || name.toLowerCase().includes(searchName.toLowerCase()),
85
+ 'svgs-item': true
86
+ }"
87
+ @click="click(name)"
88
+ >
89
+ <component
90
+ :is="Svgs[name] && Svgs[name]()"
91
+ class="svgs-icon"
92
+ :first-color="firstColor"
93
+ :second-color="secondColor"
94
+ :shape="shape"
95
+ :underlay="isUnderlay ? underlay : null"
96
+ ></component>
97
+ <span class="svgs-text" :title="name">{{ name }}</span>
98
+ </div>
99
+ </div>
75
100
  </div>
76
101
  </template>
77
102
 
@@ -87,7 +112,7 @@ import {
87
112
  TinyColorPicker,
88
113
  TinySwitch
89
114
  } from '@opentiny/vue'
90
- import { advanceIcons, batch3Icons } from './advance-icons.js'
115
+ import { advanceIcons, batch3Icons, batch4Icons } from './advance-icons.js'
91
116
 
92
117
  export default {
93
118
  components: {
@@ -104,6 +129,7 @@ export default {
104
129
  Svgs,
105
130
  advanceIcons,
106
131
  batch3Icons,
132
+ batch4Icons,
107
133
  searchName: '',
108
134
  shape: 'line',
109
135
  firstColor: '#0067D1',
@@ -12,7 +12,7 @@ export default {
12
12
  },
13
13
  desc: {
14
14
  'zh-CN': `
15
- 从 <code>@opentiny/vue-icon</code> 图标库中引入图标函数。图标函数执行后生成一个有效的 <code> Vue </code> 图标组件,可以在模板中使用。<br>
15
+ 从 <code>@opentiny/vue-icon</code> 图标库中引入图标函数,图标函数执行后生成一个有效的 <code> Vue </code> 图标组件,可以在模板中使用。在组件内应该保存图标组件的变量用于绑定,要避免在模板上直接绑定图标函数的执行。<br>
16
16
  通过修改图标的 <code>font-size</code> 的样式,指定图标的大小,通过修改<code>fill</code> 的样式指定图标的颜色。
17
17
  <div class="tip custom-block">
18
18
  <p class="custom block title"> 常见的图标使用方式 </p>
@@ -20,10 +20,11 @@ export default {
20
20
  1、在模板中通过标签式引入。比如 <code> &lt;tiny-shared /&gt; </code> <br>
21
21
  2、在模板中通过<code> &lt;component&gt; </code> 组件引入。比如 <code> &lt;component :is="tinyShared" /&gt; </code> <br>
22
22
  3、在组件属性中传入。比如 <code> &lt;tiny-button :icon="tinyShared" &gt; </code> <br>
23
+ 4、避免模板绑定图标函数的执行。不建议 <code> &lt;component :is="IconShared()" /&gt; </code>
23
24
  </div>
24
25
  `,
25
26
  'en-US': `
26
- Introduce icon functions from the <code>@opentiny/vue-icon</code> icon library. The execution of the icon function generates a valid <code> Vue </code> icon component that can be used in the template. <br>
27
+ Introduce icon functions from the <code>@opentiny/vue-icon</code> icon library. The execution of the icon function generates a valid <code> Vue </code> icon component that can be used in the template.Save the icon component variables for binding within the component. Avoid directly binding the icon function execution on the template. <br>
27
28
  Specify the size of the icon by modifying the <code>font-size</code> style, and specify the color of the icon by modifying <code>fill</code>.
28
29
  <div class="tip custom-block">
29
30
  <p class="custom block title"> Common icon usage </p>
@@ -31,6 +32,7 @@ export default {
31
32
  1. Import labels in the template. For example, <code> &lt; tiny-shared /&gt; </code> <br>
32
33
  2, in the template by <code> &lt; component&gt; The </code> component is introduced. For example, <code> &lt; component :is="tinyShared" /&gt; </code> <br>
33
34
  3. Pass in component properties. For example, <code> &lt; tiny-button :icon="tinyShared" &gt; </code> <br>
35
+ 4. Avoid executing template-bound icon functions.Not recommended <code> &lt;component :is="IconShared()" /&gt; </code>
34
36
  </div>
35
37
  `
36
38
  },
@@ -57,7 +59,7 @@ export default {
57
59
  'en-US': 'Icon Set'
58
60
  },
59
61
  desc: {
60
- 'zh-CN': `Saas业务梳理280多个标准图标,Saas业务的应用必须使用标准图标。它新增了三大功能:支持线性、面性图标切换,支持双色切换和托底效果。<br>
62
+ 'zh-CN': `Saas业务梳理 600 多个标准图标,Saas业务的应用必须使用标准图标。它新增了三大功能:支持线性、面性图标切换,支持双色切换和托底效果。<br>
61
63
  通过<code>shape</code> 属性,设置图标的线性或面性图标,它支持<code>'line' | 'filled' </code>, 默认为线性图标 。\n<br>
62
64
  通过<code>firstColor, secondColor</code>属性,设置图标的主色和副色。\n<br>
63
65
  通过<code>underlay</code>属性,设置图标的托底效果。默认样式: { background:'#eef3fe', borderRadius:'4px',scale:0.8 } <br>
@@ -38,7 +38,7 @@ test('可缩放文本域', async ({ page }) => {
38
38
  // autosize 检查高度
39
39
  await textarea2.nth(1).fill('')
40
40
  defaultHeight = await textarea2
41
- .nth(0)
41
+ .nth(1)
42
42
  .boundingBox()
43
43
  .then((box) => box?.height)
44
44
  await textarea2.nth(1).fill(fillText + fillText)
@@ -47,5 +47,5 @@ test('可缩放文本域', async ({ page }) => {
47
47
  .boundingBox()
48
48
  .then((box) => box?.height)
49
49
  await expect(fill1Height).not.toBeNull()
50
- await expect(defaultHeight).toBeGreaterThanOrEqual(fill1Height || 0)
50
+ await expect(fill1Height).toBeGreaterThanOrEqual(defaultHeight || 0)
51
51
  })
@@ -31,6 +31,6 @@ const TinyIconFilletExternalLink = iconFilletExternalLink()
31
31
 
32
32
  <style scoped>
33
33
  .tiny-link {
34
- margin-right: 48px;
34
+ margin-right: 8px;
35
35
  }
36
36
  </style>
@@ -38,6 +38,6 @@ export default {
38
38
 
39
39
  <style scoped>
40
40
  .tiny-link {
41
- margin-right: 48px;
41
+ margin-right: 8px;
42
42
  }
43
43
  </style>
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <div>
3
+ <p>Link 组件 target 属性示例</p>
4
+ <div class="demo-link-target">
5
+ <tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_blank">在新窗口打开</tiny-link>
6
+ <tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_self">在当前窗口打开</tiny-link>
7
+ <tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_parent">在父框架中打开</tiny-link>
8
+ <tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_top">在整个窗口中打开</tiny-link>
9
+ </div>
10
+ </div>
11
+ </template>
12
+
13
+ <script setup>
14
+ import { TinyLink } from '@opentiny/vue'
15
+ </script>
16
+
17
+ <style scoped>
18
+ .demo-link-target {
19
+ margin-top: 20px;
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: 10px;
23
+ }
24
+ </style>
@@ -0,0 +1,41 @@
1
+ import { test, expect } from '@playwright/test'
2
+
3
+ test.describe('Link Target 功能', () => {
4
+ test('验证不同target值的链接行为', async ({ page }) => {
5
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
6
+ await page.goto('link#target')
7
+
8
+ // 使用正确的选择器 - 选择所有链接
9
+ const links = page.locator('.demo-link-target a')
10
+
11
+ // 验证链接数量
12
+ await expect(links).toHaveCount(4)
13
+
14
+ // 验证每个链接的target属性
15
+ const targets = ['_blank', '_self', '_parent', '_top']
16
+ for (let i = 0; i < targets.length; i++) {
17
+ const link = links.nth(i)
18
+ await expect(link).toHaveAttribute('target', targets[i])
19
+ }
20
+
21
+ // 验证链接文本
22
+ const expectedTexts = ['在新窗口打开', '在当前窗口打开', '在父框架中打开', '在整个窗口中打开']
23
+ for (let i = 0; i < expectedTexts.length; i++) {
24
+ const link = links.nth(i)
25
+ await expect(link).toContainText(expectedTexts[i])
26
+ }
27
+ })
28
+
29
+ test('验证链接的href属性', async ({ page }) => {
30
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
31
+ await page.goto('link#target')
32
+
33
+ const links = page.locator('.demo-link-target a')
34
+
35
+ // 验证所有链接都有相同的href
36
+ for (let i = 0; i < 4; i++) {
37
+ const link = links.nth(i)
38
+ await expect(link).toHaveAttribute('href', 'https://opentiny.design/tiny-vue')
39
+ }
40
+ })
41
+ })
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <div>
3
+ <p>Link 组件 target 属性示例</p>
4
+ <div class="demo-link-target">
5
+ <tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_blank">在新窗口打开</tiny-link>
6
+ <tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_self">在当前窗口打开</tiny-link>
7
+ <tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_parent">在父框架中打开</tiny-link>
8
+ <tiny-link :underline="false" href="https://opentiny.design/tiny-vue" target="_top">在整个窗口中打开</tiny-link>
9
+ </div>
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+ import { TinyLink } from '@opentiny/vue'
15
+
16
+ export default {
17
+ components: {
18
+ TinyLink
19
+ }
20
+ }
21
+ </script>
22
+
23
+ <style scoped>
24
+ .demo-link-target {
25
+ margin-top: 20px;
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: 10px;
29
+ }
30
+ </style>
@@ -84,6 +84,20 @@ export default {
84
84
  '<p>Use the <code>href</code> attribute to specify the URL to be redirected to. This attribute can be used together with the native attribute <code>target</code>. </p>'
85
85
  },
86
86
  codeFiles: ['config-href.vue']
87
+ },
88
+ {
89
+ demoId: 'target',
90
+ name: {
91
+ 'zh-CN': '打开方式',
92
+ 'en-US': 'Open mode'
93
+ },
94
+ desc: {
95
+ 'zh-CN':
96
+ '<p>通过 <code>target</code> 配置链接打开方式,可选值有 <code>_self</code>、<code>_blank</code>、<code>_parent</code>、<code>_top</code>。</p>',
97
+ 'en-US':
98
+ '<p>Use the <code>target</code> attribute to configure the link opening mode. The optional values are <code>_self</code>, <code>_blank</code>, <code>_parent</code>, <code>_top</code>. </p>'
99
+ },
100
+ codeFiles: ['target.vue']
87
101
  }
88
102
  ],
89
103
  hiddenDemo: {
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <div>
3
+ <h2>消息状态:</h2>
4
+ <div class="content">
5
+ <tiny-button @click="infoClick()">信息提示图标</tiny-button>
6
+ <tiny-button @click="successClick()">成功提示图标</tiny-button>
7
+ <tiny-button @click="warningClick()">警告提示图标</tiny-button>
8
+ <tiny-button @click="errorClick()">错误提示图标</tiny-button>
9
+ <tiny-button @click="loadingClick()">加载提示图标</tiny-button>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script setup>
15
+ import { Button as TinyButton, Message } from '@opentiny/vue'
16
+
17
+ function infoClick() {
18
+ console.log(Message, 18)
19
+ Message.message({ message: '基本提示图标', status: 'info' })
20
+ }
21
+
22
+ function successClick() {
23
+ Message.message({ message: '成功提示图标', status: 'success' })
24
+ }
25
+
26
+ function warningClick() {
27
+ Message.message({ message: '警告提示图标', status: 'warning' })
28
+ }
29
+
30
+ function errorClick() {
31
+ Message.message({ message: '错误提示图标', status: 'error' })
32
+ }
33
+
34
+ function loadingClick() {
35
+ Message.message({ message: '加载提示图标', status: 'loading' })
36
+ }
37
+ </script>
38
+
39
+ <style scoped>
40
+ h2 {
41
+ font-size: 16px;
42
+ font-weight: bold;
43
+ margin: 20px 0 12px;
44
+ }
45
+ .content {
46
+ margin: 8px;
47
+ }
48
+ </style>
@@ -0,0 +1,27 @@
1
+ import { test, expect } from '@playwright/test'
2
+
3
+ test('状态和图标', async ({ page }) => {
4
+ page.on('pageerror', (exception) => expect(exception).toBeNull())
5
+ await page.goto('message#basic-usage')
6
+ const message = page.locator('.type__message.is__visible')
7
+
8
+ // ----消息状态示例----
9
+ await page.getByRole('button', { name: '信息提示图标' }).click()
10
+ await expect(message).toHaveClass(/status__info/)
11
+
12
+ // ----消息状态示例----
13
+ await page.getByRole('button', { name: '成功提示图标' }).click()
14
+ await expect(message.nth(1)).toHaveClass(/status__success/)
15
+
16
+ // ----消息状态示例----
17
+ await page.getByRole('button', { name: '警告提示图标' }).click()
18
+ await expect(message.nth(2)).toHaveClass(/status__warning/)
19
+
20
+ // ----消息状态示例----
21
+ await page.getByRole('button', { name: '错误提示图标' }).click()
22
+ await expect(message.nth(3)).toHaveClass(/status__error/)
23
+
24
+ // ----消息状态示例----
25
+ await page.getByRole('button', { name: '加载提示图标' }).click()
26
+ await expect(message.nth(4)).toHaveClass(/status__loading/)
27
+ })
@@ -0,0 +1,50 @@
1
+ <template>
2
+ <div>
3
+ <h2>消息状态:</h2>
4
+ <div class="content">
5
+ <tiny-button @click="infoClick()">信息提示图标</tiny-button>
6
+ <tiny-button @click="successClick()">成功提示图标</tiny-button>
7
+ <tiny-button @click="warningClick()">警告提示图标</tiny-button>
8
+ <tiny-button @click="errorClick()">错误提示图标</tiny-button>
9
+ <tiny-button @click="loadingClick()">加载提示图标</tiny-button>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import { Button, Message } from '@opentiny/vue'
16
+
17
+ export default {
18
+ components: {
19
+ TinyButton: Button
20
+ },
21
+ methods: {
22
+ infoClick() {
23
+ Message.message({ message: '基本提示图标', status: 'info' })
24
+ },
25
+ successClick() {
26
+ Message.message({ message: '成功提示图标', status: 'success' })
27
+ },
28
+ warningClick() {
29
+ Message.message({ message: '警告提示图标', status: 'warning' })
30
+ },
31
+ errorClick() {
32
+ Message.message({ message: '错误提示图标', status: 'error' })
33
+ },
34
+ loadingClick() {
35
+ Message.message({ message: '加载提示图标', status: 'loading' })
36
+ }
37
+ }
38
+ }
39
+ </script>
40
+
41
+ <style scoped>
42
+ h2 {
43
+ font-size: 16px;
44
+ font-weight: bold;
45
+ margin: 20px 0 12px;
46
+ }
47
+ .content {
48
+ margin: 8px;
49
+ }
50
+ </style>