@opentiny/vue-docs 2.2.18 → 2.2.20
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/apis/card.js +56 -23
- package/demos/apis/dialog-box.js +12 -5
- package/demos/apis/fall-menu.js +2 -2
- package/demos/apis/file-upload.js +2 -1
- package/demos/apis/float-button.js +211 -0
- package/demos/apis/grid.js +40 -40
- package/demos/apis/ip-address.js +3 -3
- package/demos/apis/multi-select.js +141 -22
- package/demos/apis/numeric.js +25 -0
- package/demos/apis/popeditor.js +20 -14
- package/demos/apis/search.js +11 -0
- package/demos/apis/slider.js +13 -2
- package/demos/apis/steps.js +6 -6
- package/demos/apis/tabs.js +39 -0
- package/demos/apis/time-line.js +34 -1
- package/demos/apis/time-select.js +1 -1
- package/demos/apis/tooltip.js +1 -1
- package/demos/apis/tree-menu.js +5 -5
- package/demos/mobile/app/alert/icon.vue +1 -1
- package/demos/mobile/app/alert/size.vue +1 -1
- package/demos/mobile/app/alert/slot-default.vue +8 -2
- package/demos/mobile/app/exception/buttonText.vue +4 -2
- package/demos/mobile/app/exception/exceptionClass.vue +4 -2
- package/demos/mobile/app/exception/message.vue +4 -7
- package/demos/mobile/app/exception/type.vue +4 -2
- package/demos/mobile/app/loading/background.vue +24 -0
- package/demos/mobile/app/loading/base.vue +16 -6
- package/demos/mobile/app/loading/custom-class.vue +29 -0
- package/demos/mobile/app/loading/global-registry.vue +61 -0
- package/demos/mobile/app/loading/size.vue +59 -0
- package/demos/mobile/app/loading/spinner.vue +26 -0
- package/demos/mobile/app/loading/tip-text.vue +23 -0
- package/demos/mobile/app/loading/webdoc/loading.js +155 -9
- package/demos/mobile/app/multi-select/basic-usage.vue +221 -73
- package/demos/mobile/app/multi-select/disabled.vue +174 -206
- package/demos/mobile/app/multi-select/event-click-item.vue +60 -75
- package/demos/mobile/app/multi-select/filter.vue +65 -93
- package/demos/mobile/app/multi-select/mask.vue +60 -0
- package/demos/mobile/app/multi-select/slots.vue +66 -0
- package/demos/mobile/app/multi-select/type-wheel.vue +39 -49
- package/demos/mobile/app/multi-select/webdoc/multi-select.js +49 -10
- package/demos/mobile/app/popover/base.vue +2 -3
- package/demos/mobile/app/search/base.vue +2 -2
- package/demos/mobile/app/user-head/basic-usage.vue +2 -5
- package/demos/mobile-first/app/card/basic-usage.vue +4 -2
- package/demos/mobile-first/app/card/card-type.vue +6 -12
- package/demos/mobile-first/app/card/slot.vue +2 -5
- package/demos/mobile-first/app/carousel/close-loop.vue +12 -4
- package/demos/mobile-first/app/column-list-item/basic-usage.vue +3 -7
- package/demos/mobile-first/app/column-list-item/custom-width.vue +4 -7
- package/demos/mobile-first/app/column-list-item/icon-click-event.vue +2 -5
- package/demos/mobile-first/app/column-list-item/icon-disabled.vue +2 -5
- package/demos/mobile-first/app/column-list-item/size.vue +3 -6
- package/demos/mobile-first/app/select/filter-method.vue +47 -18
- package/demos/mobile-first/app/time-line/limited-nodes.vue +29 -0
- package/demos/mobile-first/app/time-line/node-max.vue +26 -0
- package/demos/mobile-first/app/time-line/webdoc/time-line.js +26 -1
- package/demos/pc/app/alert/custom-close-composition-api.vue +7 -2
- package/demos/pc/app/alert/custom-close.spec.ts +1 -1
- package/demos/pc/app/alert/custom-close.vue +7 -2
- package/demos/pc/app/area/custom-service.spec.ts +1 -2
- package/demos/pc/app/button/ghost-composition-api.vue +6 -6
- package/demos/pc/app/button/ghost.spec.ts +19 -12
- package/demos/pc/app/button/ghost.vue +6 -6
- package/demos/pc/app/card/basic-usage-composition-api.vue +24 -0
- package/demos/pc/app/card/basic-usage.vue +32 -0
- package/demos/pc/app/card/card-disabled-composition-api.vue +45 -0
- package/demos/pc/app/card/card-disabled.vue +53 -0
- package/demos/pc/app/card/card-events-composition-api.vue +66 -0
- package/demos/pc/app/card/card-events.vue +75 -0
- package/demos/pc/app/card/card-group-composition-api.vue +69 -0
- package/demos/pc/app/card/card-group.vue +79 -0
- package/demos/pc/app/card/card-size-composition-api.vue +59 -0
- package/demos/pc/app/card/card-size.vue +67 -0
- package/demos/pc/app/card/card-status-composition-api.vue +49 -0
- package/demos/pc/app/card/card-status.vue +58 -0
- package/demos/pc/app/card/card-type-composition-api.vue +47 -0
- package/demos/pc/app/card/card-type.vue +55 -0
- package/demos/pc/app/card/check-type-checkbox-composition-api.vue +31 -0
- package/demos/pc/app/card/check-type-checkbox.vue +40 -0
- package/demos/pc/app/card/check-type-radio-composition-api.vue +31 -0
- package/demos/pc/app/card/check-type-radio.vue +39 -0
- package/demos/pc/app/card/custom-class-composition-api.vue +51 -0
- package/demos/pc/app/card/custom-class.vue +59 -0
- package/demos/pc/app/card/operate-bar-composition-api.vue +53 -0
- package/demos/pc/app/card/operate-bar.vue +60 -0
- package/demos/pc/app/card/slot-composition-api.vue +67 -0
- package/demos/pc/app/card/slot.vue +76 -0
- package/demos/pc/app/card/webdoc/card.cn.md +7 -0
- package/demos/pc/app/card/webdoc/card.en.md +7 -0
- package/demos/pc/app/card/webdoc/card.js +148 -0
- package/demos/pc/app/carousel/basic-usage.spec.ts +3 -3
- package/demos/pc/app/carousel/card-mode.spec.ts +4 -11
- package/demos/pc/app/carousel/carousel-arrow-hover.spec.ts +5 -7
- package/demos/pc/app/carousel/carousel-events.spec.ts +7 -16
- package/demos/pc/app/carousel/manual-play.spec.ts +0 -2
- package/demos/pc/app/carousel/play-interval.spec.ts +1 -4
- package/demos/pc/app/cascader/auto-load-checkStrictly.spec.ts +1 -1
- package/demos/pc/app/cascader/auto-load.spec.ts +5 -2
- package/demos/pc/app/color-picker/base.spec.ts +2 -2
- package/demos/pc/app/color-picker/event.spec.ts +1 -1
- package/demos/pc/app/color-picker/history.spec.ts +2 -6
- package/demos/pc/app/color-picker/predefine.spec.ts +2 -5
- package/demos/pc/app/company/basic-usage.spec.ts +3 -6
- package/demos/pc/app/company/custom-service.spec.ts +4 -8
- package/demos/pc/app/country/custom-service.spec.js +4 -4
- package/demos/pc/app/country/fields.spec.js +2 -2
- package/demos/pc/app/crop/aspect-ratio.spec.ts +1 -2
- package/demos/pc/app/crop/auto-crop-area.spec.ts +1 -4
- package/demos/pc/app/crop/basic-usage.spec.ts +0 -2
- package/demos/pc/app/crop/crop-meth.spec.ts +0 -2
- package/demos/pc/app/crop/event-ready.spec.ts +0 -1
- package/demos/pc/app/crop/get-container-data.spec.ts +0 -1
- package/demos/pc/app/crop/get-crop-box-data.spec.ts +0 -2
- package/demos/pc/app/crop/get-data.spec.ts +0 -1
- package/demos/pc/app/crop/min-crop-box-width-height.spec.ts +0 -2
- package/demos/pc/app/crop/no-background.spec.ts +0 -1
- package/demos/pc/app/crop/no-modal.spec.ts +0 -2
- package/demos/pc/app/crop/replace-image.spec.ts +4 -5
- package/demos/pc/app/crop/view-mode.spec.ts +1 -16
- package/demos/pc/app/date-picker/align.spec.ts +17 -14
- package/demos/pc/app/date-picker/basic-usage.spec.ts +17 -22
- package/demos/pc/app/date-picker/clear.spec.ts +13 -7
- package/demos/pc/app/date-picker/date-range.spec.ts +39 -10
- package/demos/pc/app/date-picker/events.spec.ts +11 -3
- package/demos/pc/app/date-picker/format.spec.ts +2 -2
- package/demos/pc/app/date-picker/shortcuts.spec.ts +1 -2
- package/demos/pc/app/dept/custom-service.spec.ts +16 -4
- package/demos/pc/app/detail-page/basic-usage.spec.ts +4 -4
- 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 +1 -1
- package/demos/pc/app/dialog-box/center.vue +1 -1
- package/demos/pc/app/dialog-box/close-on-click-modal-composition-api.vue +1 -1
- package/demos/pc/app/dialog-box/close-on-click-modal.vue +1 -1
- package/demos/pc/app/dialog-box/close-on-press-escape-composition-api.vue +1 -1
- package/demos/pc/app/dialog-box/close-on-press-escape.vue +1 -1
- package/demos/pc/app/dialog-box/custom-dialog-content-composition-api.vue +1 -1
- package/demos/pc/app/dialog-box/custom-dialog-content.vue +1 -1
- package/demos/pc/app/dialog-box/custom-dialog-footer-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/custom-dialog-footer.spec.ts +1 -1
- package/demos/pc/app/dialog-box/custom-dialog-title-composition-api.vue +2 -2
- package/demos/pc/app/dialog-box/custom-dialog-title.spec.ts +1 -1
- 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 +2 -2
- package/demos/pc/app/dialog-box/dialog-width.vue +2 -2
- package/demos/pc/app/dialog-box/draggable-composition-api.vue +15 -3
- package/demos/pc/app/dialog-box/draggable.spec.ts +2 -2
- package/demos/pc/app/dialog-box/draggable.vue +15 -3
- package/demos/pc/app/dialog-box/form-in-dialog.spec.ts +0 -1
- package/demos/pc/app/dialog-box/open-close-events-composition-api.vue +1 -1
- package/demos/pc/app/dialog-box/open-close-events.vue +1 -1
- package/demos/pc/app/dialog-box/webdoc/dialog-box.js +2 -2
- package/demos/pc/app/drawer/tips-props-composition-api.vue +23 -0
- package/demos/pc/app/drawer/tips-props.spec.ts +15 -0
- package/demos/pc/app/drawer/tips-props.vue +33 -0
- package/demos/pc/app/drawer/webdoc/drawer.js +10 -12
- package/demos/pc/app/drop-roles/custom-service.spec.ts +1 -1
- package/demos/pc/app/file-upload/custom-prefix.spec.ts +1 -1
- package/demos/pc/app/file-upload/file-picture-card.spec.ts +1 -1
- package/demos/pc/app/file-upload/manual-upload.spec.ts +1 -1
- package/demos/pc/app/file-upload/picture-card.spec.ts +3 -2
- package/demos/pc/app/file-upload/picture-list.spec.ts +3 -3
- package/demos/pc/app/file-upload/upload-file-list.spec.ts +1 -1
- package/demos/pc/app/file-upload/upload-request.spec.ts +11 -6
- package/demos/pc/app/float-button/backTop-composition-api.vue +40 -0
- package/demos/pc/app/float-button/backTop.vue +51 -0
- package/demos/pc/app/float-button/basic-usage-composition-api.vue +39 -0
- package/demos/pc/app/float-button/basic-usage.vue +48 -0
- package/demos/pc/app/float-button/icon-composition-api.vue +21 -0
- package/demos/pc/app/float-button/icon.vue +31 -0
- package/demos/pc/app/float-button/jump-composition-api.vue +19 -0
- package/demos/pc/app/float-button/jump.vue +26 -0
- package/demos/pc/app/float-button/reset-time-composition-api.vue +22 -0
- package/demos/pc/app/float-button/reset-time.vue +26 -0
- package/demos/pc/app/float-button/trigger-composition-api.vue +31 -0
- package/demos/pc/app/float-button/trigger.vue +40 -0
- package/demos/pc/app/float-button/webdoc/float-button.cn.md +7 -0
- package/demos/pc/app/float-button/webdoc/float-button.en.md +7 -0
- package/demos/pc/app/float-button/webdoc/float-button.js +68 -0
- package/demos/pc/app/floatbar/base.spec.ts +1 -1
- package/demos/pc/app/floatbar/custom-floatbar-item.spec.ts +1 -1
- package/demos/pc/app/floatbar/custom-style.spec.ts +1 -1
- package/demos/pc/app/floatbar/operation-floatbar-item.spec.ts +1 -1
- package/demos/pc/app/form/form-row-col.spec.js +2 -0
- package/demos/pc/app/form/label-position.spec.ts +3 -3
- package/demos/pc/app/grid/custom/ordercolumn-local.spec.js +2 -2
- package/demos/pc/app/grid/data-source/static-data-composition-api.vue +1 -1
- package/demos/pc/app/grid/data-source/static-data.spec.js +1 -1
- package/demos/pc/app/grid/data-source/static-data.vue +1 -1
- package/demos/pc/app/grid/edit/grid-equals-composition-api.vue +50 -0
- package/demos/pc/app/grid/edit/grid-equals.spec.js +10 -0
- package/demos/pc/app/grid/edit/grid-equals.vue +60 -0
- package/demos/pc/app/grid/edit/has-row-change.spec.js +2 -2
- package/demos/pc/app/grid/edit/trigger-mode-hm-editing-composition-api.vue +11 -11
- package/demos/pc/app/grid/editor/mutil-render.spec.js +1 -1
- package/demos/pc/app/grid/event/get-row-method.spec.js +4 -4
- package/demos/pc/app/grid/filter/server-filter.spec.js +1 -1
- package/demos/pc/app/grid/fixed/left-fixed.vue +1 -1
- package/demos/pc/app/grid/large-data/column-anchor.vue +132 -0
- package/demos/pc/app/grid/large-data/scroll-to.spec.js +1 -1
- package/demos/pc/app/grid/loading/grid-loading-tip.spec.js +1 -1
- package/demos/pc/app/grid/pager/show-save-msg-composition-api.vue +1 -1
- package/demos/pc/app/grid/pager/show-save-msg.vue +1 -1
- package/demos/pc/app/grid/renderer/inner-renderer-date-composition-api.vue +40 -0
- package/demos/pc/app/grid/renderer/inner-renderer-date.spec.js +9 -0
- package/demos/pc/app/grid/renderer/inner-renderer-date.vue +50 -0
- package/demos/pc/app/grid/size/grid-size-composition-api.vue +33 -26
- package/demos/pc/app/grid/size/grid-size.spec.js +7 -3
- package/demos/pc/app/grid/size/grid-size.vue +34 -26
- package/demos/pc/app/grid/sort/sort.vue +0 -1
- package/demos/pc/app/grid/toolbar/grid-full-screen-teleport-composition-api.vue +65 -0
- package/demos/pc/app/grid/toolbar/grid-full-screen-teleport.spec.js +10 -0
- package/demos/pc/app/grid/toolbar/grid-full-screen-teleport.vue +73 -0
- package/demos/pc/app/grid/tree-table/tree-grid-insert-delete-update.spec.js +1 -1
- package/demos/pc/app/grid/validation/before-submit-validation.spec.js +1 -1
- package/demos/pc/app/grid/webdoc/grid-custom-style.js +1 -1
- package/demos/pc/app/grid/webdoc/grid-edit.js +11 -0
- package/demos/pc/app/grid/webdoc/grid-editor.js +1 -1
- package/demos/pc/app/grid/webdoc/grid-large-data.js +1 -49
- package/demos/pc/app/grid/webdoc/grid-renderer.js +11 -0
- package/demos/pc/app/grid/webdoc/grid-toolbar.js +11 -2
- package/demos/pc/app/guide/basic-usage.spec.ts +3 -2
- package/demos/pc/app/guide/offset.spec.ts +3 -1
- package/demos/pc/app/hrapprover/basic-usage.spec.ts +2 -6
- package/demos/pc/app/hrapprover/custom-service.spec.ts +5 -2
- package/demos/pc/app/hrapprover/disabled.spec.ts +1 -1
- package/demos/pc/app/ip-address/delimiter.spec.ts +1 -1
- package/demos/pc/app/loading/webdoc/loading.js +1 -1
- package/demos/pc/app/locales/custom-service.spec.ts +0 -3
- package/demos/pc/app/logout/basic-usage.spec.ts +5 -5
- package/demos/pc/app/milestone/show-number.spec.ts +1 -1
- package/demos/pc/app/milestone/solid-style.spec.ts +1 -1
- package/demos/pc/app/modal/basic-usage.spec.ts +1 -1
- package/demos/pc/app/modal/duration.spec.ts +1 -2
- package/demos/pc/app/modal/{min-width-composition-api.vue → min-width-height-composition-api.vue} +4 -2
- package/demos/pc/app/modal/{min-width.spec.ts → min-width-height.spec.ts} +3 -3
- package/demos/pc/app/modal/{min-width.vue → min-width-height.vue} +4 -2
- package/demos/pc/app/modal/prop-slots-composition-api.vue +2 -2
- package/demos/pc/app/modal/show-header-footer-composition-api.vue +11 -0
- package/demos/pc/app/modal/{showHeader.spec.ts → show-header-footer.spec.ts} +3 -3
- package/demos/pc/app/modal/{showHeader.vue → show-header-footer.vue} +2 -2
- package/demos/pc/app/modal/webdoc/modal.js +12 -36
- package/demos/pc/app/notify/closeIcon.spec.ts +1 -1
- package/demos/pc/app/numeric/change-event-composition-api.vue +9 -2
- package/demos/pc/app/numeric/change-event.vue +10 -3
- package/demos/pc/app/numeric/dynamic-disabled-composition-api.vue +10 -2
- package/demos/pc/app/numeric/dynamic-disabled.spec.ts +1 -1
- package/demos/pc/app/numeric/dynamic-disabled.vue +11 -3
- package/demos/pc/app/numeric/mouse-wheel.spec.ts +2 -2
- package/demos/pc/app/numeric/precision-composition-api.vue +1 -1
- package/demos/pc/app/numeric/precision.spec.ts +10 -11
- package/demos/pc/app/numeric/string-mode-composition-api.vue +10 -0
- package/demos/pc/app/numeric/string-mode.spec.ts +17 -0
- package/demos/pc/app/numeric/string-mode.vue +19 -0
- package/demos/pc/app/numeric/webdoc/numeric.js +13 -0
- package/demos/pc/app/pager/before-page-change.spec.ts +1 -1
- package/demos/pc/app/pager/disabled-and-size.spec.ts +1 -1
- package/demos/pc/app/pop-upload/basic-usage.spec.ts +1 -1
- package/demos/pc/app/pop-upload/custom-request-headers.spec.ts +1 -1
- package/demos/pc/app/popeditor/condition-form-composition-api.vue +0 -1
- package/demos/pc/app/popeditor/condition-form.vue +0 -1
- package/demos/pc/app/popeditor/events-composition-api.vue +8 -2
- package/demos/pc/app/popeditor/events.vue +8 -2
- package/demos/pc/app/popeditor/webdoc/popeditor.js +9 -9
- package/demos/pc/app/popover/webdoc/popover.js +69 -28
- package/demos/pc/app/radio/group-options-composition-api.vue +1 -1
- package/demos/pc/app/rate/custom-3-threshold-colors.spec.js +0 -13
- package/demos/pc/app/rate/custom-3-threshold-icon.spec.js +5 -5
- package/demos/pc/app/rate/disabled-not-selected-class.spec.js +1 -1
- package/demos/pc/app/rate/not-selected-class.spec.js +1 -1
- package/demos/pc/app/rate/threshold-value.spec.js +0 -13
- package/demos/pc/app/search/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/search/basic-usage.vue +1 -1
- package/demos/pc/app/search/webdoc/search.js +3 -2
- package/demos/pc/app/select/copy-multi.spec.ts +6 -5
- package/demos/pc/app/select/copy-single.spec.ts +7 -4
- package/demos/pc/app/select/disabled-composition-api.vue +2 -2
- package/demos/pc/app/select/disabled.spec.ts +3 -3
- package/demos/pc/app/select/disabled.vue +2 -2
- package/demos/pc/app/select/events.spec.ts +3 -3
- package/demos/pc/app/select/multiple.vue +1 -1
- package/demos/pc/app/select/optimization.spec.ts +3 -7
- package/demos/pc/app/select/option-group-composition-api.vue +2 -2
- package/demos/pc/app/select/option-group.vue +2 -2
- package/demos/pc/app/select/searchable.spec.ts +1 -1
- package/demos/pc/app/select/size.spec.ts +1 -1
- package/demos/pc/app/select/tag-type-composition-api.vue +1 -1
- package/demos/pc/app/select/tag-type.spec.ts +1 -1
- package/demos/pc/app/select/tag-type.vue +1 -1
- package/demos/pc/app/slide-bar/basic-usage.spec.ts +0 -5
- package/demos/pc/app/slide-bar/wheel-blocks.spec.ts +2 -6
- package/demos/pc/app/slider/marks-composition-api.vue +20 -0
- package/demos/pc/app/slider/marks.spec.ts +12 -0
- package/demos/pc/app/slider/marks.vue +27 -0
- package/demos/pc/app/slider/show-input-composition-api.vue +2 -0
- package/demos/pc/app/slider/show-input.vue +3 -1
- package/demos/pc/app/slider/show-iput.spec.ts +14 -4
- package/demos/pc/app/slider/webdoc/slider.js +12 -0
- package/demos/pc/app/steps/advanced-steps-composition-api.vue +2 -2
- package/demos/pc/app/steps/advanced-steps.spec.ts +3 -3
- package/demos/pc/app/steps/advanced-steps.vue +2 -2
- package/demos/pc/app/steps/click-composition-api.vue +3 -10
- package/demos/pc/app/steps/click.vue +4 -12
- package/demos/pc/app/steps/line-horizontal-composition-api.vue +1 -1
- package/demos/pc/app/steps/line-horizontal.vue +1 -1
- package/demos/pc/app/steps/line-vertical-composition-api.vue +1 -1
- package/demos/pc/app/steps/line-vertical.vue +1 -1
- package/demos/pc/app/tabs/overflow-title-composition-api.vue +19 -0
- package/demos/pc/app/tabs/overflow-title.vue +28 -0
- package/demos/pc/app/tabs/tabs-events-close-composition-api.vue +5 -1
- package/demos/pc/app/tabs/tabs-events-close.spec.ts +1 -1
- package/demos/pc/app/tabs/tabs-events-close.vue +5 -1
- package/demos/pc/app/tabs/webdoc/tabs.js +18 -4
- package/demos/pc/app/tag/delete.spec.ts +3 -3
- package/demos/pc/app/time-line/shape-composition-api.vue +5 -2
- package/demos/pc/app/time-line/shape.spec.ts +2 -0
- package/demos/pc/app/time-line/shape.vue +5 -1
- package/demos/pc/app/time-line/show-divider-composition-api.vue +1 -1
- package/demos/pc/app/time-line/show-divider.vue +1 -1
- package/demos/pc/app/time-picker/disabled.spec.ts +9 -1
- package/demos/pc/app/time-picker/event.spec.ts +1 -2
- package/demos/pc/app/time-picker/format.spec.ts +10 -3
- package/demos/pc/app/time-picker/step.spec.ts +4 -1
- package/demos/pc/app/time-select/basic-usage.spec.ts +1 -1
- package/demos/pc/app/time-select/clear-icon.spec.ts +1 -1
- package/demos/pc/app/time-select/default-value.spec.ts +1 -1
- package/demos/pc/app/time-select/event-blur-composition-api.vue +3 -3
- package/demos/pc/app/time-select/event-blur.spec.ts +1 -1
- package/demos/pc/app/time-select/event-blur.vue +3 -3
- package/demos/pc/app/time-select/focus-composition-api.vue +1 -1
- package/demos/pc/app/time-select/focus.spec.ts +2 -3
- package/demos/pc/app/time-select/focus.vue +1 -1
- package/demos/pc/app/time-select/range-placeholder.spec.ts +2 -2
- package/demos/pc/app/tooltip/theme-composition-api.vue +28 -26
- package/demos/pc/app/tooltip/theme.vue +28 -26
- package/demos/pc/app/tooltip/webdoc/tooltip.js +55 -29
- package/demos/pc/app/transfer/webdoc/transfer.js +130 -44
- package/demos/pc/app/tree/webdoc/tree.js +319 -68
- package/demos/pc/app/tree-menu/basic-usage.spec.ts +0 -1
- package/demos/pc/app/tree-menu/props.spec.ts +2 -1
- package/demos/pc/app/user/custom-service.spec.ts +1 -1
- package/demos/pc/app/user-account/custom-service.spec.ts +2 -8
- package/demos/pc/app/user-contact/contact-espace-composition-api.vue +1 -0
- package/demos/pc/app/user-link/custom-service.spec.ts +2 -2
- package/demos/pc/app/watermark/webdoc/watermark.js +1 -1
- package/demos/pc/menus.js +2 -1
- package/demos/pc/resource/newVars.json +2 -2
- package/demos/pc/webdoc/changelog.md +139 -0
- package/demos/pc/webdoc/import-components-en.md +40 -2
- package/demos/pc/webdoc/import-components.md +40 -2
- package/package.json +11 -11
- package/playground/App.vue +2 -2
- package/src/App.vue +3 -2
- package/src/const.ts +27 -0
- package/src/router.js +5 -3
- package/src/tools/useTheme.js +60 -50
- package/src/views/components/components.vue +12 -33
- package/src/views/components/demo.vue +4 -4
- package/src/views/layout/layout.vue +6 -6
- package/src/views/overview.vue +6 -3
- package/demos/pc/app/credit-card-form/background-image.spec.ts +0 -10
- package/demos/pc/app/credit-card-form/basic-usage.spec.ts +0 -13
- package/demos/pc/app/credit-card-form/credit-card-form-events.spec.ts +0 -18
- package/demos/pc/app/drawer/default-slot-composition-api.vue +0 -25
- package/demos/pc/app/drawer/default-slot.spec.ts +0 -11
- package/demos/pc/app/drawer/default-slot.vue +0 -35
- package/demos/pc/app/font/Font-usage-specifications.spec.js +0 -41
- package/demos/pc/app/font/chinese-font-set.spec.js +0 -10
- package/demos/pc/app/font/english-fonts.spec.js +0 -10
- package/demos/pc/app/hrapprover/category-type.spec.ts +0 -13
- package/demos/pc/app/modal/min-height-composition-api.vue +0 -16
- package/demos/pc/app/modal/min-height.spec.ts +0 -21
- package/demos/pc/app/modal/min-height.vue +0 -23
- package/demos/pc/app/modal/showFooter-composition-api.vue +0 -11
- package/demos/pc/app/modal/showFooter.spec.ts +0 -10
- package/demos/pc/app/modal/showFooter.vue +0 -18
- package/demos/pc/app/modal/showHeader-composition-api.vue +0 -11
|
@@ -9,10 +9,18 @@ export default {
|
|
|
9
9
|
'en-US': 'Basic Usage'
|
|
10
10
|
},
|
|
11
11
|
desc: {
|
|
12
|
-
'zh-CN':
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
'zh-CN': `
|
|
13
|
+
通过 <code>reference</code> 插槽来指定一个触发源,通过 <code>content</code> 属性来指定提示内容,点击触发源会弹出内容面板。<br>
|
|
14
|
+
通过 <code>title</code> 属性来指定标题。<br>
|
|
15
|
+
通过 <code>width</code> 属性来指定一个弹出面板的宽度。<br>
|
|
16
|
+
<div class="tip custom-block">reference 插槽是必传插槽,没有它时组件渲染不出来。</div>
|
|
17
|
+
`,
|
|
18
|
+
'en-US': `
|
|
19
|
+
Specify a trigger source through the <code>reference</code> slot, specify the prompt content through the <code>content</code> property, click the trigger source will pop up the content panel. <br>
|
|
20
|
+
The title is specified by the <code>title</code> attribute. <br>
|
|
21
|
+
Use the <code>width</code> property to specify the width of a pop-up panel. <br>
|
|
22
|
+
The <div class="tip custom-block">reference slot is a required slot without which the component cannot be rendered. </div>
|
|
23
|
+
`
|
|
16
24
|
},
|
|
17
25
|
codeFiles: ['basic-usage.vue']
|
|
18
26
|
},
|
|
@@ -23,10 +31,14 @@ export default {
|
|
|
23
31
|
'en-US': 'Trigger Mode'
|
|
24
32
|
},
|
|
25
33
|
desc: {
|
|
26
|
-
'zh-CN':
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
'zh-CN': `
|
|
35
|
+
通过<code>trigger</code> 属性设定弹出框的4种触发方式, 默认值为 <code> click </code>。<br>
|
|
36
|
+
当触发方式为<code> manual</code>时,通过设置<code>v-model</code> 属性,动态控制显示和隐藏弹出框。
|
|
37
|
+
`,
|
|
38
|
+
'en-US': `
|
|
39
|
+
The <code>trigger</code> property is used to set the triggering mode of the pop-up box. The optional value of the property is <code>click/hover/manual/focus</code>, and the default value is <code>click </code>. <br>
|
|
40
|
+
When the trigger mode is <code> manual</code>, you can set the <code>v-model</code> property to dynamically display and hide pop-ups.
|
|
41
|
+
`
|
|
30
42
|
},
|
|
31
43
|
codeFiles: ['trigger.vue']
|
|
32
44
|
},
|
|
@@ -37,10 +49,14 @@ export default {
|
|
|
37
49
|
'en-US': 'Pop-up layer content'
|
|
38
50
|
},
|
|
39
51
|
desc: {
|
|
40
|
-
'zh-CN':
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
'zh-CN': `
|
|
53
|
+
通过 <code>content</code> 属性设置要显示的字符串内容。<br>
|
|
54
|
+
通过 <code>default</code> 插槽,支持自定义复杂的内容结构。<br>
|
|
55
|
+
`,
|
|
56
|
+
'en-US': `
|
|
57
|
+
The <code>content</code> property sets the string content to be displayed.
|
|
58
|
+
Support for custom complex content structures through the <code>default</code> slot.
|
|
59
|
+
`
|
|
44
60
|
},
|
|
45
61
|
codeFiles: ['content.vue']
|
|
46
62
|
},
|
|
@@ -63,10 +79,14 @@ export default {
|
|
|
63
79
|
'en-US': 'Custom Offset'
|
|
64
80
|
},
|
|
65
81
|
desc: {
|
|
66
|
-
'zh-CN':
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
82
|
+
'zh-CN': `
|
|
83
|
+
通过<code>arrow-offset</code> 设置箭头的在弹窗层上的偏移量。箭头默认至少会保留8px的空间, 以保证箭头不会贴在弹窗层两边。<br>
|
|
84
|
+
通过<code> offset</code> 设置弹框的偏移量,来改变弹框的位置。
|
|
85
|
+
`,
|
|
86
|
+
'en-US': `
|
|
87
|
+
Use <code>arrow-offset</code> to set the offset of the arrow on the popup layer. Arrows are left at least 8px by default to ensure that they are not stuck on either side of the popup layer. <br>
|
|
88
|
+
Change the position of the springboard by setting the offset</code> of the springboard
|
|
89
|
+
`
|
|
70
90
|
},
|
|
71
91
|
codeFiles: ['offset.vue']
|
|
72
92
|
},
|
|
@@ -77,10 +97,16 @@ export default {
|
|
|
77
97
|
'en-US': 'Customize the pop-up panel'
|
|
78
98
|
},
|
|
79
99
|
desc: {
|
|
80
|
-
'zh-CN':
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
100
|
+
'zh-CN': `
|
|
101
|
+
通过<code>placement</code> 设置弹出框的的位置。<br>
|
|
102
|
+
通过<code>visible-arrow</code> 设定是否显示提示框的箭头,默认值为 <code>true</code>。<br>
|
|
103
|
+
通过<code>popper-class</code> 可配置单个或多个类名,通过类名可以控制弹窗样式。
|
|
104
|
+
`,
|
|
105
|
+
'en-US': `
|
|
106
|
+
By <code>placement</code> Set the location of the pop-up box. <br>
|
|
107
|
+
Set whether the arrow of the prompt box is displayed by <code>visible-arrow</code>. The default value is true. <br>
|
|
108
|
+
You can run the <code>popper-class</code> command to configure one or more classes. You can control the popup style by class name.
|
|
109
|
+
`
|
|
84
110
|
},
|
|
85
111
|
codeFiles: ['custom-popper.vue']
|
|
86
112
|
},
|
|
@@ -91,10 +117,16 @@ export default {
|
|
|
91
117
|
'en-US': 'Delay control'
|
|
92
118
|
},
|
|
93
119
|
desc: {
|
|
94
|
-
'zh-CN':
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
120
|
+
'zh-CN': `
|
|
121
|
+
通过 <code>open-delay</code> 弹出框打开时延迟的时长,默认值为0,单位为毫秒。<br>
|
|
122
|
+
通过 <code>close-delay</code> 弹出框关闭时延迟的时长,默认值为200,单位为毫秒。<br>
|
|
123
|
+
<div class="tip custom-block">只有在触发方式为 hover 时,延迟控制功能才生效。</div>
|
|
124
|
+
`,
|
|
125
|
+
'en-US': `
|
|
126
|
+
Run the <code>open-delay</code> command to open a pop-up. The default value is 0, in milliseconds. <br>
|
|
127
|
+
Run the <code>close-delay</code> command to close the pop-up. The default value is 200, in milliseconds. <br>
|
|
128
|
+
<div class="tip custom-block"> Delay control takes effect only if the trigger mode is hover. </div>
|
|
129
|
+
`
|
|
98
130
|
},
|
|
99
131
|
codeFiles: ['delay.vue']
|
|
100
132
|
},
|
|
@@ -131,10 +163,19 @@ export default {
|
|
|
131
163
|
'en-US': 'Event'
|
|
132
164
|
},
|
|
133
165
|
desc: {
|
|
134
|
-
'zh-CN':
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
166
|
+
'zh-CN': `
|
|
167
|
+
组件支持以下事件:<br>
|
|
168
|
+
<code>hide</code> 隐藏时触发回调;<br>
|
|
169
|
+
<code>show</code> 显示时触发回调;<br>
|
|
170
|
+
<code>after-leave</code> 进入的动画结束后触发回调;<br>
|
|
171
|
+
<code>after-enter</code> 离开的动画播结束后触发回调;<br>`,
|
|
172
|
+
'en-US': `
|
|
173
|
+
The component supports the following events: <br>
|
|
174
|
+
<code>hide</code> Trigger callback when hiding <br>
|
|
175
|
+
<code>show</code> callback triggered when displayed <br>
|
|
176
|
+
<code>after-leave</code> Triggers callback after entering animation <br>
|
|
177
|
+
<code>after-enter</code> Trigger callback after the leaving animation ends <br>
|
|
178
|
+
`
|
|
138
179
|
},
|
|
139
180
|
codeFiles: ['events.vue']
|
|
140
181
|
}
|
|
@@ -10,7 +10,7 @@ import { ref } from 'vue'
|
|
|
10
10
|
import { RadioGroup as TinyRadioGroup, Modal } from '@opentiny/vue'
|
|
11
11
|
|
|
12
12
|
function handleClick() {
|
|
13
|
-
Modal.message({ message: 'click' })
|
|
13
|
+
Modal.message({ message: 'click', status: 'info' })
|
|
14
14
|
}
|
|
15
15
|
const value = ref('A')
|
|
16
16
|
const options = ref([
|
|
@@ -5,20 +5,7 @@ test.describe('rate 自定义 3 分段颜色', () => {
|
|
|
5
5
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
6
6
|
await page.goto('rate#custom-3-threshold-colors')
|
|
7
7
|
|
|
8
|
-
// hover时三分段颜色
|
|
9
8
|
const icon = page.locator('.tiny-rate__star > .tiny-svg')
|
|
10
|
-
await icon.nth(0).hover()
|
|
11
|
-
await page.waitForTimeout(200)
|
|
12
|
-
await expect(icon.nth(0)).toHaveCSS('fill', 'rgb(250, 219, 20)')
|
|
13
|
-
await icon.nth(1).hover()
|
|
14
|
-
await expect(icon.nth(1)).toHaveCSS('fill', 'rgb(250, 219, 20)')
|
|
15
|
-
await icon.nth(2).hover()
|
|
16
|
-
await expect(icon.nth(2)).toHaveCSS('fill', 'rgb(255, 122, 69)')
|
|
17
|
-
await icon.nth(3).hover()
|
|
18
|
-
await expect(icon.nth(3)).toHaveCSS('fill', 'rgb(255, 169, 64)')
|
|
19
|
-
await icon.nth(4).hover()
|
|
20
|
-
await expect(icon.nth(4)).toHaveCSS('fill', 'rgb(255, 169, 64)')
|
|
21
|
-
|
|
22
9
|
// 选中时时三分段颜色
|
|
23
10
|
await icon.nth(0).click()
|
|
24
11
|
await page.waitForTimeout(200)
|
|
@@ -8,27 +8,27 @@ test.describe('Rate 自定义 3 分段图标样式', () => {
|
|
|
8
8
|
const icon = page.locator('.tiny-rate__star > .tiny-svg')
|
|
9
9
|
|
|
10
10
|
await icon.nth(0).click()
|
|
11
|
-
await expect(page.locator('.tiny-rate > span:nth-child(1) > .tiny-svg >
|
|
11
|
+
await expect(page.locator('.tiny-rate > span:nth-child(1) > .tiny-svg > path').first()).toHaveAttribute(
|
|
12
12
|
'd',
|
|
13
13
|
'M6.5 11C5.7 11 5 10.3 5 9.5S5.7 8 6.5 8 8 8.7 8 9.5 7.3 11 6.5 11zm11 0c-.8 0-1.5-.7-1.5-1.5S16.7 8 17.5 8s1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm-2.4 8c-.5 0-.9-.4-.9-.9 0-1.3-1-2.3-2.2-2.3s-2.2 1-2.2 2.3c0 .5-.4.9-.9.9s-.9-.4-.9-.9c0-2.3 1.8-4.1 4-4.1s4 1.8 4 4.1c0 .5-.4.9-.9.9z'
|
|
14
14
|
)
|
|
15
15
|
await icon.nth(1).click()
|
|
16
|
-
await expect(page.locator('.tiny-rate > span:nth-child(2) > .tiny-svg >
|
|
16
|
+
await expect(page.locator('.tiny-rate > span:nth-child(2) > .tiny-svg > path').first()).toHaveAttribute(
|
|
17
17
|
'd',
|
|
18
18
|
'M6.5 11C5.7 11 5 10.3 5 9.5S5.7 8 6.5 8 8 8.7 8 9.5 7.3 11 6.5 11zm11 0c-.8 0-1.5-.7-1.5-1.5S16.7 8 17.5 8s1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm-2.4 8c-.5 0-.9-.4-.9-.9 0-1.3-1-2.3-2.2-2.3s-2.2 1-2.2 2.3c0 .5-.4.9-.9.9s-.9-.4-.9-.9c0-2.3 1.8-4.1 4-4.1s4 1.8 4 4.1c0 .5-.4.9-.9.9z'
|
|
19
19
|
)
|
|
20
20
|
await icon.nth(2).click()
|
|
21
|
-
await expect(page.locator('.tiny-rate > span:nth-child(3) > .tiny-svg >
|
|
21
|
+
await expect(page.locator('.tiny-rate > span:nth-child(3) > .tiny-svg > path').first()).toHaveAttribute(
|
|
22
22
|
'd',
|
|
23
23
|
'M9 16h6.1c.6 0 1 .4 1 1s-.4 1-1 1H9c-.6 0-1-.4-1-1s.5-1 1-1zm-2.5-5C5.7 11 5 10.3 5 9.5S5.7 8 6.5 8 8 8.7 8 9.5 7.3 11 6.5 11zm11 0c-.8 0-1.5-.7-1.5-1.5S16.7 8 17.5 8s1.5.7 1.5 1.5-.7 1.5-1.5 1.5z'
|
|
24
24
|
)
|
|
25
25
|
await icon.nth(3).click()
|
|
26
|
-
await expect(page.locator('.tiny-rate > span:nth-child(4) > .tiny-svg >
|
|
26
|
+
await expect(page.locator('.tiny-rate > span:nth-child(4) > .tiny-svg > path').last()).toHaveAttribute(
|
|
27
27
|
'd',
|
|
28
28
|
'M12 24C5.4 24 0 18.6 0 12S5.4 0 12 0s12 5.4 12 12-5.4 12-12 12zm0-2c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10z'
|
|
29
29
|
)
|
|
30
30
|
await icon.nth(4).click()
|
|
31
|
-
await expect(page.locator('.tiny-rate > span:nth-child(5) > .tiny-svg >
|
|
31
|
+
await expect(page.locator('.tiny-rate > span:nth-child(5) > .tiny-svg > path').last()).toHaveAttribute(
|
|
32
32
|
'd',
|
|
33
33
|
'M12 24C5.4 24 0 18.6 0 12S5.4 0 12 0s12 5.4 12 12-5.4 12-12 12zm0-2c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10z'
|
|
34
34
|
)
|
|
@@ -19,7 +19,7 @@ test.describe('Rate 自定义禁用时未选中图标类名', () => {
|
|
|
19
19
|
await expect(icon.nth(4)).toHaveClass(/disabled/)
|
|
20
20
|
|
|
21
21
|
// 未选中图标
|
|
22
|
-
const svg = page.locator('.tiny-rate > span:nth-child(5) > .tiny-svg >
|
|
22
|
+
const svg = page.locator('.tiny-rate > span:nth-child(5) > .tiny-svg > path')
|
|
23
23
|
await expect(svg).toHaveAttribute(
|
|
24
24
|
'd',
|
|
25
25
|
'M12 2.8c.1 0 .3.1.3.2l2.6 5.5c.1.1.2.2.3.2l5.8.9c.3 0 .4.4.2.6L17 14.5c-.1.1-.1.2-.1.3l1 6.1c0 .2-.1.4-.4.4h-.2l-5.1-2.8h-.4l-5.1 2.8h-.2c-.2 0-.4-.2-.4-.4l1-6.1c0-.1 0-.2-.1-.3l-4.2-4.3c-.2-.2-.1-.6.2-.6l5.8-.9c.1 0 .2-.1.3-.2L11.7 3c0-.2.2-.2.3-.2zM12 1c-.4 0-.8.1-1.1.3-.4.2-.6.5-.8.9L7.8 7l-5 .8c-.8.1-1.4.7-1.7 1.4s-.1 1.6.5 2.2l3.7 3.8-.9 5.4c-.1.6.1 1.2.5 1.7s1 .8 1.6.8c.4 0 .7-.1 1-.3l4.4-2.5 4.4 2.5c.3.2.7.3 1 .3.6 0 1.2-.3 1.6-.8.4-.5.6-1.1.5-1.7l-.9-5.4 3.7-3.8c.6-.6.7-1.4.5-2.2-.3-.8-.9-1.3-1.7-1.4L16 7l-2.2-4.8c-.2-.4-.5-.7-.8-.9-.2-.2-.6-.3-1-.3z'
|
|
@@ -6,7 +6,7 @@ test.describe('Rate 自定义未选中图标类名', () => {
|
|
|
6
6
|
await page.goto('rate#not-selected-class')
|
|
7
7
|
|
|
8
8
|
const icon = page.locator('.tiny-rate__star > .tiny-svg')
|
|
9
|
-
const svg = page.locator('span:nth-child(5) > .tiny-svg >
|
|
9
|
+
const svg = page.locator('span:nth-child(5) > .tiny-svg > path')
|
|
10
10
|
|
|
11
11
|
await icon.nth(4).hover()
|
|
12
12
|
await expect(svg).toHaveAttribute(
|
|
@@ -4,20 +4,7 @@ test.describe('rate 自定义三分段界限值', () => {
|
|
|
4
4
|
test('三段分界限值', async ({ page }) => {
|
|
5
5
|
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
6
6
|
await page.goto('rate#threshold-value')
|
|
7
|
-
|
|
8
|
-
// hover时三分段颜色
|
|
9
7
|
const icon = page.locator('.tiny-rate__star > .tiny-svg')
|
|
10
|
-
await icon.nth(0).hover()
|
|
11
|
-
await page.waitForTimeout(200)
|
|
12
|
-
await expect(icon.nth(0)).toHaveCSS('fill', 'rgb(250, 219, 20)')
|
|
13
|
-
await icon.nth(1).hover()
|
|
14
|
-
await expect(icon.nth(1)).toHaveCSS('fill', 'rgb(255, 122, 69)')
|
|
15
|
-
await icon.nth(2).hover()
|
|
16
|
-
await expect(icon.nth(2)).toHaveCSS('fill', 'rgb(255, 122, 69)')
|
|
17
|
-
await icon.nth(3).hover()
|
|
18
|
-
await expect(icon.nth(3)).toHaveCSS('fill', 'rgb(255, 169, 64)')
|
|
19
|
-
await icon.nth(4).hover()
|
|
20
|
-
await expect(icon.nth(4)).toHaveCSS('fill', 'rgb(255, 169, 64)')
|
|
21
8
|
|
|
22
9
|
// 选中时时三分段颜色
|
|
23
10
|
await icon.nth(0).click()
|
|
@@ -9,9 +9,10 @@ export default {
|
|
|
9
9
|
'en-US': 'Basic Usage'
|
|
10
10
|
},
|
|
11
11
|
desc: {
|
|
12
|
-
'zh-CN':
|
|
12
|
+
'zh-CN':
|
|
13
|
+
'通过 <code>v-model</code> 设置双向绑定搜索值, <code>placeholder</code> 设置默认占位符文本, <code>input</code>元素的原生属性<code>maxlength</code> 设置输入框最大输入字符长度。',
|
|
13
14
|
'en-US':
|
|
14
|
-
'Set bidirectional binding search values through <code>v-model</code> , and set default placeholder text through <code>placeholder</code> .'
|
|
15
|
+
'Set bidirectional binding search values through <code>v-model</code> , and set default placeholder text through <code>placeholder</code> The native attribute of the <code>input</code> element<code>maxlength</code>sets the maximum input character length of the input box.'
|
|
15
16
|
},
|
|
16
17
|
codeFiles: ['basic-usage.vue']
|
|
17
18
|
},
|
|
@@ -7,11 +7,12 @@ test('多选复制单个标签', async ({ page }) => {
|
|
|
7
7
|
const wrap = page.locator('#copy-multi')
|
|
8
8
|
const select = wrap.locator('.tiny-select').nth(0)
|
|
9
9
|
const tag = select.locator('.tiny-tag').nth(0)
|
|
10
|
+
|
|
11
|
+
await page.waitForTimeout(200)
|
|
10
12
|
const tagBox = await tag.locator('span').boundingBox()
|
|
11
13
|
const x = tagBox.x + tagBox.width
|
|
12
14
|
const y = tagBox.y + tagBox.height - 5
|
|
13
15
|
|
|
14
|
-
await page.waitForTimeout(2000)
|
|
15
16
|
await page.mouse.move(tagBox.x, tagBox.y)
|
|
16
17
|
await page.waitForTimeout(200)
|
|
17
18
|
await page.mouse.down()
|
|
@@ -37,9 +38,9 @@ test('多选一键复制所有标签', async ({ page }) => {
|
|
|
37
38
|
const select = wrap.locator('.tiny-select').nth(1)
|
|
38
39
|
const copyValueInput = wrap.locator('.copy-value .tiny-input__inner')
|
|
39
40
|
|
|
40
|
-
await page.waitForTimeout(
|
|
41
|
+
await page.waitForTimeout(200)
|
|
41
42
|
await select.hover()
|
|
42
|
-
await select.locator('.tiny-select__copy > .tiny-svg
|
|
43
|
+
await select.locator('.tiny-select__copy > .tiny-svg').click()
|
|
43
44
|
|
|
44
45
|
await copyValueInput.press('Control+V')
|
|
45
46
|
await expect(copyValueInput).toHaveValue('黄金糕,双皮奶')
|
|
@@ -52,9 +53,9 @@ test('多选设置复制文本分隔符', async ({ page }) => {
|
|
|
52
53
|
const select = wrap.locator('.tiny-select').nth(2)
|
|
53
54
|
const copyValueInput = wrap.locator('.copy-value .tiny-input__inner')
|
|
54
55
|
|
|
55
|
-
await page.waitForTimeout(
|
|
56
|
+
await page.waitForTimeout(200)
|
|
56
57
|
await select.hover()
|
|
57
|
-
await select.locator('.tiny-select__copy > .tiny-svg
|
|
58
|
+
await select.locator('.tiny-select__copy > .tiny-svg').click()
|
|
58
59
|
|
|
59
60
|
await copyValueInput.press('Control+V')
|
|
60
61
|
await expect(copyValueInput).toHaveValue('黄金糕/双皮奶')
|
|
@@ -8,9 +8,10 @@ test('单选无需配置可复制', async ({ page }) => {
|
|
|
8
8
|
const select = wrap.locator('.tiny-select').nth(0)
|
|
9
9
|
const input = select.locator('.tiny-input__inner')
|
|
10
10
|
const valueInput = wrap.locator('.custom .tiny-input__inner')
|
|
11
|
+
|
|
12
|
+
await page.waitForTimeout(200)
|
|
11
13
|
const inputBox = await input.boundingBox()
|
|
12
14
|
|
|
13
|
-
await page.waitForTimeout(2000)
|
|
14
15
|
await page.mouse.move(inputBox.x + inputBox?.width / 2, inputBox.y + inputBox?.height / 2)
|
|
15
16
|
await page.mouse.down()
|
|
16
17
|
await page.mouse.move(inputBox.x - 2, inputBox.y + inputBox?.height / 2)
|
|
@@ -31,9 +32,10 @@ test('单选可搜索配置 allow-copy 可复制', async ({ page }) => {
|
|
|
31
32
|
const select = wrap.locator('.tiny-select').nth(1)
|
|
32
33
|
const input = select.locator('.tiny-input__inner')
|
|
33
34
|
const valueInput = wrap.locator('.custom .tiny-input__inner')
|
|
35
|
+
|
|
36
|
+
await page.waitForTimeout(200)
|
|
34
37
|
const inputBox = await input.boundingBox()
|
|
35
38
|
|
|
36
|
-
await page.waitForTimeout(2000)
|
|
37
39
|
await page.mouse.move(inputBox.x + inputBox?.width / 2, inputBox.y + inputBox?.height / 2)
|
|
38
40
|
await page.mouse.down()
|
|
39
41
|
await page.mouse.move(inputBox.x - 2, inputBox.y + inputBox?.height / 2)
|
|
@@ -44,7 +46,7 @@ test('单选可搜索配置 allow-copy 可复制', async ({ page }) => {
|
|
|
44
46
|
await expect(valueInput).toHaveValue('')
|
|
45
47
|
await valueInput.click()
|
|
46
48
|
await page.keyboard.press('Control+V')
|
|
47
|
-
await page.waitForTimeout(
|
|
49
|
+
await page.waitForTimeout(200)
|
|
48
50
|
await expect(valueInput).toHaveValue('黄金糕')
|
|
49
51
|
})
|
|
50
52
|
|
|
@@ -56,9 +58,10 @@ test('单选远程搜索配置 allow-copy 可复制', async ({ page }) => {
|
|
|
56
58
|
const select = wrap.locator('.tiny-select').nth(2)
|
|
57
59
|
const input = select.locator('.tiny-input__inner')
|
|
58
60
|
const valueInput = wrap.locator('.custom .tiny-input__inner')
|
|
61
|
+
|
|
62
|
+
await page.waitForTimeout(100)
|
|
59
63
|
const inputBox = await input.boundingBox()
|
|
60
64
|
|
|
61
|
-
await page.waitForTimeout(1000)
|
|
62
65
|
await page.mouse.move(inputBox.x + inputBox?.width / 2, inputBox.y + inputBox?.height / 2)
|
|
63
66
|
await page.mouse.down()
|
|
64
67
|
await page.mouse.move(inputBox.x - 2, inputBox.y + inputBox?.height / 2)
|
|
@@ -82,12 +82,12 @@ const options2 = ref([
|
|
|
82
82
|
{ value: '选项1', label: '黄金糕' },
|
|
83
83
|
{ value: '选项2', label: '双皮奶', disabled: true },
|
|
84
84
|
{ value: '选项3', label: '蚵仔煎' },
|
|
85
|
-
{ value: '选项4', label: '龙须面' },
|
|
85
|
+
{ value: '选项4', label: '龙须面', disabled: true },
|
|
86
86
|
{ value: '选项5', label: '北京烤鸭' }
|
|
87
87
|
])
|
|
88
88
|
|
|
89
89
|
const value1 = ref('')
|
|
90
|
-
const value2 = ref([])
|
|
90
|
+
const value2 = ref(['选项2'])
|
|
91
91
|
const value3 = ref('')
|
|
92
92
|
const value4 = ref(['选项2', '选项3'])
|
|
93
93
|
const value5 = ref(['选项1', '选项2', '选项3', '选项4', '选项5'])
|
|
@@ -19,15 +19,15 @@ test('多选某项禁用', async ({ page }) => {
|
|
|
19
19
|
const tag = select.locator('.tiny-tag')
|
|
20
20
|
const option = dropdown.locator('.tiny-option')
|
|
21
21
|
|
|
22
|
-
await expect(tag).toHaveCount(
|
|
22
|
+
await expect(tag).toHaveCount(1)
|
|
23
23
|
await select.click()
|
|
24
24
|
await expect(option.filter({ hasText: '双皮奶' })).toHaveClass(/is-disabled/)
|
|
25
25
|
|
|
26
26
|
await option.filter({ hasText: '双皮奶' }).click()
|
|
27
|
-
await expect(tag).toHaveCount(
|
|
27
|
+
await expect(tag).toHaveCount(1)
|
|
28
28
|
|
|
29
29
|
await option.filter({ hasText: '黄金糕' }).click()
|
|
30
|
-
await expect(tag).toHaveCount(
|
|
30
|
+
await expect(tag).toHaveCount(2)
|
|
31
31
|
await expect(tag.filter({ hasText: '黄金糕' })).toHaveCount(1)
|
|
32
32
|
})
|
|
33
33
|
|
|
@@ -87,11 +87,11 @@ export default {
|
|
|
87
87
|
{ value: '选项1', label: '黄金糕' },
|
|
88
88
|
{ value: '选项2', label: '双皮奶', disabled: true },
|
|
89
89
|
{ value: '选项3', label: '蚵仔煎' },
|
|
90
|
-
{ value: '选项4', label: '龙须面' },
|
|
90
|
+
{ value: '选项4', label: '龙须面', disabled: true },
|
|
91
91
|
{ value: '选项5', label: '北京烤鸭' }
|
|
92
92
|
],
|
|
93
93
|
value1: '',
|
|
94
|
-
value2: [],
|
|
94
|
+
value2: ['选项2'],
|
|
95
95
|
value3: '',
|
|
96
96
|
value4: ['选项2', '选项3'],
|
|
97
97
|
value5: ['选项1', '选项2', '选项3', '选项4', '选项5']
|
|
@@ -26,7 +26,7 @@ test('单选事件', async ({ page }) => {
|
|
|
26
26
|
|
|
27
27
|
await page.waitForTimeout(200)
|
|
28
28
|
await input.hover()
|
|
29
|
-
await select.locator('.tiny-
|
|
29
|
+
await select.locator('.tiny-select__caret.icon-close').click()
|
|
30
30
|
await page.waitForTimeout(500)
|
|
31
31
|
await expect(input).toHaveValue('')
|
|
32
32
|
await expect(model.filter({ hasText: '触发 clear 事件' })).toHaveCount(1)
|
|
@@ -42,6 +42,7 @@ test('多选事件', async ({ page }) => {
|
|
|
42
42
|
const option = dropdown.locator('.tiny-option')
|
|
43
43
|
const model = page.locator('.tiny-modal')
|
|
44
44
|
|
|
45
|
+
await page.waitForTimeout(500)
|
|
45
46
|
await select.click()
|
|
46
47
|
await expect(model.filter({ hasText: '触发 focus 事件' })).toHaveCount(1)
|
|
47
48
|
await expect(model.filter({ hasText: '触发 visible-change 事件' })).toHaveCount(1)
|
|
@@ -56,7 +57,6 @@ test('多选事件', async ({ page }) => {
|
|
|
56
57
|
|
|
57
58
|
await page.waitForTimeout(500)
|
|
58
59
|
await tag.first().locator('.tiny-tag__close').click()
|
|
59
|
-
await expect(model.filter({ hasText: '触发 blur 事件' })).toHaveCount(1)
|
|
60
60
|
await expect(model.filter({ hasText: '触发 change 事件' })).toHaveCount(1)
|
|
61
61
|
await expect(model.filter({ hasText: '触发 remove-tag 事件' })).toHaveCount(1)
|
|
62
62
|
await expect(tag).toHaveCount(4)
|
|
@@ -66,7 +66,7 @@ test('多选事件', async ({ page }) => {
|
|
|
66
66
|
|
|
67
67
|
await page.waitForTimeout(200)
|
|
68
68
|
await select.hover()
|
|
69
|
-
await select.locator('.tiny-
|
|
69
|
+
await select.locator('.tiny-select__caret.icon-close').click()
|
|
70
70
|
|
|
71
71
|
await expect(tag).toHaveCount(0)
|
|
72
72
|
await expect(model.filter({ hasText: '触发 change 事件' })).toHaveCount(1)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<br />
|
|
4
4
|
<div>场景1:多选</div>
|
|
5
5
|
<br />
|
|
6
|
-
<tiny-select v-model="value1" multiple>
|
|
6
|
+
<tiny-select v-model="value1" multiple searchable>
|
|
7
7
|
<tiny-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
|
|
8
8
|
</tiny-select>
|
|
9
9
|
<br />
|
|
@@ -11,15 +11,11 @@ test('单选虚拟滚动', async ({ page }) => {
|
|
|
11
11
|
const option = dropdown.locator('.tiny-option')
|
|
12
12
|
|
|
13
13
|
await select.click()
|
|
14
|
-
await expect((await option.all()).length).
|
|
14
|
+
await expect((await option.all()).length).toBeLessThan(20) // 新虚拟滚动,预加载行数不一样了
|
|
15
15
|
await expect(option.filter({ hasText: '黄金糕17' })).toBeHidden()
|
|
16
16
|
await option.nth(9).scrollIntoViewIfNeeded()
|
|
17
17
|
await page.waitForTimeout(1000)
|
|
18
|
-
await expect(option.filter({ hasText: '黄金糕17' })).
|
|
19
|
-
await option.nth(9).scrollIntoViewIfNeeded()
|
|
20
|
-
await page.waitForTimeout(1000)
|
|
21
|
-
await option.filter({ hasText: '黄金糕17' }).click()
|
|
22
|
-
await expect(input).toHaveValue('黄金糕17')
|
|
18
|
+
await expect(option.filter({ hasText: '黄金糕17' })).toBeVisible() // 现在预加载的行比较多,所以17行已经可以看到了
|
|
23
19
|
})
|
|
24
20
|
|
|
25
21
|
test('多选虚拟滚动', async ({ page }) => {
|
|
@@ -32,7 +28,7 @@ test('多选虚拟滚动', async ({ page }) => {
|
|
|
32
28
|
const tag = select.locator('.tiny-tag')
|
|
33
29
|
|
|
34
30
|
await select.click()
|
|
35
|
-
await expect((await option.all()).length).
|
|
31
|
+
await expect((await option.all()).length).toBeLessThan(20) // 新虚拟滚动,预加载行数不一样了
|
|
36
32
|
await expect(option.filter({ hasText: '黄金糕17' })).toBeHidden()
|
|
37
33
|
await expect(option.filter({ hasText: '黄金糕16' })).toBeHidden()
|
|
38
34
|
await page.waitForTimeout(500)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div>场景1:分组 + 多选 + 面板可搜索</div>
|
|
4
4
|
<br />
|
|
5
|
-
<tiny-select v-model="
|
|
5
|
+
<tiny-select v-model="value2" multiple filterable :searchable="true">
|
|
6
6
|
<tiny-option-group v-for="group in options3" :key="group.label" :label="group.label" :disabled="!!group.disabled">
|
|
7
7
|
<tiny-option
|
|
8
8
|
v-for="item in group.options"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<br />
|
|
17
17
|
<div>场景2:单选分组</div>
|
|
18
18
|
<br />
|
|
19
|
-
<tiny-select v-model="
|
|
19
|
+
<tiny-select v-model="value1" filterable>
|
|
20
20
|
<tiny-option-group v-for="group in options3" :key="group.label" :label="group.label" :disabled="!!group.disabled">
|
|
21
21
|
<tiny-option
|
|
22
22
|
v-for="item in group.options"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div>场景1:分组 + 多选 + 面板可搜索</div>
|
|
4
4
|
<br />
|
|
5
|
-
<tiny-select v-model="
|
|
5
|
+
<tiny-select v-model="value2" multiple filterable :searchable="true">
|
|
6
6
|
<tiny-option-group v-for="group in options3" :key="group.label" :label="group.label" :disabled="!!group.disabled">
|
|
7
7
|
<tiny-option
|
|
8
8
|
v-for="item in group.options"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<br />
|
|
17
17
|
<div>场景2:单选分组</div>
|
|
18
18
|
<br />
|
|
19
|
-
<tiny-select v-model="
|
|
19
|
+
<tiny-select v-model="value1" filterable>
|
|
20
20
|
<tiny-option-group v-for="group in options3" :key="group.label" :label="group.label" :disabled="!!group.disabled">
|
|
21
21
|
<tiny-option
|
|
22
22
|
v-for="item in group.options"
|
|
@@ -29,7 +29,7 @@ test('searchable-single', async ({ page }) => {
|
|
|
29
29
|
})
|
|
30
30
|
await option.filter({ hasText: '双皮奶' }).click()
|
|
31
31
|
await page.waitForTimeout(500)
|
|
32
|
-
await expect(input).toHaveValue('
|
|
32
|
+
await expect(input).toHaveValue('')
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
test('searchable-multiple', async ({ page }) => {
|
|
@@ -9,7 +9,7 @@ test('默认尺寸', async ({ page }) => {
|
|
|
9
9
|
const input = select.locator('.tiny-input')
|
|
10
10
|
const tag = select.locator('.tiny-tag')
|
|
11
11
|
|
|
12
|
-
await expect(input.locator('.tiny-input__inner')).toHaveCSS('height', '
|
|
12
|
+
await expect(input.locator('.tiny-input__inner')).toHaveCSS('height', '30px')
|
|
13
13
|
await expect(tag.nth(0)).toHaveClass(/tiny-tag--light/)
|
|
14
14
|
})
|
|
15
15
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tiny-select v-model="value" multiple tag-type="
|
|
2
|
+
<tiny-select v-model="value" multiple tag-type="warning">
|
|
3
3
|
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
|
|
4
4
|
</tiny-select>
|
|
5
5
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tiny-select v-model="value" multiple tag-type="
|
|
2
|
+
<tiny-select v-model="value" multiple tag-type="warning">
|
|
3
3
|
<tiny-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </tiny-option>
|
|
4
4
|
</tiny-select>
|
|
5
5
|
</template>
|
|
@@ -9,9 +9,4 @@ test('基础用法', async ({ page }) => {
|
|
|
9
9
|
await slideBarList.locator('li').first().click()
|
|
10
10
|
await page.mouse.wheel(0, 100)
|
|
11
11
|
await expect(slideBarList.locator('li').first()).toHaveCSS('border-color', 'rgba(153, 153, 153, 0.7)')
|
|
12
|
-
await preview.locator('.icon-chevron-right').click()
|
|
13
|
-
// 单个滚动块的宽度为 width + marginLeft,固定值为196px
|
|
14
|
-
await expect(slideBarList).toHaveCSS('left', '-358px')
|
|
15
|
-
await preview.locator('.icon-chevron-left').click()
|
|
16
|
-
await expect(slideBarList).toHaveCSS('left', '-179px')
|
|
17
12
|
})
|
|
@@ -7,11 +7,7 @@ test('每次滚动块数', async ({ page }) => {
|
|
|
7
7
|
const slideBarList = slideBarContainer.locator('.tiny-slide-bar__list')
|
|
8
8
|
|
|
9
9
|
await slideBarList.first().click()
|
|
10
|
-
await page.locator('.icon-chevron-right').click()
|
|
11
10
|
// 单个滚动块的宽度固定为196px,所以应为 196px * 2
|
|
12
|
-
await
|
|
13
|
-
await page.
|
|
14
|
-
await expect(slideBarList).toHaveCSS('left', '-716px')
|
|
15
|
-
await page.locator('.icon-chevron-left').click()
|
|
16
|
-
await expect(slideBarList).toHaveCSS('left', '-358px')
|
|
11
|
+
await page.mouse.wheel(0, 50)
|
|
12
|
+
await page.pause()
|
|
17
13
|
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div>
|
|
4
|
+
<tiny-slider v-model="value" :marks="marks"></tiny-slider>
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup>
|
|
10
|
+
import { ref } from 'vue'
|
|
11
|
+
import { Slider as TinySlider } from '@opentiny/vue'
|
|
12
|
+
|
|
13
|
+
const marks = ref({
|
|
14
|
+
10: '10%',
|
|
15
|
+
40: '40%',
|
|
16
|
+
50: '50%'
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const value = ref(20)
|
|
20
|
+
</script>
|