@sdata/web-vue 4.4.3 → 4.5.1
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/dist/sd.css +74 -9
- package/dist/sd.min.css +2 -2
- package/es/_components/auto-tooltip/auto-tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/client-only.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/feedback-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/icon-hover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/input-label/input-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input-range.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/picker/input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-observer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/resize-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/select-view/select-view.vue.d.ts +1 -1
- package/es/_components/select-view/select-view.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/_components/transition/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/_components/virtual-list/virtual-list.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/_hooks/use-component-ref.d.ts +1 -1
- package/es/_hooks/use-responsive.js +6 -1
- package/es/_hooks/use-scrollbar.js +1 -1
- package/es/_utils/color.js +1 -1
- package/es/_utils/date.d.ts +1 -1
- package/es/_utils/date.js +6 -3
- package/es/_utils/debounce.d.ts +4 -1
- package/es/_utils/debounce.js +8 -1
- package/es/_utils/get-value-by-path.d.ts +1 -0
- package/es/_utils/get-value-by-path.js +9 -9
- package/es/_utils/global-config.js +1 -1
- package/es/_utils/omit.js +1 -1
- package/es/_utils/responsive-observe.js +1 -1
- package/es/_utils/virtual-dropdown.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/asyncToGenerator.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/defineProperty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/extends.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectDestructuringEmpty.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectSpread2.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectWithoutProperties.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/objectWithoutPropertiesLoose.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/toPrimitive.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/toPropertyKey.js +1 -1
- package/es/_virtual/{_@oxc-project_runtime@0.146.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/typeof.js +1 -1
- package/es/affix/affix.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/alert/alert.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/anchor/anchor-link.vue_vue_type_script_setup_true_lang.js +8 -4
- package/es/anchor/anchor.vue_vue_type_script_setup_true_lang.js +18 -5
- package/es/anchor/utils.d.ts +1 -1
- package/es/anchor/utils.js +4 -2
- package/es/auto-complete/auto-complete.vue.d.ts +4 -4
- package/es/auto-complete/auto-complete.vue_vue_type_script_setup_true_lang.js +22 -9
- package/es/avatar/avatar-group.vue_vue_type_script_setup_true_lang.js +16 -23
- package/es/avatar/avatar.vue_vue_type_script_setup_true_lang.js +36 -20
- package/es/avatar/style/index.css +4 -0
- package/es/avatar/style/index.scss +5 -0
- package/es/back-top/back-top.vue_vue_type_script_setup_true_lang.js +24 -13
- package/es/badge/badge.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/basic-crud-table/basic-crud-modal.vue.d.ts +1 -1
- package/es/basic-crud-table/basic-crud-modal.vue_vue_type_script_setup_true_lang.js +24 -15
- package/es/basic-crud-table/basic-crud-table.vue.d.ts +4 -4
- package/es/basic-crud-table/basic-crud-table.vue_vue_type_script_setup_true_lang.js +58 -37
- package/es/basic-crud-table/index.d.ts +12 -12
- package/es/bloom-menu/bloom-menu.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/border-beam/border-beam.vue_vue_type_script_setup_true_lang.js +64 -22
- package/es/border-beam/styles.js +20 -7
- package/es/breadcrumb/breadcrumb-item.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/breadcrumb/breadcrumb.vue_vue_type_script_setup_true_lang.js +6 -4
- package/es/button/button-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/button/button.vue_vue_type_script_setup_true_lang.js +19 -13
- package/es/button/index.d.ts +3 -3
- package/es/calendar/__test__/real-transitions.js +10 -0
- package/es/calendar/components/cell.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/calendar/components/event.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/calendar/components/header.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/calendar/components/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/calendar/core/config.js +17 -20
- package/es/calendar/core/events.js +59 -41
- package/es/calendar/core/i18n.d.ts +1 -1
- package/es/calendar/core/i18n.js +2 -2
- package/es/calendar/core/index.d.ts +6 -6
- package/es/calendar/core/index.js +1 -1
- package/es/calendar/core/view.js +10 -7
- package/es/calendar/modules/drag-and-drop.js +80 -30
- package/es/calendar/utils/date.d.ts +4 -4
- package/es/calendar/utils/date.js +20 -11
- package/es/card/card-actions.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/card/card-grid.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/card/card-meta.vue_vue_type_script_setup_true_lang.js +13 -10
- package/es/card/card.vue_vue_type_script_setup_true_lang.js +17 -11
- package/es/card/context.d.ts +2 -0
- package/es/carousel/carousel-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-indicator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/carousel/carousel.vue_vue_type_script_setup_true_lang.js +13 -10
- package/es/cascader/base-cascader-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader-column.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/cascader/cascader-option.vue_vue_type_script_setup_true_lang.js +8 -21
- package/es/cascader/cascader-panel.vue_vue_type_script_setup_true_lang.js +27 -12
- package/es/cascader/cascader-search-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/cascader/cascader.vue.d.ts +1 -1
- package/es/cascader/cascader.vue_vue_type_script_setup_true_lang.js +37 -17
- package/es/cascader/context.d.ts +2 -2
- package/es/cascader/hooks/use-lazy-load.d.ts +6 -0
- package/es/cascader/hooks/use-lazy-load.js +35 -0
- package/es/cascader/interface.d.ts +4 -0
- package/es/cascader/utils.d.ts +2 -2
- package/es/cascader/utils.js +10 -8
- package/es/checkbox/checkbox-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/checkbox/checkbox.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/checkbox/icon-check.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/collapse/collapse-item.vue_vue_type_script_setup_true_lang.js +17 -2
- package/es/collapse/collapse.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/color-picker.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/color-picker/control-bar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/gradient-thumb.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/color-picker/hooks/use-control-block.js +5 -1
- package/es/color-picker/palette.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/color-picker/panel.vue_vue_type_script_setup_true_lang.js +31 -12
- package/es/color-picker/utils.js +1 -1
- package/es/comment/comment.vue_vue_type_script_setup_true_lang.js +7 -15
- package/es/config-provider/config-provider.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/config-provider/context.d.ts +5 -1
- package/es/config-provider/context.js +2 -1
- package/es/config-provider/global-theme.d.ts +3 -0
- package/es/config-provider/global-theme.js +49 -0
- package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +39 -37
- package/es/config-provider/theme.d.ts +1 -0
- package/es/config-provider/theme.js +5 -3
- package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +33 -25
- package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +38 -6
- package/es/date-picker/hooks/use-is-disabled-date.d.ts +2 -2
- package/es/date-picker/hooks/use-is-disabled-date.js +4 -5
- package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
- package/es/date-picker/index.d.ts +28 -0
- package/es/date-picker/panels/body.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/date/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/panels/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/month/index.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/date-picker/panels/quarter/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/shortcuts.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/week-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/panels/year/index.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/picker.vue_vue_type_script_setup_true_lang.js +11 -3
- package/es/date-picker/pickers/date-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/month-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/quarter-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/week-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/pickers/year-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/date-picker/range-picker.vue.d.ts +28 -0
- package/es/date-picker/range-picker.vue_vue_type_script_setup_true_lang.js +24 -3
- package/es/descriptions/descriptions-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/descriptions/descriptions.vue_vue_type_script_setup_true_lang.js +10 -9
- package/es/descriptions/interface.d.ts +1 -0
- package/es/divider/divider.vue_vue_type_script_setup_true_lang.js +5 -3
- package/es/drawer/drawer.vue_vue_type_script_setup_true_lang.js +28 -24
- package/es/drawer/index.js +2 -2
- package/es/dropdown/dropdown-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/dropdown/dropdown-option.vue_vue_type_script_setup_true_lang.js +3 -6
- package/es/dropdown/dropdown-panel.vue_vue_type_script_setup_true_lang.js +15 -13
- package/es/dropdown/dropdown-submenu.vue_vue_type_script_setup_true_lang.js +17 -13
- package/es/dropdown/dropdown.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/ellipsis/ellipsis.vue.d.ts +2 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_setup_true_lang.js +23 -8
- package/es/ellipsis/index.d.ts +3 -0
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_setup_true_lang.js +24 -9
- package/es/empty/empty.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +34 -18
- package/es/file-previewer/pdfjs-worker.min.mjs +4 -4
- package/es/file-previewer/use-pdf-js.js +57 -38
- package/es/form/form-item-label.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item-message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/form/form-item.vue_vue_type_script_setup_true_lang.js +54 -15
- package/es/form/form.vue_vue_type_script_setup_true_lang.js +11 -8
- package/es/grid/context.d.ts +2 -2
- package/es/grid/grid-col.vue_vue_type_script_setup_true_lang.js +8 -7
- package/es/grid/grid-item.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/grid/grid-row.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/grid/grid.vue_vue_type_script_setup_true_lang.js +11 -12
- package/es/grid/style/col.scss +2 -2
- package/es/grid/style/index.css +42 -0
- package/es/grid/utils/index.js +5 -2
- package/es/icon/icon-arrow-up/icon-arrow-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-calendar/icon-calendar.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-down/icon-caret-down.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-left/icon-caret-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-right/icon-caret-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-caret-up/icon-caret-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-check/icon-check.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-check-circle-fill/icon-check-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-clock-circle/icon-clock-circle.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-close/icon-close.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-close-circle-fill/icon-close-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-copy/icon-copy.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-delete/icon-delete.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-double-left/icon-double-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-double-right/icon-double-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-down/icon-down.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-drag-dot/icon-drag-dot.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-drag-dot-vertical/icon-drag-dot-vertical.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-edit/icon-edit.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-empty/icon-empty.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-exclamation/icon-exclamation.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-exclamation-circle-fill/icon-exclamation-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-eye/icon-eye.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-eye-invisible/icon-eye-invisible.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-frown-fill/icon-face-frown-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-meh-fill/icon-face-meh-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-face-smile-fill/icon-face-smile-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file/icon-file.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-audio/icon-file-audio.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-image/icon-file-image.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-pdf/icon-file-pdf.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-file-video/icon-file-video.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-filter/icon-filter.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-fullscreen/icon-fullscreen.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-image-close/icon-image-close.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-info/icon-info.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-info-circle-fill/icon-info-circle-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-left/icon-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-link/icon-link.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-list/icon-list.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-loading/icon-loading.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu/icon-menu.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu-fold/icon-menu-fold.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-menu-unfold/icon-menu-unfold.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-minus/icon-minus.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-more/icon-more.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-mute/icon-mute.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-oblique-line/icon-oblique-line.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-original-size/icon-original-size.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-pause/icon-pause.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-play-arrow-fill/icon-play-arrow-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-plus/icon-plus.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-question-circle/icon-question-circle.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-right/icon-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-rotate-left/icon-rotate-left.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-rotate-right/icon-rotate-right.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-search/icon-search.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-star-fill/icon-star-fill.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-to-top/icon-to-top.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-up/icon-up.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-upload/icon-upload.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-voice/icon-voice.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-zoom-in/icon-zoom-in.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon/icon-zoom-out/icon-zoom-out.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/icon-component/add-from-icon-font-cn.js +5 -1
- package/es/icon-component/icon-font.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/icon-component/icon.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/icon.js +292 -292
- package/es/image/hooks/use-image-drag.js +4 -2
- package/es/image/image-footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/image.vue_vue_type_script_setup_true_lang.js +14 -10
- package/es/image/preview-action.vue.d.ts +6 -2
- package/es/image/preview-action.vue_vue_type_script_setup_true_lang.js +12 -3
- package/es/image/preview-arrow.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview-group.vue_vue_type_script_setup_true_lang.js +7 -9
- package/es/image/preview-toolbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/image/preview.vue_vue_type_script_setup_true_lang.js +17 -22
- package/es/index.css +74 -9
- package/es/index.d.ts +6 -6
- package/es/input/index.d.ts +3 -3
- package/es/input/input-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-password.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/input/input-search.vue.d.ts +1 -1
- package/es/input/input-search.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/input/input.vue_vue_type_script_setup_true_lang.js +7 -8
- package/es/input-mask/input-mask.vue_vue_type_script_setup_true_lang.js +14 -7
- package/es/input-mask/mask-engine.js +1 -1
- package/es/input-number/decimal.d.ts +3 -0
- package/es/input-number/decimal.js +49 -0
- package/es/input-number/input-number.vue_vue_type_script_setup_true_lang.js +60 -27
- package/es/input-tag/input-tag.vue_vue_type_script_setup_true_lang.js +34 -16
- package/es/input-tag/utils.js +1 -1
- package/es/json-form/json-form-component.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/json-form/json-form-item.vue_vue_type_script_setup_true_lang.js +6 -3
- package/es/json-form/json-form.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/json-form/utils.js +4 -2
- package/es/kv-list/kv-list-row.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/kv-list/kv-list.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/layout/content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/footer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/layout.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/layout/sider.vue_vue_type_script_setup_true_lang.js +6 -1
- package/es/link/link.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/index.d.ts +3 -3
- package/es/list/list-item-meta.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/list/list.vue.d.ts +1 -1
- package/es/list/list.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/locale/interface.d.ts +4 -0
- package/es/locale/lang/en-us.js +4 -0
- package/es/locale/lang/zh-cn.js +4 -0
- package/es/mention/mention.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/base-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/indent.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/overflow-wrap.vue_vue_type_script_setup_true_lang.js +13 -3
- package/es/menu/sub-menu-inline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu-pop.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/menu/sub-menu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/index.js +2 -1
- package/es/message/message-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/message/message.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/modal/hooks/use-draggable.js +3 -1
- package/es/modal/index.js +2 -2
- package/es/modal/modal.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/model-selector/model-selector-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-dialog.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-empty.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-logo.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-name.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-separator.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-shortcut.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector-trigger.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/model-selector/model-selector.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/index.js +5 -2
- package/es/notification/notification-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/notification/notification.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/number-flow/number-flow-group.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/number-flow/number-flow.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/page-header/page-header.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/pagination/interface.d.ts +1 -0
- package/es/pagination/page-item-ellipsis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item-step.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-jumper.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/page-options.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/pagination/pagination.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popconfirm/popconfirm.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/popover/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/circle.vue_vue_type_script_setup_true_lang.js +5 -5
- package/es/progress/line.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/progress/progress.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/progress/steps.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/qr-code/qr-code.vue_vue_type_script_setup_true_lang.js +23 -12
- package/es/radio/radio-group.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/radio/radio.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rate/rate.vue_vue_type_script_setup_true_lang.js +9 -7
- package/es/regex-vis/layout.js +1 -1
- package/es/regex-vis/parser/parser.js +1 -1
- package/es/regex-vis/regex-vis.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/resize-box/resize-box.vue_vue_type_script_setup_true_lang.js +7 -3
- package/es/result/403.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/404.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/500.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/result/index.d.ts +7 -6
- package/es/result/result.vue.d.ts +2 -2
- package/es/result/result.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/rich-text-editor/nodes/inline-component-node.js +1 -1
- package/es/rich-text-editor/rich-text-editor.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/rich-text-editor/rich-text-node-renderer.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/scrollbar/scrollbar.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sd-vue.js +1 -1
- package/es/secret/index.d.ts +4 -15
- package/es/secret/interface.d.ts +6 -0
- package/es/secret/secret.vue.d.ts +1 -5
- package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +5 -4
- package/es/select/hooks/use-options.js +1 -1
- package/es/select/index.d.ts +3 -3
- package/es/select/interface.d.ts +5 -0
- package/es/select/select-dropdown.vue.d.ts +3 -1
- package/es/select/select-dropdown.vue_vue_type_script_setup_true_lang.js +9 -5
- package/es/select/select.vue.d.ts +1 -1
- package/es/select/select.vue_vue_type_script_setup_true_lang.js +3 -2
- package/es/select/utils.js +1 -1
- package/es/selectable-card/index.d.ts +4 -52
- package/es/selectable-card/selectable-card.vue.d.ts +3 -20
- package/es/selectable-card/selectable-card.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/selectable-card/types.d.ts +17 -0
- package/es/sender/sender-header.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-recording-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-skill-tag.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-stop-loading-icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender-switch.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/sender/sender.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/index.d.ts +1 -0
- package/es/skeleton/interface.d.ts +14 -0
- package/es/skeleton/line.vue_vue_type_script_setup_true_lang.js +6 -8
- package/es/skeleton/shape.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/skeleton/skeleton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-button.vue_vue_type_script_setup_true_lang.js +9 -4
- package/es/slider/slider-dots.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-marks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider-ticks.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/slider/slider.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/space/space.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/dot-loading.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/spin/spin.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/split/index.d.ts +1 -0
- package/es/split/interface.d.ts +7 -7
- package/es/split/split.vue_vue_type_script_setup_true_lang.js +8 -4
- package/es/statistic/countdown.vue_vue_type_script_setup_true_lang.js +2 -1
- package/es/statistic/statistic.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/steps/index.d.ts +2 -0
- package/es/steps/step.vue_vue_type_script_setup_true_lang.js +7 -2
- package/es/steps/steps.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/switch/index.d.ts +4 -3
- package/es/switch/switch.vue.d.ts +1 -1
- package/es/switch/switch.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/table/index.d.ts +3 -3
- package/es/table/table-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-operation-td.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-operation-th.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-tbody.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-td.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-th.vue_vue_type_script_setup_true_lang.js +14 -3
- package/es/table/table-thead.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table-tr.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/table/table.vue.d.ts +1 -1
- package/es/table/table.vue_vue_type_script_setup_true_lang.js +14 -5
- package/es/table/utils.js +1 -1
- package/es/tabs/index.d.ts +19 -57
- package/es/tabs/style/index.css +17 -1
- package/es/tabs/style/index.scss +17 -1
- package/es/tabs/tab-pane.vue.d.ts +1 -13
- package/es/tabs/tab-pane.vue_vue_type_script_setup_true_lang.js +26 -5
- package/es/tabs/tabs-button.vue_vue_type_script_setup_true_lang.js +9 -3
- package/es/tabs/tabs-nav-ink.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tabs/tabs-nav.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/tabs/tabs-tab.vue_vue_type_script_setup_true_lang.js +10 -5
- package/es/tabs/tabs.vue_vue_type_script_setup_true_lang.js +8 -7
- package/es/tag/index.d.ts +10 -10
- package/es/tag/tag.vue.d.ts +4 -4
- package/es/tag/tag.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +6 -2
- package/es/textarea/index.d.ts +1 -0
- package/es/textarea/style/index.css +2 -2
- package/es/textarea/style/index.scss +3 -2
- package/es/textarea/textarea.vue_vue_type_script_setup_true_lang.js +4 -4
- package/es/theme-provider/index.d.ts +1 -0
- package/es/thinking-orb/engine/profiles.js +1 -1
- package/es/thinking-orb/presets.js +1 -1
- package/es/thinking-orb/thinking-orb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/index.d.ts +1 -0
- package/es/time-picker/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/range-panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-column.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/time-picker/time-picker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/index.d.ts +2 -0
- package/es/timeline/item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/timeline/timeline.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/toolbar/toolbar.vue_vue_type_script_setup_true_lang.js +8 -2
- package/es/tooltip/tooltip.vue_vue_type_script_setup_true_lang.js +2 -2
- package/es/tour/tour.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/transfer/index.d.ts +1 -0
- package/es/transfer/transfer-list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer-view.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/transfer/transfer.vue_vue_type_script_setup_true_lang.js +3 -5
- package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/expand-transition.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node-switcher.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/node.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/transition-node-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/tree/utils/tree-data.js +1 -1
- package/es/tree-select/hooks/use-filter-tree-node.js +2 -1
- package/es/tree-select/hooks/use-selected-state.js +1 -1
- package/es/tree-select/panel.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/tree-select/tree-select.vue.d.ts +1 -1
- package/es/tree-select/tree-select.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/trigger/interface.d.ts +4 -1
- package/es/trigger/trigger.vue_vue_type_script_setup_true_lang.js +11 -5
- package/es/typography/base.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/edit-content.vue_vue_type_script_setup_true_lang.js +5 -2
- package/es/typography/operations.vue_vue_type_script_setup_true_lang.js +4 -2
- package/es/typography/paragraph.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/text.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/title.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography-operations.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/typography.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/typography/utils/inner-text-renderer.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/style/index.css +9 -6
- package/es/upload/style/index.scss +12 -6
- package/es/upload/upload-button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-list-item.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-list.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/upload/upload-picture-item.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/upload/upload-progress.vue_vue_type_script_setup_true_lang.js +42 -11
- package/es/upload/upload.vue_vue_type_script_setup_true_lang.js +1 -1
- package/es/verification-code/index.d.ts +1 -0
- package/es/verification-code/verification-code.vue_vue_type_script_setup_true_lang.js +3 -3
- package/es/watermark/hooks/use-mutation-observer.js +1 -1
- package/es/watermark/index.d.ts +5 -3
- package/es/watermark/watermark.vue_vue_type_script_setup_true_lang.js +4 -1
- package/json/vetur-attributes.json +4 -0
- package/json/vetur-tags.json +2 -1
- package/json/web-types.json +9 -1
- package/package.json +9 -9
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { isNull, isUndefined } from "../_utils/is.js";
|
|
3
3
|
import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
|
|
4
4
|
import { cascaderInjectionKey } from "./context.js";
|
|
5
5
|
import { getCheckedStatus, getLeafOptionInfos, getLeafOptionKeys, getOptionInfos, getValidValues, getValueKey } from "./utils.js";
|
|
6
6
|
import base_cascader_panel_default from "./base-cascader-panel.js";
|
|
7
|
+
import { useLazyLoad } from "./hooks/use-lazy-load.js";
|
|
7
8
|
import { useSelectedPath } from "./hooks/use-selected-path.js";
|
|
8
9
|
import { computed, createBlock, createSlots, defineComponent, openBlock, provide, reactive, ref, renderSlot, toRefs, unref, useSlots, watch, withCtx } from "vue";
|
|
9
10
|
//#region components/cascader/cascader-panel.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -62,8 +63,14 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
62
63
|
const leafOptionSet = reactive(/* @__PURE__ */ new Set());
|
|
63
64
|
const lazyLoadOptions = reactive({});
|
|
64
65
|
const addLazyLoadOptions = (children, key) => {
|
|
65
|
-
|
|
66
|
+
var _optionMap$get;
|
|
67
|
+
const source = (_optionMap$get = optionMap.get(key)) === null || _optionMap$get === void 0 ? void 0 : _optionMap$get.raw;
|
|
68
|
+
if (source) lazyLoadOptions[key] = {
|
|
69
|
+
source,
|
|
70
|
+
children
|
|
71
|
+
};
|
|
66
72
|
};
|
|
73
|
+
const { loadOption, isLoading } = useLazyLoad(loadMore, optionMap, addLazyLoadOptions);
|
|
67
74
|
const DEFAULT_FIELD_NAMES = {
|
|
68
75
|
value: "value",
|
|
69
76
|
label: "label",
|
|
@@ -76,7 +83,10 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
76
83
|
watch([
|
|
77
84
|
options,
|
|
78
85
|
lazyLoadOptions,
|
|
79
|
-
mergedFieldNames
|
|
86
|
+
mergedFieldNames,
|
|
87
|
+
loadMore,
|
|
88
|
+
checkStrictly,
|
|
89
|
+
valueKey
|
|
80
90
|
], ([_options, _lazyLoadOptions, _fieldNames]) => {
|
|
81
91
|
optionMap.clear();
|
|
82
92
|
leafOptionMap.clear();
|
|
@@ -140,6 +150,8 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
140
150
|
}
|
|
141
151
|
};
|
|
142
152
|
const handleClickOption = (option, checked) => {
|
|
153
|
+
if (option.disabled || option.selectionDisabled) return;
|
|
154
|
+
if (!props.multiple && !props.checkStrictly && !option.isLeaf) return;
|
|
143
155
|
if (props.multiple) selectMultiple(option, checked !== null && checked !== void 0 ? checked : true);
|
|
144
156
|
else selectSingle(option);
|
|
145
157
|
};
|
|
@@ -152,8 +164,8 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
152
164
|
onClickOption: handleClickOption,
|
|
153
165
|
setActiveKey,
|
|
154
166
|
setSelectedPath,
|
|
155
|
-
|
|
156
|
-
|
|
167
|
+
loadOption,
|
|
168
|
+
isLoading,
|
|
157
169
|
slots,
|
|
158
170
|
valueMap: computedValueMap,
|
|
159
171
|
expandTrigger,
|
|
@@ -161,10 +173,11 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
161
173
|
}));
|
|
162
174
|
const handleKeyDown = getKeyDownHandler(/* @__PURE__ */ new Map([
|
|
163
175
|
[KEYBOARD_KEY.ENTER, (_ev) => {
|
|
164
|
-
if (activeOption.value) {
|
|
176
|
+
if (activeOption.value && !activeOption.value.disabled) {
|
|
165
177
|
let checked;
|
|
166
178
|
if (props.checkStrictly || activeOption.value.isLeaf) checked = !computedValueMap.value.has(activeOption.value.key);
|
|
167
179
|
else checked = !getCheckedStatus(activeOption.value, computedValueMap.value).checked;
|
|
180
|
+
loadOption(activeOption.value);
|
|
168
181
|
setSelectedPath(activeOption.value.key);
|
|
169
182
|
handleClickOption(activeOption.value, checked);
|
|
170
183
|
}
|
|
@@ -180,18 +193,20 @@ var cascader_panel_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
180
193
|
setActiveKey(activeNode === null || activeNode === void 0 ? void 0 : activeNode.key);
|
|
181
194
|
}],
|
|
182
195
|
[KEYBOARD_KEY.ARROW_RIGHT, (ev) => {
|
|
183
|
-
var _activeOption$value;
|
|
184
196
|
ev.preventDefault();
|
|
185
|
-
if (
|
|
186
|
-
|
|
197
|
+
if (activeOption.value && !activeOption.value.disabled) {
|
|
198
|
+
loadOption(activeOption.value);
|
|
187
199
|
setSelectedPath(activeOption.value.key);
|
|
188
|
-
|
|
200
|
+
if (activeOption.value.children) {
|
|
201
|
+
var _activeOption$value$c;
|
|
202
|
+
setActiveKey((_activeOption$value$c = activeOption.value.children.find((option) => !option.disabled)) === null || _activeOption$value$c === void 0 ? void 0 : _activeOption$value$c.key);
|
|
203
|
+
}
|
|
189
204
|
}
|
|
190
205
|
}],
|
|
191
206
|
[KEYBOARD_KEY.ARROW_LEFT, (ev) => {
|
|
192
|
-
var _activeOption$
|
|
207
|
+
var _activeOption$value;
|
|
193
208
|
ev.preventDefault();
|
|
194
|
-
if ((_activeOption$
|
|
209
|
+
if ((_activeOption$value = activeOption.value) === null || _activeOption$value === void 0 ? void 0 : _activeOption$value.parent) {
|
|
195
210
|
setSelectedPath(activeOption.value.parent.key);
|
|
196
211
|
setActiveKey(activeOption.value.parent.key);
|
|
197
212
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import Empty from "../empty/index.js";
|
|
5
5
|
import Scrollbar from "../scrollbar/index.js";
|
|
@@ -62,12 +62,12 @@ declare const __VLS_base: import("vue").DefineComponent<CascaderProps, {}, {}, {
|
|
|
62
62
|
disabled: boolean;
|
|
63
63
|
error: boolean;
|
|
64
64
|
readonly: boolean | string;
|
|
65
|
+
loading: boolean;
|
|
65
66
|
defaultPopupVisible: boolean;
|
|
66
67
|
expandTrigger: import("./types").CascaderExpandTrigger;
|
|
67
68
|
allowClear: boolean;
|
|
68
69
|
fitWidth: boolean;
|
|
69
70
|
maxWFull: boolean;
|
|
70
|
-
loading: boolean;
|
|
71
71
|
valueKey: string;
|
|
72
72
|
checkStrictly: boolean;
|
|
73
73
|
pathMode: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
2
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
3
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
4
4
|
import { isArray, isFunction, isNull, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import { KEYBOARD_KEY, getKeyDownHandler } from "../_utils/keyboard.js";
|
|
6
6
|
import { useAllowClear } from "../_hooks/use-allow-clear.js";
|
|
@@ -9,16 +9,16 @@ import { resolveDropdownVirtualListProps } from "../_utils/virtual-dropdown.js";
|
|
|
9
9
|
import Trigger from "../trigger/index.js";
|
|
10
10
|
import Tooltip from "../tooltip/index.js";
|
|
11
11
|
import { useReadonlyTip, useReadonlyTipText } from "../_hooks/use-readonly-tip.js";
|
|
12
|
-
import { debounce } from "../_utils/debounce.js";
|
|
13
12
|
import select_view_default from "../_components/select-view/select-view.js";
|
|
14
13
|
import { useAllowSearch } from "../_hooks/use-allow-search.js";
|
|
15
14
|
import { useTrigger } from "../_hooks/use-trigger.js";
|
|
16
15
|
import { cascaderInjectionKey } from "./context.js";
|
|
17
16
|
import { getCheckedStatus, getLeafOptionInfos, getLeafOptionKeys, getOptionInfos, getOptionLabel, getValidValues, getValueKey } from "./utils.js";
|
|
18
17
|
import base_cascader_panel_default from "./base-cascader-panel.js";
|
|
18
|
+
import { useLazyLoad } from "./hooks/use-lazy-load.js";
|
|
19
19
|
import { useSelectedPath } from "./hooks/use-selected-path.js";
|
|
20
20
|
import cascader_search_panel_default from "./cascader-search-panel.js";
|
|
21
|
-
import { computed, createBlock, createSlots, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, inject, mergeProps, normalizeProps, openBlock, provide, reactive, ref, renderSlot, toRef, toRefs, unref, useAttrs, useSlots, watch, withCtx } from "vue";
|
|
21
|
+
import { computed, createBlock, createSlots, createVNode, defineComponent, getCurrentInstance, guardReactiveProps, inject, mergeProps, normalizeProps, onBeforeUnmount, openBlock, provide, reactive, ref, renderSlot, toRef, toRefs, unref, useAttrs, useSlots, watch, withCtx } from "vue";
|
|
22
22
|
//#region components/cascader/cascader.vue?vue&type=script&setup=true&lang.ts
|
|
23
23
|
var DEFAULT_CASCADER_VIRTUAL_ITEM_SIZE = 36;
|
|
24
24
|
var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, {
|
|
@@ -227,8 +227,14 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
227
227
|
const leafOptionSet = reactive(/* @__PURE__ */ new Set());
|
|
228
228
|
const lazyLoadOptions = reactive({});
|
|
229
229
|
const addLazyLoadOptions = (children, key) => {
|
|
230
|
-
|
|
230
|
+
var _optionMap$get;
|
|
231
|
+
const source = (_optionMap$get = optionMap.get(key)) === null || _optionMap$get === void 0 ? void 0 : _optionMap$get.raw;
|
|
232
|
+
if (source) lazyLoadOptions[key] = {
|
|
233
|
+
source,
|
|
234
|
+
children
|
|
235
|
+
};
|
|
231
236
|
};
|
|
237
|
+
const { loadOption, isLoading } = useLazyLoad(loadMore, optionMap, addLazyLoadOptions);
|
|
232
238
|
const DEFAULT_FIELD_NAMES = {
|
|
233
239
|
value: "value",
|
|
234
240
|
label: "label",
|
|
@@ -241,7 +247,10 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
241
247
|
watch([
|
|
242
248
|
options,
|
|
243
249
|
lazyLoadOptions,
|
|
244
|
-
mergedFieldNames
|
|
250
|
+
mergedFieldNames,
|
|
251
|
+
loadMore,
|
|
252
|
+
checkStrictly,
|
|
253
|
+
valueKey
|
|
245
254
|
], ([_options, _lazyLoadOptions, _fieldNames]) => {
|
|
246
255
|
optionMap.clear();
|
|
247
256
|
leafOptionMap.clear();
|
|
@@ -348,12 +357,20 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
348
357
|
handleInputValueChange("", "optionChecked");
|
|
349
358
|
};
|
|
350
359
|
const handleClickOption = (option, checked) => {
|
|
360
|
+
if (option.disabled || option.selectionDisabled) return;
|
|
361
|
+
if (!props.multiple && !props.checkStrictly && !option.isLeaf) return;
|
|
351
362
|
if (props.multiple) selectMultiple(option, checked !== null && checked !== void 0 ? checked : true);
|
|
352
363
|
else selectSingle(option);
|
|
353
364
|
};
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
365
|
+
let searchTimer;
|
|
366
|
+
const handleSearch = (value) => {
|
|
367
|
+
clearTimeout(searchTimer);
|
|
368
|
+
searchTimer = setTimeout(() => {
|
|
369
|
+
searchTimer = void 0;
|
|
370
|
+
emit("search", value);
|
|
371
|
+
}, props.searchDelay);
|
|
372
|
+
};
|
|
373
|
+
onBeforeUnmount(() => clearTimeout(searchTimer));
|
|
357
374
|
const handleInputValueChange = (value, reason) => {
|
|
358
375
|
if (value !== computedInputValue.value) {
|
|
359
376
|
if (reason === "manual" && !computedPopupVisible.value) handlePopupVisibleChange(true);
|
|
@@ -411,10 +428,10 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
411
428
|
onClickOption: handleClickOption,
|
|
412
429
|
setActiveKey,
|
|
413
430
|
setSelectedPath,
|
|
414
|
-
|
|
431
|
+
loadOption,
|
|
432
|
+
isLoading,
|
|
415
433
|
expandTrigger,
|
|
416
434
|
ellipsis,
|
|
417
|
-
addLazyLoadOptions,
|
|
418
435
|
formatLabel,
|
|
419
436
|
separator: props.separator,
|
|
420
437
|
slots,
|
|
@@ -423,10 +440,11 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
423
440
|
const handleKeyDown = getKeyDownHandler(/* @__PURE__ */ new Map([
|
|
424
441
|
[KEYBOARD_KEY.ENTER, (_ev) => {
|
|
425
442
|
if (computedPopupVisible.value) {
|
|
426
|
-
if (activeOption.value) {
|
|
443
|
+
if (activeOption.value && !activeOption.value.disabled) {
|
|
427
444
|
let checked;
|
|
428
445
|
if (props.checkStrictly || activeOption.value.isLeaf) checked = !computedValueMap.value.has(activeOption.value.key);
|
|
429
446
|
else checked = !getCheckedStatus(activeOption.value, computedValueMap.value).checked;
|
|
447
|
+
loadOption(activeOption.value);
|
|
430
448
|
setSelectedPath(activeOption.value.key);
|
|
431
449
|
handleClickOption(activeOption.value, checked);
|
|
432
450
|
}
|
|
@@ -447,20 +465,22 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
447
465
|
}],
|
|
448
466
|
[KEYBOARD_KEY.ARROW_RIGHT, (ev) => {
|
|
449
467
|
if (!showSearchPanel.value) {
|
|
450
|
-
var _activeOption$value;
|
|
451
468
|
ev.preventDefault();
|
|
452
|
-
if (
|
|
453
|
-
|
|
469
|
+
if (activeOption.value && !activeOption.value.disabled) {
|
|
470
|
+
loadOption(activeOption.value);
|
|
454
471
|
setSelectedPath(activeOption.value.key);
|
|
455
|
-
|
|
472
|
+
if (activeOption.value.children) {
|
|
473
|
+
var _activeOption$value$c;
|
|
474
|
+
setActiveKey((_activeOption$value$c = activeOption.value.children.find((option) => !option.disabled)) === null || _activeOption$value$c === void 0 ? void 0 : _activeOption$value$c.key);
|
|
475
|
+
}
|
|
456
476
|
}
|
|
457
477
|
}
|
|
458
478
|
}],
|
|
459
479
|
[KEYBOARD_KEY.ARROW_LEFT, (ev) => {
|
|
460
480
|
if (!showSearchPanel.value) {
|
|
461
|
-
var _activeOption$
|
|
481
|
+
var _activeOption$value;
|
|
462
482
|
ev.preventDefault();
|
|
463
|
-
if ((_activeOption$
|
|
483
|
+
if ((_activeOption$value = activeOption.value) === null || _activeOption$value === void 0 ? void 0 : _activeOption$value.parent) {
|
|
464
484
|
setSelectedPath(activeOption.value.parent.key);
|
|
465
485
|
setActiveKey(activeOption.value.parent.key);
|
|
466
486
|
}
|
package/es/cascader/context.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export interface CascaderContext {
|
|
|
4
4
|
onClickOption: (option: CascaderOptionInfo, checked?: boolean) => void;
|
|
5
5
|
setActiveKey: (key?: string) => void;
|
|
6
6
|
setSelectedPath: (key?: string) => void;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
loadOption: (option: CascaderOptionInfo) => void;
|
|
8
|
+
isLoading: (option: CascaderOptionInfo) => boolean;
|
|
9
9
|
formatLabel?: (options: CascaderOption[]) => string;
|
|
10
10
|
separator?: string;
|
|
11
11
|
slots: Slots;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { CascaderLoadMore, CascaderOption, CascaderOptionInfo } from '../interface';
|
|
3
|
+
export declare function useLazyLoad(loader: Ref<CascaderLoadMore | undefined>, options: Map<string, CascaderOptionInfo>, addChildren: (children: CascaderOption[], key: string) => void): {
|
|
4
|
+
loadOption: (option: CascaderOptionInfo) => void;
|
|
5
|
+
isLoading: (option: CascaderOptionInfo) => boolean;
|
|
6
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { onBeforeUnmount, shallowReactive, toRaw } from "vue";
|
|
2
|
+
//#region components/cascader/hooks/use-lazy-load.ts
|
|
3
|
+
function useLazyLoad(loader, options, addChildren) {
|
|
4
|
+
const pending = shallowReactive(/* @__PURE__ */ new Map());
|
|
5
|
+
let disposed = false;
|
|
6
|
+
onBeforeUnmount(() => {
|
|
7
|
+
disposed = true;
|
|
8
|
+
pending.clear();
|
|
9
|
+
});
|
|
10
|
+
const isLoading = (option) => {
|
|
11
|
+
var _pending$get;
|
|
12
|
+
return ((_pending$get = pending.get(option.key)) === null || _pending$get === void 0 ? void 0 : _pending$get.source) === toRaw(option.raw);
|
|
13
|
+
};
|
|
14
|
+
const loadOption = (option) => {
|
|
15
|
+
if (disposed || !loader.value || option.disabled || option.isLeaf || option.children || isLoading(option)) return;
|
|
16
|
+
const { key } = option;
|
|
17
|
+
const request = { source: toRaw(option.raw) };
|
|
18
|
+
pending.set(key, request);
|
|
19
|
+
new Promise((resolve, reject) => {
|
|
20
|
+
var _loader$value;
|
|
21
|
+
Promise.resolve((_loader$value = loader.value) === null || _loader$value === void 0 ? void 0 : _loader$value.call(loader, option.raw, resolve)).catch(reject);
|
|
22
|
+
}).then((children) => {
|
|
23
|
+
var _options$get;
|
|
24
|
+
if (!disposed && pending.get(key) === request && toRaw((_options$get = options.get(key)) === null || _options$get === void 0 ? void 0 : _options$get.raw) === request.source && children) addChildren(children, key);
|
|
25
|
+
}).catch(() => void 0).finally(() => {
|
|
26
|
+
if (pending.get(key) === request) pending.delete(key);
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
loadOption,
|
|
31
|
+
isLoading
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { useLazyLoad };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { BaseType, FieldString } from '../_utils/types';
|
|
2
2
|
import { TagProps } from '../tag';
|
|
3
|
+
export type CascaderLazyLoadOptions = Record<string, {
|
|
4
|
+
source: CascaderOption;
|
|
5
|
+
children: CascaderOption[];
|
|
6
|
+
}>;
|
|
3
7
|
export type CascaderOptionValue = BaseType | Record<string, unknown>;
|
|
4
8
|
export type CascaderPathValue = CascaderOptionValue[];
|
|
5
9
|
export type CascaderSingleValue = CascaderOptionValue | CascaderPathValue;
|
package/es/cascader/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { BaseType } from '../_utils/types';
|
|
3
|
-
import { CascaderFieldNames, CascaderModelValue, CascaderOption, CascaderOptionInfo, CascaderSingleValue } from './interface';
|
|
3
|
+
import { CascaderLazyLoadOptions, CascaderFieldNames, CascaderModelValue, CascaderOption, CascaderOptionInfo, CascaderSingleValue } from './interface';
|
|
4
4
|
export declare const getOptionInfos: (options: CascaderOption[], { optionMap, leafOptionMap, leafOptionSet, leafOptionValueMap, totalLevel: innerLevel, checkStrictly, enabledLazyLoad, lazyLoadOptions, valueKey, fieldNames, }: {
|
|
5
5
|
optionMap: Map<string, CascaderOptionInfo>;
|
|
6
6
|
leafOptionMap: Map<string, CascaderOptionInfo>;
|
|
@@ -9,7 +9,7 @@ export declare const getOptionInfos: (options: CascaderOption[], { optionMap, le
|
|
|
9
9
|
totalLevel: Ref<number>;
|
|
10
10
|
checkStrictly: Ref<boolean>;
|
|
11
11
|
enabledLazyLoad: boolean;
|
|
12
|
-
lazyLoadOptions:
|
|
12
|
+
lazyLoadOptions: CascaderLazyLoadOptions;
|
|
13
13
|
valueKey: Ref<string>;
|
|
14
14
|
fieldNames: Required<CascaderFieldNames>;
|
|
15
15
|
}) => CascaderOptionInfo[];
|
package/es/cascader/utils.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { isArray, isNull, isNumber, isObject, isUndefined } from "../_utils/is.js";
|
|
2
|
+
import { toRaw } from "vue";
|
|
2
3
|
//#region components/cascader/utils.ts
|
|
4
|
+
var getPathKey = (values) => values.map((value) => String(value).replaceAll("%", "%25").replaceAll("-", "%2D")).join("-");
|
|
3
5
|
var getOptionInfos = (options, { optionMap, leafOptionMap, leafOptionSet, leafOptionValueMap, totalLevel: innerLevel, checkStrictly, enabledLazyLoad, lazyLoadOptions, valueKey, fieldNames }) => {
|
|
4
6
|
let totalLevel = 0;
|
|
5
7
|
const getTotalLeafOptions = (children) => {
|
|
@@ -17,7 +19,8 @@ var getOptionInfos = (options, { optionMap, leafOptionMap, leafOptionSet, leafOp
|
|
|
17
19
|
}
|
|
18
20
|
if (enabledLazyLoad && !data.isLeaf) {
|
|
19
21
|
data.isLeaf = false;
|
|
20
|
-
|
|
22
|
+
const cached = lazyLoadOptions[key];
|
|
23
|
+
if (cached && toRaw(cached.source) === toRaw(item)) data.children = travelOptions(cached.children, data, level + 1);
|
|
21
24
|
return;
|
|
22
25
|
}
|
|
23
26
|
data.isLeaf = true;
|
|
@@ -49,10 +52,10 @@ var getOptionInfos = (options, { optionMap, leafOptionMap, leafOptionSet, leafOp
|
|
|
49
52
|
};
|
|
50
53
|
const path = parentPath.concat(data);
|
|
51
54
|
const pathValue = [];
|
|
52
|
-
const key = path.map((pathItem) => {
|
|
55
|
+
const key = getPathKey(path.map((pathItem) => {
|
|
53
56
|
pathValue.push(pathItem.value);
|
|
54
57
|
return pathItem.valueKey;
|
|
55
|
-
})
|
|
58
|
+
}));
|
|
56
59
|
data.path = path;
|
|
57
60
|
data.pathValue = pathValue;
|
|
58
61
|
data.key = key;
|
|
@@ -81,9 +84,8 @@ var getCheckedStatus = (option, valueMap) => {
|
|
|
81
84
|
if (valueMap === null || valueMap === void 0 ? void 0 : valueMap.has(option.key)) checked = true;
|
|
82
85
|
} else {
|
|
83
86
|
var _valueMap$keys, _option$totalLeafOpti;
|
|
84
|
-
const reg = new RegExp(`^${option.key}(-|$)`);
|
|
85
87
|
const checkedLeafOptionNumber = Array.from((_valueMap$keys = valueMap === null || valueMap === void 0 ? void 0 : valueMap.keys()) !== null && _valueMap$keys !== void 0 ? _valueMap$keys : []).reduce((pre, key) => {
|
|
86
|
-
if (
|
|
88
|
+
if (key === option.key || key.startsWith(`${option.key}-`)) return pre + 1;
|
|
87
89
|
return pre;
|
|
88
90
|
}, 0);
|
|
89
91
|
if (checkedLeafOptionNumber > 0 && checkedLeafOptionNumber >= ((_option$totalLeafOpti = option.totalLeafOptions) !== null && _option$totalLeafOpti !== void 0 ? _option$totalLeafOpti : 1)) checked = true;
|
|
@@ -109,12 +111,12 @@ var getLeafOptionInfos = (option) => {
|
|
|
109
111
|
};
|
|
110
112
|
var getValueKey = (value, { valueKey, leafOptionValueMap }) => {
|
|
111
113
|
var _leafOptionValueMap$g;
|
|
112
|
-
if (isArray(value)) return value.map((item) => {
|
|
114
|
+
if (isArray(value)) return getPathKey(value.map((item) => {
|
|
113
115
|
if (isObject(item)) return item[valueKey];
|
|
114
116
|
return item;
|
|
115
|
-
})
|
|
117
|
+
}));
|
|
116
118
|
const _value = isObject(value) ? value[valueKey] : value;
|
|
117
|
-
return (_leafOptionValueMap$g = leafOptionValueMap.get(String(_value))) !== null && _leafOptionValueMap$g !== void 0 ? _leafOptionValueMap$g :
|
|
119
|
+
return (_leafOptionValueMap$g = leafOptionValueMap.get(String(_value))) !== null && _leafOptionValueMap$g !== void 0 ? _leafOptionValueMap$g : getPathKey([_value]);
|
|
118
120
|
};
|
|
119
121
|
var getValidValues = (value, { multiple, pathMode }) => {
|
|
120
122
|
if (!isArray(value)) return isUndefined(value) || isNull(value) || value === "" ? [] : [value];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isArray, isFunction, isNumber, isString } from "../_utils/is.js";
|
|
5
5
|
import { checkboxGroupKey } from "./context.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useFormItem } from "../_hooks/use-form-item.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import { isArray, isNull, isUndefined } from "../_utils/is.js";
|
|
5
5
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
@@ -101,6 +101,7 @@ var checkbox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineC
|
|
|
101
101
|
(_eventHandlers$value = eventHandlers.value) === null || _eventHandlers$value === void 0 || (_eventHandlers$value$ = _eventHandlers$value.onChange) === null || _eventHandlers$value$ === void 0 || _eventHandlers$value$.call(_eventHandlers$value, event);
|
|
102
102
|
}
|
|
103
103
|
nextTick(() => {
|
|
104
|
+
if (checkboxRef.value) checkboxRef.value.indeterminate = props.indeterminate;
|
|
104
105
|
if (checkboxRef.value && checkboxRef.value.checked !== computedChecked.value) checkboxRef.value.checked = computedChecked.value;
|
|
105
106
|
});
|
|
106
107
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { createElementBlock, createElementVNode, defineComponent, openBlock } from "vue";
|
|
3
3
|
//#region components/checkbox/icon-check.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var _hoisted_1 = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isNumber } from "../_utils/is.js";
|
|
4
4
|
import icon_hover_default from "../_components/icon-hover.js";
|
|
@@ -54,7 +54,10 @@ var collapse_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
54
54
|
});
|
|
55
55
|
const headerId = `${prefixCls}-${instance === null || instance === void 0 ? void 0 : instance.uid}-header`;
|
|
56
56
|
const contentId = `${prefixCls}-${instance === null || instance === void 0 ? void 0 : instance.uid}-content`;
|
|
57
|
-
const cls = computed(() => [prefixCls, {
|
|
57
|
+
const cls = computed(() => [prefixCls, {
|
|
58
|
+
[`${prefixCls}-active`]: isActive.value,
|
|
59
|
+
[`${prefixCls}-no-icon`]: !mergedShowExpandIcon.value
|
|
60
|
+
}]);
|
|
58
61
|
const headerCls = computed(() => [
|
|
59
62
|
`${prefixCls}-header`,
|
|
60
63
|
`${prefixCls}-header-${collapseCtx.expandIconPosition}`,
|
|
@@ -78,12 +81,15 @@ var collapse_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
78
81
|
};
|
|
79
82
|
const handleKeydown = (event) => {
|
|
80
83
|
if (props.disabled) return;
|
|
84
|
+
const target = event.target;
|
|
85
|
+
if (target === null || target === void 0 ? void 0 : target.closest("input, textarea, select, button, a[href], [contenteditable=\"true\"]")) return;
|
|
81
86
|
if (isActivationKey(event)) {
|
|
82
87
|
var _collapseCtx$handleCl2;
|
|
83
88
|
event.preventDefault();
|
|
84
89
|
(_collapseCtx$handleCl2 = collapseCtx.handleClick) === null || _collapseCtx$handleCl2 === void 0 || _collapseCtx$handleCl2.call(collapseCtx, key, event);
|
|
85
90
|
}
|
|
86
91
|
};
|
|
92
|
+
let leaving = false;
|
|
87
93
|
const transitionEvents = {
|
|
88
94
|
onEnter: (element) => {
|
|
89
95
|
element.style.height = `${element.scrollHeight}px`;
|
|
@@ -92,15 +98,24 @@ var collapse_item_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ de
|
|
|
92
98
|
element.style.height = "auto";
|
|
93
99
|
},
|
|
94
100
|
onBeforeLeave: (element) => {
|
|
101
|
+
leaving = true;
|
|
95
102
|
element.style.height = `${element.scrollHeight}px`;
|
|
96
103
|
},
|
|
97
104
|
onLeave: (element) => {
|
|
98
105
|
element.style.height = "0";
|
|
99
106
|
},
|
|
100
107
|
onAfterLeave: () => {
|
|
108
|
+
leaving = false;
|
|
101
109
|
if (mergedDestroyOnHide.value) mounted.value = false;
|
|
110
|
+
},
|
|
111
|
+
onLeaveCancelled: () => {
|
|
112
|
+
leaving = false;
|
|
102
113
|
}
|
|
103
114
|
};
|
|
115
|
+
watch(mergedDestroyOnHide, (destroy) => {
|
|
116
|
+
if (!destroy) mounted.value = true;
|
|
117
|
+
else if (!isActive.value && !leaving) mounted.value = false;
|
|
118
|
+
}, { flush: "post" });
|
|
104
119
|
watch(isActive, (active) => {
|
|
105
120
|
if (active && !mounted.value) mounted.value = true;
|
|
106
121
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isArray } from "../_utils/is.js";
|
|
4
4
|
import { collapseKey } from "./context.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { configProviderInjectionKey } from "../config-provider/context.js";
|
|
2
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
3
3
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
4
4
|
import Trigger from "../trigger/index.js";
|
|
5
5
|
import Tooltip from "../tooltip/index.js";
|
|
@@ -128,7 +128,7 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
130
|
const handleColorChange = (value, trigger) => {
|
|
131
|
-
if (!props.disabled) emitChange(value, trigger);
|
|
131
|
+
if (!props.disabled && !props.readonly) emitChange(value, trigger);
|
|
132
132
|
};
|
|
133
133
|
const handleClear = (event) => {
|
|
134
134
|
inputDraft.value = null;
|
|
@@ -188,7 +188,7 @@ var color_picker_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ def
|
|
|
188
188
|
"enable-multiple-gradient": props.enableMultipleGradient,
|
|
189
189
|
"recent-colors": mergedRecentColors.value,
|
|
190
190
|
"swatch-colors": mergedSwatchColors.value,
|
|
191
|
-
disabled: props.disabled,
|
|
191
|
+
disabled: props.disabled || !!props.readonly,
|
|
192
192
|
"enable-alpha": mergedEnableAlpha.value,
|
|
193
193
|
format: normalizedFormat.value,
|
|
194
194
|
"show-primary-color-preview": props.showPrimaryColorPreview,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { useControlBlock } from "./hooks/use-control-block.js";
|
|
4
4
|
import { Fragment, computed, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, unref, withCtx } from "vue";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { formatColor } from "./utils.js";
|
|
3
3
|
import { computed, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, ref, unref } from "vue";
|
|
4
4
|
import { useDraggable } from "@vueuse/core";
|
|
5
5
|
//#region components/color-picker/gradient-thumb.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _hoisted_1 = ["disabled"];
|
|
6
7
|
var gradient_thumb_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent(_objectSpread2(_objectSpread2({}, { name: "GradientThumb" }), {}, {
|
|
7
8
|
__name: "gradient-thumb",
|
|
8
9
|
props: {
|
|
@@ -43,10 +44,12 @@ var gradient_thumb_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
43
44
|
const handleClick = (event) => {
|
|
44
45
|
var _props$onSelect2;
|
|
45
46
|
event.stopPropagation();
|
|
47
|
+
if (props.disabled) return;
|
|
46
48
|
if (!shouldIgnoreClick.value) (_props$onSelect2 = props.onSelect) === null || _props$onSelect2 === void 0 || _props$onSelect2.call(props);
|
|
47
49
|
};
|
|
48
50
|
const handleKeyDown = (event) => {
|
|
49
51
|
var _props$onRemove;
|
|
52
|
+
if (props.disabled) return;
|
|
50
53
|
if (event.key === "Delete" || event.key === "Backspace") (_props$onRemove = props.onRemove) === null || _props$onRemove === void 0 || _props$onRemove.call(props);
|
|
51
54
|
};
|
|
52
55
|
return (_ctx, _cache) => {
|
|
@@ -54,6 +57,7 @@ var gradient_thumb_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
54
57
|
ref_key: "thumbRef",
|
|
55
58
|
ref: thumbRef,
|
|
56
59
|
type: "button",
|
|
60
|
+
disabled: props.disabled,
|
|
57
61
|
class: normalizeClass([`${props.prefixCls}-gradient-thumb`, { [`${props.prefixCls}-gradient-thumb-active`]: props.active }]),
|
|
58
62
|
style: normalizeStyle({ left: `${props.point.left}%` }),
|
|
59
63
|
onClick: handleClick,
|
|
@@ -61,7 +65,7 @@ var gradient_thumb_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ d
|
|
|
61
65
|
}, [createElementVNode("span", {
|
|
62
66
|
class: normalizeClass(`${props.prefixCls}-gradient-thumb-inner`),
|
|
63
67
|
style: normalizeStyle({ backgroundColor: unref(formatColor)(props.point.hsva, "CSS", true) })
|
|
64
|
-
}, null, 6)],
|
|
68
|
+
}, null, 6)], 46, _hoisted_1);
|
|
65
69
|
};
|
|
66
70
|
}
|
|
67
71
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { throttleByRaf } from "../../_utils/throttle-by-raf.js";
|
|
2
|
-
import { ref } from "vue";
|
|
2
|
+
import { onBeforeUnmount, ref } from "vue";
|
|
3
3
|
//#region components/color-picker/hooks/use-control-block.ts
|
|
4
4
|
var useControlBlock = ({ value, onChange }) => {
|
|
5
5
|
const active = ref(false);
|
|
@@ -37,6 +37,10 @@ var useControlBlock = ({ value, onChange }) => {
|
|
|
37
37
|
window.addEventListener("mouseup", removeListener);
|
|
38
38
|
window.addEventListener("contextmenu", removeListener);
|
|
39
39
|
};
|
|
40
|
+
onBeforeUnmount(() => {
|
|
41
|
+
removeListener();
|
|
42
|
+
throttledChange.cancel();
|
|
43
|
+
});
|
|
40
44
|
return {
|
|
41
45
|
active,
|
|
42
46
|
blockRef,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/objectSpread2.js";
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { hsvToRgb } from "../_utils/color.js";
|
|
4
4
|
import { useControlBlock } from "./hooks/use-control-block.js";
|