@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
|
@@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test'
|
|
|
2
2
|
|
|
3
3
|
test('user-custom-service', async ({ page }) => {
|
|
4
4
|
await page.goto('user#custom-service')
|
|
5
|
-
const input = page.locator('
|
|
5
|
+
const input = page.locator('.tiny-user .tiny-input__inner')
|
|
6
6
|
const value = page.locator('.user-value')
|
|
7
7
|
const options = page.locator('.tiny-select-dropdown').locator('.tiny-option')
|
|
8
8
|
|
|
@@ -8,23 +8,17 @@ test('user-account-custom-service', async ({ page }) => {
|
|
|
8
8
|
const content = page.locator('.custom-content')
|
|
9
9
|
const loginButton = page.locator('.tiny-logout')
|
|
10
10
|
|
|
11
|
-
await expect(userImage).toHaveCSS('background-image',
|
|
11
|
+
await expect(userImage).toHaveCSS('background-image', /\/images\/dog1.png/)
|
|
12
12
|
await expect(userName).toHaveText('test1')
|
|
13
13
|
await expect(dropdown).toBeHidden()
|
|
14
14
|
await userName.hover()
|
|
15
|
-
await page.waitForTimeout(1000)
|
|
16
15
|
await expect(dropdown).toBeVisible()
|
|
17
16
|
await expect(content).toHaveText('默认插槽自定义内容')
|
|
18
17
|
await expect(loginButton).toHaveText('登录')
|
|
19
18
|
await loginButton.click()
|
|
20
|
-
await page.getByRole('button', { name: '
|
|
19
|
+
await page.getByRole('button', { name: '确定' }).click()
|
|
21
20
|
await page.waitForTimeout(1000)
|
|
22
21
|
await userName.hover()
|
|
23
22
|
await page.waitForTimeout(1000)
|
|
24
23
|
await expect(loginButton).toHaveText('注销')
|
|
25
|
-
await loginButton.click()
|
|
26
|
-
await page.waitForTimeout(1000)
|
|
27
|
-
await userName.hover()
|
|
28
|
-
await page.waitForTimeout(1000)
|
|
29
|
-
await expect(loginButton).toHaveText('登录')
|
|
30
24
|
})
|
|
@@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test'
|
|
|
3
3
|
test('user-link-custom-service', async ({ page }) => {
|
|
4
4
|
await page.goto('user-link#custom-service')
|
|
5
5
|
const card = page.locator('.tiny-popper.tiny-user-card')
|
|
6
|
-
const reference = page.locator('
|
|
6
|
+
const reference = page.locator('.reference-wrapper')
|
|
7
7
|
const img = card.locator('.card-top-img img')
|
|
8
8
|
|
|
9
9
|
await expect(reference).toHaveText('test3')
|
|
@@ -11,7 +11,7 @@ test('user-link-custom-service', async ({ page }) => {
|
|
|
11
11
|
await reference.click()
|
|
12
12
|
await page.waitForTimeout(1000)
|
|
13
13
|
await expect(card).toBeVisible()
|
|
14
|
-
await expect(img).toHaveAttribute('src',
|
|
14
|
+
await expect(img).toHaveAttribute('src', /\/images\/dog1.png/)
|
|
15
15
|
|
|
16
16
|
const text = card.locator('.card-top-text')
|
|
17
17
|
await expect(text).toContainText(['公共技术测试数据部门(测试数据部)'])
|
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
desc: {
|
|
18
18
|
'zh-CN':
|
|
19
|
-
'<p>通过 <code>content</code> 属性设置水印的文字。</br>通过 <code>font</code>
|
|
19
|
+
'<p>通过 <code>content</code> 属性设置水印的文字。</br>通过 <code>font</code> 属性设置水印的样式。</p>',
|
|
20
20
|
'en-US':
|
|
21
21
|
'Set the text of the watermark through the <code>content</code> attribute.</br> Set the style of the watermark through the <code>font</code> attribute. '
|
|
22
22
|
},
|
package/demos/pc/menus.js
CHANGED
|
@@ -78,7 +78,8 @@ export const cmpMenus = [
|
|
|
78
78
|
{ 'nameCn': '弹窗选择 ', 'name': 'DialogSelect ', 'key': 'dialog-select' },
|
|
79
79
|
{ 'nameCn': '抽屉', 'name': 'Drawer', 'key': 'drawer' },
|
|
80
80
|
{ 'nameCn': '过滤器面板', 'name': 'FilterPanel', 'key': 'filter-panel' },
|
|
81
|
-
{ 'nameCn': '面板分割', 'name': 'Split', 'key': 'split' }
|
|
81
|
+
{ 'nameCn': '面板分割', 'name': 'Split', 'key': 'split' },
|
|
82
|
+
{ 'nameCn': '卡片', 'name': 'Card', 'key': 'card' }
|
|
82
83
|
]
|
|
83
84
|
},
|
|
84
85
|
{
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"--ti-button-group-item-button-font-size": "--ti-button-group-item-btn-font-size",
|
|
88
88
|
"--ti-button-group-item-button-disabled-background": "--ti-button-group-item-btn-disabled-bg-color",
|
|
89
89
|
"--ti-button-group-item-button-disabled-border-color": "--ti-button-group-item-btn-disabled-border-color",
|
|
90
|
-
"--ti-button-group-item-button-disabled-color": "--ti-button-group-item-
|
|
90
|
+
"--ti-button-group-item-button-disabled-color": "--ti-button-group-item-disabled-text-color",
|
|
91
91
|
"--ti-button-group-item-button-hover-background": "--ti-button-group-item-btn-hover-bg-color",
|
|
92
92
|
"--ti-button-group-item-button-hover-color": "--ti-button-group-item-btn-hover-text-color",
|
|
93
93
|
"--ti-button-group-item-button-plain-color": "--ti-button-group-item-btn-plain-text-color",
|
|
@@ -1547,4 +1547,4 @@
|
|
|
1547
1547
|
"--ti-wizard-detail-border-radius": "--ti-wizard-detail-border-radius",
|
|
1548
1548
|
"--ti-wizard-detail-background": "--ti-wizard-detail-bg-color",
|
|
1549
1549
|
"--ti-wizard-chart-icon-bgcolor": "--ti-wizard-chart-icon-bg-color"
|
|
1550
|
-
}
|
|
1550
|
+
}
|
|
@@ -1,5 +1,144 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## v2.14.0/v3.14.0
|
|
4
|
+
|
|
5
|
+
`2024/03/07`
|
|
6
|
+
|
|
7
|
+
## What's Changed
|
|
8
|
+
|
|
9
|
+
### Exciting New Features 🎉
|
|
10
|
+
|
|
11
|
+
- feat(vue): [mind-map] mindmap by @GaoNeng-wWw in https://github.com/opentiny/tiny-vue/pull/1207
|
|
12
|
+
- feat(skeleton): skeleton component by @mengqiuleo in https://github.com/opentiny/tiny-vue/pull/1345
|
|
13
|
+
- feat(float-button): [float-button] add float-button by @fanbingbing16 in https://github.com/opentiny/tiny-vue/pull/1394
|
|
14
|
+
- feat(card): add card component by @shenjunjian
|
|
15
|
+
- feat auto import plugin by @mengqiuleo in https://github.com/opentiny/tiny-vue/pull/1397
|
|
16
|
+
- feat(time-line): refresh ui by @MNZhu in https://github.com/opentiny/tiny-vue/pull/1281
|
|
17
|
+
- feat(numeric): refresh ui by @MNZhu in https://github.com/opentiny/tiny-vue/pull/1258
|
|
18
|
+
- styles(action-sheet): [action-sheet] add action-sheet type by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1307
|
|
19
|
+
- styles(amount): [amount] add amount types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1310
|
|
20
|
+
- styles(fall-menu): [fall-menu] add fall-menu types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1315
|
|
21
|
+
- styles(tree-menu): [tree-menu] add tree-menu types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1316
|
|
22
|
+
- styles(collapse): [collapse] add collapse types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1317
|
|
23
|
+
- styles(drawer): [drawer] add drawer types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1318
|
|
24
|
+
- styles(autocomplete): [autocomplete] add autocomplete types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1322
|
|
25
|
+
- style(tag-group): [tag-group] improve ts types of components by @Floyd-bit in https://github.com/opentiny/tiny-vue/pull/1323
|
|
26
|
+
- styles(cascader): [cascader] add cascader types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1324
|
|
27
|
+
- style(popconfirm): [popconfirm] improve typescript declaration of components by @Floyd-bit in https://github.com/opentiny/tiny-vue/pull/1325
|
|
28
|
+
- style(rate): [rate] improve typescript declaration of components by @Floyd-bit in https://github.com/opentiny/tiny-vue/pull/1328
|
|
29
|
+
- styles(ip-address): [ip-address] add ip-address types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1329
|
|
30
|
+
- styles(async-flowchart): [async-flowchart] add async-flowchart types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1312
|
|
31
|
+
- styles(area): [area] add area types by @jxhhdx in https://github.com/opentiny/tiny-vue/pull/1311
|
|
32
|
+
- feat(dialog-box): [dialog-box] make the dialogBox drag outside the window by @wNing50 in https://github.com/opentiny/tiny-vue/pull/1268
|
|
33
|
+
- style(user-head): [user-head] improve typescript declaration of compo… by @Floyd-bit in https://github.com/opentiny/tiny-vue/pull/1380
|
|
34
|
+
- fix(carousel ): [carousel] update carousel xdesign by @James-9696 in https://github.com/opentiny/tiny-vue/pull/1422
|
|
35
|
+
- fix(badge): [badge] update badge xdesign by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1420
|
|
36
|
+
- feat(date-picker): [date-picker] support xdesign by @kagol in https://github.com/opentiny/tiny-vue/pull/1417
|
|
37
|
+
- feat(slider): [slider] marks supported, input range supported by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1429
|
|
38
|
+
- [drawer] fix smb theme by @Huangyilin19 in https://github.com/opentiny/tiny-vue/pull/1411
|
|
39
|
+
- feat(vue): add vue sub packages dependencies by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1424
|
|
40
|
+
- fix(transfer ): [transfer] update transfer xdesign by @James-9696 in https://github.com/opentiny/tiny-vue/pull/1419
|
|
41
|
+
- fix(skeleton): [skeleton]add skeleton of smb theme by @James-9696 in https://github.com/opentiny/tiny-vue/pull/1410
|
|
42
|
+
- feat(loading): [loading] smb theme by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1431
|
|
43
|
+
- fix(Switch): [Switch] add keydown support and improth the accessibility by @AcWrong02 in https://github.com/opentiny/tiny-vue/pull/1428
|
|
44
|
+
- feat(vue): [popconfirm] add popper-options props by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1439
|
|
45
|
+
- feat(theme/input): [input] smb theme by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1463
|
|
46
|
+
- feat(search): [search] Increase input maximum character limit attribu… by @chenxi-20 in https://github.com/opentiny/tiny-vue/pull/1457
|
|
47
|
+
- feat(search): refresh ui by @MNZhu in https://github.com/opentiny/tiny-vue/pull/1469
|
|
48
|
+
|
|
49
|
+
### Bug Fixes 🐛
|
|
50
|
+
|
|
51
|
+
- fix(build): fix build error and update versions by @zzcr in https://github.com/opentiny/tiny-vue/pull/1254
|
|
52
|
+
- fix(calendar-view): [calendar-view] week display error by @Jevin0 in https://github.com/opentiny/tiny-vue/pull/1241
|
|
53
|
+
- fix(time): [time-picker] Scroll to the specified position on the second click by @wNing50 in https://github.com/opentiny/tiny-vue/pull/1169
|
|
54
|
+
- fix(slider): [slider] In input box mode, set the min attribute to a n… by @AcWrong02 in https://github.com/opentiny/tiny-vue/pull/1202
|
|
55
|
+
- feat(relase) sync relase to dev by @zzcr in https://github.com/opentiny/tiny-vue/pull/1306
|
|
56
|
+
- fix: fix tsconfig for not Vue projects by @xiejay97 in https://github.com/opentiny/tiny-vue/pull/1342
|
|
57
|
+
- fix(cli): package.json missing dependency when create ui by @mengqiuleo in https://github.com/opentiny/tiny-vue/pull/1339
|
|
58
|
+
- fix(site): async-highlight lost reactivity by @GaoNeng-wWw in https://github.com/opentiny/tiny-vue/pull/1344
|
|
59
|
+
- fix(grid): [grid] fix the abnornal blank block when quantity from 500… by @wNing50 in https://github.com/opentiny/tiny-vue/pull/1321
|
|
60
|
+
- fix(pull-refresh): fix pull up by @MNZhu in https://github.com/opentiny/tiny-vue/pull/1235
|
|
61
|
+
- fix(col): [layout] Fix Vue warning with configuration span of 24 by @falcon-jin in https://github.com/opentiny/tiny-vue/pull/1272
|
|
62
|
+
- fix(numeric): [numeric] Fix Bug caused by initial value greater than maximum by @wkif in https://github.com/opentiny/tiny-vue/pull/1284
|
|
63
|
+
- fix(timeline): [time-line] fix console error about `event click undefined` by @gweesin in https://github.com/opentiny/tiny-vue/pull/1297
|
|
64
|
+
- fix(dropdown): [dropdown] Fix the issue of dropdown component causing warning messages in the console: Component emitted event "is-disabled" but it is neither declared in the emits option by @liumingxiy in https://github.com/opentiny/tiny-vue/pull/1356
|
|
65
|
+
- fix(tree-menu): [tree-menu]fix treeMenu error in vue2 by @zzcr in https://github.com/opentiny/tiny-vue/pull/1371
|
|
66
|
+
- fix(anchor):[anchor]When the anchor component has a default currentLink, the style is not the expected style by @fanbingbing16 in https://github.com/opentiny/tiny-vue/pull/1368
|
|
67
|
+
- fix(date-picker): [date-picker] fixed the issue that entering date did not work by @kagol in https://github.com/opentiny/tiny-vue/pull/1386
|
|
68
|
+
- fix(modal): [modal] The Modal Modal box component should not automatically close when hovering over a message with type="message" by @AcWrong02 in https://github.com/opentiny/tiny-vue/pull/1377
|
|
69
|
+
- fix(mobile-first): fix mobile-first components bugs by @zzcr in https://github.com/opentiny/tiny-vue/pull/1426
|
|
70
|
+
- fix(renderless): fix designConfig error by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1423
|
|
71
|
+
- fix(types): fix button group ts type warning by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1430
|
|
72
|
+
- fix(watermark): [watermark] fix the pic watermark above the content by @wNing50 in https://github.com/opentiny/tiny-vue/pull/1425
|
|
73
|
+
- fix(theme/notify): [notify] fix notify title white-space by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1413
|
|
74
|
+
- style(rich-text-editor): [rich-text-editor] css variable error by @Jevin0 in https://github.com/opentiny/tiny-vue/pull/1367
|
|
75
|
+
- fix: fix theme tool by @kagol in https://github.com/opentiny/tiny-vue/pull/1433
|
|
76
|
+
- fix(ci): delete e2e-comment useless 'echo' by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1440
|
|
77
|
+
- fix(vue/grid/src/edit/src/methods): [grid] fix-1383 The activeMethod … by @David-TechNomad in https://github.com/opentiny/tiny-vue/pull/1407
|
|
78
|
+
- fix(ci): fix e2e test pr commment by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1466
|
|
79
|
+
- fix(time-picker): fix time-picker components bug by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1461
|
|
80
|
+
- fix(theme/notify): [notify] word-break by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1464
|
|
81
|
+
|
|
82
|
+
### Other Changes
|
|
83
|
+
|
|
84
|
+
- chore: [date-picker] config playwright timezoneId by @kagol in https://github.com/opentiny/tiny-vue/pull/1253
|
|
85
|
+
- build(internal): fix inline chunk error by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1256
|
|
86
|
+
- feat(switch): [switch] amend demo and API bug of switch by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1257
|
|
87
|
+
- test(tag): [tag] improve unit testing of components by @Floyd-bit in https://github.com/opentiny/tiny-vue/pull/1261
|
|
88
|
+
- fix(build): fix build error and update versions by @zzcr in https://github.com/opentiny/tiny-vue/pull/1269
|
|
89
|
+
- docs(components): [anchor] Test document walkthrough by @chenxi-20 in https://github.com/opentiny/tiny-vue/pull/1274
|
|
90
|
+
- test(wizard): [wizard] improve unit testing of components by @Floyd-bit in https://github.com/opentiny/tiny-vue/pull/1275
|
|
91
|
+
- fix(collapse): [collapse] fix collapse api type by @wuyiping0628 in https://github.com/opentiny/tiny-vue/pull/1271
|
|
92
|
+
- test(TimeSelect): improve unit testing of TimeSelect Component by @AcWrong02 in https://github.com/opentiny/tiny-vue/pull/1270
|
|
93
|
+
- docs(sites): [grid] add custom pager in grid demo by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1288
|
|
94
|
+
- docs(sites): add v3.13.0 changelog by @zzcr in https://github.com/opentiny/tiny-vue/pull/1278
|
|
95
|
+
- feat(playground): add 3.13 version and change layoutReverse default by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1291
|
|
96
|
+
- docs(progress): [progress] Optimization Merge Example by @chenxi-20 in https://github.com/opentiny/tiny-vue/pull/1282
|
|
97
|
+
- feat(popconfirm): [popconfirm] optimize docs and API by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1301
|
|
98
|
+
- test(user-head): [user-head] improve unit testing of components by @Floyd-bit in https://github.com/opentiny/tiny-vue/pull/1296
|
|
99
|
+
- docs(modal/dialog-box): [modal,dialog-box] update docs by @James-9696 in https://github.com/opentiny/tiny-vue/pull/1287
|
|
100
|
+
- docs(tree): [tree] Clear redundant default-expand-all attribute descripttions by @Jevin0 in https://github.com/opentiny/tiny-vue/pull/1285
|
|
101
|
+
- docs(time-picker): [time-picker] optimize docs and demos by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1273
|
|
102
|
+
- feat(badge): [badge] optimize docs and API by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1302
|
|
103
|
+
- docs(TimeSelect): [TimeSelect]improve ths docs of TimeSelect by @AcWrong02 in https://github.com/opentiny/tiny-vue/pull/1283
|
|
104
|
+
- docs(date-picker): [date-picker] optimize date-picker docs by @kagol in https://github.com/opentiny/tiny-vue/pull/1320
|
|
105
|
+
- docs(container): [container] optimize docs and demos by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1333
|
|
106
|
+
- docs(site/notify): [notify] specification document by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1337
|
|
107
|
+
- docs(site/input): [input] specification document by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1336
|
|
108
|
+
- docs(site/loading): [loading] specification document by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1338
|
|
109
|
+
- docs(anchor):[anchor]Fixed mode on and off with text reversed by @fanbingbing16 in https://github.com/opentiny/tiny-vue/pull/1304
|
|
110
|
+
- feat(ci): add pr preview action by @mengqiuleo in https://github.com/opentiny/tiny-vue/pull/1351
|
|
111
|
+
- fix(site/loading): [loading] rectify loading size prop description by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1353
|
|
112
|
+
- docs(CONTRIBUTING): supplement the pr title description document by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1360
|
|
113
|
+
- docs(sites): add saas sites env by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1370
|
|
114
|
+
- fix(sites): add saas sites env by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1385
|
|
115
|
+
- chore(ci): add pr preview through vercel deploy by @kagol in https://github.com/opentiny/tiny-vue/pull/1388
|
|
116
|
+
- docs: optimize contributing guide docs by @kagol in https://github.com/opentiny/tiny-vue/pull/1382
|
|
117
|
+
- docs(time-select): [time-select] optimize docs and demos by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1403
|
|
118
|
+
- feat(autocomplete): [autocomplete] adapt to autocomplete smb themes by @wuyiping0628 in https://github.com/opentiny/tiny-vue/pull/1421
|
|
119
|
+
- docs(steps): optimize demo by @Huangyilin19 in https://github.com/opentiny/tiny-vue/pull/1415
|
|
120
|
+
- fix(ci): delete pr github action by @mengqiuleo in https://github.com/opentiny/tiny-vue/pull/1393
|
|
121
|
+
- ci: chat gpt code review by @GaoNeng-wWw in https://github.com/opentiny/tiny-vue/pull/1391
|
|
122
|
+
- (docs): update drag-outside-window of dialog-box by @James-9696 in https://github.com/opentiny/tiny-vue/pull/1376
|
|
123
|
+
- feat(collapse): [collapse] updata collapse xdesign by @wuyiping0628 in https://github.com/opentiny/tiny-vue/pull/1427
|
|
124
|
+
- feat(ci): e2e add vue2 by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1398
|
|
125
|
+
- docs(time-select): [time-select] optimize docs and demos by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1418
|
|
126
|
+
- fix(docs): update docs of fall-menu by @James-9696 in https://github.com/opentiny/tiny-vue/pull/1432
|
|
127
|
+
- fix(docs): update docs of dialog-box by @James-9696 in https://github.com/opentiny/tiny-vue/pull/1434
|
|
128
|
+
- fix(modal): [modal]optimize modal demo by @James-9696 in https://github.com/opentiny/tiny-vue/pull/1437
|
|
129
|
+
- docs(site/loading): [loading] improve documentation by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1451
|
|
130
|
+
- docs(site/popeditor): improve documentation by @yoyo201626 in https://github.com/opentiny/tiny-vue/pull/1438
|
|
131
|
+
- test(e2e): [grid]fix grid e2e test error by @zzcr in https://github.com/opentiny/tiny-vue/pull/1458
|
|
132
|
+
- docs(radio): [radio] optimize demo by @You-Hw-Y in https://github.com/opentiny/tiny-vue/pull/1462
|
|
133
|
+
- docs(sites): change apis doc and hidden form menu by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1472
|
|
134
|
+
- docs(sites): add 3.14 version playground by @gimmyhehe in https://github.com/opentiny/tiny-vue/pull/1470
|
|
135
|
+
|
|
136
|
+
## New Contributors
|
|
137
|
+
|
|
138
|
+
- @Jevin0 made their first contribution in https://github.com/opentiny/tiny-vue/pull/1241
|
|
139
|
+
- @mengqiuleo made their first contribution in https://github.com/opentiny/tiny-vue/pull/1340
|
|
140
|
+
- @liumingxiy made their first contribution in https://github.com/opentiny/tiny-vue/pull/1356
|
|
141
|
+
|
|
3
142
|
## v2.13.0/v3.13.0
|
|
4
143
|
|
|
5
144
|
`2024/01/05`
|
|
@@ -2,9 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction Components
|
|
4
4
|
|
|
5
|
-
`TinyVue`
|
|
5
|
+
`TinyVue` supports automatic import, multiple component import, single component import, and complete import.
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Auto import (recommended)
|
|
8
|
+
|
|
9
|
+
First, you need to install the plugin `@opentiny/unplugin-tiny-vue`.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i @opentiny/unplugin-tiny-vue -D
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Then, insert the following code into your project's `Vite` or `Webpack` configuration file.
|
|
16
|
+
|
|
17
|
+
Vite
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// vite.config.ts
|
|
21
|
+
|
|
22
|
+
import autoImportPlugin from '@opentiny/unplugin-tiny-vue'
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
plugins: [autoImportPlugin()]
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Webpack
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
// webpack.config.js
|
|
33
|
+
|
|
34
|
+
const autoImportPlugin = require('@opentiny/unplugin-tiny-vue')
|
|
35
|
+
|
|
36
|
+
module.exports = {
|
|
37
|
+
plugins: [autoImportPlugin()]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This way, you can directly use TinyVue components in your project. These components are automatically imported on demand, without the need for manual import, and you don't have to worry about the project size becoming too large.
|
|
42
|
+
|
|
43
|
+
For more information about automatic on-demand imports, please refer to [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) and [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import).
|
|
44
|
+
|
|
45
|
+
### Multi-component introduction
|
|
8
46
|
|
|
9
47
|
Multi-component reference is from the dependency package.`@opentiny/vue`Multiple components are referenced in. The following is an example (in the following figure)`Button`and`Alert`Component as an example):
|
|
10
48
|
|
|
@@ -2,9 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
## 引入组件
|
|
4
4
|
|
|
5
|
-
`TinyVue`
|
|
5
|
+
`TinyVue` 支持自动导入、多组件引入、单组件引入以及完整引入四种方式。
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### 自动导入(推荐)
|
|
8
|
+
|
|
9
|
+
首先你需要安装 `@opentiny/unplugin-tiny-vue` 这款插件。
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm i @opentiny/unplugin-tiny-vue -D
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
然后把以下代码插入到你项目的 `Vite` 或 `Webpack` 配置文件中。
|
|
16
|
+
|
|
17
|
+
Vite
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
// vite.config.ts
|
|
21
|
+
|
|
22
|
+
import autoImportPlugin from '@opentiny/unplugin-tiny-vue'
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
plugins: [autoImportPlugin()]
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Webpack
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
// webpack.config.js
|
|
33
|
+
|
|
34
|
+
const autoImportPlugin = require('@opentiny/unplugin-tiny-vue')
|
|
35
|
+
|
|
36
|
+
module.exports = {
|
|
37
|
+
plugins: [autoImportPlugin()]
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
这样你就能直接在项目中使用 TinyVue 的组件,这些组件都是自动按需导入的,无需手动导入,且不用担心项目体积变得太大。
|
|
42
|
+
|
|
43
|
+
想了解更多自动按需导入的信息,请参考:[unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) 和 [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)。
|
|
44
|
+
|
|
45
|
+
### 多组件引入
|
|
8
46
|
|
|
9
47
|
多组件引用即从依赖包 `@opentiny/vue` 中引用多个组件,参考示例如下(以 `Button` 和 `Alert` 组件为例):
|
|
10
48
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-docs",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@unocss/reset": "0.38.2",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"marked": "^4.3.0",
|
|
17
17
|
"sortablejs": "1.15.0",
|
|
18
18
|
"@opentiny/vue-repl": "^1.1.0",
|
|
19
|
-
"@opentiny/vue": "3.
|
|
20
|
-
"@opentiny/vue-icon
|
|
21
|
-
"@opentiny/vue-common": "3.
|
|
22
|
-
"@opentiny/vue-
|
|
23
|
-
"@opentiny/vue-
|
|
24
|
-
"@opentiny/vue-design-
|
|
25
|
-
"@opentiny/vue-theme": "3.
|
|
26
|
-
"@opentiny/vue-
|
|
27
|
-
"@opentiny/vue-design-smb": "3.13.0-alpha.1",
|
|
19
|
+
"@opentiny/vue": "~3.14.0",
|
|
20
|
+
"@opentiny/vue-icon": "~3.14.0",
|
|
21
|
+
"@opentiny/vue-common": "~3.14.0",
|
|
22
|
+
"@opentiny/vue-icon-saas": "~3.14.0",
|
|
23
|
+
"@opentiny/vue-design-aurora": "~3.14.0",
|
|
24
|
+
"@opentiny/vue-design-saas": "~3.14.0",
|
|
25
|
+
"@opentiny/vue-theme-mobile": "~3.14.0",
|
|
26
|
+
"@opentiny/vue-design-smb": "~3.14.0",
|
|
28
27
|
"@opentiny/vue-vite-import": "~1.1.5",
|
|
29
|
-
"@opentiny/vue-theme
|
|
28
|
+
"@opentiny/vue-theme": "~3.14.0",
|
|
29
|
+
"@opentiny/vue-theme-saas": "~3.14.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/markdown-it": "^12.2.3",
|
package/playground/App.vue
CHANGED
|
@@ -17,7 +17,7 @@ import logoUrl from './assets/opentiny-logo.svg?url'
|
|
|
17
17
|
import GitHub from './icons/Github.vue'
|
|
18
18
|
import Share from './icons/Share.vue'
|
|
19
19
|
|
|
20
|
-
const VERSION = 'tiny-vue-version-3.
|
|
20
|
+
const VERSION = 'tiny-vue-version-3.14'
|
|
21
21
|
const LAYOUT = 'playground-layout'
|
|
22
22
|
const LAYOUT_REVERSE = 'playground-layout-reverse'
|
|
23
23
|
|
|
@@ -28,7 +28,7 @@ const isMobileFirst = tinyMode === 'mobile-first'
|
|
|
28
28
|
const isSaas = tinyTheme === 'saas'
|
|
29
29
|
const isPreview = searchObj.get('openMode') === 'preview' // 是否多端弹窗预览
|
|
30
30
|
|
|
31
|
-
const versions = ['3.13', '3.12', '3.11', '3.10', '3.9', '3.8']
|
|
31
|
+
const versions = ['3.14', '3.13', '3.12', '3.11', '3.10', '3.9', '3.8']
|
|
32
32
|
const latestVersion = isPreview ? versions[0] : localStorage.getItem(VERSION) || versions[0]
|
|
33
33
|
const cdnHost = localStorage.getItem('setting-cdn')
|
|
34
34
|
const getRuntime = (version) => {
|
package/src/App.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="hp100 of-hidden">
|
|
3
|
-
<tiny-config-provider :design="designConfig">
|
|
3
|
+
<tiny-config-provider :design="designConfig" :key="currentThemeKey">
|
|
4
4
|
<router-view />
|
|
5
5
|
<tiny-modal :show-header="false" :show-footer="false" v-model="modalSHow" width="1400px" height="900px" resize>
|
|
6
6
|
<tiny-icon-close class="close-icon" @click="modalSHow = false"></tiny-icon-close>
|
|
@@ -41,7 +41,7 @@ export default defineComponent({
|
|
|
41
41
|
})
|
|
42
42
|
common.renderHeader()
|
|
43
43
|
})
|
|
44
|
-
const { designConfig } = useTheme()
|
|
44
|
+
const { designConfig, currentThemeKey } = useTheme()
|
|
45
45
|
|
|
46
46
|
provide('showPreview', (url) => {
|
|
47
47
|
previewUrl.value = url
|
|
@@ -50,6 +50,7 @@ export default defineComponent({
|
|
|
50
50
|
return {
|
|
51
51
|
appData,
|
|
52
52
|
designConfig,
|
|
53
|
+
currentThemeKey,
|
|
53
54
|
previewUrl,
|
|
54
55
|
modalSHow
|
|
55
56
|
}
|
package/src/const.ts
CHANGED
|
@@ -8,3 +8,30 @@ export const LANG_PATH_MAP = {
|
|
|
8
8
|
[ZH_CN_LANG]: 'zh-CN',
|
|
9
9
|
[EN_US_LANG]: 'en-US'
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
export const CURRENT_THEME_KEY = 'tiny-current-theme'
|
|
13
|
+
|
|
14
|
+
// 主题
|
|
15
|
+
export const DEFAULT_THEME = 'tiny-default-theme'
|
|
16
|
+
export const AURORA_THEME = 'tiny-aurora-theme'
|
|
17
|
+
export const SMB_THEME = 'tiny-smb-theme'
|
|
18
|
+
export const INFINITY_THEME = 'tiny-infinity-theme'
|
|
19
|
+
|
|
20
|
+
// 主题对应路由参数映射表
|
|
21
|
+
export const THEME_ROUTE_MAP = {
|
|
22
|
+
[DEFAULT_THEME]: 'os-theme',
|
|
23
|
+
[AURORA_THEME]: 'aurora-theme',
|
|
24
|
+
[SMB_THEME]: 'smb-theme',
|
|
25
|
+
[INFINITY_THEME]: 'infinity-theme'
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description 在一对一映射的对象中,通过值反查key
|
|
30
|
+
* @param map 给定的映射
|
|
31
|
+
* @param val 值
|
|
32
|
+
* @returns 对应值的key
|
|
33
|
+
*/
|
|
34
|
+
export const getKeyByValue = (map, val) =>
|
|
35
|
+
Object.keys(map).find((key) => {
|
|
36
|
+
return map[key] === val
|
|
37
|
+
})
|
package/src/router.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
2
|
import Layout from '@/views/layout/layout.vue'
|
|
3
|
-
import { LANG_KEY, LANG_PATH_MAP, ZH_CN_LANG } from './const'
|
|
3
|
+
import { LANG_KEY, LANG_PATH_MAP, ZH_CN_LANG, CURRENT_THEME_KEY, THEME_ROUTE_MAP, DEFAULT_THEME } from './const'
|
|
4
4
|
import { $local } from './tools/storage'
|
|
5
5
|
|
|
6
6
|
const Components = () => import('@/views/components/components.vue')
|
|
@@ -12,7 +12,7 @@ const context = import.meta.env.VITE_CONTEXT
|
|
|
12
12
|
let routes = [
|
|
13
13
|
// 组件总览
|
|
14
14
|
{
|
|
15
|
-
path: `${context}:all?/:lang/overview`,
|
|
15
|
+
path: `${context}:all?/:lang/:theme/overview`,
|
|
16
16
|
component: Layout,
|
|
17
17
|
name: 'overview',
|
|
18
18
|
children: [{ name: 'Overview', path: '', component: Overview, meta: { title: '组件总览 | TinyVue' } }]
|
|
@@ -37,7 +37,9 @@ let routes = [
|
|
|
37
37
|
redirect: () => {
|
|
38
38
|
const lang = $local[LANG_KEY]
|
|
39
39
|
const langPath = LANG_PATH_MAP[lang] || LANG_PATH_MAP[ZH_CN_LANG]
|
|
40
|
-
|
|
40
|
+
const themeKey = localStorage.getItem(CURRENT_THEME_KEY)
|
|
41
|
+
const theme = THEME_ROUTE_MAP[themeKey] || THEME_ROUTE_MAP[DEFAULT_THEME]
|
|
42
|
+
return { path: `${context}${langPath}/${theme}/overview` }
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
45
|
]
|
package/src/tools/useTheme.js
CHANGED
|
@@ -2,87 +2,97 @@ import { watch, computed } from 'vue'
|
|
|
2
2
|
import TinyThemeTool from '@opentiny/vue-theme/theme-tool'
|
|
3
3
|
import { tinyAuroraTheme, tinySmbTheme, tinyInfinityTheme } from '@opentiny/vue-theme/theme'
|
|
4
4
|
import { hooks } from '@opentiny/vue-common'
|
|
5
|
-
import { Notify } from '@opentiny/vue'
|
|
6
5
|
import designSmbConfig from '@opentiny/vue-design-smb'
|
|
7
6
|
import designAuroraConfig from '@opentiny/vue-design-aurora'
|
|
8
7
|
import designSaasConfig from '@opentiny/vue-design-saas'
|
|
8
|
+
import { router } from '@/router'
|
|
9
9
|
import { appData } from './appData'
|
|
10
|
+
import {
|
|
11
|
+
THEME_ROUTE_MAP,
|
|
12
|
+
CURRENT_THEME_KEY,
|
|
13
|
+
DEFAULT_THEME,
|
|
14
|
+
AURORA_THEME,
|
|
15
|
+
SMB_THEME,
|
|
16
|
+
INFINITY_THEME,
|
|
17
|
+
getKeyByValue
|
|
18
|
+
} from '../const'
|
|
10
19
|
|
|
11
|
-
const
|
|
20
|
+
const themeMap = {
|
|
21
|
+
[DEFAULT_THEME]: null,
|
|
22
|
+
[AURORA_THEME]: tinyAuroraTheme,
|
|
23
|
+
[SMB_THEME]: tinySmbTheme,
|
|
24
|
+
[INFINITY_THEME]: tinyInfinityTheme
|
|
25
|
+
}
|
|
12
26
|
|
|
13
27
|
const isEn = appData.lang === 'enUS'
|
|
14
28
|
|
|
15
29
|
const themeData = [
|
|
16
|
-
{ value:
|
|
17
|
-
{ value:
|
|
18
|
-
{ value:
|
|
19
|
-
{ value:
|
|
30
|
+
{ value: [DEFAULT_THEME], label: isEn ? 'Default Theme' : '默认主题' },
|
|
31
|
+
{ value: [INFINITY_THEME], label: isEn ? 'Infinity Theme' : '无限主题' },
|
|
32
|
+
{ value: [AURORA_THEME], label: isEn ? 'Aurora Theme' : 'Aurora 主题' },
|
|
33
|
+
{ value: [SMB_THEME], label: isEn ? 'SMB Theme' : 'SMB 主题' }
|
|
20
34
|
]
|
|
21
35
|
|
|
22
36
|
const designConfigMap = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
let isShowTip = false
|
|
29
|
-
function showTip() {
|
|
30
|
-
Notify({
|
|
31
|
-
type: 'info',
|
|
32
|
-
title: '请注意',
|
|
33
|
-
message: '主题切换成功,如有部分主题样式不生效,请尝试手动刷新页面即可',
|
|
34
|
-
position: 'top-right',
|
|
35
|
-
duration: 3000,
|
|
36
|
-
verticalOffset: 200
|
|
37
|
-
})
|
|
38
|
-
isShowTip = true
|
|
37
|
+
[DEFAULT_THEME]: {},
|
|
38
|
+
[INFINITY_THEME]: {},
|
|
39
|
+
[AURORA_THEME]: designAuroraConfig,
|
|
40
|
+
[SMB_THEME]: designSmbConfig
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
const theme = new TinyThemeTool()
|
|
42
|
-
const lastThemeKey = localStorage.getItem(CURRENT_THEME_KEY)
|
|
43
|
-
const currThemeLabel = hooks.ref(lastThemeKey || 'tiny-default-theme')
|
|
44
|
-
const designConfig = computed(() => {
|
|
45
|
-
if (import.meta.env.VITE_TINY_THEME === 'saas') {
|
|
46
|
-
return designSaasConfig
|
|
47
|
-
}
|
|
48
|
-
return designConfigMap[currThemeLabel.value]
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
const THEME_MAP = {
|
|
52
|
-
'tiny-aurora-theme': tinyAuroraTheme,
|
|
53
|
-
'tiny-smb-theme': tinySmbTheme,
|
|
54
|
-
'tiny-infinity-theme': tinyInfinityTheme
|
|
55
|
-
}
|
|
56
44
|
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
}
|
|
45
|
+
const defaultThemeKey = DEFAULT_THEME
|
|
46
|
+
const currentThemeKey = hooks.ref(defaultThemeKey)
|
|
60
47
|
|
|
61
48
|
watch(
|
|
62
|
-
() =>
|
|
49
|
+
() => currentThemeKey.value,
|
|
63
50
|
(newVal) => {
|
|
64
51
|
localStorage.setItem(CURRENT_THEME_KEY, newVal)
|
|
65
|
-
theme.changeTheme(
|
|
66
|
-
// 若部分主题样式切换不生效,第一次则提示用户需要手动刷新
|
|
67
|
-
if (!isShowTip) {
|
|
68
|
-
showTip()
|
|
69
|
-
}
|
|
52
|
+
theme.changeTheme(themeMap[newVal])
|
|
70
53
|
}
|
|
71
54
|
)
|
|
72
55
|
|
|
73
|
-
|
|
74
|
-
if (
|
|
75
|
-
|
|
56
|
+
const designConfig = computed(() => {
|
|
57
|
+
if (import.meta.env.VITE_TINY_THEME === 'saas') {
|
|
58
|
+
return designSaasConfig
|
|
59
|
+
}
|
|
60
|
+
return designConfigMap[currentThemeKey.value]
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const changeTheme = (themeKey) => {
|
|
64
|
+
router.push({
|
|
65
|
+
params: {
|
|
66
|
+
theme: THEME_ROUTE_MAP[themeKey]
|
|
67
|
+
}
|
|
68
|
+
})
|
|
76
69
|
}
|
|
77
70
|
|
|
78
71
|
// 返回拷贝,防止原始数据被修改
|
|
79
72
|
const getThemeData = () => JSON.parse(JSON.stringify(themeData))
|
|
80
73
|
|
|
74
|
+
let initWatchRoute = false
|
|
75
|
+
const watchRoute = () => {
|
|
76
|
+
if (initWatchRoute) {
|
|
77
|
+
return
|
|
78
|
+
}
|
|
79
|
+
initWatchRoute = true
|
|
80
|
+
watch(
|
|
81
|
+
() => router.currentRoute.value.params.theme,
|
|
82
|
+
(val) => {
|
|
83
|
+
const themeKey = getKeyByValue(THEME_ROUTE_MAP, val)
|
|
84
|
+
currentThemeKey.value = themeKey || defaultThemeKey
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
81
89
|
export default function useTheme() {
|
|
90
|
+
watchRoute()
|
|
82
91
|
return {
|
|
83
92
|
getThemeData,
|
|
84
93
|
changeTheme,
|
|
85
|
-
|
|
86
|
-
designConfig
|
|
94
|
+
currentThemeKey,
|
|
95
|
+
designConfig,
|
|
96
|
+
defaultTheme: THEME_ROUTE_MAP[defaultThemeKey]
|
|
87
97
|
}
|
|
88
98
|
}
|