@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
|
@@ -11,13 +11,21 @@ export default {
|
|
|
11
11
|
{
|
|
12
12
|
'demoId': 'basic',
|
|
13
13
|
'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' },
|
|
14
|
-
'desc': {
|
|
14
|
+
'desc': {
|
|
15
|
+
'zh-CN':
|
|
16
|
+
'<p>通过 <code>content</code> 属性设置水印的文字。</br>通过 <code>font</code> 属性设置水印的样式</p>。',
|
|
17
|
+
'en-US':
|
|
18
|
+
'Set the text of the watermark through the <code>content</code> attribute.</br> Set the style of the watermark through the <code>font</code> attribute. '
|
|
19
|
+
},
|
|
15
20
|
'codeFiles': ['basic-usage.vue']
|
|
16
21
|
},
|
|
17
22
|
{
|
|
18
23
|
'demoId': 'image',
|
|
19
24
|
'name': { 'zh-CN': '图片水印', 'en-US': 'Basic Usage Image' },
|
|
20
|
-
'desc': {
|
|
25
|
+
'desc': {
|
|
26
|
+
'zh-CN': '<p>通过 <code>image</code> 属性设置水印的图片。</p>',
|
|
27
|
+
'en-US': 'Set the watermark image through the <code>image</code> property. '
|
|
28
|
+
},
|
|
21
29
|
'codeFiles': ['image.vue']
|
|
22
30
|
}
|
|
23
31
|
],
|
|
@@ -31,7 +39,7 @@ export default {
|
|
|
31
39
|
'type': 'number',
|
|
32
40
|
'defaultValue': '120',
|
|
33
41
|
'desc': {
|
|
34
|
-
'zh-CN': '水印的宽度, 最小宽度
|
|
42
|
+
'zh-CN': '水印的宽度, 最小宽度120px',
|
|
35
43
|
'en-US': 'The width of the watermark, minimum width 120'
|
|
36
44
|
},
|
|
37
45
|
'demoId': 'basic'
|
|
@@ -41,7 +49,7 @@ export default {
|
|
|
41
49
|
'type': 'number',
|
|
42
50
|
'defaultValue': '64',
|
|
43
51
|
'desc': {
|
|
44
|
-
'zh-CN': '水印的高度, 最小高度
|
|
52
|
+
'zh-CN': '水印的高度, 最小高度64px',
|
|
45
53
|
'en-US': 'The height of the watermark, minimum height 120'
|
|
46
54
|
},
|
|
47
55
|
'demoId': 'basic'
|
|
@@ -61,7 +69,7 @@ export default {
|
|
|
61
69
|
'type': 'number',
|
|
62
70
|
'defaultValue': '9',
|
|
63
71
|
'desc': {
|
|
64
|
-
'zh-CN':
|
|
72
|
+
'zh-CN': "追加的水印元素的 'z-index' ",
|
|
65
73
|
'en-US': 'The z-index of the appended watermark element'
|
|
66
74
|
},
|
|
67
75
|
'demoId': 'basic'
|
|
@@ -71,7 +79,7 @@ export default {
|
|
|
71
79
|
'type': 'string',
|
|
72
80
|
'defaultValue': '',
|
|
73
81
|
'desc': {
|
|
74
|
-
'zh-CN': '图片源,建议导出 2 倍或 3
|
|
82
|
+
'zh-CN': '图片源,建议导出 2 倍或 3 倍图,优先级高(支持 base64 格式),此属性高于 content ',
|
|
75
83
|
'en-US': 'Image source, it is recommended to export 2x or 3x image, high priority, higher content'
|
|
76
84
|
},
|
|
77
85
|
'demoId': 'image'
|
|
@@ -81,23 +89,18 @@ export default {
|
|
|
81
89
|
'type': 'string',
|
|
82
90
|
'defaultValue': '',
|
|
83
91
|
'desc': {
|
|
84
|
-
'zh-CN': '水印文字内容,此属性低于image',
|
|
92
|
+
'zh-CN': '水印文字内容,此属性低于 image',
|
|
85
93
|
'en-US': 'Watermark text content, lower image'
|
|
86
94
|
},
|
|
87
95
|
'demoId': 'basic'
|
|
88
96
|
},
|
|
89
97
|
{
|
|
90
98
|
'name': 'font',
|
|
91
|
-
'type': '
|
|
99
|
+
'type': 'Font',
|
|
92
100
|
'defaultValue': '',
|
|
101
|
+
'typeAnchorName': 'Font',
|
|
93
102
|
'desc': {
|
|
94
|
-
'zh-CN':
|
|
95
|
-
color:'rgba(0,0,0,.15)',
|
|
96
|
-
fontSize:'16',
|
|
97
|
-
"fontWeight":'normal',
|
|
98
|
-
"fontFamily":'sans-serif',
|
|
99
|
-
"fontStyle":'normal'
|
|
100
|
-
}`,
|
|
103
|
+
'zh-CN': `水印文字样式`,
|
|
101
104
|
'en-US': 'Text style'
|
|
102
105
|
},
|
|
103
106
|
'demoId': 'basic'
|
|
@@ -117,7 +120,7 @@ export default {
|
|
|
117
120
|
'type': 'array',
|
|
118
121
|
'defaultValue': '[20, 20] ',
|
|
119
122
|
'desc': {
|
|
120
|
-
'zh-CN': '
|
|
123
|
+
'zh-CN': '水印距离容器左上角的偏移量',
|
|
121
124
|
'en-US': 'The offset of the watermark from the upper left corner of the container. '
|
|
122
125
|
},
|
|
123
126
|
'demoId': 'basic'
|
|
@@ -136,5 +139,18 @@ export default {
|
|
|
136
139
|
'events': [],
|
|
137
140
|
'slots': []
|
|
138
141
|
}
|
|
142
|
+
],
|
|
143
|
+
types: [
|
|
144
|
+
{
|
|
145
|
+
name: 'Font',
|
|
146
|
+
type: 'type',
|
|
147
|
+
code: `type Font = {
|
|
148
|
+
color:string,
|
|
149
|
+
fontSize:number,
|
|
150
|
+
fontWeight:string,
|
|
151
|
+
fontFamily:string,
|
|
152
|
+
fontStyle:string
|
|
153
|
+
}`
|
|
154
|
+
}
|
|
139
155
|
]
|
|
140
156
|
}
|
package/demos/pc/menus.js
CHANGED
|
@@ -97,7 +97,7 @@ export const cmpMenus = [
|
|
|
97
97
|
{ 'nameCn': '文件上传', 'name': 'FileUpload', 'key': 'file-upload' },
|
|
98
98
|
{ 'nameCn': '表单', 'name': 'Form', 'key': 'form' },
|
|
99
99
|
{ 'nameCn': '输入框', 'name': 'Input', 'key': 'input' },
|
|
100
|
-
{ 'nameCn': '
|
|
100
|
+
{ 'nameCn': ' IP地址输入框', 'name': 'IpAddress', 'key': 'ip-address' },
|
|
101
101
|
{ 'nameCn': '文字链接', 'name': 'Link', 'key': 'link' },
|
|
102
102
|
{ 'nameCn': '计数器', 'name': 'Numeric', 'key': 'numeric' },
|
|
103
103
|
{ 'nameCn': '弹出编辑', 'name': 'PopEditor', 'key': 'popeditor' },
|
|
@@ -288,6 +288,11 @@ export const cmpMenus = [
|
|
|
288
288
|
'mark': {
|
|
289
289
|
'text': 'New'
|
|
290
290
|
}
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
'nameCn': '脑图',
|
|
294
|
+
'name': 'mind-map',
|
|
295
|
+
'key': 'mind-map'
|
|
291
296
|
}
|
|
292
297
|
]
|
|
293
298
|
}
|
|
@@ -117,14 +117,20 @@ rules: {
|
|
|
117
117
|
|
|
118
118
|
#### trigger
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
Configure the way to trigger the verification rules through `trigger`. When it is `change`, the verification is triggered when the input box value changes. When it is `blur`,
|
|
121
|
+
the verification is triggered after the input box value is out of focus. Can be set to an array `['change', 'blur']` to trigger both scenarios. The default is to trigger both scenarios.
|
|
122
|
+
If it is only triggered when the verification method is actively called, it can be set to an empty array `[]`. An example of usage is as follows:
|
|
121
123
|
|
|
122
124
|
```js
|
|
123
125
|
rules: {
|
|
124
|
-
users: { len: 2, message: 'The length must be 2', trigger: 'change' }
|
|
126
|
+
users: { len: 2, message: 'The length must be 2', trigger: 'change' },
|
|
127
|
+
password: { len: 2, message: 'The length must be 2', trigger: ['change', 'blur'] },
|
|
128
|
+
nickname: { len: 10, message: 'Duplicate name already exists', trigger: [] }
|
|
125
129
|
}
|
|
126
130
|
```
|
|
127
131
|
|
|
132
|
+
````
|
|
133
|
+
|
|
128
134
|
The configurable values are as follows:
|
|
129
135
|
|
|
130
136
|
- `blur`: The verification is triggered after the focus is out of focus.
|
|
@@ -139,7 +145,7 @@ Enumerated value validation, which verifies whether the value of the field is in
|
|
|
139
145
|
rules: {
|
|
140
146
|
role: { type: 'enum', enum: ['admin', 'user', 'guest'] }
|
|
141
147
|
}
|
|
142
|
-
|
|
148
|
+
````
|
|
143
149
|
|
|
144
150
|
#### whitespace
|
|
145
151
|
|
|
@@ -117,12 +117,14 @@ rules: {
|
|
|
117
117
|
|
|
118
118
|
#### trigger
|
|
119
119
|
|
|
120
|
-
通过 `trigger` 配置触发校验规则的方式,为 `change` 时,当输入框值改变即触发校验,为 `blur` 时则失焦后触发校验。可设置成数组 `['change', 'blur']`
|
|
120
|
+
通过 `trigger` 配置触发校验规则的方式,为 `change` 时,当输入框值改变即触发校验,为 `blur` 时则失焦后触发校验。可设置成数组 `['change', 'blur']` 两种场景都触发,默认为两种场景都触发。
|
|
121
|
+
如果如果仅在主动调用校验方式时触发,可设置为空数组 `[]`。使用示例如下所示:
|
|
121
122
|
|
|
122
123
|
```js
|
|
123
124
|
rules: {
|
|
124
125
|
users: { len: 2, message: '长度必须为2', trigger: 'change' },
|
|
125
126
|
password: { len: 2, message: '长度必须为2', trigger: ['change', 'blur'] },
|
|
127
|
+
nickname: { len: 10, message: '已存在重复名称', trigger: [] }
|
|
126
128
|
}
|
|
127
129
|
```
|
|
128
130
|
|
|
@@ -49,20 +49,22 @@ resolve: {
|
|
|
49
49
|
|
|
50
50
|
```js
|
|
51
51
|
import TinyThemeTool from' @opentiny/vue-theme/theme-tool.js'
|
|
52
|
-
import {tinyInfinityTheme} from'@opentiny/vue-theme/theme' //Infinite theme
|
|
53
52
|
|
|
54
|
-
|
|
53
|
+
// Infinite theme
|
|
54
|
+
import {tinyInfinityTheme} from'@opentiny/vue-theme/theme'
|
|
55
55
|
|
|
56
|
-
//
|
|
56
|
+
// Initialize the infinite theme.
|
|
57
|
+
const theme = new TinyThemeTool(tinyInfinityTheme,'tinyStyleSheetId')
|
|
57
58
|
|
|
59
|
+
// Customize the theme data format.
|
|
58
60
|
const tinyTestTheme = {
|
|
59
|
-
id: 'tiny-test-theme', //Unique ID of a topic. Each topic must be unique.
|
|
60
|
-
name: 'testTheme', //English name of the theme
|
|
61
|
-
cnName:'Test Topic', //Chinese name of the topic
|
|
62
|
-
data: {'ti-base-color':'#f2f2f3'} //Subject data
|
|
61
|
+
id: 'tiny-test-theme', // Unique ID of a topic. Each topic must be unique.
|
|
62
|
+
name: 'testTheme', // English name of the theme
|
|
63
|
+
cnName:'Test Topic', // Chinese name of the topic
|
|
64
|
+
data: {'ti-base-color':'#f2f2f3'} // Subject data
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
//Dynamic theme switching
|
|
67
|
+
// Dynamic theme switching
|
|
66
68
|
|
|
67
69
|
theme.changeTheme(tinyTestTheme)
|
|
68
70
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-docs",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.9",
|
|
4
|
+
"license": "MIT",
|
|
4
5
|
"dependencies": {
|
|
5
6
|
"@unocss/reset": "0.38.2",
|
|
6
7
|
"@vue/repl": "^2.5.5",
|
|
@@ -13,19 +14,18 @@
|
|
|
13
14
|
"vue-i18n": "^9.1.10",
|
|
14
15
|
"vue-router": "4.1.5",
|
|
15
16
|
"marked": "^4.3.0",
|
|
16
|
-
"@playwright/test": "^1.29.2",
|
|
17
17
|
"sortablejs": "1.15.0",
|
|
18
18
|
"@opentiny/vue-repl": "^1.1.0",
|
|
19
19
|
"@opentiny/vue": "~3.12.0",
|
|
20
|
-
"@opentiny/vue-common": "~3.12.0",
|
|
21
20
|
"@opentiny/vue-icon": "~3.12.0",
|
|
22
|
-
"@opentiny/vue-icon-saas": "~3.12.0",
|
|
23
21
|
"@opentiny/vue-design-smb": "~3.12.0",
|
|
22
|
+
"@opentiny/vue-common": "~3.12.0",
|
|
23
|
+
"@opentiny/vue-icon-saas": "~3.12.0",
|
|
24
|
+
"@opentiny/vue-theme": "~3.13.1",
|
|
24
25
|
"@opentiny/vue-design-aurora": "~3.12.0",
|
|
25
|
-
"@opentiny/vue-
|
|
26
|
-
"@opentiny/vue-theme": "~3.
|
|
27
|
-
"@opentiny/vue-theme-saas": "~3.
|
|
28
|
-
"@opentiny/vue-vite-import": "~1.1.5"
|
|
26
|
+
"@opentiny/vue-vite-import": "~1.1.5",
|
|
27
|
+
"@opentiny/vue-theme-mobile": "~3.13.0",
|
|
28
|
+
"@opentiny/vue-theme-saas": "~3.13.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/markdown-it": "^12.2.3",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"cross-spawn": "^7.0.3",
|
|
39
39
|
"fs-extra": "^10.1.0",
|
|
40
40
|
"less": "^4.1.3",
|
|
41
|
+
"@playwright/test": "^1.40.1",
|
|
41
42
|
"markdown-it": "^13.0.1",
|
|
42
43
|
"markdown-it-anchor": "^8.6.4",
|
|
43
44
|
"markdown-it-emoji": "^2.0.2",
|
package/playground/App.vue
CHANGED
|
@@ -38,6 +38,8 @@ const createImportMap = (version) => {
|
|
|
38
38
|
'@opentiny/vue-locale': `${getRuntime(version)}tiny-vue-locale.mjs`,
|
|
39
39
|
'@opentiny/vue-common': `${getRuntime(version)}tiny-vue-common.mjs`,
|
|
40
40
|
'@opentiny/vue-theme/': `${cdnHost}/@opentiny/vue-theme@${version}/`,
|
|
41
|
+
'@opentiny/vue-theme-mobile/': `${cdnHost}/@opentiny/vue-theme-mobile@${version}/`,
|
|
42
|
+
'@opentiny/vue-renderless/': `${cdnHost}/@opentiny/vue-renderless@${version}/`,
|
|
41
43
|
'sortablejs': `${cdnHost}/sortablejs@1.15.0/modular/sortable.esm.js`
|
|
42
44
|
}
|
|
43
45
|
if (['aurora', 'smb'].includes(tinyTheme)) {
|
|
@@ -72,6 +74,7 @@ const getTinyTheme = (version) => {
|
|
|
72
74
|
const hash = location.hash.slice(1)
|
|
73
75
|
const shareData = hash.split('|')
|
|
74
76
|
|
|
77
|
+
// eslint-disable-next-line new-cap
|
|
75
78
|
const store = new useStore({
|
|
76
79
|
serializedState: shareData.length === 2 ? shareData[1] : '',
|
|
77
80
|
showOutput: true,
|
|
@@ -153,6 +156,11 @@ function insertStyleDom(version) {
|
|
|
153
156
|
link.href = getTinyTheme(version)
|
|
154
157
|
iframeWin.addEventListener('DOMContentLoaded', () => {
|
|
155
158
|
iframeWin.document.head.append(link)
|
|
159
|
+
|
|
160
|
+
// 增加mobile支持,增加mobile的样式表
|
|
161
|
+
const mobileLink = link.cloneNode(true)
|
|
162
|
+
mobileLink.href = `${cdnHost}/@opentiny/vue-theme-mobile@${version}/index.css`
|
|
163
|
+
iframeWin.document.head.append(mobileLink)
|
|
156
164
|
})
|
|
157
165
|
})
|
|
158
166
|
}
|
|
@@ -170,6 +178,7 @@ function getDemoName(name, apiMode) {
|
|
|
170
178
|
return name.replace(/\.vue$/, `${apiMode === 'Options' ? '' : '-composition-api'}.vue`)
|
|
171
179
|
}
|
|
172
180
|
|
|
181
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
173
182
|
const getDemoCode = async ({ cmpId, fileName, apiMode, mode }) => {
|
|
174
183
|
const demoName = getDemoName(`${getWebdocPath(cmpId)}/${fileName}`, apiMode)
|
|
175
184
|
const path = tinyMode === 'mobile-first' ? `@demos/mobile-first/app/${demoName}` : `${staticDemoPath}/${demoName}`
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="button-wrap">
|
|
3
|
-
<tiny-button round>默认1秒</tiny-button>
|
|
4
|
-
<tiny-button type="primary" round :reset-time="2000">禁用2秒</tiny-button>
|
|
5
|
-
<tiny-button type="success" round :reset-time="5000">禁用5秒</tiny-button>
|
|
6
|
-
<tiny-button round>圆角按钮</tiny-button>
|
|
7
|
-
<tiny-button type="primary" round disabled>主要按钮</tiny-button>
|
|
8
|
-
<tiny-button type="success" round disabled>成功按钮</tiny-button>
|
|
9
|
-
<tiny-button type="info" round disabled>信息按钮</tiny-button>
|
|
10
|
-
<tiny-button type="warning" round disabled>警告按钮</tiny-button>
|
|
11
|
-
<tiny-button type="danger" round disabled>危险按钮</tiny-button>
|
|
12
|
-
<tiny-button type="secondary" round disabled>次要按钮</tiny-button>
|
|
13
|
-
<tiny-button round disabled>弱按钮</tiny-button>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script lang="jsx">
|
|
18
|
-
import { Button } from '@opentiny/vue'
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
components: {
|
|
22
|
-
TinyButton: Button
|
|
23
|
-
},
|
|
24
|
-
methods: {
|
|
25
|
-
click() {
|
|
26
|
-
console.log('click event!!!')
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<style scoped>
|
|
33
|
-
.button-wrap {
|
|
34
|
-
padding: 0 10px;
|
|
35
|
-
}
|
|
36
|
-
.button-wrap .tiny-mobile-button {
|
|
37
|
-
margin-right: 16px;
|
|
38
|
-
margin-bottom: 16px;
|
|
39
|
-
}
|
|
40
|
-
</style>
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="demo-form-native-type">
|
|
3
|
-
<div class="page__hd">
|
|
4
|
-
<h1 class="page__title">Form</h1>
|
|
5
|
-
<p class="page__desc">表单(纯展示)</p>
|
|
6
|
-
</div>
|
|
7
|
-
<div class="demo-padds-native-type">
|
|
8
|
-
<tiny-form ref="ruleForm" :model="createData" :rules="rules">
|
|
9
|
-
<tiny-form-item label="优秀" prop="users" vertical>
|
|
10
|
-
<tiny-input v-model="createData.users" placeholder="请输入内容" type="form"></tiny-input>
|
|
11
|
-
</tiny-form-item>
|
|
12
|
-
<tiny-form-item label="优秀" vertical>
|
|
13
|
-
<tiny-input
|
|
14
|
-
v-model="createData.user"
|
|
15
|
-
is-select
|
|
16
|
-
:select-menu="menus"
|
|
17
|
-
placeholder="请输入内容"
|
|
18
|
-
type="form"
|
|
19
|
-
></tiny-input>
|
|
20
|
-
</tiny-form-item>
|
|
21
|
-
<tiny-form-item class="demo-form-base-item">
|
|
22
|
-
<tiny-button type="primary" @click="handleSubmit('ruleForm')">提交</tiny-button>
|
|
23
|
-
</tiny-form-item>
|
|
24
|
-
</tiny-form>
|
|
25
|
-
</div>
|
|
26
|
-
<tiny-dialog-box
|
|
27
|
-
:visible="boxVisibility"
|
|
28
|
-
@update:visible="boxVisibility = $event"
|
|
29
|
-
:modal-append-to-body="false"
|
|
30
|
-
title="消息提示"
|
|
31
|
-
>
|
|
32
|
-
<span>reset</span>
|
|
33
|
-
</tiny-dialog-box>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script lang="jsx">
|
|
38
|
-
import { Form, FormItem, Input, Button, DialogBox } from '@opentiny/vue'
|
|
39
|
-
|
|
40
|
-
export default {
|
|
41
|
-
components: {
|
|
42
|
-
TinyForm: Form,
|
|
43
|
-
TinyFormItem: FormItem,
|
|
44
|
-
TinyInput: Input,
|
|
45
|
-
TinyButton: Button,
|
|
46
|
-
TinyDialogBox: DialogBox
|
|
47
|
-
},
|
|
48
|
-
data() {
|
|
49
|
-
return {
|
|
50
|
-
createData: {
|
|
51
|
-
users: ''
|
|
52
|
-
},
|
|
53
|
-
rules: {
|
|
54
|
-
users: [{ required: true, message: '必填', trigger: 'change' }]
|
|
55
|
-
},
|
|
56
|
-
boxVisibility: false
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
methods: {
|
|
60
|
-
handleSubmit(formName) {
|
|
61
|
-
this.$refs[formName].validate((valid) => {
|
|
62
|
-
if (valid) {
|
|
63
|
-
this.boxVisibility = true
|
|
64
|
-
this.$refs[formName].resetFields()
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
</script>
|
|
71
|
-
|
|
72
|
-
<style scoped>
|
|
73
|
-
.demo-padds-native-type {
|
|
74
|
-
padding: 15px;
|
|
75
|
-
background: white;
|
|
76
|
-
margin-bottom: 15px;
|
|
77
|
-
}
|
|
78
|
-
.page__hd {
|
|
79
|
-
padding: 40px;
|
|
80
|
-
}
|
|
81
|
-
.page__title {
|
|
82
|
-
font-weight: 400;
|
|
83
|
-
font-size: 21px;
|
|
84
|
-
text-align: left;
|
|
85
|
-
}
|
|
86
|
-
.page__desc {
|
|
87
|
-
margin-top: 5px;
|
|
88
|
-
color: #888;
|
|
89
|
-
font-size: 14px;
|
|
90
|
-
text-align: left;
|
|
91
|
-
}
|
|
92
|
-
.demo-form-native-type {
|
|
93
|
-
height: 100%;
|
|
94
|
-
background: #f4f4f4;
|
|
95
|
-
}
|
|
96
|
-
</style>
|
|
97
|
-
|
|
98
|
-
<style>
|
|
99
|
-
.demo-form-native-type .tiny-form-item__label {
|
|
100
|
-
background: #fff;
|
|
101
|
-
}
|
|
102
|
-
.demo-padds-native-type .tiny-mobile-input-form__input {
|
|
103
|
-
text-align: right;
|
|
104
|
-
}
|
|
105
|
-
</style>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="button-wrap">
|
|
3
|
-
<tiny-button plain>朴素按钮</tiny-button>
|
|
4
|
-
<tiny-button type="primary" plain>主要按钮</tiny-button>
|
|
5
|
-
<tiny-button type="success" plain>成功按钮</tiny-button>
|
|
6
|
-
<tiny-button type="info" plain>信息按钮</tiny-button>
|
|
7
|
-
<tiny-button type="warning" plain>警告按钮</tiny-button>
|
|
8
|
-
<tiny-button type="danger" plain>危险按钮</tiny-button>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script lang="jsx">
|
|
13
|
-
import { Button } from '@opentiny/vue'
|
|
14
|
-
|
|
15
|
-
export default {
|
|
16
|
-
components: {
|
|
17
|
-
TinyButton: Button
|
|
18
|
-
},
|
|
19
|
-
data() {
|
|
20
|
-
return {}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<style scoped>
|
|
26
|
-
.button-wrap {
|
|
27
|
-
padding: 0 10px;
|
|
28
|
-
}
|
|
29
|
-
.button-wrap .tiny-mobile-button:not(:nth-child(3n)) {
|
|
30
|
-
margin-right: 16px;
|
|
31
|
-
margin-bottom: 16px;
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="button-wrap">
|
|
3
|
-
<tiny-button round>圆角按钮</tiny-button>
|
|
4
|
-
<tiny-button type="primary" round>主要按钮</tiny-button>
|
|
5
|
-
<tiny-button type="success" round>成功按钮</tiny-button>
|
|
6
|
-
<tiny-button type="info" round>信息按钮</tiny-button>
|
|
7
|
-
<tiny-button type="warning" round>警告按钮</tiny-button>
|
|
8
|
-
<tiny-button type="danger" round>危险按钮</tiny-button>
|
|
9
|
-
<tiny-button type="secondary" round>次要按钮</tiny-button>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script lang="jsx">
|
|
14
|
-
import { Button } from '@opentiny/vue'
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
components: {
|
|
18
|
-
TinyButton: Button
|
|
19
|
-
},
|
|
20
|
-
data() {
|
|
21
|
-
return {}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<style scoped>
|
|
27
|
-
.button-wrap {
|
|
28
|
-
padding: 0 10px;
|
|
29
|
-
}
|
|
30
|
-
.button-wrap .tiny-mobile-button {
|
|
31
|
-
margin-right: 16px;
|
|
32
|
-
margin-bottom: 16px;
|
|
33
|
-
}
|
|
34
|
-
</style>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="button-wrap">
|
|
3
|
-
<tiny-button round>默认1秒</tiny-button>
|
|
4
|
-
<tiny-button type="primary" round :reset-time="2000">禁用2秒</tiny-button>
|
|
5
|
-
<tiny-button type="success" round :reset-time="5000">禁用5秒</tiny-button>
|
|
6
|
-
<tiny-button round>圆角按钮</tiny-button>
|
|
7
|
-
<tiny-button type="primary" round disabled>主要按钮</tiny-button>
|
|
8
|
-
<tiny-button type="success" round disabled>成功按钮</tiny-button>
|
|
9
|
-
<tiny-button type="info" round disabled>信息按钮</tiny-button>
|
|
10
|
-
<tiny-button type="warning" round disabled>警告按钮</tiny-button>
|
|
11
|
-
<tiny-button type="danger" round disabled>危险按钮</tiny-button>
|
|
12
|
-
<tiny-button type="secondary" round disabled>次要按钮</tiny-button>
|
|
13
|
-
<tiny-button round disabled>弱按钮</tiny-button>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script lang="jsx">
|
|
18
|
-
import { Button } from '@opentiny/vue'
|
|
19
|
-
|
|
20
|
-
export default {
|
|
21
|
-
components: {
|
|
22
|
-
TinyButton: Button
|
|
23
|
-
},
|
|
24
|
-
data() {
|
|
25
|
-
return {}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<style scoped>
|
|
31
|
-
.button-wrap {
|
|
32
|
-
padding: 0 10px;
|
|
33
|
-
}
|
|
34
|
-
.button-wrap .tiny-mobile-button {
|
|
35
|
-
margin-right: 16px;
|
|
36
|
-
margin-bottom: 16px;
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<tiny-calendar-view :modes="['timeline', 'schedule']" mode="timeline"> </tiny-calendar-view>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import { CalendarView } from '@opentiny/vue'
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
components: {
|
|
10
|
-
TinyCalendarView: CalendarView
|
|
11
|
-
},
|
|
12
|
-
methods: {}
|
|
13
|
-
}
|
|
14
|
-
</script>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<tiny-file-upload :action="action" :before-upload="beforeAvatarUpload">
|
|
3
|
-
<tiny-button type="primary">点击上传</tiny-button>
|
|
4
|
-
</tiny-file-upload>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script setup lang="jsx">
|
|
8
|
-
import { ref } from 'vue'
|
|
9
|
-
import { FileUpload as TinyFileUpload, Button as TinyButton, Modal as TinyModal } from '@opentiny/vue'
|
|
10
|
-
|
|
11
|
-
const action = ref('http://localhost:3000/api/upload')
|
|
12
|
-
|
|
13
|
-
function beforeAvatarUpload(file) {
|
|
14
|
-
const isJPG = file.type === 'image/jpeg'
|
|
15
|
-
const isLt2M = file.size / 1024 / 1024 < 2
|
|
16
|
-
const allow = isJPG && isLt2M
|
|
17
|
-
|
|
18
|
-
!allow && TinyModal.alert('自定义提示:该文件不合规范,文件类型或大小超出限制')
|
|
19
|
-
|
|
20
|
-
return allow
|
|
21
|
-
}
|
|
22
|
-
</script>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { test, expect } from '@playwright/test'
|
|
2
|
-
|
|
3
|
-
test('上传前限制', async ({ page }) => {
|
|
4
|
-
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
-
await page.goto('file-upload#upload-limit')
|
|
6
|
-
|
|
7
|
-
const upload = page.getByRole('button', { name: '点击上传' })
|
|
8
|
-
const lists = page.locator('.tiny-upload-list__item')
|
|
9
|
-
const [fileChooser] = await Promise.all([page.waitForEvent('filechooser'), upload.click()])
|
|
10
|
-
|
|
11
|
-
const path = require('node:path')
|
|
12
|
-
const path1 = path.resolve(__dirname, '测试.jpg')
|
|
13
|
-
const path2 = path.resolve(__dirname, '测试.svg')
|
|
14
|
-
const path3 = path.resolve(__dirname, '测试.png')
|
|
15
|
-
|
|
16
|
-
fileChooser.setFiles(path1)
|
|
17
|
-
fileChooser.setFiles(path2)
|
|
18
|
-
fileChooser.setFiles(path3)
|
|
19
|
-
await expect(lists).toHaveCount(0)
|
|
20
|
-
})
|