@opentiny/vue-docs 2.2.7 → 2.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demos/mobile/app/button/base.vue +42 -0
- package/demos/mobile/app/button/disabled.vue +42 -0
- package/demos/mobile/app/button/event.vue +46 -0
- package/demos/mobile/app/button/icon.vue +8 -7
- package/demos/mobile/app/button/loading.vue +21 -9
- package/demos/mobile/app/button/reset-time.vue +9 -16
- package/demos/mobile/app/button/size.vue +28 -11
- package/demos/mobile/app/button/webdoc/button.js +43 -98
- package/demos/mobile/app/file-upload/custom-upload-tip.vue +1 -1
- package/demos/mobile/app/switch/webdoc/switch.cn.md +3 -4
- package/demos/mobile-first/app/switch/webdoc/switch.cn.md +1 -1
- package/demos/mobile-first/app/switch/webdoc/switch.en.md +1 -1
- package/demos/pc/app/action-menu/webdoc/action-menu.js +2 -2
- package/demos/pc/app/alert/basic-usage-composition-api.vue +1 -0
- package/demos/pc/app/alert/basic-usage.vue +1 -0
- package/demos/pc/app/alert/custom-close.spec.ts +1 -1
- package/demos/pc/app/alert/icon-composition-api.vue +3 -2
- package/demos/pc/app/alert/icon.vue +4 -3
- package/demos/pc/app/alert/webdoc/alert.js +12 -2
- package/demos/pc/app/anchor/basic-usage-composition-api.vue +7 -7
- package/demos/pc/app/anchor/basic-usage.spec.ts +2 -2
- package/demos/pc/app/anchor/basic-usage.vue +7 -7
- package/demos/pc/app/anchor/change-composition-api.vue +7 -7
- package/demos/pc/app/anchor/change.spec.ts +2 -2
- package/demos/pc/app/anchor/change.vue +7 -7
- package/demos/pc/app/anchor/is-affix-composition-api.vue +7 -7
- package/demos/pc/app/anchor/is-affix.vue +7 -7
- package/demos/pc/app/anchor/webdoc/anchor.js +4 -4
- package/demos/pc/app/autocomplete/webdoc/autocomplete.js +2 -2
- package/demos/pc/app/badge/webdoc/badge.js +1 -1
- package/demos/pc/app/button/webdoc/button.js +1 -1
- package/demos/pc/app/button-group/basic-usage.spec.ts +1 -0
- package/demos/pc/app/button-group/slot-empty-composition-api.vue +25 -0
- package/demos/pc/app/button-group/slot-empty.spec.ts +11 -0
- package/demos/pc/app/button-group/slot-empty.vue +33 -0
- package/demos/pc/app/button-group/webdoc/button-group.js +9 -0
- package/demos/pc/app/calendar/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/calendar/basic-usage.spec.ts +33 -0
- package/demos/pc/app/calendar/basic-usage.vue +1 -1
- package/demos/pc/app/calendar/calendar-mode-composition-api.vue +1 -1
- package/demos/pc/app/calendar/calendar-mode.spec.ts +33 -0
- package/demos/pc/app/calendar/calendar-mode.vue +1 -1
- package/demos/pc/app/calendar/custom-calendar-toolbar-composition-api.vue +3 -3
- package/demos/pc/app/calendar/custom-calendar-toolbar.spec.ts +18 -0
- package/demos/pc/app/calendar/custom-calendar-toolbar.vue +3 -3
- package/demos/pc/app/calendar/custom-day-cell-composition-api.vue +1 -1
- package/demos/pc/app/calendar/custom-day-cell.spec.ts +10 -0
- package/demos/pc/app/calendar/custom-day-cell.vue +1 -1
- package/demos/pc/app/calendar/dynamic-add-schedule-composition-api.vue +1 -1
- package/demos/pc/app/calendar/dynamic-add-schedule.spec.ts +26 -0
- package/demos/pc/app/calendar/dynamic-add-schedule.vue +1 -1
- package/demos/pc/app/calendar/show-selected-date-composition-api.vue +1 -1
- package/demos/pc/app/calendar/show-selected-date.spec.ts +14 -0
- package/demos/pc/app/calendar/show-selected-date.vue +1 -1
- package/demos/pc/app/calendar/webdoc/calendar.js +22 -8
- package/demos/pc/app/calendar-view/basic-usage.spec.ts +18 -0
- package/demos/pc/app/calendar-view/calendar-day-mark.spec.ts +23 -0
- package/demos/pc/app/calendar-view/calendar-disabled-day-composition-api.vue +2 -2
- package/demos/pc/app/calendar-view/calendar-disabled-day.spec.ts +12 -0
- package/demos/pc/app/calendar-view/calendar-disabled-day.vue +1 -1
- package/demos/pc/app/calendar-view/calendar-event.spec.ts +25 -0
- package/demos/pc/app/calendar-view/calendar-mode.spec.ts +25 -0
- package/demos/pc/app/calendar-view/calendar-schedule-slot.spec.ts +18 -0
- package/demos/pc/app/calendar-view/calendar-timeline-range.spec.ts +11 -0
- package/demos/pc/app/calendar-view/calendar-timeline-slot.spec.ts +23 -0
- package/demos/pc/app/calendar-view/custom-calendar-toolbar.spec.ts +8 -0
- package/demos/pc/app/calendar-view/custom-day-bg-color.spec.ts +8 -0
- package/demos/pc/app/calendar-view/custom-header.spec.ts +11 -0
- package/demos/pc/app/calendar-view/multi-select-composition-api.vue +2 -2
- package/demos/pc/app/calendar-view/multi-select.spec.ts +13 -0
- package/demos/pc/app/calendar-view/multi-select.vue +1 -1
- package/demos/pc/app/calendar-view/set-working-day-composition-api.vue +3 -7
- package/demos/pc/app/calendar-view/set-working-day.spec.ts +22 -0
- package/demos/pc/app/calendar-view/set-working-day.vue +1 -1
- package/demos/pc/app/calendar-view/webdoc/calendar-view.js +1 -1
- package/demos/pc/app/carousel/autoplay-composition-api.vue +2 -2
- package/demos/pc/app/carousel/autoplay.spec.ts +2 -0
- package/demos/pc/app/carousel/autoplay.vue +2 -2
- package/demos/pc/app/carousel/basic-usage-composition-api.vue +2 -2
- package/demos/pc/app/carousel/basic-usage.spec.ts +1 -8
- package/demos/pc/app/carousel/basic-usage.vue +2 -2
- package/demos/pc/app/carousel/card-mode-composition-api.vue +2 -2
- package/demos/pc/app/carousel/card-mode.vue +2 -2
- package/demos/pc/app/carousel/carousel-arrow-always-composition-api.vue +2 -2
- package/demos/pc/app/carousel/carousel-arrow-always.vue +2 -2
- package/demos/pc/app/carousel/carousel-arrow-hover-composition-api.vue +2 -2
- package/demos/pc/app/carousel/carousel-arrow-hover.vue +2 -2
- package/demos/pc/app/carousel/carousel-arrow-never-composition-api.vue +2 -2
- package/demos/pc/app/carousel/carousel-arrow-never.vue +2 -2
- package/demos/pc/app/carousel/carousel-events-composition-api.vue +2 -2
- package/demos/pc/app/carousel/carousel-events.vue +2 -2
- package/demos/pc/app/carousel/close-loop-composition-api.vue +2 -2
- package/demos/pc/app/carousel/close-loop.vue +2 -2
- package/demos/pc/app/carousel/custom-height-composition-api.vue +2 -2
- package/demos/pc/app/carousel/custom-height.vue +2 -2
- package/demos/pc/app/carousel/indicator-trigger-composition-api.vue +2 -2
- package/demos/pc/app/carousel/indicator-trigger.vue +2 -2
- package/demos/pc/app/carousel/initial-index-composition-api.vue +2 -2
- package/demos/pc/app/carousel/initial-index.vue +2 -2
- package/demos/pc/app/carousel/manual-play-composition-api.vue +19 -8
- package/demos/pc/app/carousel/manual-play.vue +18 -8
- package/demos/pc/app/carousel/play-interval-composition-api.vue +2 -2
- package/demos/pc/app/carousel/play-interval.vue +2 -2
- package/demos/pc/app/carousel/show-title-composition-api.vue +2 -2
- package/demos/pc/app/carousel/show-title.vue +2 -2
- package/demos/pc/app/carousel/up-down-carousel-composition-api.vue +2 -2
- package/demos/pc/app/carousel/up-down-carousel.vue +2 -2
- package/demos/pc/app/chart/histogram/demo4-composition-api.vue +0 -2
- package/demos/pc/app/chart/histogram/demo4.vue +0 -2
- package/demos/pc/app/checkbox/checkbox-events-composition-api.vue +2 -3
- package/demos/pc/app/checkbox/checkbox-events.vue +2 -3
- package/demos/pc/app/checkbox/group-options-composition-api.vue +1 -1
- package/demos/pc/app/checkbox/group-options.vue +1 -1
- package/demos/pc/app/checkbox/size-composition-api.vue +0 -1
- package/demos/pc/app/checkbox/text-composition-api.vue +3 -2
- package/demos/pc/app/checkbox/text.vue +2 -1
- package/demos/pc/app/checkbox/webdoc/checkbox.js +3 -3
- package/demos/pc/app/collapse/title-composition-api.vue +3 -2
- package/demos/pc/app/collapse/title.vue +3 -2
- package/demos/pc/app/collapse/webdoc/collapse.js +11 -11
- package/demos/pc/app/config-provider/webdoc/config-provider.js +3 -3
- package/demos/pc/app/date-picker/align.spec.ts +11 -12
- package/demos/pc/app/date-picker/basic-usage.spec.ts +17 -23
- package/demos/pc/app/date-picker/clear.spec.ts +24 -5
- package/demos/pc/app/date-picker/date-range.spec.ts +63 -11
- package/demos/pc/app/date-picker/default-value.spec.ts +19 -4
- package/demos/pc/app/date-picker/events.spec.ts +24 -10
- package/demos/pc/app/date-picker/format.spec.ts +12 -11
- package/demos/pc/app/date-picker/shortcuts.spec.ts +6 -5
- package/demos/pc/app/dialog-box/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/dialog-box/basic-usage.vue +1 -1
- package/demos/pc/app/dialog-box/center-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/center.vue +2 -2
- package/demos/pc/app/dialog-box/close-on-click-modal-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/close-on-click-modal.vue +2 -2
- package/demos/pc/app/dialog-box/close-on-press-escape-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/close-on-press-escape.vue +2 -2
- package/demos/pc/app/dialog-box/custom-dialog-content-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/custom-dialog-content.vue +2 -2
- package/demos/pc/app/dialog-box/custom-dialog-footer-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/custom-dialog-footer.vue +4 -4
- package/demos/pc/app/dialog-box/custom-dialog-title-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/custom-dialog-title.vue +2 -2
- package/demos/pc/app/dialog-box/dialog-top-height-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/dialog-top-height.vue +2 -2
- package/demos/pc/app/dialog-box/dialog-width-composition-api.vue +3 -3
- package/demos/pc/app/dialog-box/dialog-width.vue +3 -3
- package/demos/pc/app/dialog-box/lock-scroll-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/lock-scroll.vue +2 -2
- package/demos/pc/app/dialog-box/webdoc/dialog-box.js +63 -63
- package/demos/pc/app/dialog-select/nest-grid-multi-composition-api.vue +9 -3
- package/demos/pc/app/dialog-select/nest-grid-multi.vue +8 -3
- package/demos/pc/app/dialog-select/nest-grid-single-composition-api.vue +3 -2
- package/demos/pc/app/dialog-select/nest-grid-single.vue +3 -2
- package/demos/pc/app/dialog-select/nest-tree-multi-composition-api.vue +3 -2
- package/demos/pc/app/dialog-select/nest-tree-multi.vue +3 -2
- package/demos/pc/app/dialog-select/nest-tree-single-composition-api.vue +3 -2
- package/demos/pc/app/dialog-select/nest-tree-single.vue +3 -2
- package/demos/pc/app/dialog-select/webdoc/dialog-select.js +90 -42
- package/demos/pc/app/drawer/confirm-event-composition-api.vue +1 -1
- package/demos/pc/app/drawer/confirm-event.vue +1 -1
- package/demos/pc/app/drawer/webdoc/drawer.cn.md +1 -1
- package/demos/pc/app/drawer/webdoc/drawer.en.md +7 -0
- package/demos/pc/app/drawer/webdoc/drawer.js +94 -47
- package/demos/pc/app/drawer/z-index-composition-api.vue +1 -1
- package/demos/pc/app/drawer/z-index.spec.ts +1 -1
- package/demos/pc/app/drawer/z-index.vue +1 -1
- package/demos/pc/app/drop-times/basic-usage-composition-api.vue +7 -1
- package/demos/pc/app/drop-times/basic-usage.spec.ts +1 -1
- package/demos/pc/app/drop-times/basic-usage.vue +8 -2
- package/demos/pc/app/drop-times/size-composition-api.vue +14 -4
- package/demos/pc/app/drop-times/size.spec.ts +5 -1
- package/demos/pc/app/drop-times/size.vue +14 -4
- package/demos/pc/app/drop-times/start-end-step-composition-api.vue +8 -13
- package/demos/pc/app/drop-times/start-end-step.spec.ts +1 -1
- package/demos/pc/app/drop-times/start-end-step.vue +10 -16
- package/demos/pc/app/drop-times/webdoc/drop-times.js +27 -17
- package/demos/pc/app/dropdown/webdoc/dropdown.js +2 -2
- package/demos/pc/app/fall-menu/webdoc/fall-menu.js +4 -10
- package/demos/pc/app/file-upload/abort-quest-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/abort-quest.vue +1 -1
- package/demos/pc/app/file-upload/basic-usage.spec.ts +2 -2
- package/demos/pc/app/file-upload/{prevent-upload-file-composition-api.vue → before-upload-limit-composition-api.vue} +13 -5
- package/demos/pc/app/file-upload/{prevent-upload-file.spec.ts → before-upload-limit.spec.ts} +9 -4
- package/demos/pc/app/file-upload/{prevent-upload-file.vue → before-upload-limit.vue} +15 -5
- package/demos/pc/app/file-upload/custom-upload-tip-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/custom-upload-tip.spec.ts +1 -1
- package/demos/pc/app/file-upload/custom-upload-tip.vue +1 -1
- package/demos/pc/app/file-upload/form-validation-composition-api.vue +10 -4
- package/demos/pc/app/file-upload/form-validation.vue +9 -3
- package/demos/pc/app/file-upload/multiple-file.spec.ts +3 -1
- package/demos/pc/app/file-upload/upload-events-composition-api.vue +8 -8
- package/demos/pc/app/file-upload/upload-events.vue +8 -8
- package/demos/pc/app/file-upload/upload-request-composition-api.vue +1 -1
- package/demos/pc/app/file-upload/upload-request.vue +1 -1
- package/demos/pc/app/file-upload/webdoc/file-upload.js +97 -96
- package/demos/pc/app/form/form-validation-composition-api.vue +2 -2
- package/demos/pc/app/form/form-validation.vue +1 -1
- package/demos/pc/app/form/label-position.spec.ts +3 -0
- package/demos/pc/app/form/popper-options.spec.ts +1 -0
- package/demos/pc/app/form/slot-label-composition-api.vue +1 -1
- package/demos/pc/app/form/validate-debounce-composition-api.vue +3 -3
- package/demos/pc/app/form/validate-debounce.vue +3 -3
- package/demos/pc/app/form/webdoc/form.js +10 -9
- package/demos/pc/app/grid/dynamically-columns/dynamically-columns-composition-api.vue +6 -4
- package/demos/pc/app/grid/dynamically-columns/dynamically-columns.vue +6 -4
- package/demos/pc/app/grid/dynamically-columns/reverse-row-composition-api.vue +3 -1
- package/demos/pc/app/grid/dynamically-columns/reverse-row.vue +3 -1
- package/demos/pc/app/grid/faq/grid-in-dialog-box-composition-api.vue +1 -1
- package/demos/pc/app/grid/faq/grid-in-dialog-box.spec.js +1 -1
- package/demos/pc/app/grid/faq/grid-in-dialog-box.vue +1 -1
- package/demos/pc/app/grid/filter/advanced-filter-composition-api.vue +0 -15
- package/demos/pc/app/grid/filter/advanced-filter.spec.js +1 -1
- package/demos/pc/app/grid/filter/advanced-filter.vue +0 -14
- package/demos/pc/app/grid/filter/custom-filter.spec.js +1 -1
- package/demos/pc/app/grid/filter/default-filter-composition-api.vue +1 -1
- package/demos/pc/app/grid/filter/default-filter.spec.ts +1 -1
- package/demos/pc/app/grid/filter/default-filter.vue +1 -1
- package/demos/pc/app/grid/filter/simple-default-value-filter-composition-api.vue +0 -14
- package/demos/pc/app/grid/filter/simple-default-value-filter.vue +0 -14
- package/demos/pc/app/grid/filter/simple-filter-composition-api.vue +0 -14
- package/demos/pc/app/grid/filter/simple-filter.vue +0 -14
- package/demos/pc/app/grid/footer/configuration-summary.spec.js +1 -1
- package/demos/pc/app/grid/highlight/set-current-row-composition-api.vue +4 -1
- package/demos/pc/app/grid/highlight/set-current-row.vue +4 -1
- package/demos/pc/app/grid/large-data/scroll-to-composition-api.vue +6 -3
- package/demos/pc/app/grid/large-data/scroll-to.vue +6 -3
- package/demos/pc/app/grid/pager/inner-pager-composition-api.vue +1 -1
- package/demos/pc/app/grid/pager/inner-pager.spec.js +1 -1
- package/demos/pc/app/grid/pager/inner-pager.vue +1 -1
- package/demos/pc/app/grid/sort/server-sort-composition-api.vue +3 -3
- package/demos/pc/app/grid/sort/server-sort.vue +2 -2
- package/demos/pc/app/grid/sort/sort-composition-api.vue +4 -1
- package/demos/pc/app/grid/sort/sort.spec.js +1 -1
- package/demos/pc/app/grid/sort/sort.vue +4 -1
- package/demos/pc/app/grid/toolbar/insert-delete-update-composition-api.vue +2 -1
- package/demos/pc/app/grid/toolbar/insert-delete-update.vue +2 -1
- package/demos/pc/app/grid/toolbar/toolbar-op-config-composition-api.vue +3 -2
- package/demos/pc/app/grid/toolbar/toolbar-op-config.vue +3 -2
- package/demos/pc/app/grid/validation/before-submit-validation-composition-api.vue +5 -5
- package/demos/pc/app/grid/validation/before-submit-validation.spec.js +2 -2
- package/demos/pc/app/grid/validation/before-submit-validation.vue +5 -5
- package/demos/pc/app/grid/webdoc/grid-appearance-settings.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-context-menu.js +4 -4
- package/demos/pc/app/grid/webdoc/grid-custom-style.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-custom.js +31 -31
- package/demos/pc/app/grid/webdoc/grid-drag.js +1 -1
- package/demos/pc/app/grid/webdoc/grid-dynamically-columns.js +4 -1
- package/demos/pc/app/grid/webdoc/grid-editor.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-empty.js +4 -1
- package/demos/pc/app/grid/webdoc/grid-expand.js +3 -3
- package/demos/pc/app/grid/webdoc/grid-faq.js +4 -4
- package/demos/pc/app/grid/webdoc/grid-filter.js +4 -4
- package/demos/pc/app/grid/webdoc/grid-footer.js +1 -1
- package/demos/pc/app/grid/webdoc/grid-highlight.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-import-export.js +5 -2
- package/demos/pc/app/grid/webdoc/grid-large-data.js +6 -5
- package/demos/pc/app/grid/webdoc/grid-mouse-keyboard.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-pager.js +11 -2
- package/demos/pc/app/grid/webdoc/grid-renderer.js +11 -11
- package/demos/pc/app/grid/webdoc/grid-row-grouping.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-size.js +6 -6
- package/demos/pc/app/grid/webdoc/grid-slot.js +16 -4
- package/demos/pc/app/grid/webdoc/grid-tip.js +3 -3
- package/demos/pc/app/grid/webdoc/grid-toolbar.js +17 -9
- package/demos/pc/app/grid/webdoc/grid-tree-table.js +9 -7
- package/demos/pc/app/grid/webdoc/grid-validation.js +6 -6
- package/demos/pc/app/grid/webdoc/grid.js +160 -85
- package/demos/pc/app/icon/iconGroups.js +1 -0
- package/demos/pc/app/icon/list-composition-api.vue +8 -0
- package/demos/pc/app/icon/list.vue +7 -0
- package/demos/pc/app/image/basic-usage.spec.ts +1 -1
- package/demos/pc/app/image/events.spec.ts +1 -1
- package/demos/pc/app/image/lazy.spec.ts +1 -1
- package/demos/pc/app/image/preview-in-dialog.spec.ts +1 -1
- package/demos/pc/app/image/preview.spec.ts +1 -1
- package/demos/pc/app/image/slot.spec.ts +1 -1
- package/demos/pc/app/image/webdoc/image.cn.md +3 -1
- package/demos/pc/app/image/webdoc/image.en.md +3 -1
- package/demos/pc/app/image/webdoc/image.js +34 -18
- package/demos/pc/app/input/method-addMemory-composition-api.vue +1 -0
- package/demos/pc/app/input/method-addMemory.spec.ts +11 -0
- package/demos/pc/app/input/method-addMemory.vue +1 -0
- package/demos/pc/app/input/webdoc/input.js +12 -2
- package/demos/pc/app/ip-address/webdoc/ip-address.cn.md +2 -2
- package/demos/pc/app/ip-address/webdoc/ip-address.js +2 -2
- package/demos/pc/app/link/webdoc/link.js +1 -1
- package/demos/pc/app/loading/webdoc/loading.js +1 -1
- package/demos/pc/app/milestone/show-number-composition-api.vue +1 -1
- package/demos/pc/app/milestone/show-number.vue +1 -1
- package/demos/pc/app/milestone/solid-style-composition-api.vue +1 -1
- package/demos/pc/app/milestone/solid-style.vue +1 -1
- package/demos/pc/app/milestone/webdoc/milestone.js +9 -9
- package/demos/pc/app/mind-map/basic-usage-composition-api.vue +14 -0
- package/demos/pc/app/mind-map/basic-usage.spec.ts +36 -0
- package/demos/pc/app/mind-map/basic-usage.vue +20 -0
- package/demos/pc/app/mind-map/event-composition-api.vue +125 -0
- package/demos/pc/app/mind-map/event.spec.ts +52 -0
- package/demos/pc/app/mind-map/event.vue +136 -0
- package/demos/pc/app/mind-map/export-data-composition-api.vue +108 -0
- package/demos/pc/app/mind-map/export-data.spec.ts +19 -0
- package/demos/pc/app/mind-map/export-data.vue +119 -0
- package/demos/pc/app/mind-map/webdoc/mind-map.cn.md +7 -0
- package/demos/pc/app/mind-map/webdoc/mind-map.en.md +7 -0
- package/demos/pc/app/mind-map/webdoc/mind-map.js +250 -0
- package/demos/pc/app/modal/webdoc/modal.js +47 -47
- package/demos/pc/app/nav-menu/custom-service-composition-api.vue +5 -5
- package/demos/pc/app/nav-menu/custom-service.vue +5 -5
- package/demos/pc/app/notify/webdoc/notify.js +9 -6
- package/demos/pc/app/numeric/webdoc/numeric.js +23 -23
- package/demos/pc/app/pager/before-page-change-composition-api.vue +1 -1
- package/demos/pc/app/pager/before-page-change.vue +1 -1
- package/demos/pc/app/pager/custom-layout-composition-api.vue +8 -6
- package/demos/pc/app/pager/custom-layout.vue +8 -6
- package/demos/pc/app/pager/custom-total-composition-api.vue +20 -18
- package/demos/pc/app/pager/custom-total.vue +20 -18
- package/demos/pc/app/pager/hide-on-single-page-composition-api.vue +1 -1
- package/demos/pc/app/pager/hide-on-single-page.spec.ts +1 -1
- package/demos/pc/app/pager/hide-on-single-page.vue +1 -1
- package/demos/pc/app/pager/pager-event-composition-api.vue +10 -5
- package/demos/pc/app/pager/pager-event.vue +10 -5
- package/demos/pc/app/pager/webdoc/pager.js +3 -3
- package/demos/pc/app/pop-upload/webdoc/pop-upload.js +3 -3
- package/demos/pc/app/popconfirm/webdoc/popconfirm.js +1 -1
- package/demos/pc/app/progress/custom-color-composition-api.vue +10 -5
- package/demos/pc/app/progress/custom-color.spec.ts +14 -1
- package/demos/pc/app/progress/custom-color.vue +10 -5
- package/demos/pc/app/progress/custom-status-composition-api.vue +30 -11
- package/demos/pc/app/progress/custom-status.vue +30 -11
- package/demos/pc/app/progress/webdoc/progress.js +7 -8
- package/demos/pc/app/qr-code/level-composition-api.vue +5 -8
- package/demos/pc/app/qr-code/style-composition-api.vue +1 -0
- package/demos/pc/app/qr-code/style.vue +1 -0
- package/demos/pc/app/qr-code/webdoc/qr-code.js +22 -10
- package/demos/pc/app/radio/group-options-composition-api.vue +13 -0
- package/demos/pc/app/radio/group-options.vue +20 -2
- package/demos/pc/app/radio/webdoc/radio.js +3 -3
- package/demos/pc/app/rate/webdoc/rate.js +8 -10
- package/demos/pc/app/search/events-composition-api.vue +4 -4
- package/demos/pc/app/search/events.vue +4 -4
- package/demos/pc/app/search/slot-prefix-composition-api.vue +1 -1
- package/demos/pc/app/search/slot-prefix.vue +1 -1
- package/demos/pc/app/search/webdoc/search.js +2 -2
- package/demos/pc/app/select/basic-usage-composition-api.vue +11 -6
- package/demos/pc/app/select/basic-usage.spec.ts +34 -9
- package/demos/pc/app/select/basic-usage.vue +11 -6
- package/demos/pc/app/select/clear-no-match-value-composition-api.vue +1 -1
- package/demos/pc/app/select/clear-no-match-value.vue +1 -1
- package/demos/pc/app/select/events-composition-api.vue +12 -6
- package/demos/pc/app/select/events.vue +10 -5
- package/demos/pc/app/select/is-drop-inherit-width-composition-api.vue +1 -2
- package/demos/pc/app/select/is-drop-inherit-width.vue +1 -2
- package/demos/pc/app/select/no-data-text-composition-api.vue +1 -1
- package/demos/pc/app/select/no-data-text.spec.ts +1 -1
- package/demos/pc/app/select/no-data-text.vue +1 -1
- package/demos/pc/app/select/optimization-composition-api.vue +5 -2
- package/demos/pc/app/select/optimization.vue +4 -1
- package/demos/pc/app/select/option-group-composition-api.vue +33 -11
- package/demos/pc/app/select/option-group.spec.ts +2 -2
- package/demos/pc/app/select/option-group.vue +34 -13
- package/demos/pc/app/select/slot-default-composition-api.vue +49 -13
- package/demos/pc/app/select/slot-default.spec.ts +5 -2
- package/demos/pc/app/select/slot-default.vue +50 -14
- package/demos/pc/app/select/slot-empty-composition-api.vue +16 -3
- package/demos/pc/app/select/slot-empty.spec.ts +1 -1
- package/demos/pc/app/select/slot-empty.vue +18 -4
- package/demos/pc/app/select/webdoc/select.js +89 -16
- package/demos/pc/app/slider/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/slider/basic-usage.vue +1 -1
- package/demos/pc/app/switch/before-change-composition-api.vue +4 -1
- package/demos/pc/app/switch/before-change.vue +4 -3
- package/demos/pc/app/switch/custom-true-false-value-composition-api.vue +1 -1
- package/demos/pc/app/switch/custom-true-false-value.spec.ts +2 -2
- package/demos/pc/app/switch/custom-true-false-value.vue +1 -1
- package/demos/pc/app/switch/event-change-composition-api.vue +1 -1
- package/demos/pc/app/switch/event-change.vue +1 -1
- package/demos/pc/app/switch/webdoc/switch.cn.md +1 -1
- package/demos/pc/app/switch/webdoc/switch.js +1 -1
- package/demos/pc/app/tabs/webdoc/tabs.js +3 -3
- package/demos/pc/app/tag/webdoc/tag.js +1 -1
- package/demos/pc/app/tag-group/basic-usage.vue +1 -1
- package/demos/pc/app/tag-group/webdoc/tag-group.js +2 -2
- package/demos/pc/app/time-select/basic-usage-composition-api.vue +10 -2
- package/demos/pc/app/time-select/basic-usage.spec.ts +6 -5
- package/demos/pc/app/time-select/basic-usage.vue +10 -2
- package/demos/pc/app/time-select/clear-icon-composition-api.vue +17 -9
- package/demos/pc/app/time-select/clear-icon.spec.ts +7 -5
- package/demos/pc/app/time-select/clear-icon.vue +17 -9
- package/demos/pc/app/time-select/default-value-composition-api.vue +10 -2
- package/demos/pc/app/time-select/default-value.spec.ts +3 -2
- package/demos/pc/app/time-select/default-value.vue +10 -2
- package/demos/pc/app/time-select/editable-composition-api.vue +10 -2
- package/demos/pc/app/time-select/editable.vue +10 -2
- package/demos/pc/app/time-select/event-blur-composition-api.vue +8 -2
- package/demos/pc/app/time-select/event-blur.spec.ts +2 -2
- package/demos/pc/app/time-select/event-blur.vue +10 -4
- package/demos/pc/app/time-select/focus-composition-api.vue +12 -3
- package/demos/pc/app/time-select/focus.spec.ts +5 -4
- package/demos/pc/app/time-select/focus.vue +12 -3
- package/demos/pc/app/time-select/picker-options-composition-api.vue +21 -13
- package/demos/pc/app/time-select/picker-options.spec.ts +1 -1
- package/demos/pc/app/time-select/picker-options.vue +21 -13
- package/demos/pc/app/time-select/range-placeholder-composition-api.vue +17 -3
- package/demos/pc/app/time-select/range-placeholder.spec.ts +16 -13
- package/demos/pc/app/time-select/range-placeholder.vue +17 -3
- package/demos/pc/app/time-select/size-medium-composition-api.vue +15 -2
- package/demos/pc/app/time-select/size-medium.spec.ts +5 -1
- package/demos/pc/app/time-select/size-medium.vue +15 -2
- package/demos/pc/app/time-select/suffix-icon-composition-api.vue +8 -2
- package/demos/pc/app/time-select/suffix-icon.vue +8 -2
- package/demos/pc/app/time-select/webdoc/time-select.js +57 -78
- package/demos/pc/app/toggle-menu/webdoc/toggle-menu.js +2 -2
- package/demos/pc/app/transfer/basic-usage.spec.ts +1 -1
- package/demos/pc/app/transfer/before-transfer.spec.ts +1 -1
- package/demos/pc/app/transfer/custom-btns.spec.ts +1 -1
- package/demos/pc/app/transfer/custom-filter.spec.ts +1 -1
- package/demos/pc/app/transfer/custom-footer.spec.ts +2 -1
- package/demos/pc/app/transfer/custom-render.spec.ts +1 -1
- package/demos/pc/app/transfer/custom-titles.spec.ts +1 -1
- package/demos/pc/app/transfer/default-checked.spec.ts +1 -1
- package/demos/pc/app/transfer/drop-config.spec.ts +1 -1
- package/demos/pc/app/transfer/nested-table.spec.ts +1 -1
- package/demos/pc/app/transfer/nested-tree.spec.ts +1 -1
- package/demos/pc/app/transfer/target-order.spec.ts +1 -1
- package/demos/pc/app/transfer/transfer-events.spec.ts +1 -1
- package/demos/pc/app/transfer/webdoc/transfer.cn.md +1 -1
- package/demos/pc/app/transfer/webdoc/transfer.en.md +3 -3
- package/demos/pc/app/transfer/webdoc/transfer.js +76 -43
- package/demos/pc/app/tree/basic-usage.spec.ts +1 -1
- package/demos/pc/app/tree/check-op.spec.ts +1 -1
- package/demos/pc/app/tree/checkbox.spec.ts +1 -1
- package/demos/pc/app/tree/contextmenu.spec.ts +1 -1
- package/demos/pc/app/tree/drag.spec.ts +1 -1
- package/demos/pc/app/tree/edit.spec.ts +1 -1
- package/demos/pc/app/tree/expand-control.spec.ts +1 -1
- package/demos/pc/app/tree/filter-view.spec.ts +1 -1
- package/demos/pc/app/tree/icons.spec.ts +1 -1
- package/demos/pc/app/tree/lazy.spec.ts +1 -1
- package/demos/pc/app/tree/node-hl.spec.ts +1 -1
- package/demos/pc/app/tree/node-op.spec.ts +1 -1
- package/demos/pc/app/tree/other.spec.ts +1 -1
- package/demos/pc/app/tree/props.spec.ts +1 -1
- package/demos/pc/app/tree/radio.spec.ts +1 -1
- package/demos/pc/app/tree/slot.spec.ts +1 -1
- package/demos/pc/app/tree/webdoc/tree.cn.md +1 -1
- package/demos/pc/app/tree/webdoc/tree.en.md +1 -1
- package/demos/pc/app/tree/webdoc/tree.js +67 -19
- package/demos/pc/app/tree-menu/custom-icon.spec.ts +1 -0
- package/demos/pc/app/tree-menu/only-check-children.spec.ts +24 -2
- package/demos/pc/app/tree-menu/props.spec.ts +22 -2
- package/demos/pc/app/tree-menu/show-expand.spec.ts +36 -4
- package/demos/pc/app/tree-menu/show-filter.spec.ts +54 -3
- package/demos/pc/app/tree-menu/show-number.spec.ts +14 -1
- package/demos/pc/app/tree-menu/webdoc/tree-menu.js +4 -4
- package/demos/pc/app/user-head/image-user-head-composition-api.vue +1 -1
- package/demos/pc/app/user-head/image-user-head.vue +1 -1
- package/demos/pc/app/user-head/webdoc/user-head.js +17 -17
- package/demos/pc/app/watermark/webdoc/watermark.js +32 -16
- package/demos/pc/menus.js +6 -1
- package/demos/pc/webdoc/form-valid-en.md +9 -3
- package/demos/pc/webdoc/form-valid.md +3 -1
- package/demos/pc/webdoc/theme-en.md +10 -8
- package/package.json +9 -8
- package/playground/App.vue +9 -0
- package/demos/mobile/app/button/event-click.vue +0 -40
- package/demos/mobile/app/button/native-type.vue +0 -105
- package/demos/mobile/app/button/plain.vue +0 -33
- package/demos/mobile/app/button/round.vue +0 -34
- package/demos/mobile/app/button/text.vue +0 -38
- package/demos/pc/app/calendar-view/hide-mode-composition-api.vue +0 -7
- package/demos/pc/app/calendar-view/hide-mode.vue +0 -13
- package/demos/pc/app/calendar-view/mode-combination-composition-api.vue +0 -7
- package/demos/pc/app/calendar-view/mode-combination.vue +0 -14
- package/demos/pc/app/file-upload/upload-limit-composition-api.vue +0 -22
- package/demos/pc/app/file-upload/upload-limit.spec.ts +0 -20
- package/demos/pc/app/file-upload/upload-limit.vue +0 -32
- package/demos/pc/app/time-select/default-time-composition-api.vue +0 -11
- package/demos/pc/app/time-select/default-time.vue +0 -19
- package/demos/pc/app/time-select/disabled-composition-api.vue +0 -10
- package/demos/pc/app/time-select/disabled.spec.ts +0 -8
- package/demos/pc/app/time-select/disabled.vue +0 -18
- package/demos/pc/app/time-select/event-change-composition-api.vue +0 -16
- package/demos/pc/app/time-select/event-change.vue +0 -25
- package/demos/pc/app/time-select/popper-class-composition-api.vue +0 -27
- package/demos/pc/app/time-select/popper-class.spec.ts +0 -9
- package/demos/pc/app/time-select/popper-class.vue +0 -35
- package/demos/pc/app/time-select/size-mini-composition-api.vue +0 -10
- package/demos/pc/app/time-select/size-mini.spec.ts +0 -8
- package/demos/pc/app/time-select/size-mini.vue +0 -18
- package/demos/pc/app/time-select/size-small-composition-api.vue +0 -10
- package/demos/pc/app/time-select/size-small.spec.ts +0 -8
- package/demos/pc/app/time-select/size-small.vue +0 -18
- package/demos/pc/resource/user-group-2.png +0 -0
- package/demos/pc/resource/user-group.png +0 -0
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
<tiny-alert :icon="TinyIconBoat" description="自定义图标"></tiny-alert>
|
|
4
4
|
<tiny-alert description="默认图标"></tiny-alert>
|
|
5
5
|
<tiny-alert type="success" description="type 为 success 的默认图标"></tiny-alert>
|
|
6
|
-
<tiny-alert type="warning" description="type 为 warning 的默认图标"></tiny-alert>
|
|
6
|
+
<tiny-alert :icon="TinyIconWarningTriangle" type="warning" description="type 为 warning 的默认图标"></tiny-alert>
|
|
7
7
|
<tiny-alert type="error" description="type 为 error 的默认图标"></tiny-alert>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script setup>
|
|
12
12
|
import { Alert as TinyAlert } from '@opentiny/vue'
|
|
13
|
-
import { iconBoat } from '@opentiny/vue-icon'
|
|
13
|
+
import { iconBoat, iconWarningTriangle } from '@opentiny/vue-icon'
|
|
14
14
|
|
|
15
15
|
const TinyIconBoat = iconBoat()
|
|
16
|
+
const TinyIconWarningTriangle = iconWarningTriangle()
|
|
16
17
|
</script>
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
<tiny-alert :icon="TinyIconBoat" description="自定义图标"></tiny-alert>
|
|
4
4
|
<tiny-alert description="默认图标"></tiny-alert>
|
|
5
5
|
<tiny-alert type="success" description="type 为 success 的默认图标"></tiny-alert>
|
|
6
|
-
<tiny-alert type="warning" description="type 为 warning 的默认图标"></tiny-alert>
|
|
6
|
+
<tiny-alert :icon="TinyIconWarningTriangle" type="warning" description="type 为 warning 的默认图标"></tiny-alert>
|
|
7
7
|
<tiny-alert type="error" description="type 为 error 的默认图标"></tiny-alert>
|
|
8
8
|
</div>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
12
|
import { Alert } from '@opentiny/vue'
|
|
13
|
-
import { iconBoat } from '@opentiny/vue-icon'
|
|
13
|
+
import { iconBoat, iconWarningTriangle } from '@opentiny/vue-icon'
|
|
14
14
|
|
|
15
15
|
export default {
|
|
16
16
|
components: {
|
|
@@ -18,7 +18,8 @@ export default {
|
|
|
18
18
|
},
|
|
19
19
|
data() {
|
|
20
20
|
return {
|
|
21
|
-
TinyIconBoat: iconBoat()
|
|
21
|
+
TinyIconBoat: iconBoat(),
|
|
22
|
+
TinyIconWarningTriangle: iconWarningTriangle()
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -132,7 +132,7 @@ export default {
|
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
'name': 'icon',
|
|
135
|
-
'type': '
|
|
135
|
+
'type': 'Component',
|
|
136
136
|
'defaultValue': '--',
|
|
137
137
|
'desc': {
|
|
138
138
|
'zh-CN': '传入图标组件自定义警告的图标,默认会根据 type 值自动使用对应图标',
|
|
@@ -174,7 +174,8 @@ export default {
|
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
'name': 'type',
|
|
177
|
-
'type':
|
|
177
|
+
'type': 'IType',
|
|
178
|
+
'typeAnchorName': 'IType',
|
|
178
179
|
'defaultValue': "'info'",
|
|
179
180
|
'desc': {
|
|
180
181
|
'zh-CN': '警告的类型',
|
|
@@ -238,5 +239,14 @@ export default {
|
|
|
238
239
|
}
|
|
239
240
|
]
|
|
240
241
|
}
|
|
242
|
+
],
|
|
243
|
+
types: [
|
|
244
|
+
{
|
|
245
|
+
name: 'IType',
|
|
246
|
+
type: 'type',
|
|
247
|
+
code: `
|
|
248
|
+
type IType = 'success' | 'warning' | 'info' | 'error' | 'simple'
|
|
249
|
+
`
|
|
250
|
+
}
|
|
241
251
|
]
|
|
242
252
|
}
|
|
@@ -19,29 +19,29 @@ const links = ref([
|
|
|
19
19
|
{
|
|
20
20
|
key: 'basic-usage',
|
|
21
21
|
link: '#basic-usage',
|
|
22
|
-
title: '
|
|
22
|
+
title: '基本用法'
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
key: 'is-affix',
|
|
26
26
|
link: '#is-affix',
|
|
27
|
-
title: '
|
|
27
|
+
title: '固定模式'
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
key: 'set-container',
|
|
31
31
|
link: '#set-container',
|
|
32
|
-
title: '
|
|
32
|
+
title: '滚动容器'
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
key: 'on-change',
|
|
36
|
-
link: '#
|
|
37
|
-
title: '
|
|
36
|
+
link: '#change',
|
|
37
|
+
title: 'change 事件'
|
|
38
38
|
}
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
key: 'api',
|
|
43
|
-
link: '#
|
|
44
|
-
title: '
|
|
43
|
+
link: '#API',
|
|
44
|
+
title: 'API'
|
|
45
45
|
}
|
|
46
46
|
])
|
|
47
47
|
|
|
@@ -6,7 +6,7 @@ test('基本用法', async ({ page }) => {
|
|
|
6
6
|
|
|
7
7
|
const anchor = page.locator('.tiny-anchor')
|
|
8
8
|
const link1 = anchor.getByRole('link', { name: '演示' })
|
|
9
|
-
const link2 = anchor.getByRole('link', { name: '
|
|
9
|
+
const link2 = anchor.getByRole('link', { name: 'change 事件' })
|
|
10
10
|
const hash1 = await page.evaluate(() => window.location.hash)
|
|
11
11
|
|
|
12
12
|
await link1.click()
|
|
@@ -18,5 +18,5 @@ test('基本用法', async ({ page }) => {
|
|
|
18
18
|
await link2.click()
|
|
19
19
|
const hash3 = await page.evaluate(() => window.location.hash)
|
|
20
20
|
|
|
21
|
-
await expect(hash3).toContain('#
|
|
21
|
+
await expect(hash3).toContain('#change')
|
|
22
22
|
})
|
|
@@ -27,29 +27,29 @@ export default {
|
|
|
27
27
|
{
|
|
28
28
|
key: 'basic-usage',
|
|
29
29
|
link: '#basic-usage',
|
|
30
|
-
title: '
|
|
30
|
+
title: '基本用法'
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
key: 'is-affix',
|
|
34
34
|
link: '#is-affix',
|
|
35
|
-
title: '
|
|
35
|
+
title: '固定模式'
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
key: 'set-container',
|
|
39
39
|
link: '#set-container',
|
|
40
|
-
title: '
|
|
40
|
+
title: '滚动容器'
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
key: 'on-change',
|
|
44
|
-
link: '#
|
|
45
|
-
title: '
|
|
44
|
+
link: '#change',
|
|
45
|
+
title: 'change 事件'
|
|
46
46
|
}
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
key: 'api',
|
|
51
|
-
link: '#
|
|
52
|
-
title: '
|
|
51
|
+
link: '#API',
|
|
52
|
+
title: 'API'
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
55
|
type: 'dot'
|
|
@@ -15,29 +15,29 @@ const links = ref([
|
|
|
15
15
|
{
|
|
16
16
|
key: 'basic-usage',
|
|
17
17
|
link: '#basic-usage',
|
|
18
|
-
title: '
|
|
18
|
+
title: '基本用法'
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
key: 'is-affix',
|
|
22
22
|
link: '#is-affix',
|
|
23
|
-
title: '
|
|
23
|
+
title: '固定模式'
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
key: 'set-container',
|
|
27
27
|
link: '#set-container',
|
|
28
|
-
title: '
|
|
28
|
+
title: '滚动容器'
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
key: 'on-change',
|
|
32
|
-
link: '#
|
|
33
|
-
title: '
|
|
32
|
+
link: '#change',
|
|
33
|
+
title: 'change 事件'
|
|
34
34
|
}
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
key: 'api',
|
|
39
|
-
link: '#
|
|
40
|
-
title: '
|
|
39
|
+
link: '#API',
|
|
40
|
+
title: 'API'
|
|
41
41
|
}
|
|
42
42
|
])
|
|
43
43
|
|
|
@@ -6,12 +6,12 @@ test('change事件', async ({ page }) => {
|
|
|
6
6
|
|
|
7
7
|
const anchor = page.locator('.tiny-anchor')
|
|
8
8
|
const link1 = anchor.getByRole('link', { name: '演示' })
|
|
9
|
-
const link2 = anchor.getByRole('link', { name: '
|
|
9
|
+
const link2 = anchor.getByRole('link', { name: 'change 事件' })
|
|
10
10
|
const modal = page.locator('.tiny-modal')
|
|
11
11
|
|
|
12
12
|
await link1.click()
|
|
13
13
|
await expect(modal).toHaveCount(1)
|
|
14
14
|
await link2.click()
|
|
15
15
|
await expect(modal).toHaveCount(2)
|
|
16
|
-
await expect(modal.last()).toHaveText(/#
|
|
16
|
+
await expect(modal.last()).toHaveText(/#change/)
|
|
17
17
|
})
|
|
@@ -20,29 +20,29 @@ export default {
|
|
|
20
20
|
{
|
|
21
21
|
key: 'basic-usage',
|
|
22
22
|
link: '#basic-usage',
|
|
23
|
-
title: '
|
|
23
|
+
title: '基本用法'
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
key: 'is-affix',
|
|
27
27
|
link: '#is-affix',
|
|
28
|
-
title: '
|
|
28
|
+
title: '固定模式'
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
key: 'set-container',
|
|
32
32
|
link: '#set-container',
|
|
33
|
-
title: '
|
|
33
|
+
title: '滚动容器'
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
key: 'on-change',
|
|
37
|
-
link: '#
|
|
38
|
-
title: '
|
|
37
|
+
link: '#change',
|
|
38
|
+
title: 'change 事件'
|
|
39
39
|
}
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
key: 'api',
|
|
44
|
-
link: '#
|
|
45
|
-
title: '
|
|
44
|
+
link: '#API',
|
|
45
|
+
title: 'API'
|
|
46
46
|
}
|
|
47
47
|
]
|
|
48
48
|
}
|
|
@@ -22,29 +22,29 @@ const links = ref([
|
|
|
22
22
|
{
|
|
23
23
|
key: 'basic-usage',
|
|
24
24
|
link: '#basic-usage',
|
|
25
|
-
title: '
|
|
25
|
+
title: '基本用法'
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
key: 'is-affix',
|
|
29
29
|
link: '#is-affix',
|
|
30
|
-
title: '
|
|
30
|
+
title: '固定模式'
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
key: 'set-container',
|
|
34
34
|
link: '#set-container',
|
|
35
|
-
title: '
|
|
35
|
+
title: '滚动容器'
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
key: 'on-change',
|
|
39
|
-
link: '#
|
|
40
|
-
title: '
|
|
39
|
+
link: '#change',
|
|
40
|
+
title: 'change 事件'
|
|
41
41
|
}
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
key: 'api',
|
|
46
|
-
link: '#
|
|
47
|
-
title: '
|
|
46
|
+
link: '#API',
|
|
47
|
+
title: 'API'
|
|
48
48
|
}
|
|
49
49
|
])
|
|
50
50
|
</script>
|
|
@@ -28,29 +28,29 @@ export default {
|
|
|
28
28
|
{
|
|
29
29
|
key: 'basic-usage',
|
|
30
30
|
link: '#basic-usage',
|
|
31
|
-
title: '
|
|
31
|
+
title: '基本用法'
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
key: 'is-affix',
|
|
35
35
|
link: '#is-affix',
|
|
36
|
-
title: '
|
|
36
|
+
title: '固定模式'
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
key: 'set-container',
|
|
40
40
|
link: '#set-container',
|
|
41
|
-
title: '
|
|
41
|
+
title: '滚动容器'
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
key: 'on-change',
|
|
45
|
-
link: '#
|
|
46
|
-
title: '
|
|
45
|
+
link: '#change',
|
|
46
|
+
title: 'change 事件'
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
key: 'api',
|
|
52
|
-
link: '#
|
|
53
|
-
title: '
|
|
52
|
+
link: '#API',
|
|
53
|
+
title: 'API'
|
|
54
54
|
}
|
|
55
55
|
]
|
|
56
56
|
}
|
|
@@ -52,7 +52,7 @@ export default {
|
|
|
52
52
|
'defaultValue': '',
|
|
53
53
|
'desc': {
|
|
54
54
|
'zh-CN':
|
|
55
|
-
'用于单页面 hash 路由模式时指定滚动容器的id值,id为空时则滚动容器默认为 HTML 文档的根节点 body 元素',
|
|
55
|
+
'用于单页面 hash 路由模式时指定滚动容器的 id 值,id 为空时则滚动容器默认为 HTML 文档的根节点 body 元素',
|
|
56
56
|
'en-US':
|
|
57
57
|
'When used in single page hash routing mode, specify the id value of the scrolling container. If the id is empty, the scrolling container defaults to the body element of the root node of the HTML document'
|
|
58
58
|
},
|
|
@@ -71,7 +71,7 @@ export default {
|
|
|
71
71
|
'typeAnchorName': 'ILink',
|
|
72
72
|
'defaultValue': '',
|
|
73
73
|
'desc': {
|
|
74
|
-
'zh-CN': '导航数据配置项,可通过children嵌套',
|
|
74
|
+
'zh-CN': '导航数据配置项,可通过 children 嵌套',
|
|
75
75
|
'en-US': 'Navigation data configuration items can be nested through children'
|
|
76
76
|
},
|
|
77
77
|
'demoId': 'basic-usage'
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
89
89
|
{
|
|
90
90
|
'name': 'type',
|
|
91
91
|
'type': '"line" | "dot"',
|
|
92
|
-
'defaultValue': '
|
|
92
|
+
'defaultValue': `'line'`,
|
|
93
93
|
'desc': {
|
|
94
94
|
'zh-CN': '锚点类型',
|
|
95
95
|
'en-US': 'Anchor type'
|
|
@@ -113,7 +113,7 @@ export default {
|
|
|
113
113
|
'type': '(hash: string) => void',
|
|
114
114
|
'defaultValue': '',
|
|
115
115
|
'desc': {
|
|
116
|
-
'zh-CN': '使用change代替;[deprecated v3.12.0废弃,v3.17.0移除;移除原因:命名规范]',
|
|
116
|
+
'zh-CN': '使用 change 代替;[deprecated v3.12.0 废弃,v3.17.0 移除;移除原因:命名规范]',
|
|
117
117
|
'en-US':
|
|
118
118
|
'use change instead [deprecated v3.12.0 abandoned, v3.17.0 removed; reason for removal: naming convention]'
|
|
119
119
|
},
|
|
@@ -271,14 +271,14 @@ export default {
|
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
'name': 'prefix-icon',
|
|
274
|
-
'type': '
|
|
274
|
+
'type': 'Component',
|
|
275
275
|
'defaultValue': '',
|
|
276
276
|
'desc': { 'zh-CN': '输入框头部图标', 'en-US': 'Icon on the header of the text box' },
|
|
277
277
|
'demoId': 'custom-icon'
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
'name': 'suffix-icon',
|
|
281
|
-
'type': '
|
|
281
|
+
'type': 'Component',
|
|
282
282
|
'defaultValue': '',
|
|
283
283
|
'desc': { 'zh-CN': '输入框尾部图标', 'en-US': 'Icon at the end of the text box' },
|
|
284
284
|
'demoId': 'custom-icon'
|
|
@@ -10,6 +10,7 @@ test('按钮组基本示例', async ({ page }) => {
|
|
|
10
10
|
const button3 = demo.getByRole('button', { name: 'Button3' })
|
|
11
11
|
|
|
12
12
|
await button3.click()
|
|
13
|
+
await demo.getByRole('button', { name: 'Button2' }).hover()
|
|
13
14
|
await expect(buttonGroup.locator('li').nth(2)).toHaveClass('active')
|
|
14
15
|
await expect(button3).toHaveCSS('background-color', 'rgb(94, 124, 224)')
|
|
15
16
|
await expect(button3).toHaveCSS('border-bottom-color', 'rgb(94, 124, 224)')
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<tiny-button-group :data="groupData" v-model="checkedVal"></tiny-button-group>
|
|
4
|
+
<tiny-button-group :data="groupData" v-model="checkedVal">
|
|
5
|
+
<span class="custom-empty">自定义空数据</span>
|
|
6
|
+
</tiny-button-group>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
import { ref } from 'vue'
|
|
12
|
+
import { ButtonGroup as TinyButtonGroup } from '@opentiny/vue'
|
|
13
|
+
|
|
14
|
+
const checkedVal = ref('')
|
|
15
|
+
const groupData = ref([])
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<style scoped>
|
|
19
|
+
.custom-empty {
|
|
20
|
+
color: #fac20a;
|
|
21
|
+
}
|
|
22
|
+
.tiny-button-group + .tiny-button-group {
|
|
23
|
+
margin-left: 20px;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('空数据插槽', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('button-group#slot-empty')
|
|
6
|
+
|
|
7
|
+
const demo = page.locator('#slot-empty')
|
|
8
|
+
const emptySlot = demo.locator('.tiny-button-group .tiny-button-group--empty')
|
|
9
|
+
await expect(emptySlot.first()).toHaveCSS('color', 'rgb(173, 176, 184)')
|
|
10
|
+
await expect(demo.locator('.tiny-button-group .custom-empty')).toHaveCSS('color', 'rgb(250, 194, 10)')
|
|
11
|
+
})
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<tiny-button-group :data="groupData" v-model="checkedVal"></tiny-button-group>
|
|
4
|
+
<tiny-button-group :data="groupData" v-model="checkedVal">
|
|
5
|
+
<span class="custom-empty">自定义空数据</span>
|
|
6
|
+
</tiny-button-group>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import { ButtonGroup } from '@opentiny/vue'
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
components: {
|
|
15
|
+
TinyButtonGroup: ButtonGroup
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
checkedVal: '',
|
|
20
|
+
groupData: []
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<style scoped>
|
|
27
|
+
.custom-empty {
|
|
28
|
+
color: #fac20a;
|
|
29
|
+
}
|
|
30
|
+
.tiny-button-group + .tiny-button-group {
|
|
31
|
+
margin-left: 20px;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -86,6 +86,15 @@ export default {
|
|
|
86
86
|
},
|
|
87
87
|
'codeFiles': ['slot-default.vue']
|
|
88
88
|
},
|
|
89
|
+
{
|
|
90
|
+
'demoId': 'slot-empty',
|
|
91
|
+
'name': { 'zh-CN': '空数据插槽', 'en-US': 'Empty slot' },
|
|
92
|
+
'desc': {
|
|
93
|
+
'zh-CN': '<p>当数据为空时,默认会显示暂无数据,通过默认插槽自定义内容。</p>',
|
|
94
|
+
'en-US': '<p>When the data is empty, customize the content via the <code>empty</code> slot.</p>'
|
|
95
|
+
},
|
|
96
|
+
'codeFiles': ['slot-empty.vue']
|
|
97
|
+
},
|
|
89
98
|
{
|
|
90
99
|
'demoId': 'button-group-multiple',
|
|
91
100
|
'name': { 'zh-CN': '多行按钮组', 'en-US': 'Button Group Multiple' },
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('基本用法', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('calendar#basic-usage')
|
|
6
|
+
const pcDemo = page.locator('.pc-demo')
|
|
7
|
+
const nowMonth = new Date().getMonth() + 1
|
|
8
|
+
const today = page.locator('.today')
|
|
9
|
+
const selectedDay = page.getByRole('cell', { name: '14' }).locator('div').first()
|
|
10
|
+
const selectedMonth = page.getByRole('cell', { name: '7 月' }).locator('div').first()
|
|
11
|
+
// 校验日期,查看页面显示是否是月
|
|
12
|
+
await pcDemo.getByRole('listitem').filter({ hasText: '月' }).nth(2).click()
|
|
13
|
+
await expect(pcDemo.locator('.tiny-calendar > div').last()).toHaveClass(/month/)
|
|
14
|
+
// 校验日期选择,选中的样式有selected
|
|
15
|
+
await selectedDay.click()
|
|
16
|
+
await expect(selectedDay).toHaveClass(/selected/)
|
|
17
|
+
// 校验今天按钮,选中的样式有selected today
|
|
18
|
+
await pcDemo.getByRole('button', { name: '今天' }).click()
|
|
19
|
+
await expect(today).toHaveClass(/selected/)
|
|
20
|
+
|
|
21
|
+
// 校验年里的月份代码逻辑一致
|
|
22
|
+
await pcDemo.getByRole('listitem').filter({ hasText: '年' }).nth(2).click()
|
|
23
|
+
await expect(pcDemo.locator('.tiny-calendar > div').last()).toHaveClass(/year/)
|
|
24
|
+
await selectedMonth.click()
|
|
25
|
+
await expect(selectedMonth).toHaveClass(/selected/)
|
|
26
|
+
await pcDemo.getByRole('button', { name: '本月' }).click()
|
|
27
|
+
await expect(
|
|
28
|
+
pcDemo
|
|
29
|
+
.getByRole('cell', { name: `${nowMonth}` + ' 月' })
|
|
30
|
+
.locator('div')
|
|
31
|
+
.first()
|
|
32
|
+
).toHaveClass(/selected/)
|
|
33
|
+
})
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('显示模式', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('calendar#calendar-mode')
|
|
6
|
+
const pcDemo = page.locator('.pc-demo')
|
|
7
|
+
const nowMonth = new Date().getMonth() + 1
|
|
8
|
+
const today = page.locator('.today')
|
|
9
|
+
const selectedDay = page.getByRole('cell', { name: '14' }).locator('div').first()
|
|
10
|
+
const selectedMonth = page.getByRole('cell', { name: '7 月' }).locator('div').first()
|
|
11
|
+
// 校验日期,查看页面显示是否是月
|
|
12
|
+
await pcDemo.getByRole('listitem').filter({ hasText: '月' }).nth(2).click()
|
|
13
|
+
await expect(pcDemo.locator('.tiny-calendar > div').last()).toHaveClass(/month/)
|
|
14
|
+
// 校验日期选择,选中的样式有selected
|
|
15
|
+
await selectedDay.click()
|
|
16
|
+
await expect(selectedDay).toHaveClass(/selected/)
|
|
17
|
+
// 校验今天按钮,选中的样式有selected today
|
|
18
|
+
await pcDemo.getByRole('button', { name: '今天' }).click()
|
|
19
|
+
await expect(today).toHaveClass(/selected/)
|
|
20
|
+
|
|
21
|
+
// 校验年里的月份代码逻辑一致
|
|
22
|
+
await pcDemo.getByRole('listitem').filter({ hasText: '年' }).nth(2).click()
|
|
23
|
+
await expect(pcDemo.locator('.tiny-calendar > div').last()).toHaveClass(/year/)
|
|
24
|
+
await selectedMonth.click()
|
|
25
|
+
await expect(selectedMonth).toHaveClass(/selected/)
|
|
26
|
+
await pcDemo.getByRole('button', { name: '本月' }).click()
|
|
27
|
+
await expect(
|
|
28
|
+
pcDemo
|
|
29
|
+
.getByRole('cell', { name: `${nowMonth}` + ' 月' })
|
|
30
|
+
.locator('div')
|
|
31
|
+
.first()
|
|
32
|
+
).toHaveClass(/selected/)
|
|
33
|
+
})
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
</tiny-calendar>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
|
-
<script setup
|
|
9
|
+
<script setup>
|
|
10
10
|
import { Calendar as TinyCalendar, Button as TinyButton } from '@opentiny/vue'
|
|
11
11
|
|
|
12
12
|
function toToday(scope) {
|
|
13
13
|
let year = new Date().getFullYear()
|
|
14
|
-
let month = new Date().getMonth()
|
|
14
|
+
let month = new Date().getMonth()
|
|
15
15
|
let day = new Date().getDate()
|
|
16
|
-
scope.selectedDate = new Date(year
|
|
16
|
+
scope.selectedDate = new Date(year, month, day).valueOf()
|
|
17
17
|
}
|
|
18
18
|
</script>
|