@opentiny/vue-docs 2.2.4 → 2.2.6
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/container/basic-usage.vue +105 -0
- package/demos/mobile/app/container/custom-width.vue +93 -0
- package/demos/mobile/app/container/webdoc/container.cn.md +7 -0
- package/demos/mobile/app/container/webdoc/container.en.md +7 -0
- package/demos/mobile/app/container/webdoc/container.js +80 -0
- package/demos/mobile/app/pull-refresh/animation-duration.vue +58 -12
- package/demos/mobile/app/pull-refresh/base.vue +32 -18
- package/demos/mobile/app/pull-refresh/disabled-pull-down.vue +66 -0
- package/demos/mobile/app/pull-refresh/disabled-pull-up.vue +67 -0
- package/demos/mobile/app/pull-refresh/{hasmore.vue → event.vue} +21 -20
- package/demos/mobile/app/pull-refresh/{enhance.vue → has-more.vue} +20 -25
- package/demos/mobile/app/pull-refresh/loosing-text.vue +55 -12
- package/demos/mobile/app/pull-refresh/pull-refresh-slot.vue +64 -15
- package/demos/mobile/app/pull-refresh/pull-up-distance.vue +74 -0
- package/demos/mobile/app/pull-refresh/pulling-text.vue +56 -12
- package/demos/mobile/app/pull-refresh/webdoc/pull-refresh.js +98 -120
- package/demos/mobile/app/tabs/before-leave.vue +3 -3
- package/demos/mobile/app/tabs/tabs-events.vue +7 -7
- package/demos/mobile/menus.js +4 -1
- package/demos/mobile-first/app/tabs/basic-usage.vue +3 -3
- package/demos/mobile-first/app/tabs/before-leave.vue +3 -3
- package/demos/mobile-first/app/tabs/change-title.vue +2 -2
- package/demos/mobile-first/app/tabs/custom-tab-content.vue +3 -3
- package/demos/mobile-first/app/tabs/custom-tab-title.vue +3 -3
- package/demos/mobile-first/app/tabs/position-bottom.vue +10 -10
- package/demos/mobile-first/app/tabs/position-left.vue +10 -10
- package/demos/mobile-first/app/tabs/position-right.vue +10 -10
- package/demos/mobile-first/app/tabs/position.vue +10 -10
- package/demos/mobile-first/app/tabs/prevent-tab-switching.vue +3 -3
- package/demos/mobile-first/app/tabs/stretch-wh.vue +3 -3
- package/demos/mobile-first/app/tabs/tab-style-bordercard.vue +10 -10
- package/demos/mobile-first/app/tabs/tab-style-card.vue +10 -10
- package/demos/mobile-first/app/tabs/tabdata-title.vue +4 -4
- package/demos/mobile-first/app/tabs/tabs-draggable.vue +1 -1
- package/demos/mobile-first/app/tabs/tabs-events-add.vue +3 -3
- package/demos/mobile-first/app/tabs/tabs-events-click.vue +3 -3
- package/demos/mobile-first/app/tabs/tabs-events-close.vue +4 -4
- package/demos/mobile-first/app/tabs/tabs-events-edit.vue +4 -4
- package/demos/mobile-first/app/tabs/tabs-separator.vue +8 -8
- package/demos/mobile-first/app/tabs/tabs-size.vue +3 -3
- package/demos/mobile-first/app/tabs/tabs-tabs.vue +2 -2
- package/demos/mobile-first/app/tabs/with-add.vue +1 -1
- package/demos/pc/app/action-menu/disabled.vue +2 -1
- package/demos/pc/app/action-menu/icon-composition-api.vue +73 -0
- package/demos/pc/app/action-menu/icon.vue +79 -0
- package/demos/pc/app/action-menu/popper-class.spec.ts +2 -1
- package/demos/pc/app/action-menu/webdoc/action-menu.js +42 -1
- package/demos/pc/app/autocomplete/webdoc/autocomplete.js +30 -16
- package/demos/pc/app/breadcrumb/webdoc/breadcrumb.js +3 -3
- package/demos/pc/app/button/basic-usage-composition-api.vue +2 -0
- package/demos/pc/app/button/basic-usage.vue +2 -0
- package/demos/pc/app/button/click-composition-api.vue +1 -1
- package/demos/pc/app/button/click.vue +1 -1
- package/demos/pc/app/button/dynamic-disabled-composition-api.vue +10 -1
- package/demos/pc/app/button/{dynamic-disabled.spec.js → dynamic-disabled.spec.ts} +4 -0
- package/demos/pc/app/button/dynamic-disabled.vue +12 -3
- package/demos/pc/app/button/ghost-composition-api.vue +26 -0
- package/demos/pc/app/button/ghost.spec.ts +69 -0
- package/demos/pc/app/button/ghost.vue +32 -0
- package/demos/pc/app/button/icon-composition-api.vue +2 -0
- package/demos/pc/app/button/icon.vue +2 -0
- package/demos/pc/app/button/loading-composition-api.vue +2 -0
- package/demos/pc/app/button/loading.vue +2 -0
- package/demos/pc/app/button/size-composition-api.vue +2 -0
- package/demos/pc/app/button/size.vue +2 -0
- package/demos/pc/app/button/text-composition-api.vue +1 -1
- package/demos/pc/app/button/text.vue +1 -1
- package/demos/pc/app/button/webdoc/button.js +28 -1
- package/demos/pc/app/button-group/button-group-multiple-composition-api.vue +9 -9
- package/demos/pc/app/button-group/button-group-multiple.vue +9 -9
- package/demos/pc/app/button-group/change-event-composition-api.vue +1 -1
- package/demos/pc/app/button-group/change-event.vue +1 -1
- package/demos/pc/app/button-group/show-edit-composition-api.vue +1 -1
- package/demos/pc/app/button-group/show-edit.vue +1 -1
- package/demos/pc/app/button-group/webdoc/button-group.js +2 -3
- package/demos/pc/app/carousel/webdoc/carousel.js +82 -49
- package/demos/pc/app/cascader/auto-load-checkStrictly-composition-api.vue +2 -1
- package/demos/pc/app/cascader/auto-load-checkStrictly.vue +2 -1
- package/demos/pc/app/cascader/auto-load-composition-api.vue +3 -1
- package/demos/pc/app/cascader/auto-load.vue +2 -1
- package/demos/pc/app/cascader/events-composition-api.vue +1 -1
- package/demos/pc/app/cascader/expand-trigger-composition-api.vue +195 -2
- package/demos/pc/app/cascader/show-all-levels-composition-api.vue +197 -2
- package/demos/pc/app/cascader/webdoc/cascader.js +27 -13
- package/demos/pc/app/cascader-panel/basic-usage-composition-api.vue +3 -1
- package/demos/pc/app/cascader-panel/basic-usage.vue +2 -1
- package/demos/pc/app/cascader-panel/cascader-panel-props-composition-api.vue +3 -1
- package/demos/pc/app/cascader-panel/cascader-panel-props.vue +3 -1
- package/demos/pc/app/cascader-panel/change-composition-api.vue +1 -2
- package/demos/pc/app/cascader-panel/change.vue +1 -1
- package/demos/pc/app/cascader-panel/webdoc/cascader-panel.js +5 -5
- package/demos/pc/app/color-picker/webdoc/color-picker.js +36 -18
- package/demos/pc/app/color-select-panel/webdoc/color-select-panel.js +32 -19
- package/demos/pc/app/config-provider/basic.spec.ts +9 -0
- package/demos/pc/app/config-provider/tag.spec.ts +12 -0
- package/demos/pc/app/config-provider/text-direct.spec.ts +11 -0
- package/demos/pc/app/config-provider/webdoc/config-provider.en.md +7 -0
- package/demos/pc/app/config-provider/webdoc/config-provider.js +27 -12
- package/demos/pc/app/container/basic-usage.spec.js +47 -2
- package/demos/pc/app/container/custom-with-height.spec.js +10 -2
- package/demos/pc/app/crop/webdoc/crop.js +53 -49
- package/demos/pc/app/dialog-box/webdoc/dialog-box.js +82 -83
- package/demos/pc/app/divider/webdoc/divider.js +25 -21
- package/demos/pc/app/dropdown/events-composition-api.vue +1 -1
- package/demos/pc/app/dropdown/events.spec.ts +1 -0
- package/demos/pc/app/dropdown/multi-level-composition-api.vue +4 -8
- package/demos/pc/app/dropdown/multi-level.spec.ts +16 -9
- package/demos/pc/app/dropdown/multi-level.vue +3 -7
- package/demos/pc/app/dropdown/show-icon-composition-api.vue +44 -21
- package/demos/pc/app/dropdown/show-icon.vue +42 -12
- package/demos/pc/app/dropdown/webdoc/dropdown.js +29 -8
- package/demos/pc/app/fall-menu/custom-menuitem.spec.ts +6 -9
- package/demos/pc/app/fall-menu/custom-slider-icon.spec.ts +10 -21
- package/demos/pc/app/fall-menu/data-resource.spec.ts +6 -9
- package/demos/pc/app/file-upload/abort-quest.spec.ts +6 -5
- package/demos/pc/app/file-upload/accept-file-image.spec.ts +9 -4
- package/demos/pc/app/file-upload/custom-trigger.spec.ts +1 -1
- package/demos/pc/app/file-upload/disabled.spec.ts +4 -5
- package/demos/pc/app/file-upload/drag-upload.spec.ts +1 -1
- package/demos/pc/app/file-upload/file-picture-card.spec.ts +7 -6
- package/demos/pc/app/file-upload/form-validation.spec.ts +2 -2
- package/demos/pc/app/file-upload/image-size.spec.ts +2 -2
- package/demos/pc/app/file-upload/max-file-count.spec.ts +6 -6
- package/demos/pc/app/file-upload/paste-upload-composition-api.vue +2 -2
- package/demos/pc/app/file-upload/paste-upload.spec.ts +19 -2
- package/demos/pc/app/file-upload/picture-card.spec.ts +6 -5
- package/demos/pc/app/file-upload/picture-list.spec.ts +2 -3
- package/demos/pc/app/file-upload/prevent-delete-file.spec.ts +1 -1
- package/demos/pc/app/file-upload/prevent-upload-file.spec.ts +1 -1
- package/demos/pc/app/file-upload/upload-events.spec.ts +6 -4
- package/demos/pc/app/file-upload/upload-file-list-slot.spec.ts +18 -0
- package/demos/pc/app/file-upload/upload-file-list-thumb-composition-api.vue +4 -3
- package/demos/pc/app/file-upload/upload-file-list-thumb.spec.ts +2 -2
- package/demos/pc/app/file-upload/upload-file-list-thumb.vue +4 -3
- package/demos/pc/app/file-upload/upload-file-list.spec.ts +9 -9
- package/demos/pc/app/file-upload/upload-limit.spec.ts +5 -8
- package/demos/pc/app/file-upload/upload-request.spec.ts +1 -1
- package/demos/pc/app/file-upload/upload-user-head.spec.ts +1 -1
- package/demos/pc/app/file-upload/webdoc/file-upload.js +4 -4
- package/demos/pc/app/file-upload//346/265/213/350/257/225.txt +1 -0
- package/demos/pc/app/form/custom-validation-rule-composition-api.vue +2 -14
- package/demos/pc/app/form/custom-validation-rule.vue +2 -8
- package/demos/pc/app/form/form-validate-field.vue +2 -2
- package/demos/pc/app/form/size.spec.ts +26 -6
- package/demos/pc/app/grid/custom-style/body-style-composition-api.vue +1 -1
- package/demos/pc/app/grid/custom-style/footer-style-composition-api.vue +64 -19
- package/demos/pc/app/grid/drag/row-drag-ctrl-composition-api.vue +4 -4
- package/demos/pc/app/grid/edit/trigger-mode-hm-editing-composition-api.vue +2 -2
- package/demos/pc/app/grid/edit/trigger-mode-hm-editing.vue +1 -1
- package/demos/pc/app/grid/event/cell-mouse-event-composition-api.vue +1 -1
- package/demos/pc/app/grid/event/context-menu-event-composition-api.vue +1 -0
- package/demos/pc/app/grid/event/edit-event-composition-api.vue +1 -1
- package/demos/pc/app/grid/expand/set-row-expansion-composition-api.vue +9 -4
- package/demos/pc/app/grid/loading/{grid-loading-off-tip-composition-api.vue → grid-custom-loading-composition-api.vue} +29 -4
- package/demos/pc/app/grid/loading/grid-custom-loading.spec.js +7 -0
- package/demos/pc/app/grid/loading/{grid-loading-off-tip.vue → grid-custom-loading.vue} +27 -1
- package/demos/pc/app/grid/operation-column/clear-and-set-radio-row-composition-api.vue +5 -1
- package/demos/pc/app/grid/operation-column/selection-operation-composition-api.vue +32 -0
- package/demos/pc/app/grid/size/grid-size-composition-api.vue +17 -0
- package/demos/pc/app/grid/slot/editor-slot-composition-api.vue +13 -7
- package/demos/pc/app/grid/sort/combinations-sort-composition-api.vue +3 -3
- package/demos/pc/app/grid/sort/combinations-sort.spec.js +3 -0
- package/demos/pc/app/grid/sort/combinations-sort.vue +3 -3
- package/demos/pc/app/grid/toolbar/insert-remove-rows-composition-api.vue +1 -1
- package/demos/pc/app/grid/toolbar/insert-remove-rows.vue +1 -1
- package/demos/pc/app/grid/toolbar/refresh-grid-composition-api.vue +105 -0
- package/demos/pc/app/grid/tree-table/set-tree-expansion-composition-api.vue +4 -4
- package/demos/pc/app/grid/validation/before-submit-validation-composition-api.vue +19 -2
- package/demos/pc/app/grid/validation/before-submit-validation.spec.js +5 -2
- package/demos/pc/app/grid/validation/before-submit-validation.vue +19 -2
- package/demos/pc/app/grid/webdoc/grid-loading.js +9 -5
- package/demos/pc/app/grid/webdoc/grid-size.js +2 -2
- package/demos/pc/app/grid/webdoc/grid-validation.js +1 -1
- package/demos/pc/app/grid/webdoc/grid.js +8 -1
- package/demos/pc/app/guide/callback-composition-api.vue +2 -2
- package/demos/pc/app/guide/callback.vue +2 -2
- package/demos/pc/app/guide/highlight-box-composition-api.vue +9 -8
- package/demos/pc/app/guide/highlight-box.vue +8 -2
- package/demos/pc/app/guide/offset-composition-api.vue +7 -2
- package/demos/pc/app/guide/offset.vue +7 -2
- package/demos/pc/app/guide/size-composition-api.vue +3 -8
- package/demos/pc/app/guide/size.vue +3 -8
- package/demos/pc/app/guide/webdoc/guide.js +2 -2
- package/demos/pc/app/image/basic-usage.spec.ts +9 -2
- package/demos/pc/app/image/events.spec.ts +3 -1
- package/demos/pc/app/image/lazy-composition-api.vue +2 -2
- package/demos/pc/app/image/lazy.spec.ts +7 -4
- package/demos/pc/app/image/lazy.vue +2 -2
- package/demos/pc/app/image/preview-in-dialog.spec.ts +15 -1
- package/demos/pc/app/image/preview.spec.ts +28 -13
- package/demos/pc/app/image/slot.spec.ts +3 -0
- package/demos/pc/app/input/webdoc/input.js +11 -11
- package/demos/pc/app/link/basic-usage-composition-api.vue +1 -1
- package/demos/pc/app/link/basic-usage.spec.ts +1 -1
- package/demos/pc/app/link/basic-usage.vue +1 -1
- package/demos/pc/app/link/config-href.spec.ts +2 -2
- package/demos/pc/app/link/custom-icon.spec.ts +5 -5
- package/demos/pc/app/link/dynamic-disable.spec.ts +11 -11
- package/demos/pc/app/link/focus-no-underline.spec.ts +3 -3
- package/demos/pc/app/link/link-style-composition-api.vue +6 -6
- package/demos/pc/app/link/link-style.spec.ts +36 -7
- package/demos/pc/app/link/link-style.vue +6 -6
- package/demos/pc/app/link/webdoc/link.js +20 -22
- package/demos/pc/app/link-menu/webdoc/link-menu.js +22 -22
- package/demos/pc/app/milestone/basic-usage-composition-api.vue +6 -6
- package/demos/pc/app/milestone/basic-usage.spec.ts +1 -1
- package/demos/pc/app/milestone/basic-usage.vue +6 -6
- package/demos/pc/app/milestone/line-style-composition-api.vue +6 -6
- package/demos/pc/app/milestone/line-style.vue +6 -6
- package/demos/pc/app/milestone/show-number-composition-api.vue +9 -7
- package/demos/pc/app/milestone/show-number.spec.ts +7 -7
- package/demos/pc/app/milestone/show-number.vue +9 -7
- package/demos/pc/app/milestone/solid-style-composition-api.vue +7 -7
- package/demos/pc/app/milestone/solid-style.spec.ts +7 -7
- package/demos/pc/app/milestone/solid-style.vue +7 -7
- package/demos/pc/app/milestone/webdoc/milestone.js +31 -12
- package/demos/pc/app/modal/webdoc/modal.js +80 -76
- package/demos/pc/app/nav-menu/basic-usage.spec.ts +2 -2
- package/demos/pc/app/nav-menu/before-skip-prevent.spec.ts +1 -1
- package/demos/pc/app/nav-menu/before-skip.spec.ts +1 -1
- package/demos/pc/app/nav-menu/custom-service.spec.ts +1 -2
- package/demos/pc/app/nav-menu/overflow.spec.ts +2 -2
- package/demos/pc/app/nav-menu/slot-logo.spec.ts +1 -1
- package/demos/pc/app/nav-menu/slot-toolbar.spec.ts +2 -2
- package/demos/pc/app/numeric/webdoc/numeric.js +33 -32
- package/demos/pc/app/search/basic-usage.spec.ts +1 -1
- package/demos/pc/app/search/clearable.spec.ts +1 -1
- package/demos/pc/app/search/events-composition-api.vue +6 -0
- package/demos/pc/app/search/events.spec.ts +9 -6
- package/demos/pc/app/search/events.vue +5 -0
- package/demos/pc/app/search/webdoc/search.js +14 -4
- package/demos/pc/app/slide-bar/webdoc/slide-bar.js +18 -12
- package/demos/pc/app/slider/webdoc/slider.js +23 -18
- package/demos/pc/app/steps/advanced-steps.spec.ts +3 -2
- package/demos/pc/app/steps/click-composition-api.vue +0 -1
- package/demos/pc/app/steps/click.spec.ts +1 -12
- package/demos/pc/app/steps/custom-steps-item.spec.ts +1 -1
- package/demos/pc/app/steps/node-status-composition-api.vue +1 -1
- package/demos/pc/app/steps/node-status.spec.ts +1 -1
- package/demos/pc/app/steps/node-status.vue +1 -1
- package/demos/pc/app/steps/normal-steps-composition-api.vue +1 -1
- package/demos/pc/app/steps/normal-steps.spec.ts +2 -2
- package/demos/pc/app/steps/normal-steps.vue +1 -1
- package/demos/pc/app/steps/only-number-composition-api.vue +1 -1
- package/demos/pc/app/steps/only-number.spec.ts +1 -1
- package/demos/pc/app/steps/only-number.vue +1 -1
- package/demos/pc/app/steps/show-divider-composition-api.vue +1 -1
- package/demos/pc/app/steps/show-divider.spec.ts +1 -1
- package/demos/pc/app/steps/show-divider.vue +1 -1
- package/demos/pc/app/steps/size-composition-api.vue +6 -9
- package/demos/pc/app/steps/size.spec.ts +1 -4
- package/demos/pc/app/steps/size.vue +4 -4
- package/demos/pc/app/steps/slot-active-node-desc-composition-api.vue +3 -1
- package/demos/pc/app/steps/slot-active-node-desc.spec.ts +1 -1
- package/demos/pc/app/steps/slot-active-node-desc.vue +3 -1
- package/demos/pc/app/steps/slot-description-composition-api.vue +6 -6
- package/demos/pc/app/steps/slot-description.spec.ts +1 -1
- package/demos/pc/app/steps/slot-description.vue +5 -5
- package/demos/pc/app/steps/slot-item-composition-api.vue +0 -1
- package/demos/pc/app/steps/slot-item.spec.ts +1 -7
- package/demos/pc/app/steps/slot-item.vue +0 -1
- package/demos/pc/app/steps/space.spec.ts +1 -1
- package/demos/pc/app/steps/text-position-composition-api.vue +1 -1
- package/demos/pc/app/steps/text-position.spec.ts +1 -4
- package/demos/pc/app/steps/text-position.vue +1 -1
- package/demos/pc/app/steps/vertical-steps.spec.ts +13 -19
- package/demos/pc/app/steps/webdoc/steps.js +18 -17
- package/demos/pc/app/tabs/basic-usage-composition-api.vue +4 -4
- package/demos/pc/app/tabs/basic-usage.vue +4 -4
- package/demos/pc/app/tabs/before-leave-composition-api.vue +3 -3
- package/demos/pc/app/tabs/before-leave.vue +3 -3
- package/demos/pc/app/tabs/custom-more-icon-composition-api.vue +1 -1
- package/demos/pc/app/tabs/custom-more-icon.vue +1 -1
- package/demos/pc/app/tabs/custom-tab-content-composition-api.vue +3 -3
- package/demos/pc/app/tabs/custom-tab-content.vue +3 -3
- package/demos/pc/app/tabs/custom-tab-title-composition-api.vue +3 -3
- package/demos/pc/app/tabs/custom-tab-title.vue +3 -3
- package/demos/pc/app/tabs/lazy-composition-api.vue +5 -3
- package/demos/pc/app/tabs/lazy.vue +5 -3
- package/demos/pc/app/tabs/position-composition-api.vue +22 -17
- package/demos/pc/app/tabs/position.spec.ts +4 -4
- package/demos/pc/app/tabs/position.vue +19 -18
- package/demos/pc/app/tabs/prevent-tab-switching-composition-api.vue +3 -3
- package/demos/pc/app/tabs/prevent-tab-switching.vue +3 -3
- package/demos/pc/app/tabs/stretch-wh-composition-api.vue +3 -3
- package/demos/pc/app/tabs/stretch-wh.vue +3 -3
- package/demos/pc/app/tabs/tab-style-bordercard-composition-api.vue +10 -10
- package/demos/pc/app/tabs/tab-style-bordercard.vue +10 -10
- package/demos/pc/app/tabs/tab-style-card-composition-api.vue +1 -1
- package/demos/pc/app/tabs/tab-style-card.vue +1 -1
- package/demos/pc/app/tabs/tabs-draggable-composition-api.vue +1 -1
- package/demos/pc/app/tabs/tabs-draggable.spec.ts +1 -7
- package/demos/pc/app/tabs/tabs-draggable.vue +1 -1
- package/demos/pc/app/tabs/tabs-events-click-composition-api.vue +3 -3
- package/demos/pc/app/tabs/tabs-events-click.vue +3 -3
- package/demos/pc/app/tabs/tabs-events-close-composition-api.vue +4 -4
- package/demos/pc/app/tabs/tabs-events-close.vue +4 -4
- package/demos/pc/app/tabs/tabs-events-edit-composition-api.vue +4 -4
- package/demos/pc/app/tabs/tabs-events-edit.vue +4 -4
- package/demos/pc/app/tabs/tabs-separator-composition-api.vue +7 -7
- package/demos/pc/app/tabs/tabs-separator.vue +7 -7
- package/demos/pc/app/tabs/tabs-size-composition-api.vue +3 -3
- package/demos/pc/app/tabs/tabs-size.vue +3 -3
- package/demos/pc/app/tabs/tooltip-composition-api.vue +17 -13
- package/demos/pc/app/tabs/tooltip.vue +17 -13
- package/demos/pc/app/tabs/webdoc/tabs.js +35 -35
- package/demos/pc/app/tabs/with-add-composition-api.vue +1 -1
- package/demos/pc/app/tabs/with-add.vue +1 -1
- package/demos/pc/app/tag/{before-delete-composition-api.vue → delete-composition-api.vue} +6 -16
- package/demos/pc/app/tag/delete.spec.ts +19 -0
- package/demos/pc/app/tag/{closable.vue → delete.vue} +22 -5
- package/demos/pc/app/tag/webdoc/tag.js +15 -7
- package/demos/pc/app/time-line/webdoc/time-line.js +12 -12
- package/demos/pc/app/toggle-menu/webdoc/toggle-menu.js +64 -55
- package/demos/pc/app/tooltip/content.spec.js +1 -1
- package/demos/pc/app/tooltip/custom-popper.spec.js +4 -4
- package/demos/pc/app/transfer/basic-usage.spec.ts +7 -20
- package/demos/pc/app/transfer/custom-btns.spec.ts +11 -19
- package/demos/pc/app/transfer/custom-filter.spec.ts +6 -4
- package/demos/pc/app/transfer/custom-footer.spec.ts +1 -2
- package/demos/pc/app/transfer/custom-render.spec.ts +7 -5
- package/demos/pc/app/transfer/custom-titles.spec.ts +5 -3
- package/demos/pc/app/transfer/default-checked.spec.ts +5 -9
- package/demos/pc/app/transfer/drop-config.spec.ts +21 -16
- package/demos/pc/app/transfer/manual-clear-query.spec.ts +2 -2
- package/demos/pc/app/transfer/nested-table.spec.ts +12 -35
- package/demos/pc/app/transfer/nested-tree.spec.ts +3 -30
- package/demos/pc/app/transfer/target-order.spec.ts +2 -1
- package/demos/pc/app/transfer/transfer-events.spec.ts +2 -1
- package/demos/pc/app/tree/basic-usage.spec.ts +26 -16
- package/demos/pc/app/tree/check-op.spec.ts +37 -19
- package/demos/pc/app/tree/checkbox.spec.ts +23 -18
- package/demos/pc/app/tree/contextmenu.spec.ts +9 -8
- package/demos/pc/app/tree/drag.spec.ts +10 -18
- package/demos/pc/app/tree/edit.spec.ts +24 -103
- package/demos/pc/app/tree/expand-control.spec.ts +22 -18
- package/demos/pc/app/tree/filter-view.spec.ts +16 -18
- package/demos/pc/app/tree/icons.spec.ts +20 -18
- package/demos/pc/app/tree/lazy.spec.ts +10 -18
- package/demos/pc/app/tree/node-hl.spec.ts +27 -18
- package/demos/pc/app/tree/node-op-composition-api.vue +12 -6
- package/demos/pc/app/tree/node-op.spec.ts +32 -19
- package/demos/pc/app/tree/other.spec.ts +5 -18
- package/demos/pc/app/tree/props.spec.ts +7 -18
- package/demos/pc/app/tree/radio.spec.ts +10 -18
- package/demos/pc/app/tree/slot.spec.ts +12 -18
- package/demos/pc/app/tree/webdoc/tree.js +2 -2
- package/demos/pc/app/tree-menu/accordion.spec.ts +3 -1
- package/demos/pc/app/tree-menu/basic-usage.spec.ts +4 -2
- package/demos/pc/app/tree-menu/current-node-composition-api.vue +7 -3
- package/demos/pc/app/tree-menu/current-node.spec.ts +20 -13
- package/demos/pc/app/tree-menu/current-node.vue +8 -6
- package/demos/pc/app/tree-menu/custom-icon.spec.ts +12 -2
- package/demos/pc/app/tree-menu/data-resource.spec.ts +33 -21
- package/demos/pc/app/tree-menu/default-expand-all.spec.ts +25 -8
- package/demos/pc/app/tree-menu/default-expanded-keys-highlight.spec.ts +6 -4
- package/demos/pc/app/tree-menu/default-expanded-keys.spec.ts +11 -7
- package/demos/pc/app/tree-menu/draggable.spec.ts +11 -4
- package/demos/pc/app/tree-menu/empty-text.spec.ts +1 -1
- package/demos/pc/app/tree-menu/event-allow-draggable.spec.ts +4 -1
- package/demos/pc/app/tree-menu/events.spec.ts +56 -28
- package/demos/pc/app/tree-menu/expand-on-click-node.spec.ts +32 -3
- package/demos/pc/app/tree-menu/filter-node-method.spec.ts +9 -6
- package/demos/pc/app/tree-menu/filter-node-method.vue +0 -4
- package/demos/pc/app/tree-menu/indent.spec.ts +9 -4
- package/demos/pc/app/tree-menu/lazy-load.spec.ts +8 -4
- package/demos/pc/app/tree-menu/menu-collapsible.spec.ts +5 -2
- package/demos/pc/app/tree-menu/show-checkbox.spec.ts +79 -41
- package/demos/pc/app/tree-menu/text-ellipsis.spec.ts +7 -4
- package/demos/pc/app/tree-menu/tree-menu-slot.spec.ts +4 -3
- package/demos/pc/app/tree-menu/webdoc/tree-menu.cn.md +1 -1
- package/demos/pc/app/tree-menu/webdoc/tree-menu.en.md +1 -1
- package/demos/pc/app/tree-menu/webdoc/tree-menu.js +3 -3
- package/demos/pc/app/user-contact/webdoc/user-contact.js +21 -13
- package/demos/pc/app/user-head/icon-user-head.spec.ts +3 -3
- package/demos/pc/app/user-head/image-user-head.spec.ts +2 -2
- package/demos/pc/app/user-head/webdoc/user-head.js +44 -28
- package/demos/pc/webdoc/changelog.md +1 -0
- package/demos/pc/webdoc/import-components.md +2 -4
- package/demos/pc/webdoc/theme-en.md +8 -4
- package/demos/pc/webdoc/theme.md +10 -3
- package/package.json +6 -6
- package/src/App.vue +0 -2
- package/src/i18n/index.js +3 -3
- package/src/main.js +2 -7
- package/src/menus.jsx +1 -1
- package/src/tools/useApiMode.js +2 -2
- package/src/tools/useBulletin.jsx +2 -2
- package/src/tools/utils.js +2 -2
- package/src/views/components/VersionTip.vue +14 -8
- package/src/views/components/components.vue +48 -47
- package/src/views/components/demo.vue +11 -11
- package/src/views/docs/docs.vue +2 -3
- package/src/views/layout/layout.vue +17 -19
- package/src/views/overview.vue +16 -13
- package/vite.config.ts +10 -4
- package/demos/mobile/app/pull-refresh/disabled.vue +0 -57
- package/demos/mobile/app/pull-refresh/head-height.vue +0 -31
- package/demos/mobile/app/pull-refresh/result-text.vue +0 -46
- package/demos/mobile/app/pull-refresh/success-duration.vue +0 -31
- package/demos/mobile/app/pull-refresh/success-text.vue +0 -27
- package/demos/pc/app/grid/loading/grid-loading-off-tip.spec.js +0 -8
- package/demos/pc/app/tag/before-delete.vue +0 -64
- package/demos/pc/app/tag/closable-composition-api.vue +0 -25
- package/demos/pc/app/tag/closable.spec.ts +0 -14
- /package/demos/pc/app/button/{autofocus.spec.js → autofocus.spec.ts} +0 -0
- /package/demos/pc/app/button/{basic-usage.spec.js → basic-usage.spec.ts} +0 -0
- /package/demos/pc/app/button/{click.spec.js → click.spec.ts} +0 -0
- /package/demos/pc/app/button/{icon.spec.js → icon.spec.ts} +0 -0
- /package/demos/pc/app/button/{image.spec.js → image.spec.ts} +0 -0
- /package/demos/pc/app/button/{loading.spec.js → loading.spec.ts} +0 -0
- /package/demos/pc/app/button/{reset-time.spec.js → reset-time.spec.ts} +0 -0
- /package/demos/pc/app/button/{size.spec.js → size.spec.ts} +0 -0
- /package/demos/pc/app/button/{text.spec.js → text.spec.ts} +0 -0
|
@@ -6,8 +6,8 @@ export default {
|
|
|
6
6
|
'demoId': 'basic-usage',
|
|
7
7
|
'name': { 'zh-CN': '基础用法', 'en-US': 'Basic Usage' },
|
|
8
8
|
'desc': {
|
|
9
|
-
'zh-CN': '',
|
|
10
|
-
'en-US': ''
|
|
9
|
+
'zh-CN': '<p>通过设置 <code>fetch-suggestions</code> 方法设置输入建议。</p>',
|
|
10
|
+
'en-US': '<p> Set input suggestions by setting the <code>fetch-suggestions</code> method.'
|
|
11
11
|
},
|
|
12
12
|
'codeFiles': ['basic-usage.vue']
|
|
13
13
|
},
|
|
@@ -43,8 +43,10 @@ export default {
|
|
|
43
43
|
'demoId': 'slot',
|
|
44
44
|
'name': { 'zh-CN': '插槽', 'en-US': 'slot' },
|
|
45
45
|
'desc': {
|
|
46
|
-
'zh-CN':
|
|
47
|
-
|
|
46
|
+
'zh-CN':
|
|
47
|
+
'<p>分别配置 <code>prepend</code>、<code>append</code>、<code>prefix</code>、<code>suffix</code>、<code>default</code> 插槽。</p>',
|
|
48
|
+
'en-US':
|
|
49
|
+
'<p>Configure <code>prepend</code>, <code>append</code>, <code>prefix</code>, <code>default</code>, and <code>suffix</code> slots.</p>'
|
|
48
50
|
},
|
|
49
51
|
'codeFiles': ['slot.vue']
|
|
50
52
|
},
|
|
@@ -113,8 +115,7 @@ export default {
|
|
|
113
115
|
'demoId': 'placement',
|
|
114
116
|
'name': { 'zh-CN': '菜单弹出位置', 'en-US': 'Menu Pop-up Position' },
|
|
115
117
|
'desc': {
|
|
116
|
-
'zh-CN':
|
|
117
|
-
'<p><code>placement</code> 属性可以设置菜单弹出位置,默认为 <code>bottom-start</code>。</p>\n',
|
|
118
|
+
'zh-CN': '<p><code>placement</code> 属性可以设置菜单弹出位置,默认为 <code>bottom-start</code>。</p>\n',
|
|
118
119
|
'en-US':
|
|
119
120
|
'<p><code>placement</code> property can be used to set the menu pop-up position. The default value is <code>bottom-start</code>. </p>\n'
|
|
120
121
|
},
|
|
@@ -182,7 +183,7 @@ export default {
|
|
|
182
183
|
{
|
|
183
184
|
'name': 'value-key',
|
|
184
185
|
'type': 'string',
|
|
185
|
-
'defaultValue': 'value'
|
|
186
|
+
'defaultValue': `'value'`,
|
|
186
187
|
'desc': {
|
|
187
188
|
'zh-CN': '在输入建议对象中,用于显示和匹配输入的键名',
|
|
188
189
|
'en-US': 'In the Input Suggestion object, key names for displaying and matching inputs'
|
|
@@ -210,8 +211,7 @@ export default {
|
|
|
210
211
|
'defaultValue': `'bottom-start'`,
|
|
211
212
|
'desc': {
|
|
212
213
|
'zh-CN': '菜单弹出位置',
|
|
213
|
-
'en-US':
|
|
214
|
-
'Menu pop-up position'
|
|
214
|
+
'en-US': 'Menu pop-up position'
|
|
215
215
|
},
|
|
216
216
|
'demoId': 'placement'
|
|
217
217
|
},
|
|
@@ -249,7 +249,7 @@ export default {
|
|
|
249
249
|
'name': 'name',
|
|
250
250
|
'type': 'string',
|
|
251
251
|
'defaultValue': '',
|
|
252
|
-
'desc': { 'zh-CN': 'input元素的原生属性', 'en-US': 'Native attributes of the input element' }
|
|
252
|
+
'desc': { 'zh-CN': 'input 元素的原生属性', 'en-US': 'Native attributes of the input element' }
|
|
253
253
|
},
|
|
254
254
|
{
|
|
255
255
|
'name': 'select-when-unmatched',
|
|
@@ -271,14 +271,14 @@ export default {
|
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
'name': 'prefix-icon',
|
|
274
|
-
'type': '
|
|
274
|
+
'type': 'VueComponent',
|
|
275
275
|
'defaultValue': '',
|
|
276
276
|
'desc': { 'zh-CN': '输入框头部图标', 'en-US': 'Icon on the header of the text box' },
|
|
277
277
|
'demoId': 'custom-icon'
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
280
|
'name': 'suffix-icon',
|
|
281
|
-
'type': '
|
|
281
|
+
'type': 'VueComponent',
|
|
282
282
|
'defaultValue': '',
|
|
283
283
|
'desc': { 'zh-CN': '输入框尾部图标', 'en-US': 'Icon at the end of the text box' },
|
|
284
284
|
'demoId': 'custom-icon'
|
|
@@ -330,10 +330,11 @@ export default {
|
|
|
330
330
|
'events': [
|
|
331
331
|
{
|
|
332
332
|
'name': 'select',
|
|
333
|
-
'type': '(selection:
|
|
333
|
+
'type': '(selection: IAutocompleteSuggestionItem) => void',
|
|
334
|
+
'typeAnchorName': 'IAutocompleteSuggestionItem',
|
|
334
335
|
'defaultValue': '',
|
|
335
336
|
'desc': {
|
|
336
|
-
'zh-CN': '点击选中建议项时触发,回调参数为fetch-suggestions中传入的项',
|
|
337
|
+
'zh-CN': '点击选中建议项时触发,回调参数为 fetch-suggestions 中传入的项',
|
|
337
338
|
'en-US':
|
|
338
339
|
'Triggered when you click to select a suggestion item. The callback parameter is the item passed in fetch-suggestions'
|
|
339
340
|
},
|
|
@@ -373,13 +374,26 @@ export default {
|
|
|
373
374
|
'name': 'default',
|
|
374
375
|
'type': '',
|
|
375
376
|
'defaultValue': '',
|
|
376
|
-
'desc': {
|
|
377
|
+
'desc': {
|
|
378
|
+
'zh-CN':
|
|
379
|
+
'下拉列表项插槽,插槽参数: arg: { slotScope: IAutocompleteSuggestionItem }, 其中 slotScope 是 fetch-suggestions 中传入的项',
|
|
380
|
+
'en-US':
|
|
381
|
+
'Drop-down list item slot, slot parameter: arg: { slotScope: IAutocompleteSuggestionItem }, where slotScope is the item passed in fetch-suggestions'
|
|
382
|
+
},
|
|
377
383
|
'demoId': 'slot'
|
|
378
384
|
}
|
|
379
385
|
]
|
|
380
386
|
}
|
|
381
387
|
],
|
|
382
388
|
types: [
|
|
389
|
+
{
|
|
390
|
+
name: 'IAutocompleteSuggestionItem',
|
|
391
|
+
type: 'type',
|
|
392
|
+
code: `interface IAutocompleteSuggestionItem {
|
|
393
|
+
[key: string]: string | undefined
|
|
394
|
+
value?: string
|
|
395
|
+
}`
|
|
396
|
+
},
|
|
383
397
|
{
|
|
384
398
|
name: 'IAutocompletePlacement',
|
|
385
399
|
type: 'type',
|
|
@@ -388,7 +402,7 @@ export default {
|
|
|
388
402
|
{
|
|
389
403
|
name: 'IAutocompleteFetchSuggestions',
|
|
390
404
|
type: 'type',
|
|
391
|
-
code: 'type IAutocompleteFetchSuggestions = (queryString: string, callback: (suggestions:
|
|
405
|
+
code: 'type IAutocompleteFetchSuggestions = (queryString: string, callback: (suggestions: IAutocompleteSuggestionItem[]) => void) => void'
|
|
392
406
|
}
|
|
393
407
|
]
|
|
394
408
|
}
|
|
@@ -6,8 +6,8 @@ export default {
|
|
|
6
6
|
'demoId': 'base',
|
|
7
7
|
'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' },
|
|
8
8
|
'desc': {
|
|
9
|
-
'zh-CN': `<code>Breadcrumb</code>:通过 <code>select</code>
|
|
10
|
-
<code>BreadcrumbItem</code>:通过 <code>to</code> 设置选项路由跳转对象,<code
|
|
9
|
+
'zh-CN': `<code>Breadcrumb</code>:通过 <code>select</code> 监听面包屑选中事件。<br/>
|
|
10
|
+
<code>BreadcrumbItem</code>:通过 <code>to</code> 设置选项路由跳转对象,<code>label</code> 设置选项名称,<code>select</code> 监听选项选中事件。`,
|
|
11
11
|
'en-US': `<code>Breadcrumb</code>: Listen for breadcrumb selection events through<code>select</code>; <br/>
|
|
12
12
|
<code>BreadcrumbItem</code>: Route the jump object through the <code>to</code>setting option,<code></code>setting option name,<code>select</code>listening for option selection events.`
|
|
13
13
|
},
|
|
@@ -71,7 +71,7 @@ export default {
|
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
'name': 'separator-icon',
|
|
74
|
-
'type': '
|
|
74
|
+
'type': 'vueComponent',
|
|
75
75
|
'defaultValue': '',
|
|
76
76
|
'desc': { 'zh-CN': '图标分隔符', 'en-US': 'Icon separator' },
|
|
77
77
|
'demoId': 'separator'
|
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
<tiny-button type="warning" :disabled="disabled" plain>警告按钮</tiny-button>
|
|
19
19
|
<tiny-button type="danger" :disabled="disabled" plain>危险按钮</tiny-button>
|
|
20
20
|
</tiny-row>
|
|
21
|
+
|
|
22
|
+
<tiny-row>
|
|
23
|
+
<tiny-button :disabled="disabled" ghost>幽灵按钮</tiny-button>
|
|
24
|
+
<tiny-button :icon="TinyIconSearch" :disabled="disabled">图标按钮</tiny-button>
|
|
25
|
+
<tiny-button :icon="TinyIconSearch" :disabled="disabled"> </tiny-button>
|
|
26
|
+
<tiny-button :icon="TinyIconSearch" :disabled="disabled" circle> </tiny-button>
|
|
27
|
+
</tiny-row>
|
|
21
28
|
</tiny-layout>
|
|
22
29
|
</template>
|
|
23
30
|
|
|
@@ -27,7 +34,7 @@ import { Button as TinyButton, Layout as TinyLayout, Row as TinyRow, Switch as T
|
|
|
27
34
|
import { iconSearch } from '@opentiny/vue-icon'
|
|
28
35
|
|
|
29
36
|
const disabled = ref(false)
|
|
30
|
-
const
|
|
37
|
+
const TinyIconSearch = iconSearch()
|
|
31
38
|
</script>
|
|
32
39
|
|
|
33
40
|
<style scoped>
|
|
@@ -37,5 +44,7 @@ const IconSearch = iconSearch()
|
|
|
37
44
|
|
|
38
45
|
.tiny-button {
|
|
39
46
|
margin-bottom: 10px;
|
|
47
|
+
margin-left: 0;
|
|
48
|
+
margin-right: 8px;
|
|
40
49
|
}
|
|
41
50
|
</style>
|
|
@@ -6,6 +6,7 @@ test('测试禁用状态是否生效', async ({ page }) => {
|
|
|
6
6
|
|
|
7
7
|
const demo = page.locator('#dynamic-disabled')
|
|
8
8
|
const switchBtn = demo.locator('.tiny-switch')
|
|
9
|
+
const ghostBtn = demo.getByRole('button', { name: '幽灵按钮' })
|
|
9
10
|
|
|
10
11
|
await switchBtn.click()
|
|
11
12
|
await expect(demo.locator('.tiny-button').first()).toBeDisabled()
|
|
@@ -15,6 +16,9 @@ test('测试禁用状态是否生效', async ({ page }) => {
|
|
|
15
16
|
await expect(demo.getByRole('button', { name: '默认按钮' }).first()).toBeDisabled()
|
|
16
17
|
await expect(demo.getByRole('button', { name: '主要按钮' }).first()).toBeDisabled()
|
|
17
18
|
await expect(demo.getByRole('button', { name: '成功按钮' }).first()).toBeDisabled()
|
|
19
|
+
await expect(ghostBtn).toHaveCSS('color', 'rgb(173, 176, 184)')
|
|
20
|
+
await expect(ghostBtn).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
21
|
+
await expect(ghostBtn).toHaveCSS('border-bottom-color', 'rgb(173, 176, 184)')
|
|
18
22
|
|
|
19
23
|
await switchBtn.click()
|
|
20
24
|
await expect(demo.locator('.tiny-button').first()).not.toBeDisabled()
|
|
@@ -11,19 +11,26 @@
|
|
|
11
11
|
</tiny-row>
|
|
12
12
|
|
|
13
13
|
<tiny-row>
|
|
14
|
-
<tiny-button :disabled="disabled" plain
|
|
14
|
+
<tiny-button :disabled="disabled" plain>朴素按钮</tiny-button>
|
|
15
15
|
<tiny-button type="primary" :disabled="disabled" plain>主要按钮</tiny-button>
|
|
16
16
|
<tiny-button type="success" :disabled="disabled" plain>成功按钮</tiny-button>
|
|
17
17
|
<tiny-button type="info" :disabled="disabled" plain>信息按钮</tiny-button>
|
|
18
18
|
<tiny-button type="warning" :disabled="disabled" plain>警告按钮</tiny-button>
|
|
19
19
|
<tiny-button type="danger" :disabled="disabled" plain>危险按钮</tiny-button>
|
|
20
20
|
</tiny-row>
|
|
21
|
+
|
|
22
|
+
<tiny-row>
|
|
23
|
+
<tiny-button :disabled="disabled" ghost>幽灵按钮</tiny-button>
|
|
24
|
+
<tiny-button :icon="TinyIconSearch" :disabled="disabled">图标按钮</tiny-button>
|
|
25
|
+
<tiny-button :icon="TinyIconSearch" :disabled="disabled"> </tiny-button>
|
|
26
|
+
<tiny-button :icon="TinyIconSearch" :disabled="disabled" circle> </tiny-button>
|
|
27
|
+
</tiny-row>
|
|
21
28
|
</tiny-layout>
|
|
22
29
|
</template>
|
|
23
30
|
|
|
24
31
|
<script>
|
|
25
32
|
import { Button, Layout, Row, Switch } from '@opentiny/vue'
|
|
26
|
-
import {
|
|
33
|
+
import { iconSearch } from '@opentiny/vue-icon'
|
|
27
34
|
|
|
28
35
|
export default {
|
|
29
36
|
components: {
|
|
@@ -35,7 +42,7 @@ export default {
|
|
|
35
42
|
data() {
|
|
36
43
|
return {
|
|
37
44
|
disabled: false,
|
|
38
|
-
|
|
45
|
+
TinyIconSearch: iconSearch()
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
48
|
}
|
|
@@ -47,5 +54,7 @@ export default {
|
|
|
47
54
|
}
|
|
48
55
|
.tiny-button {
|
|
49
56
|
margin-bottom: 10px;
|
|
57
|
+
margin-left: 0;
|
|
58
|
+
margin-right: 8px;
|
|
50
59
|
}
|
|
51
60
|
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="gray-bg">
|
|
3
|
+
<tiny-button ghost>幽灵按钮</tiny-button>
|
|
4
|
+
<tiny-button ghost type="primary">主要按钮</tiny-button>
|
|
5
|
+
<tiny-button ghost type="success">成功按钮</tiny-button>
|
|
6
|
+
<tiny-button ghost type="info">信息按钮</tiny-button>
|
|
7
|
+
<tiny-button ghost type="warning">告警按钮</tiny-button>
|
|
8
|
+
<tiny-button ghost type="danger">危险按钮</tiny-button>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
import { Button as TinyButton } from '@opentiny/vue'
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<style scoped>
|
|
17
|
+
.gray-bg {
|
|
18
|
+
background: #ccc;
|
|
19
|
+
padding: 20px 10px 10px;
|
|
20
|
+
}
|
|
21
|
+
.tiny-button {
|
|
22
|
+
margin-bottom: 10px;
|
|
23
|
+
margin-left: 0;
|
|
24
|
+
margin-right: 8px;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { test, expect } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('幽灵按钮', async ({ page }) => {
|
|
4
|
+
page.on('pageerror', (exception) => expect(exception).toBeNull())
|
|
5
|
+
await page.goto('button#ghost')
|
|
6
|
+
|
|
7
|
+
const demo = page.locator('#ghost')
|
|
8
|
+
const getGhostBtn = (index: number) => demo.locator('.tiny-button').nth(index)
|
|
9
|
+
|
|
10
|
+
// 默认幽灵按钮
|
|
11
|
+
await expect(getGhostBtn(0)).toHaveCSS('color', 'rgb(37, 43, 58)')
|
|
12
|
+
await expect(getGhostBtn(0)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
13
|
+
await expect(getGhostBtn(0)).toHaveCSS('border-bottom-color', 'rgb(173, 176, 184)')
|
|
14
|
+
await page.waitForTimeout(200)
|
|
15
|
+
await getGhostBtn(0).hover()
|
|
16
|
+
await expect(getGhostBtn(0)).toHaveCSS('color', 'rgb(94, 124, 224)')
|
|
17
|
+
await expect(getGhostBtn(0)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
18
|
+
await expect(getGhostBtn(0)).toHaveCSS('border-bottom-color', 'rgb(94, 124, 224)')
|
|
19
|
+
|
|
20
|
+
// 主要幽灵按钮
|
|
21
|
+
await expect(getGhostBtn(1)).toHaveCSS('color', 'rgb(94, 124, 224)')
|
|
22
|
+
await expect(getGhostBtn(1)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
23
|
+
await expect(getGhostBtn(1)).toHaveCSS('border-bottom-color', 'rgb(94, 124, 224)')
|
|
24
|
+
await page.waitForTimeout(200)
|
|
25
|
+
await getGhostBtn(1).hover()
|
|
26
|
+
await expect(getGhostBtn(1)).toHaveCSS('color', 'rgb(118, 147, 245)')
|
|
27
|
+
await expect(getGhostBtn(1)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
28
|
+
await expect(getGhostBtn(1)).toHaveCSS('border-bottom-color', 'rgb(118, 147, 245)')
|
|
29
|
+
|
|
30
|
+
// 成功幽灵按钮
|
|
31
|
+
await expect(getGhostBtn(2)).toHaveCSS('color', 'rgb(80, 212, 171)')
|
|
32
|
+
await expect(getGhostBtn(2)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
33
|
+
await expect(getGhostBtn(2)).toHaveCSS('border-bottom-color', 'rgb(80, 212, 171)')
|
|
34
|
+
await page.waitForTimeout(200)
|
|
35
|
+
await getGhostBtn(2).hover()
|
|
36
|
+
await expect(getGhostBtn(2)).toHaveCSS('color', 'rgb(172, 242, 220)')
|
|
37
|
+
await expect(getGhostBtn(2)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
38
|
+
await expect(getGhostBtn(2)).toHaveCSS('border-bottom-color', 'rgb(172, 242, 220)')
|
|
39
|
+
|
|
40
|
+
// 信息幽灵按钮
|
|
41
|
+
await expect(getGhostBtn(3)).toHaveCSS('color', 'rgb(37, 43, 58)')
|
|
42
|
+
await expect(getGhostBtn(3)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
43
|
+
await expect(getGhostBtn(3)).toHaveCSS('border-bottom-color', 'rgb(37, 43, 58)')
|
|
44
|
+
await page.waitForTimeout(200)
|
|
45
|
+
await getGhostBtn(3).hover()
|
|
46
|
+
await expect(getGhostBtn(3)).toHaveCSS('color', 'rgb(92, 97, 115)')
|
|
47
|
+
await expect(getGhostBtn(3)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
48
|
+
await expect(getGhostBtn(3)).toHaveCSS('border-bottom-color', 'rgb(92, 97, 115)')
|
|
49
|
+
|
|
50
|
+
// 告警幽灵按钮
|
|
51
|
+
await expect(getGhostBtn(4)).toHaveCSS('color', 'rgb(250, 152, 65)')
|
|
52
|
+
await expect(getGhostBtn(4)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
53
|
+
await expect(getGhostBtn(4)).toHaveCSS('border-bottom-color', 'rgb(250, 152, 65)')
|
|
54
|
+
await page.waitForTimeout(200)
|
|
55
|
+
await getGhostBtn(4).hover()
|
|
56
|
+
await expect(getGhostBtn(4)).toHaveCSS('color', 'rgb(250, 194, 10)')
|
|
57
|
+
await expect(getGhostBtn(4)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
58
|
+
await expect(getGhostBtn(4)).toHaveCSS('border-bottom-color', 'rgb(250, 194, 10)')
|
|
59
|
+
|
|
60
|
+
// 危险幽灵按钮
|
|
61
|
+
await expect(getGhostBtn(5)).toHaveCSS('color', 'rgb(199, 0, 11)')
|
|
62
|
+
await expect(getGhostBtn(5)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
63
|
+
await expect(getGhostBtn(5)).toHaveCSS('border-bottom-color', 'rgb(199, 0, 11)')
|
|
64
|
+
await page.waitForTimeout(200)
|
|
65
|
+
await getGhostBtn(5).hover()
|
|
66
|
+
await expect(getGhostBtn(5)).toHaveCSS('color', 'rgb(214, 74, 82)')
|
|
67
|
+
await expect(getGhostBtn(5)).toHaveCSS('background-color', 'rgba(0, 0, 0, 0)')
|
|
68
|
+
await expect(getGhostBtn(5)).toHaveCSS('border-bottom-color', 'rgb(214, 74, 82)')
|
|
69
|
+
})
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="gray-bg">
|
|
3
|
+
<tiny-button ghost>幽灵按钮</tiny-button>
|
|
4
|
+
<tiny-button ghost type="primary">主要按钮</tiny-button>
|
|
5
|
+
<tiny-button ghost type="success">成功按钮</tiny-button>
|
|
6
|
+
<tiny-button ghost type="info">信息按钮</tiny-button>
|
|
7
|
+
<tiny-button ghost type="warning">告警按钮</tiny-button>
|
|
8
|
+
<tiny-button ghost type="danger">危险按钮</tiny-button>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { Button } from '@opentiny/vue'
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
components: {
|
|
17
|
+
TinyButton: Button
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style scoped>
|
|
23
|
+
.gray-bg {
|
|
24
|
+
background: #ccc;
|
|
25
|
+
padding: 20px 10px 10px;
|
|
26
|
+
}
|
|
27
|
+
.tiny-button {
|
|
28
|
+
margin-bottom: 10px;
|
|
29
|
+
margin-left: 0;
|
|
30
|
+
margin-right: 8px;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -13,6 +13,15 @@ export default {
|
|
|
13
13
|
},
|
|
14
14
|
'codeFiles': ['basic-usage.vue']
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
'demoId': 'ghost',
|
|
18
|
+
'name': { 'zh-CN': '幽灵按钮', 'en-US': 'Ghost button' },
|
|
19
|
+
'desc': {
|
|
20
|
+
'zh-CN': '<p>通过 <code>ghost</code> 设置幽灵按钮。</p>',
|
|
21
|
+
'en-US': '<p>Set up ghost buttons via <code>ghost</code>.</p>'
|
|
22
|
+
},
|
|
23
|
+
'codeFiles': ['ghost.vue']
|
|
24
|
+
},
|
|
16
25
|
{
|
|
17
26
|
'demoId': 'dynamic-disabled',
|
|
18
27
|
'name': { 'zh-CN': '动态禁用按钮', 'en-US': 'Dynamic Disable Button' },
|
|
@@ -139,6 +148,16 @@ export default {
|
|
|
139
148
|
},
|
|
140
149
|
'demoId': 'dynamic-disabled'
|
|
141
150
|
},
|
|
151
|
+
{
|
|
152
|
+
'name': 'ghost',
|
|
153
|
+
'type': 'boolean',
|
|
154
|
+
'defaultValue': 'false',
|
|
155
|
+
'desc': {
|
|
156
|
+
'zh-CN': '是否幽灵按钮',
|
|
157
|
+
'en-US': 'Is ghost button'
|
|
158
|
+
},
|
|
159
|
+
'demoId': 'ghost'
|
|
160
|
+
},
|
|
142
161
|
{
|
|
143
162
|
'name': 'icon',
|
|
144
163
|
'type': 'VueComponent',
|
|
@@ -221,7 +240,8 @@ export default {
|
|
|
221
240
|
},
|
|
222
241
|
{
|
|
223
242
|
'name': 'type',
|
|
224
|
-
'type':
|
|
243
|
+
'type': 'IButtonType',
|
|
244
|
+
'typeAnchorName': 'IButtonType',
|
|
225
245
|
'defaultValue': '--',
|
|
226
246
|
'desc': {
|
|
227
247
|
'zh-CN': '展示按钮不同的状态,设置为text则展示为文本按钮',
|
|
@@ -255,5 +275,12 @@ export default {
|
|
|
255
275
|
}
|
|
256
276
|
]
|
|
257
277
|
}
|
|
278
|
+
],
|
|
279
|
+
types: [
|
|
280
|
+
{
|
|
281
|
+
name: 'IButtonType',
|
|
282
|
+
type: 'interface',
|
|
283
|
+
code: `type IButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text'`
|
|
284
|
+
}
|
|
258
285
|
]
|
|
259
286
|
}
|
|
@@ -10,15 +10,15 @@ import { ButtonGroup as TinyButtonGroup } from '@opentiny/vue'
|
|
|
10
10
|
|
|
11
11
|
const checkedVal = ref('Button1')
|
|
12
12
|
const groupData = ref([
|
|
13
|
-
{ text: '
|
|
14
|
-
{ text: '
|
|
15
|
-
{ text: '
|
|
16
|
-
{ text: '
|
|
17
|
-
{ text: '
|
|
18
|
-
{ text: '
|
|
19
|
-
{ text: '
|
|
20
|
-
{ text: '
|
|
21
|
-
{ text: '
|
|
13
|
+
{ text: 'Button01', value: 'Button01' },
|
|
14
|
+
{ text: 'Button02', value: 'Button02' },
|
|
15
|
+
{ text: 'Button03', value: 'Button03' },
|
|
16
|
+
{ text: 'Button04', value: 'Button04' },
|
|
17
|
+
{ text: 'Button05', value: 'Button05' },
|
|
18
|
+
{ text: 'Button06', value: 'Button06' },
|
|
19
|
+
{ text: 'Button07', value: 'Button07' },
|
|
20
|
+
{ text: 'Button08', value: 'Button08' },
|
|
21
|
+
{ text: 'Button09', value: 'Button09' },
|
|
22
22
|
{ text: 'Button10', value: 'Button10' },
|
|
23
23
|
{ text: 'Button11', value: 'Button11' },
|
|
24
24
|
{ text: 'Button12', value: 'Button12' }
|
|
@@ -15,15 +15,15 @@ export default {
|
|
|
15
15
|
return {
|
|
16
16
|
checkedVal: 'Button1',
|
|
17
17
|
groupData: [
|
|
18
|
-
{ text: '
|
|
19
|
-
{ text: '
|
|
20
|
-
{ text: '
|
|
21
|
-
{ text: '
|
|
22
|
-
{ text: '
|
|
23
|
-
{ text: '
|
|
24
|
-
{ text: '
|
|
25
|
-
{ text: '
|
|
26
|
-
{ text: '
|
|
18
|
+
{ text: 'Button01', value: 'Button01' },
|
|
19
|
+
{ text: 'Button02', value: 'Button02' },
|
|
20
|
+
{ text: 'Button03', value: 'Button03' },
|
|
21
|
+
{ text: 'Button04', value: 'Button04' },
|
|
22
|
+
{ text: 'Button05', value: 'Button05' },
|
|
23
|
+
{ text: 'Button06', value: 'Button06' },
|
|
24
|
+
{ text: 'Button07', value: 'Button07' },
|
|
25
|
+
{ text: 'Button08', value: 'Button08' },
|
|
26
|
+
{ text: 'Button09', value: 'Button09' },
|
|
27
27
|
{ text: 'Button10', value: 'Button10' },
|
|
28
28
|
{ text: 'Button11', value: 'Button11' },
|
|
29
29
|
{ text: 'Button12', value: 'Button12' }
|
|
@@ -6,10 +6,9 @@ export default {
|
|
|
6
6
|
'demoId': 'basic-usage',
|
|
7
7
|
'name': { 'zh-CN': '基本用法', 'en-US': 'Basic Usage' },
|
|
8
8
|
'desc': {
|
|
9
|
-
'zh-CN':
|
|
10
|
-
'<p>通过 <code>data</code> 设置按钮组数据,类型为 <a href="#IButtonGroupData">IButtonGroupData</a> ,通过 <code>v-model</code> 设置绑定值。</p>',
|
|
9
|
+
'zh-CN': '<p>通过 <code>data</code> 设置按钮组数据,<code>v-model</code> 设置绑定值。</p>',
|
|
11
10
|
'en-US':
|
|
12
|
-
'<p>Set the button group data
|
|
11
|
+
'<p>Set the button group data through <code>data</code> , and set the binding value through <code>v model</code> .</p>'
|
|
13
12
|
},
|
|
14
13
|
'codeFiles': ['basic-usage.vue']
|
|
15
14
|
},
|