bkui-vue 2.0.1-beta.8 → 2.0.1-beta.80
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/README.md +15 -0
- package/dist/index.cjs.js +167 -167
- package/dist/index.esm.js +32462 -31824
- package/dist/index.umd.js +167 -167
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.css +130 -0
- package/lib/affix/affix.variable.css +262 -1
- package/lib/affix/index.js +7 -7
- package/lib/alert/alert.css +133 -3
- package/lib/alert/alert.d.ts +5 -12
- package/lib/alert/alert.variable.css +262 -1
- package/lib/alert/index.d.ts +11 -26
- package/lib/alert/index.js +6 -6
- package/lib/backtop/backtop.css +133 -3
- package/lib/backtop/backtop.d.ts +1 -1
- package/lib/backtop/backtop.variable.css +395 -4
- package/lib/backtop/index.d.ts +3 -3
- package/lib/backtop/index.js +6 -6
- package/lib/badge/badge.css +156 -26
- package/lib/badge/badge.variable.css +262 -1
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb.css +135 -5
- package/lib/breadcrumb/breadcrumb.variable.css +397 -6
- package/lib/button/button.css +417 -243
- package/lib/button/button.d.ts +8 -8
- package/lib/button/button.less +74 -71
- package/lib/button/button.variable.css +450 -145
- package/lib/button/index.d.ts +11 -11
- package/lib/button/index.js +6 -7
- package/lib/card/card.css +134 -4
- package/lib/card/card.variable.css +396 -5
- package/lib/cascader/cascader-panel.d.ts +6 -1
- package/lib/cascader/cascader.css +153 -23
- package/lib/cascader/cascader.d.ts +5 -1
- package/lib/cascader/cascader.variable.css +415 -24
- package/lib/cascader/index.d.ts +1 -0
- package/lib/cascader/index.js +110 -40
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox-group.d.ts +0 -16
- package/lib/checkbox/checkbox.css +147 -9
- package/lib/checkbox/checkbox.d.ts +39 -7
- package/lib/checkbox/checkbox.less +12 -0
- package/lib/checkbox/checkbox.variable.css +270 -1
- package/lib/checkbox/index.d.ts +57 -22
- package/lib/checkbox/index.js +21 -8
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/code-diff/code-diff.css +130 -0
- package/lib/code-diff/code-diff.variable.css +262 -1
- package/lib/code-diff/index.js +8 -8
- package/lib/collapse/collapse.css +131 -1
- package/lib/collapse/collapse.variable.css +262 -1
- package/lib/collapse/index.js +2 -2
- package/lib/collapse/utils.d.ts +2 -2
- package/lib/collapse-transition/collapse-transition.css +130 -0
- package/lib/collapse-transition/collapse-transition.variable.css +262 -1
- package/lib/color-picker/color-picker.css +130 -0
- package/lib/color-picker/color-picker.d.ts +16 -0
- package/lib/color-picker/color-picker.variable.css +262 -1
- package/lib/color-picker/index.d.ts +23 -0
- package/lib/color-picker/index.js +52 -45
- package/lib/components.d.ts +32 -32
- package/lib/components.js +31 -31
- package/lib/config-provider/config-provider.css +130 -0
- package/lib/config-provider/config-provider.variable.css +262 -1
- package/lib/config-provider/index.d.ts +1 -1
- package/lib/container/container.css +130 -0
- package/lib/container/container.variable.css +392 -1
- package/lib/container/index.js +6 -7
- package/lib/date-picker/base/date-table.d.ts +1 -1
- package/lib/date-picker/base/month-table.d.ts +1 -1
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -1
- package/lib/date-picker/base/year-table.d.ts +1 -1
- package/lib/date-picker/date-picker.css +147 -17
- package/lib/date-picker/date-picker.d.ts +0 -10
- package/lib/date-picker/date-picker.variable.css +262 -1
- package/lib/date-picker/index.d.ts +0 -22
- package/lib/date-picker/index.js +256 -219
- package/lib/date-picker/interface.d.ts +9 -9
- package/lib/date-picker/panel/date-range.d.ts +5 -5
- package/lib/date-picker/panel/date.d.ts +1 -1
- package/lib/date-picker/panel/time-range.d.ts +1 -10
- package/lib/date-picker/panel/time.d.ts +2 -11
- package/lib/date-picker/props.d.ts +1 -5
- package/lib/date-picker/time-picker.d.ts +0 -9
- package/lib/date-picker/utils.d.ts +1 -1
- package/lib/dialog/dialog.css +138 -8
- package/lib/dialog/dialog.d.ts +42 -26
- package/lib/dialog/dialog.variable.css +400 -9
- package/lib/dialog/index.d.ts +90 -56
- package/lib/dialog/index.js +25 -23
- package/lib/dialog/props.d.ts +18 -11
- package/lib/directives/index.d.ts +4 -3
- package/lib/directives/index.js +198 -176
- package/lib/directives/tooltips.d.ts +1 -1
- package/lib/dist.index.js +2 -4
- package/lib/divider/divider.css +133 -3
- package/lib/divider/divider.d.ts +5 -5
- package/lib/divider/divider.variable.css +262 -1
- package/lib/divider/index.d.ts +11 -11
- package/lib/divider/index.js +2 -2
- package/lib/divider/props.d.ts +2 -2
- package/lib/dropdown/dropdown-item.d.ts +1 -1
- package/lib/dropdown/dropdown-menu.d.ts +1 -1
- package/lib/dropdown/dropdown.css +130 -0
- package/lib/dropdown/dropdown.d.ts +5 -5
- package/lib/dropdown/dropdown.variable.css +392 -1
- package/lib/dropdown/index.d.ts +13 -13
- package/lib/dropdown/index.js +7 -7
- package/lib/exception/exception.css +130 -0
- package/lib/exception/exception.d.ts +9 -9
- package/lib/exception/exception.variable.css +262 -1
- package/lib/exception/index.d.ts +11 -11
- package/lib/exception/index.js +10 -10
- package/lib/exception/typings/index.d.ts +1 -1
- package/lib/fixed-navbar/fixed-navbar.css +134 -4
- package/lib/fixed-navbar/fixed-navbar.variable.css +262 -1
- package/lib/fixed-navbar/index.js +2 -2
- package/lib/form/form-item.d.ts +7 -19
- package/lib/form/form.css +130 -0
- package/lib/form/form.d.ts +2 -2
- package/lib/form/form.variable.css +262 -1
- package/lib/form/index.d.ts +7 -14
- package/lib/form/index.js +22 -21
- package/lib/form/type.d.ts +2 -2
- package/lib/icon/index.d.ts +11 -11
- package/lib/icon/index.js +11 -11
- package/lib/image/image-viewer.css +130 -0
- package/lib/image/image-viewer.d.ts +1 -1
- package/lib/image/image-viewer.variable.css +262 -1
- package/lib/image/image.css +130 -0
- package/lib/image/image.variable.css +392 -1
- package/lib/image/index.js +20 -21
- package/lib/index.d.ts +9 -3
- package/lib/index.js +5 -29
- package/lib/info-box/index.js +17 -18
- package/lib/info-box/info-box.css +134 -4
- package/lib/info-box/info-box.d.ts +15 -15
- package/lib/info-box/info-box.variable.css +262 -1
- package/lib/input/index.d.ts +15 -15
- package/lib/input/index.js +63 -516
- package/lib/input/input.css +225 -73
- package/lib/input/input.d.ts +15 -15
- package/lib/input/input.less +30 -1
- package/lib/input/input.variable.css +487 -74
- package/lib/link/index.d.ts +11 -11
- package/lib/link/index.js +3 -3
- package/lib/link/link.css +146 -16
- package/lib/link/link.d.ts +5 -5
- package/lib/link/link.variable.css +262 -1
- package/lib/loading/index.d.ts +12 -11
- package/lib/loading/index.js +10 -8
- package/lib/loading/loading.css +146 -16
- package/lib/loading/loading.d.ts +8 -8
- package/lib/loading/loading.variable.css +408 -17
- package/lib/locale/index.d.ts +1 -1
- package/lib/menu/index.js +0 -1
- package/lib/menu/menu.css +148 -18
- package/lib/menu/menu.variable.css +410 -19
- package/lib/menu/submenu.css +130 -0
- package/lib/menu/submenu.variable.css +262 -1
- package/lib/menu/utils.d.ts +3 -3
- package/lib/message/index.js +18 -18
- package/lib/message/message.css +153 -22
- package/lib/message/message.less +3 -2
- package/lib/message/message.variable.css +264 -2
- package/lib/message/messageConstructor.d.ts +16 -16
- package/lib/modal/index.d.ts +49 -8
- package/lib/modal/index.js +49 -28
- package/lib/modal/modal.css +134 -4
- package/lib/modal/modal.d.ts +19 -3
- package/lib/modal/modal.variable.css +396 -5
- package/lib/modal/props.mixin.d.ts +8 -1
- package/lib/navigation/index.js +20 -20
- package/lib/navigation/navigation.css +132 -2
- package/lib/navigation/navigation.d.ts +1 -1
- package/lib/navigation/navigation.variable.css +262 -1
- package/lib/notify/index.js +4 -4
- package/lib/notify/notify.css +137 -7
- package/lib/notify/notify.variable.css +262 -1
- package/lib/notify/notifyConstructor.d.ts +5 -5
- package/lib/overflow-title/components/overflow-title.d.ts +9 -16
- package/lib/overflow-title/index.d.ts +19 -34
- package/lib/overflow-title/index.js +75 -18
- package/lib/overflow-title/props.d.ts +18 -21
- package/lib/pagination/index.d.ts +0 -19
- package/lib/pagination/index.js +61 -23
- package/lib/pagination/pagination.css +139 -9
- package/lib/pagination/pagination.d.ts +0 -13
- package/lib/pagination/pagination.less +14 -13
- package/lib/pagination/pagination.variable.css +270 -9
- package/lib/pagination/type.d.ts +1 -1
- package/lib/pagination/use-limit.d.ts +1 -1
- package/lib/pagination/use-total.d.ts +1 -1
- package/lib/plugin-popover/index.js +20 -21
- package/lib/pop-confirm/index.d.ts +11 -43
- package/lib/pop-confirm/index.js +27 -28
- package/lib/pop-confirm/pop-confirm.css +133 -1
- package/lib/pop-confirm/pop-confirm.d.ts +5 -19
- package/lib/pop-confirm/pop-confirm.less +3 -1
- package/lib/pop-confirm/pop-confirm.variable.css +265 -2
- package/lib/pop-confirm/props.d.ts +5 -11
- package/lib/popover/const.d.ts +3 -3
- package/lib/popover/index.d.ts +19 -19
- package/lib/popover/index.js +20 -21
- package/lib/popover/plugin-popover.d.ts +1 -1
- package/lib/popover/popover.css +130 -0
- package/lib/popover/popover.d.ts +7 -7
- package/lib/popover/popover.variable.css +262 -1
- package/lib/popover/props.d.ts +4 -4
- package/lib/preset.d.ts +0 -1
- package/lib/preset.js +0 -1
- package/lib/process/index.js +3 -3
- package/lib/process/process.css +143 -13
- package/lib/process/process.variable.css +262 -1
- package/lib/progress/index.d.ts +11 -11
- package/lib/progress/index.js +10 -11
- package/lib/progress/progress.css +134 -4
- package/lib/progress/progress.d.ts +7 -7
- package/lib/progress/progress.variable.css +396 -5
- package/lib/radio/index.d.ts +21 -21
- package/lib/radio/index.js +28 -17
- package/lib/radio/radio-button.d.ts +7 -7
- package/lib/radio/radio-group.d.ts +7 -7
- package/lib/radio/radio.css +172 -42
- package/lib/radio/radio.d.ts +7 -7
- package/lib/radio/radio.variable.css +262 -1
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.js +8 -8
- package/lib/rate/rate.css +130 -0
- package/lib/rate/rate.variable.css +262 -1
- package/lib/resize-layout/index.d.ts +34 -11
- package/lib/resize-layout/index.js +33 -14
- package/lib/resize-layout/resize-layout.css +130 -0
- package/lib/resize-layout/resize-layout.d.ts +16 -5
- package/lib/resize-layout/resize-layout.variable.css +262 -1
- package/lib/scrollbar/css/scrollbar.css +239 -0
- package/lib/scrollbar/css/scrollbar.less +139 -0
- package/lib/scrollbar/css/scrollbar.variable.css +499 -0
- package/lib/scrollbar/handlers/click-rail.d.ts +2 -0
- package/lib/scrollbar/handlers/drag-thumb.d.ts +1 -0
- package/lib/scrollbar/handlers/keyboard.d.ts +2 -0
- package/lib/scrollbar/handlers/mouse-wheel.d.ts +2 -0
- package/lib/scrollbar/handlers/touch.d.ts +4 -0
- package/lib/scrollbar/helper/class-names.d.ts +21 -0
- package/lib/scrollbar/helper/css.d.ts +3 -0
- package/lib/scrollbar/helper/dom.d.ts +4 -0
- package/lib/scrollbar/helper/event-manager.d.ts +20 -0
- package/lib/scrollbar/helper/util.d.ts +11 -0
- package/lib/scrollbar/index.d.ts +133 -13
- package/lib/scrollbar/index.js +1332 -18434
- package/lib/scrollbar/process-scroll-diff.d.ts +1 -0
- package/lib/scrollbar/update-geometry.d.ts +8 -0
- package/lib/search-select/index.d.ts +100 -78
- package/lib/search-select/index.js +343 -213
- package/lib/search-select/input.d.ts +17 -6
- package/lib/search-select/menu.d.ts +13 -1
- package/lib/search-select/search-select.css +163 -35
- package/lib/search-select/search-select.d.ts +33 -43
- package/lib/search-select/search-select.less +2 -2
- package/lib/search-select/search-select.variable.css +425 -36
- package/lib/search-select/selected.d.ts +35 -10
- package/lib/search-select/utils.d.ts +6 -6
- package/lib/select/common.d.ts +4 -4
- package/lib/select/index.d.ts +155 -77
- package/lib/select/index.js +296 -197
- package/lib/select/option.d.ts +5 -6
- package/lib/select/select.css +175 -43
- package/lib/select/select.d.ts +62 -28
- package/lib/select/select.less +7 -4
- package/lib/select/select.variable.css +437 -44
- package/lib/select/selectTagInput.d.ts +7 -6
- package/lib/select/type.d.ts +10 -11
- package/lib/shared/frame-throttle.d.ts +15 -0
- package/lib/shared/index.d.ts +2 -1
- package/lib/shared/index.js +110 -47
- package/lib/shared/popover.d.ts +3 -3
- package/lib/shared/token.d.ts +1 -1
- package/lib/shared/vue-types.d.ts +48 -48
- package/lib/shared/z-index-manager.d.ts +6 -6
- package/lib/sideslider/index.d.ts +41 -7
- package/lib/sideslider/index.js +12 -11
- package/lib/sideslider/sideslider.css +138 -9
- package/lib/sideslider/sideslider.d.ts +19 -3
- package/lib/sideslider/sideslider.less +7 -8
- package/lib/sideslider/sideslider.variable.css +269 -9
- package/lib/slider/index.js +21 -23
- package/lib/slider/slider.css +135 -5
- package/lib/slider/slider.variable.css +262 -1
- package/lib/steps/index.d.ts +14 -29
- package/lib/steps/index.js +3 -4
- package/lib/steps/steps.css +168 -38
- package/lib/steps/steps.d.ts +8 -18
- package/lib/steps/steps.variable.css +262 -1
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/mixins/animate.css +130 -0
- package/lib/styles/mixins/animate.variable.css +262 -1
- package/lib/styles/mixins/mixins.css +130 -0
- package/lib/styles/mixins/mixins.variable.css +130 -0
- package/lib/styles/mixins/popper.css +130 -0
- package/lib/styles/mixins/popper.variable.css +262 -1
- package/lib/styles/mixins/scroll.css +130 -0
- package/lib/styles/mixins/scroll.variable.css +262 -1
- package/lib/styles/reset.css +130 -0
- package/lib/styles/reset.variable.css +262 -1
- package/lib/{scrollbar/scrollbar.variable.css → styles/themes/themes.css} +2 -76
- package/lib/styles/themes/themes.less +299 -129
- package/lib/styles/themes/themes.variable.css +130 -0
- package/lib/swiper/index.js +5 -5
- package/lib/swiper/swiper.css +130 -0
- package/lib/swiper/swiper.variable.css +262 -1
- package/lib/switcher/index.d.ts +11 -11
- package/lib/switcher/index.js +2 -2
- package/lib/switcher/switcher.css +147 -17
- package/lib/switcher/switcher.d.ts +9 -9
- package/lib/switcher/switcher.variable.css +409 -18
- package/lib/tab/index.d.ts +44 -114
- package/lib/tab/index.js +60 -49
- package/lib/tab/props.d.ts +25 -50
- package/lib/tab/tab-nav.d.ts +26 -66
- package/lib/tab/tab-panel.d.ts +22 -0
- package/lib/tab/tab.css +211 -17
- package/lib/tab/tab.d.ts +10 -54
- package/lib/tab/tab.less +91 -4
- package/lib/tab/tab.variable.css +326 -1
- package/lib/table/components/ghost-body.d.ts +2 -0
- package/lib/table/components/table-cell.d.ts +22 -0
- package/lib/table/components/table-column.d.ts +23 -126
- package/lib/table/const.d.ts +23 -10
- package/lib/table/events.d.ts +16 -112
- package/lib/table/hooks/use-cell.d.ts +20 -0
- package/lib/table/hooks/use-column-resize.d.ts +7 -0
- package/lib/table/hooks/use-column-template.d.ts +5 -0
- package/lib/table/hooks/use-columns.d.ts +69 -0
- package/lib/table/{plugins → hooks}/use-draggable.d.ts +2 -2
- package/lib/table/hooks/use-fixed-column.d.ts +10 -0
- package/lib/table/hooks/use-head.d.ts +16 -0
- package/lib/table/hooks/use-layout.d.ts +25 -0
- package/lib/table/hooks/use-pagination.d.ts +16 -0
- package/lib/table/hooks/use-render.d.ts +21 -0
- package/lib/table/hooks/use-rows.d.ts +30 -0
- package/lib/table/hooks/use-settings.d.ts +136 -0
- package/lib/table/{plugins → hooks}/use-shift-key.d.ts +4 -2
- package/lib/table/index.d.ts +112 -634
- package/lib/table/index.js +4089 -3559
- package/lib/table/plugins/head-filter.css +135 -0
- package/lib/table/plugins/head-filter.d.ts +2 -1
- package/lib/table/plugins/head-filter.less +4 -0
- package/lib/table/plugins/head-filter.variable.css +267 -1
- package/lib/table/plugins/head-sort.css +130 -0
- package/lib/table/plugins/head-sort.variable.css +262 -1
- package/lib/table/plugins/settings.css +131 -0
- package/lib/table/plugins/settings.less +1 -0
- package/lib/table/plugins/settings.variable.css +263 -1
- package/lib/table/props.d.ts +125 -62
- package/lib/table/table.css +753 -431
- package/lib/table/table.d.ts +51 -185
- package/lib/table/table.less +244 -112
- package/lib/table/table.variable.css +1058 -475
- package/lib/table/utils.d.ts +49 -21
- package/lib/table-column/index.d.ts +30 -289
- package/lib/table-column/index.js +17385 -46
- package/lib/tag/index.d.ts +11 -11
- package/lib/tag/index.js +2 -3
- package/lib/tag/tag.css +136 -6
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag/tag.less +1 -1
- package/lib/tag/tag.variable.css +263 -2
- package/lib/tag-input/common.d.ts +2 -2
- package/lib/tag-input/index.d.ts +14 -11
- package/lib/tag-input/index.js +72 -52
- package/lib/tag-input/tag-input.css +157 -27
- package/lib/tag-input/tag-input.d.ts +8 -19
- package/lib/tag-input/tag-input.less +9 -9
- package/lib/tag-input/tag-input.variable.css +271 -10
- package/lib/tag-input/tag-props.d.ts +2 -2
- package/lib/time-picker/index.d.ts +0 -19
- package/lib/time-picker/time-picker.css +130 -0
- package/lib/time-picker/time-picker.variable.css +262 -1
- package/lib/timeline/index.js +2 -2
- package/lib/timeline/timeline.css +149 -19
- package/lib/timeline/timeline.variable.css +262 -1
- package/lib/transfer/const.d.ts +2 -2
- package/lib/transfer/index.js +3 -5
- package/lib/transfer/transfer.css +149 -19
- package/lib/transfer/transfer.variable.css +262 -1
- package/lib/tree/constant.d.ts +22 -20
- package/lib/tree/index.d.ts +41 -27
- package/lib/tree/index.js +109 -58
- package/lib/tree/props.d.ts +18 -11
- package/lib/tree/tree.css +242 -78
- package/lib/tree/tree.d.ts +17 -17
- package/lib/tree/tree.variable.css +504 -79
- package/lib/tree/use-empty.d.ts +1 -1
- package/lib/tree/use-node-action.d.ts +10 -9
- package/lib/tree/use-node-async.d.ts +2 -1
- package/lib/tree/use-node-attribute.d.ts +42 -34
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/tree/use-tree-init.d.ts +8 -5
- package/lib/tree/util.d.ts +21 -21
- package/lib/upload/index.d.ts +27 -4
- package/lib/upload/index.js +86 -42
- package/lib/upload/props.d.ts +7 -2
- package/lib/upload/upload.css +157 -27
- package/lib/upload/upload.d.ts +13 -2
- package/lib/upload/upload.type.d.ts +12 -6
- package/lib/upload/upload.variable.css +419 -28
- package/lib/upload/use-file-handler.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +12 -46
- package/lib/virtual-render/index.js +17468 -148
- package/lib/virtual-render/props.d.ts +2 -9
- package/lib/virtual-render/use-fix-top.d.ts +1 -1
- package/lib/virtual-render/use-scrollbar.d.ts +4 -17
- package/lib/virtual-render/v-virtual-render.d.ts +7 -1
- package/lib/virtual-render/virtual-render.css +225 -69
- package/lib/virtual-render/virtual-render.d.ts +6 -22
- package/lib/virtual-render/virtual-render.less +2 -11
- package/lib/virtual-render/virtual-render.variable.css +487 -70
- package/lib/volar.components.d.ts +2 -0
- package/package.json +17 -55
- package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
- package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/index.d.ts +0 -241
- package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
- package/lib/scrollbar/scrollbar.css +0 -75
- package/lib/scrollbar/scrollbar.less +0 -94
- package/lib/table/plugins/col-group.d.ts +0 -38
- package/lib/table/plugins/settings.d.ts +0 -16
- package/lib/table/plugins/use-active-columns.d.ts +0 -16
- package/lib/table/plugins/use-column-resize.d.ts +0 -35
- package/lib/table/plugins/use-column-template.d.ts +0 -7
- package/lib/table/plugins/use-fixed-column.d.ts +0 -27
- package/lib/table/plugins/use-head-cell.d.ts +0 -7
- package/lib/table/plugins/use-pagination.d.ts +0 -23
- package/lib/table/use-attributes.d.ts +0 -62
- package/lib/table/use-column.d.ts +0 -275
- package/lib/table/use-common.d.ts +0 -1679
- package/lib/table/use-render.d.ts +0 -11
- /package/lib/table/{plugins → components}/body-empty.d.ts +0 -0
- /package/lib/table/{plugins → hooks}/use-observer-resize.d.ts +0 -0
- /package/lib/table/{plugins → hooks}/use-scroll-loading.d.ts +0 -0
package/lib/select/index.js
CHANGED
@@ -2,12 +2,11 @@ import "../styles/reset.css";
|
|
2
2
|
import "./select.less";
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__ from "../shared";
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
|
5
|
-
import * as __WEBPACK_EXTERNAL_MODULE_lodash_isEqual_ce045a54__ from "lodash/isEqual";
|
6
5
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_checkbox_13b1cb4a__ from "../checkbox";
|
7
6
|
import "../checkbox/checkbox.less";
|
8
7
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__ from "../config-provider";
|
9
8
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__ from "../icon";
|
10
|
-
import * as
|
9
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lodash_isEqual_ce045a54__ from "lodash/isEqual";
|
11
10
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_directives_45d4776f__ from "../directives";
|
12
11
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_input_d525237e__ from "../input";
|
13
12
|
import "../input/input.less";
|
@@ -17,9 +16,11 @@ import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_popover_9b03f19d__ from "../p
|
|
17
16
|
import "../popover/popover.less";
|
18
17
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_virtual_render_927587a8__ from "../virtual-render";
|
19
18
|
import "../virtual-render/virtual-render.less";
|
20
|
-
import * as
|
19
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lodash_merge_cf99375a__ from "lodash/merge";
|
20
|
+
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_overflow_title_051a85a5__ from "../overflow-title";
|
21
21
|
import * as __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_tag_d74826be__ from "../tag";
|
22
22
|
import "../tag/tag.less";
|
23
|
+
import * as __WEBPACK_EXTERNAL_MODULE_lodash_debounce_3540babe__ from "lodash/debounce";
|
23
24
|
/******/ var __webpack_modules__ = ({
|
24
25
|
|
25
26
|
/***/ 7609:
|
@@ -492,10 +493,6 @@ function _defineProperty(obj, key, value) {
|
|
492
493
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
493
494
|
var external_vue_y = x => () => x
|
494
495
|
const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createTextVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createTextVNode, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["customRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.customRef, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["getCurrentInstance"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.getCurrentInstance, ["inject"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.inject, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["onBeforeMount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["provide"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.provide, ["reactive"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.reactive, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["resolveDirective"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.resolveDirective, ["toRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRef, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["vModelText"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.vModelText, ["vShow"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.vShow, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch, ["withDirectives"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.withDirectives });
|
495
|
-
;// CONCATENATED MODULE: external "lodash/isEqual"
|
496
|
-
var isEqual_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
497
|
-
var isEqual_y = x => () => x
|
498
|
-
const isEqual_namespaceObject = isEqual_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_isEqual_ce045a54__["default"] });
|
499
496
|
;// CONCATENATED MODULE: external "../checkbox"
|
500
497
|
var checkbox_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
501
498
|
var checkbox_y = x => () => x
|
@@ -511,7 +508,11 @@ const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () =>
|
|
511
508
|
;// CONCATENATED MODULE: external "../icon"
|
512
509
|
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
513
510
|
var icon_y = x => () => x
|
514
|
-
const icon_namespaceObject = icon_x({ ["
|
511
|
+
const icon_namespaceObject = icon_x({ ["AngleDown"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleDown, ["AngleUpFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AngleUpFill, ["Close"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Close, ["Done"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Done, ["Search"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Search, ["TextAll"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.TextAll });
|
512
|
+
;// CONCATENATED MODULE: external "lodash/isEqual"
|
513
|
+
var isEqual_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
514
|
+
var isEqual_y = x => () => x
|
515
|
+
const isEqual_namespaceObject = isEqual_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_isEqual_ce045a54__["default"] });
|
515
516
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
|
516
517
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
517
518
|
try {
|
@@ -596,15 +597,16 @@ function useRegistry(data) {
|
|
596
597
|
// 注册item
|
597
598
|
var register = function register(key, item) {
|
598
599
|
if (!item) return;
|
599
|
-
if (data.value.has(key)) {
|
600
|
-
// console.warn(`repeat ${key}`, item);
|
601
|
-
return;
|
602
|
-
}
|
603
600
|
return data.value.set(key, item);
|
604
601
|
};
|
605
602
|
// 删除item
|
606
|
-
var unregister = function unregister(key) {
|
607
|
-
|
603
|
+
var unregister = function unregister(key, item) {
|
604
|
+
if (item) {
|
605
|
+
if (data.value.get(key) !== item) return;
|
606
|
+
data.value["delete"](key);
|
607
|
+
} else {
|
608
|
+
data.value["delete"](key);
|
609
|
+
}
|
608
610
|
};
|
609
611
|
return {
|
610
612
|
register: register,
|
@@ -621,6 +623,7 @@ function useDebouncedRef(value) {
|
|
621
623
|
track();
|
622
624
|
return innerValue;
|
623
625
|
},
|
626
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
624
627
|
set: function set(newValue) {
|
625
628
|
clearTimeout(timeout);
|
626
629
|
if (newValue === undefined || newValue === '') {
|
@@ -732,7 +735,6 @@ function isInViewPort(el, client) {
|
|
732
735
|
|
733
736
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
734
737
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
735
|
-
/* eslint-disable vue/no-reserved-component-names */
|
736
738
|
/*
|
737
739
|
* Tencent is pleased to support the open source community by making
|
738
740
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -770,7 +772,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
770
772
|
name: 'Option',
|
771
773
|
props: {
|
772
774
|
id: {
|
773
|
-
type: [String, Number
|
775
|
+
type: [String, Number],
|
774
776
|
require: true
|
775
777
|
},
|
776
778
|
name: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.number, shared_namespaceObject.PropTypes.string]),
|
@@ -779,6 +781,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
779
781
|
},
|
780
782
|
setup: function setup(props, _ref) {
|
781
783
|
var attrs = _ref.attrs;
|
784
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
782
785
|
var _getCurrentInstance = (0,external_vue_namespaceObject.getCurrentInstance)(),
|
783
786
|
proxy = _getCurrentInstance.proxy;
|
784
787
|
var states = (0,external_vue_namespaceObject.reactive)({
|
@@ -860,8 +863,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
860
863
|
group === null || group === void 0 || group.register(optionID.value, proxy);
|
861
864
|
});
|
862
865
|
(0,external_vue_namespaceObject.onBeforeUnmount)(function () {
|
863
|
-
select === null || select === void 0 || select.unregister(optionID.value);
|
864
|
-
group === null || group === void 0 || group.unregister(optionID.value);
|
866
|
+
select === null || select === void 0 || select.unregister(optionID.value, proxy);
|
867
|
+
group === null || group === void 0 || group.unregister(optionID.value, proxy);
|
865
868
|
});
|
866
869
|
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
867
870
|
resolveClassName = _usePrefix.resolveClassName;
|
@@ -894,16 +897,16 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
894
897
|
"onClick": this.handleOptionClick,
|
895
898
|
"onMouseenter": this.handleMouseEnter
|
896
899
|
}, [this.showSelectedIcon && this.selectedStyle === shared_namespaceObject.SelectedTypeEnum.CHECKBOX && (0,external_vue_namespaceObject.createVNode)(checkbox_namespaceObject["default"], {
|
897
|
-
"disabled": this.disabled,
|
898
900
|
"class": this.resolveClassName('select-checkbox'),
|
901
|
+
"disabled": this.disabled,
|
899
902
|
"modelValue": this.selected
|
900
903
|
}, null), (_this$$slots$default = (_this$$slots$default2 = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : (0,external_vue_namespaceObject.createVNode)("span", {
|
901
904
|
"class": this.resolveClassName('select-option-item'),
|
902
905
|
"title": String(this.optionName)
|
903
906
|
}, [this.highlightKeyword ? this.transformNode(String(this.optionName)) : this.optionName]), this.showSelectedIcon && this.selected && this.selectedStyle === shared_namespaceObject.SelectedTypeEnum.CHECK && (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Done, {
|
904
|
-
"class": this.resolveClassName('select-selected-icon'),
|
905
907
|
"width": 22,
|
906
|
-
"height": 22
|
908
|
+
"height": 22,
|
909
|
+
"class": this.resolveClassName('select-selected-icon')
|
907
910
|
}, null)]), [[external_vue_namespaceObject.vShow, this.visible]]);
|
908
911
|
}
|
909
912
|
}));
|
@@ -1054,10 +1057,6 @@ function optionGroup_objectSpread(e) { for (var r = 1; r < arguments.length; r++
|
|
1054
1057
|
}, [(_this$$slots$default = (_this$$slots = this.$slots)["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.call(_this$$slots)]), [[external_vue_namespaceObject.vShow, !this.groupCollapse]])]), [[external_vue_namespaceObject.vShow, this.visible]]);
|
1055
1058
|
}
|
1056
1059
|
}));
|
1057
|
-
;// CONCATENATED MODULE: external "lodash/merge"
|
1058
|
-
var merge_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1059
|
-
var merge_y = x => () => x
|
1060
|
-
const merge_namespaceObject = merge_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_merge_cf99375a__["default"] });
|
1061
1060
|
;// CONCATENATED MODULE: external "../directives"
|
1062
1061
|
var directives_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1063
1062
|
var directives_y = x => () => x
|
@@ -1094,6 +1093,10 @@ const virtual_render_namespaceObject = virtual_render_x({ ["default"]: () => __W
|
|
1094
1093
|
var virtual_render_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1095
1094
|
var virtual_render_less_y = x => () => x
|
1096
1095
|
const virtual_render_less_namespaceObject = virtual_render_less_x({ });
|
1096
|
+
;// CONCATENATED MODULE: external "lodash/merge"
|
1097
|
+
var merge_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1098
|
+
var merge_y = x => () => x
|
1099
|
+
const merge_namespaceObject = merge_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_merge_cf99375a__["default"] });
|
1097
1100
|
;// CONCATENATED MODULE: ../../packages/select/src/pinyin/dict.js
|
1098
1101
|
/*
|
1099
1102
|
* Tencent is pleased to support the open source community by making
|
@@ -1121,8 +1124,6 @@ const virtual_render_less_namespaceObject = virtual_render_less_x({ });
|
|
1121
1124
|
* IN THE SOFTWARE.
|
1122
1125
|
*/
|
1123
1126
|
|
1124
|
-
/* eslint-disable max-len */
|
1125
|
-
|
1126
1127
|
/**
|
1127
1128
|
* Source: <https://android.googlesource.com/platform/packages/providers/ContactsProvider/+/0c49720fb3d58e346739c2ccd56ed2b739249e07/src/com/android/providers/contacts/HanziToPinyin.java>
|
1128
1129
|
* Updated by creeper
|
@@ -2036,7 +2037,6 @@ let COLLATOR;
|
|
2036
2037
|
function patchDict(patchers) {
|
2037
2038
|
if (!patchers) return;
|
2038
2039
|
if (typeof patchers === 'function') {
|
2039
|
-
// eslint-disable-next-line no-param-reassign
|
2040
2040
|
patchers = [patchers];
|
2041
2041
|
}
|
2042
2042
|
if (patchers.forEach) {
|
@@ -2127,7 +2127,6 @@ function genToken(ch) {
|
|
2127
2127
|
}
|
2128
2128
|
|
2129
2129
|
if (cmp < 0) {
|
2130
|
-
// eslint-disable-next-line no-plusplus
|
2131
2130
|
offset--;
|
2132
2131
|
}
|
2133
2132
|
|
@@ -2296,10 +2295,10 @@ if (core.isSupported() && _56l.shouldPatch(core.genToken)) {
|
|
2296
2295
|
|
2297
2296
|
/* harmony default export */ const pinyin = (core);
|
2298
2297
|
|
2299
|
-
;// CONCATENATED MODULE: external "
|
2300
|
-
var
|
2301
|
-
var
|
2302
|
-
const
|
2298
|
+
;// CONCATENATED MODULE: external "../overflow-title"
|
2299
|
+
var overflow_title_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
2300
|
+
var overflow_title_y = x => () => x
|
2301
|
+
const overflow_title_namespaceObject = overflow_title_x({ ["OverflowTitle"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_overflow_title_051a85a5__.OverflowTitle });
|
2303
2302
|
;// CONCATENATED MODULE: external "../tag"
|
2304
2303
|
var tag_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
2305
2304
|
var tag_y = x => () => x
|
@@ -2308,6 +2307,10 @@ const tag_namespaceObject = tag_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE
|
|
2308
2307
|
var tag_less_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
2309
2308
|
var tag_less_y = x => () => x
|
2310
2309
|
const tag_less_namespaceObject = tag_less_x({ });
|
2310
|
+
;// CONCATENATED MODULE: external "lodash/debounce"
|
2311
|
+
var debounce_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
2312
|
+
var debounce_y = x => () => x
|
2313
|
+
const debounce_namespaceObject = debounce_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE_lodash_debounce_3540babe__["default"] });
|
2311
2314
|
;// CONCATENATED MODULE: ../../packages/select/src/selectTagInput.tsx
|
2312
2315
|
|
2313
2316
|
|
@@ -2344,6 +2347,7 @@ const tag_less_namespaceObject = tag_less_x({ });
|
|
2344
2347
|
|
2345
2348
|
|
2346
2349
|
|
2350
|
+
|
2347
2351
|
/* harmony default export */ const selectTagInput = ((0,external_vue_namespaceObject.defineComponent)({
|
2348
2352
|
name: 'SelectTagInput',
|
2349
2353
|
directives: {
|
@@ -2380,7 +2384,7 @@ const tag_less_namespaceObject = tag_less_x({ });
|
|
2380
2384
|
var overflowTagIndex = (0,external_vue_namespaceObject.ref)(null);
|
2381
2385
|
var overflowContent = (0,external_vue_namespaceObject.computed)(function () {
|
2382
2386
|
return selected.value.slice(overflowTagIndex.value, selected.value.length).map(function (item) {
|
2383
|
-
return item.
|
2387
|
+
return select === null || select === void 0 ? void 0 : select.handleGetLabelByValue(item.value);
|
2384
2388
|
}).join(', ');
|
2385
2389
|
});
|
2386
2390
|
(0,external_vue_namespaceObject.watch)(modelValue, function () {
|
@@ -2402,6 +2406,9 @@ const tag_less_namespaceObject = tag_less_x({ });
|
|
2402
2406
|
var _inputRef$value2;
|
2403
2407
|
(_inputRef$value2 = inputRef.value) === null || _inputRef$value2 === void 0 || _inputRef$value2.blur();
|
2404
2408
|
};
|
2409
|
+
var updateModelValue = function updateModelValue(data) {
|
2410
|
+
emit('update:modelValue', data);
|
2411
|
+
};
|
2405
2412
|
var handleInput = function handleInput(e) {
|
2406
2413
|
emit('update:modelValue', e.target.value);
|
2407
2414
|
};
|
@@ -2471,6 +2478,7 @@ const tag_less_namespaceObject = tag_less_x({ });
|
|
2471
2478
|
handleRemoveTag: handleRemoveTag,
|
2472
2479
|
focus: focus,
|
2473
2480
|
blur: blur,
|
2481
|
+
updateModelValue: updateModelValue,
|
2474
2482
|
handleInput: handleInput,
|
2475
2483
|
handleKeydown: handleKeydown,
|
2476
2484
|
resolveClassName: resolveClassName
|
@@ -2485,8 +2493,8 @@ const tag_less_namespaceObject = tag_less_x({ });
|
|
2485
2493
|
_this$$slots$default2,
|
2486
2494
|
_this$$slots3,
|
2487
2495
|
_this = this,
|
2488
|
-
_this$$
|
2489
|
-
_this$$
|
2496
|
+
_this$$slots5,
|
2497
|
+
_this$$slots5$suffix;
|
2490
2498
|
var prefix = (_this$$slots = this.$slots) === null || _this$$slots === void 0 || (_this$$slots$prefix = _this$$slots.prefix) === null || _this$$slots$prefix === void 0 ? void 0 : _this$$slots$prefix.call(_this$$slots);
|
2491
2499
|
var selectTagClass = (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, this.resolveClassName('select-tag'), true), this.resolveClassName('select-tag--default'), true), 'is-disabled', this.disabled), 'collapse-tag', this.collapseTags), 'has-prefix', !!prefix), 'is-simplicity', this.behavior === 'simplicity'));
|
2492
2500
|
var tagWrapperClass = (0,shared_namespaceObject.classes)(_defineProperty({}, this.resolveClassName('select-tag-wrapper'), true));
|
@@ -2494,54 +2502,62 @@ const tag_less_namespaceObject = tag_less_x({ });
|
|
2494
2502
|
display: this.selected.length && !this.filterable ? 'none' : ''
|
2495
2503
|
};
|
2496
2504
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
2497
|
-
"
|
2498
|
-
"
|
2505
|
+
"ref": "tagWrapperRef",
|
2506
|
+
"class": selectTagClass
|
2499
2507
|
}, [(_this$$slots2 = this.$slots) === null || _this$$slots2 === void 0 || (_this$$slots2$prefix = _this$$slots2.prefix) === null || _this$$slots2$prefix === void 0 ? void 0 : _this$$slots2$prefix.call(_this$$slots2), (0,external_vue_namespaceObject.createVNode)("div", {
|
2500
2508
|
"class": tagWrapperClass
|
2501
2509
|
}, [(_this$$slots$default = (_this$$slots$default2 = (_this$$slots3 = this.$slots)["default"]) === null || _this$$slots$default2 === void 0 ? void 0 : _this$$slots$default2.call(_this$$slots3)) !== null && _this$$slots$default !== void 0 ? _this$$slots$default : this.selected.map(function (item, index) {
|
2502
|
-
var _this$select;
|
2510
|
+
var _this$$slots$tagRende, _this$$slots$tagRende2, _this$$slots4, _this$select;
|
2503
2511
|
return (0,external_vue_namespaceObject.createVNode)(tag_namespaceObject["default"], {
|
2504
|
-
"
|
2505
|
-
"theme": _this.tagTheme,
|
2506
|
-
"style": {
|
2507
|
-
display: _this.collapseTags && _this.overflowTagIndex && index >= _this.overflowTagIndex ? 'none' : ''
|
2508
|
-
},
|
2512
|
+
"key": item.value,
|
2509
2513
|
"ref": function ref(el) {
|
2510
2514
|
return _this.tagsRefs[index] = el;
|
2511
2515
|
},
|
2516
|
+
"style": {
|
2517
|
+
display: _this.collapseTags && _this.overflowTagIndex && index >= _this.overflowTagIndex ? 'none' : ''
|
2518
|
+
},
|
2519
|
+
"theme": _this.tagTheme,
|
2520
|
+
"closable": true,
|
2512
2521
|
"onClose": function onClose() {
|
2513
2522
|
return _this.handleRemoveTag(item.value);
|
2514
2523
|
}
|
2515
2524
|
}, {
|
2516
2525
|
"default": function _default() {
|
2517
|
-
return [(_this$
|
2526
|
+
return [(_this$$slots$tagRende = (_this$$slots$tagRende2 = (_this$$slots4 = _this.$slots).tagRender) === null || _this$$slots$tagRende2 === void 0 ? void 0 : _this$$slots$tagRende2.call(_this$$slots4, item)) !== null && _this$$slots$tagRende !== void 0 ? _this$$slots$tagRende : (0,external_vue_namespaceObject.createVNode)(overflow_title_namespaceObject.OverflowTitle, {
|
2527
|
+
"type": "tips"
|
2528
|
+
}, {
|
2529
|
+
"default": function _default() {
|
2530
|
+
return [(_this$select = _this.select) === null || _this$select === void 0 ? void 0 : _this$select.handleGetLabelByValue(item.value)];
|
2531
|
+
}
|
2532
|
+
})];
|
2518
2533
|
}
|
2519
2534
|
});
|
2520
2535
|
}), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)(tag_namespaceObject["default"], {
|
2521
|
-
"
|
2536
|
+
"ref": "collapseTagRef",
|
2522
2537
|
"style": {
|
2523
2538
|
display: !!this.overflowTagIndex && this.collapseTags ? '' : 'none'
|
2524
2539
|
},
|
2525
|
-
"
|
2540
|
+
"class": this.resolveClassName('select-overflow-tag')
|
2526
2541
|
}, {
|
2527
2542
|
"default": function _default() {
|
2528
2543
|
return [(0,external_vue_namespaceObject.createTextVNode)("+"), _this.selected.length - _this.overflowTagIndex];
|
2529
2544
|
}
|
2530
2545
|
}), [[(0,external_vue_namespaceObject.resolveDirective)("bk-tooltips"), {
|
2531
2546
|
content: this.overflowContent,
|
2532
|
-
disabled: !this.overflowTagIndex || !this.collapseTags
|
2547
|
+
disabled: !this.overflowTagIndex || !this.collapseTags,
|
2548
|
+
extCls: this.resolveClassName('select-tooltips')
|
2533
2549
|
}]]), (0,external_vue_namespaceObject.createVNode)("input", {
|
2534
|
-
"class": this.resolveClassName('select-tag-input'),
|
2535
2550
|
"ref": "inputRef",
|
2536
|
-
"type": "text",
|
2537
2551
|
"style": inputStyle,
|
2552
|
+
"class": this.resolveClassName('select-tag-input'),
|
2553
|
+
"disabled": this.disabled,
|
2538
2554
|
"placeholder": !this.selected.length ? this.placeholder : '',
|
2539
2555
|
"readonly": !this.filterable,
|
2540
|
-
"
|
2556
|
+
"type": "text",
|
2541
2557
|
"value": !this.filterable ? '' : this.value,
|
2542
2558
|
"onInput": this.handleInput,
|
2543
2559
|
"onKeydown": this.handleKeydown
|
2544
|
-
}, null)]), (_this$$
|
2560
|
+
}, null)]), (_this$$slots5 = this.$slots) === null || _this$$slots5 === void 0 || (_this$$slots5$suffix = _this$$slots5.suffix) === null || _this$$slots5$suffix === void 0 ? void 0 : _this$$slots5$suffix.call(_this$$slots5)]);
|
2545
2561
|
}
|
2546
2562
|
}));
|
2547
2563
|
;// CONCATENATED MODULE: ../../packages/select/src/select.tsx
|
@@ -2554,7 +2570,6 @@ function select_unsupportedIterableToArray(o, minLen) { if (!o) return; if (type
|
|
2554
2570
|
function select_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
2555
2571
|
function select_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
2556
2572
|
function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? select_ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : select_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
2557
|
-
/* eslint-disable vue/no-reserved-component-names */
|
2558
2573
|
/*
|
2559
2574
|
* Tencent is pleased to support the open source community by making
|
2560
2575
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -2613,9 +2628,10 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2613
2628
|
size: shared_namespaceObject.PropTypes.size().def(shared_namespaceObject.SizeEnum.DEFAULT),
|
2614
2629
|
clearable: shared_namespaceObject.PropTypes.bool.def(true),
|
2615
2630
|
loading: shared_namespaceObject.PropTypes.bool.def(false),
|
2616
|
-
filterable: shared_namespaceObject.PropTypes.bool.def(
|
2631
|
+
filterable: shared_namespaceObject.PropTypes.bool.def(false),
|
2617
2632
|
remoteMethod: shared_namespaceObject.PropTypes.func,
|
2618
|
-
scrollHeight: shared_namespaceObject.PropTypes.number.def(
|
2633
|
+
scrollHeight: shared_namespaceObject.PropTypes.number.def(204),
|
2634
|
+
minHeight: shared_namespaceObject.PropTypes.number,
|
2619
2635
|
showAll: shared_namespaceObject.PropTypes.bool.def(false),
|
2620
2636
|
allOptionId: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.number, shared_namespaceObject.PropTypes.string]),
|
2621
2637
|
showSelectAll: shared_namespaceObject.PropTypes.bool.def(false),
|
@@ -2653,7 +2669,12 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2653
2669
|
type: Function
|
2654
2670
|
},
|
2655
2671
|
searchWithPinyin: shared_namespaceObject.PropTypes.bool.def(true),
|
2656
|
-
highlightKeyword: shared_namespaceObject.PropTypes.bool.def(false)
|
2672
|
+
highlightKeyword: shared_namespaceObject.PropTypes.bool.def(false),
|
2673
|
+
trigger: {
|
2674
|
+
type: String,
|
2675
|
+
"default": 'default'
|
2676
|
+
},
|
2677
|
+
disableScrollToSelectedOption: shared_namespaceObject.PropTypes.bool.def(false) // 是否禁用滚动到选中option的功能
|
2657
2678
|
},
|
2658
2679
|
emits: ['update:modelValue', 'change', 'toggle', 'clear', 'scroll-end', 'focus', 'blur', 'tag-remove', 'select', 'deselect', 'search-change'],
|
2659
2680
|
setup: function setup(props, _ref) {
|
@@ -2693,7 +2714,10 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2693
2714
|
filterOption = _toRefs.filterOption,
|
2694
2715
|
searchWithPinyin = _toRefs.searchWithPinyin,
|
2695
2716
|
highlightKeyword = _toRefs.highlightKeyword,
|
2696
|
-
disableFocusBehavior = _toRefs.disableFocusBehavior
|
2717
|
+
disableFocusBehavior = _toRefs.disableFocusBehavior,
|
2718
|
+
trigger = _toRefs.trigger,
|
2719
|
+
disableScrollToSelectedOption = _toRefs.disableScrollToSelectedOption;
|
2720
|
+
var virtualRenderRef = (0,external_vue_namespaceObject.ref)(null);
|
2697
2721
|
var localNoDataText = (0,external_vue_namespaceObject.computed)(function () {
|
2698
2722
|
if (props.noDataText === undefined) {
|
2699
2723
|
return t.value.noData;
|
@@ -2735,8 +2759,8 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2735
2759
|
var triggerRef = (0,external_vue_namespaceObject.ref)();
|
2736
2760
|
var contentRef = (0,external_vue_namespaceObject.ref)();
|
2737
2761
|
var searchRef = (0,external_vue_namespaceObject.ref)();
|
2762
|
+
var scrollContainerRef = (0,external_vue_namespaceObject.ref)();
|
2738
2763
|
var selectTagInputRef = (0,external_vue_namespaceObject.ref)();
|
2739
|
-
var virtualRenderRef = (0,external_vue_namespaceObject.ref)();
|
2740
2764
|
var popoverRef = (0,external_vue_namespaceObject.ref)();
|
2741
2765
|
var optionsMap = (0,external_vue_namespaceObject.ref)(new Map());
|
2742
2766
|
var options = (0,external_vue_namespaceObject.computed)(function () {
|
@@ -2746,12 +2770,13 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2746
2770
|
});
|
2747
2771
|
var groupsMap = (0,external_vue_namespaceObject.ref)(new Map());
|
2748
2772
|
var selected = (0,external_vue_namespaceObject.ref)([]);
|
2749
|
-
var
|
2773
|
+
var selectedCacheMap = (0,external_vue_namespaceObject.computed)(function () {
|
2750
2774
|
return selected.value.reduce(function (pre, item) {
|
2751
2775
|
pre[item.value] = item.label;
|
2752
2776
|
return pre;
|
2753
|
-
}, {});
|
2777
|
+
}, _defineProperty({}, "".concat(allOptionId.value), t.value.all));
|
2754
2778
|
});
|
2779
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2755
2780
|
var activeOptionValue = (0,external_vue_namespaceObject.ref)(); // 当前悬浮的option
|
2756
2781
|
var listMap = (0,external_vue_namespaceObject.computed)(function () {
|
2757
2782
|
return list.value.reduce(function (pre, item) {
|
@@ -2775,8 +2800,8 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2775
2800
|
var _popoverRef$value;
|
2776
2801
|
(_popoverRef$value = popoverRef.value) === null || _popoverRef$value === void 0 || _popoverRef$value.updatePopover(null, popoverConfig.value);
|
2777
2802
|
});
|
2778
|
-
//
|
2779
|
-
var
|
2803
|
+
// list模式下搜索后的值
|
2804
|
+
var filterList = (0,external_vue_namespaceObject.computed)(function () {
|
2780
2805
|
return isRemoteSearch.value ? list.value : list.value.filter(function (item) {
|
2781
2806
|
return defaultSearchMethod(curSearchValue.value, String(item[displayKey.value]), item);
|
2782
2807
|
});
|
@@ -2849,12 +2874,22 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2849
2874
|
var virtualHeight = (0,external_vue_namespaceObject.computed)(function () {
|
2850
2875
|
return scrollHeight.value - 12 - (isShowSelectAll.value ? 32 : 0);
|
2851
2876
|
});
|
2877
|
+
var virtualLineHeight = (0,external_vue_namespaceObject.ref)(32);
|
2878
|
+
// 是否启用虚拟滚动(如果配置了启用,但是数据小于滚动高度则不开启)
|
2879
|
+
var isEnableVirtualRender = (0,external_vue_namespaceObject.computed)(function () {
|
2880
|
+
if (enableVirtualRender.value) return filterList.value.length * virtualLineHeight.value > virtualHeight.value;
|
2881
|
+
return false;
|
2882
|
+
});
|
2883
|
+
// 预加载滚动数据
|
2884
|
+
var preloadItemCount = (0,external_vue_namespaceObject.computed)(function () {
|
2885
|
+
return Math.ceil(virtualHeight.value / virtualLineHeight.value);
|
2886
|
+
});
|
2852
2887
|
// 当前空状态时显示文案
|
2853
2888
|
var curContentText = (0,external_vue_namespaceObject.computed)(function () {
|
2854
2889
|
if (searchLoading.value) {
|
2855
2890
|
return localLoadingText.value;
|
2856
2891
|
}
|
2857
|
-
if (isSearchEmpty.value || list.value.length && !
|
2892
|
+
if (isSearchEmpty.value || list.value.length && !filterList.value.length) {
|
2858
2893
|
return localNoMatchText.value;
|
2859
2894
|
}
|
2860
2895
|
if (isOptionsEmpty.value) {
|
@@ -2910,9 +2945,21 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2910
2945
|
hidePopover = _usePopover.hidePopover,
|
2911
2946
|
showPopover = _usePopover.showPopover,
|
2912
2947
|
togglePopover = _usePopover.togglePopover;
|
2948
|
+
var handleHidePopover = function handleHidePopover() {
|
2949
|
+
if (trigger.value === 'manual') return;
|
2950
|
+
hidePopover();
|
2951
|
+
};
|
2952
|
+
var handleShowPopover = function handleShowPopover() {
|
2953
|
+
if (trigger.value === 'manual') return;
|
2954
|
+
showPopover();
|
2955
|
+
};
|
2913
2956
|
// 输入框是否可以输入内容
|
2957
|
+
// const isInput = computed(
|
2958
|
+
// () => ((filterable.value && inputSearch.value) || allowCreate.value) && isPopoverShow.value,
|
2959
|
+
// );
|
2960
|
+
// 自定义创建失焦后仍保留输入框内的内容
|
2914
2961
|
var isInput = (0,external_vue_namespaceObject.computed)(function () {
|
2915
|
-
return
|
2962
|
+
return filterable.value && inputSearch.value && isPopoverShow.value || allowCreate.value;
|
2916
2963
|
});
|
2917
2964
|
(0,external_vue_namespaceObject.watch)(isPopoverShow, function (isShow) {
|
2918
2965
|
emit('toggle', isPopoverShow.value);
|
@@ -2933,10 +2980,10 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2933
2980
|
// 滚动到当前选中的options中
|
2934
2981
|
var scrollActiveOptionIntoView = function scrollActiveOptionIntoView() {
|
2935
2982
|
var _contentRef$value, _contentRef$value$que, _optionsDom$;
|
2983
|
+
if (isEnableVirtualRender.value || disableScrollToSelectedOption.value) return;
|
2936
2984
|
var optionsDom = (_contentRef$value = contentRef.value) === null || _contentRef$value === void 0 || (_contentRef$value$que = _contentRef$value.querySelectorAll) === null || _contentRef$value$que === void 0 ? void 0 : _contentRef$value$que.call(_contentRef$value, '.is-selected');
|
2937
2985
|
optionsDom === null || optionsDom === void 0 || (_optionsDom$ = optionsDom[0]) === null || _optionsDom$ === void 0 || _optionsDom$.scrollIntoView({
|
2938
2986
|
block: 'center'
|
2939
|
-
// behavior: 'smooth',
|
2940
2987
|
});
|
2941
2988
|
};
|
2942
2989
|
// 初始化当前悬浮的option项
|
@@ -2953,14 +3000,17 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2953
3000
|
}
|
2954
3001
|
};
|
2955
3002
|
// 默认搜索方法
|
3003
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2956
3004
|
var defaultSearchMethod = function defaultSearchMethod(searchValue, optionName) {
|
2957
3005
|
var _toLowerCase2;
|
2958
3006
|
var filterData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
2959
3007
|
if (hasFilterOptionFunc.value) {
|
3008
|
+
// 是否配置了单个options过滤
|
2960
3009
|
return !!filterOption.value(searchValue, select_objectSpread({}, filterData));
|
2961
3010
|
}
|
2962
3011
|
if (searchWithPinyin.value) {
|
2963
3012
|
var _toLowerCase;
|
3013
|
+
// 是否配置了拼音过滤
|
2964
3014
|
var pinyinList = pinyin.parse(optionName).map(function (v) {
|
2965
3015
|
if (v.type === 2) {
|
2966
3016
|
return v.target.toLowerCase();
|
@@ -2994,6 +3044,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
2994
3044
|
searchLoading = _useRemoteSearch.searchLoading;
|
2995
3045
|
// 派发search change事件
|
2996
3046
|
(0,external_vue_namespaceObject.watch)(searchValue, function () {
|
3047
|
+
scrollContainerRef.value.scrollTop = 0;
|
2997
3048
|
emit('search-change', searchValue.value);
|
2998
3049
|
});
|
2999
3050
|
// 派发change事件
|
@@ -3001,10 +3052,12 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3001
3052
|
if (val === modelValue.value) return;
|
3002
3053
|
emit('update:modelValue', val, modelValue.value);
|
3003
3054
|
emit('change', val, modelValue.value);
|
3055
|
+
// 重置Selected 以model-value为主
|
3056
|
+
handleSetSelectedData();
|
3004
3057
|
};
|
3005
3058
|
// 派发toggle事件
|
3006
3059
|
var handleTogglePopover = function handleTogglePopover() {
|
3007
|
-
if (isDisabled.value) return;
|
3060
|
+
if (isDisabled.value || trigger.value === 'manual') return;
|
3008
3061
|
handleFocus();
|
3009
3062
|
togglePopover();
|
3010
3063
|
};
|
@@ -3045,7 +3098,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3045
3098
|
label: value
|
3046
3099
|
}];
|
3047
3100
|
emitChange(value);
|
3048
|
-
|
3101
|
+
handleHidePopover();
|
3049
3102
|
}
|
3050
3103
|
customOptionName.value = '';
|
3051
3104
|
};
|
@@ -3079,6 +3132,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3079
3132
|
return item.value;
|
3080
3133
|
}));
|
3081
3134
|
emit('select', option.optionID);
|
3135
|
+
clearMultipleInputValue();
|
3082
3136
|
}
|
3083
3137
|
focusInput();
|
3084
3138
|
} else {
|
@@ -3087,12 +3141,22 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3087
3141
|
label: option.optionName || option.optionID,
|
3088
3142
|
value: option.optionID
|
3089
3143
|
}];
|
3144
|
+
if (filterable.value && allowCreate.value) {
|
3145
|
+
customOptionName.value = '';
|
3146
|
+
}
|
3090
3147
|
emitChange(option.optionID);
|
3091
3148
|
emit('select', option.optionID);
|
3092
|
-
|
3149
|
+
handleHidePopover();
|
3093
3150
|
handleBlur();
|
3094
3151
|
}
|
3095
3152
|
};
|
3153
|
+
// 是否需要清空多选输入框内容
|
3154
|
+
var clearMultipleInputValue = function clearMultipleInputValue() {
|
3155
|
+
if (['tag'].includes(multipleMode.value) && isInput.value) {
|
3156
|
+
var _selectTagInputRef$va;
|
3157
|
+
(_selectTagInputRef$va = selectTagInputRef.value) === null || _selectTagInputRef$va === void 0 || _selectTagInputRef$va.updateModelValue('');
|
3158
|
+
}
|
3159
|
+
};
|
3096
3160
|
// 聚焦输入框
|
3097
3161
|
var focusInput = function focusInput() {
|
3098
3162
|
if (disableFocusBehavior.value) return;
|
@@ -3102,8 +3166,8 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3102
3166
|
(_searchRef$value = searchRef.value) === null || _searchRef$value === void 0 || _searchRef$value.focus();
|
3103
3167
|
} else {
|
3104
3168
|
if (multipleMode.value === 'tag') {
|
3105
|
-
var _selectTagInputRef$
|
3106
|
-
(_selectTagInputRef$
|
3169
|
+
var _selectTagInputRef$va2;
|
3170
|
+
(_selectTagInputRef$va2 = selectTagInputRef.value) === null || _selectTagInputRef$va2 === void 0 || _selectTagInputRef$va2.focus();
|
3107
3171
|
} else {
|
3108
3172
|
var _inputRef$value;
|
3109
3173
|
(_inputRef$value = inputRef.value) === null || _inputRef$value === void 0 || _inputRef$value.focus();
|
@@ -3115,8 +3179,8 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3115
3179
|
var blurInput = function blurInput() {
|
3116
3180
|
setTimeout(function () {
|
3117
3181
|
if (multipleMode.value === 'tag') {
|
3118
|
-
var _selectTagInputRef$
|
3119
|
-
(_selectTagInputRef$
|
3182
|
+
var _selectTagInputRef$va3;
|
3183
|
+
(_selectTagInputRef$va3 = selectTagInputRef.value) === null || _selectTagInputRef$va3 === void 0 || _selectTagInputRef$va3.blur();
|
3120
3184
|
} else {
|
3121
3185
|
var _inputRef$value2;
|
3122
3186
|
(_inputRef$value2 = inputRef.value) === null || _inputRef$value2 === void 0 || _inputRef$value2.blur();
|
@@ -3127,9 +3191,10 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3127
3191
|
var handleClear = function handleClear(e) {
|
3128
3192
|
e.stopPropagation();
|
3129
3193
|
selected.value = [];
|
3194
|
+
clearMultipleInputValue();
|
3130
3195
|
emitChange(multiple.value ? [] : '');
|
3131
3196
|
emit('clear', multiple.value ? [] : '');
|
3132
|
-
|
3197
|
+
handleHidePopover();
|
3133
3198
|
};
|
3134
3199
|
var handleSelectedAllOptionMouseEnter = function handleSelectedAllOptionMouseEnter() {
|
3135
3200
|
activeOptionValue.value = '';
|
@@ -3140,22 +3205,21 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3140
3205
|
selected.value = [];
|
3141
3206
|
} else {
|
3142
3207
|
var _list$value;
|
3143
|
-
var
|
3208
|
+
var tmpSelectedMap = new Map();
|
3144
3209
|
options.value.forEach(function (option) {
|
3145
|
-
if (option.disabled) return;
|
3146
|
-
|
3147
|
-
value: option.optionID,
|
3148
|
-
label: option.optionName || option.optionID
|
3149
|
-
});
|
3210
|
+
if (option.disabled || tmpSelectedMap.has(option.optionID)) return;
|
3211
|
+
tmpSelectedMap.set(option.optionID, option.optionName || option.optionID);
|
3150
3212
|
});
|
3151
3213
|
(_list$value = list.value) === null || _list$value === void 0 || _list$value.forEach(function (item) {
|
3152
|
-
if (item.disabled) return;
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3214
|
+
if (item.disabled || tmpSelectedMap.has(item[idKey.value])) return;
|
3215
|
+
tmpSelectedMap.set(item[idKey.value], item[displayKey.value]);
|
3216
|
+
});
|
3217
|
+
selected.value = Array.from(tmpSelectedMap.keys()).map(function (key) {
|
3218
|
+
return {
|
3219
|
+
value: key,
|
3220
|
+
label: tmpSelectedMap.get(key)
|
3221
|
+
};
|
3157
3222
|
});
|
3158
|
-
selected.value = tmpSelected;
|
3159
3223
|
}
|
3160
3224
|
emitChange(selected.value.map(function (item) {
|
3161
3225
|
return item.value;
|
@@ -3205,7 +3269,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3205
3269
|
emit('tag-remove', val);
|
3206
3270
|
}
|
3207
3271
|
};
|
3208
|
-
//
|
3272
|
+
// 优先级: option name属性 > list模式 > 上一次选择的label > 当前值
|
3209
3273
|
var handleGetLabelByValue = function handleGetLabelByValue(value) {
|
3210
3274
|
var _optionsMap$value2;
|
3211
3275
|
// 处理options value为对象类型,引用类型变更后,回显不对问题
|
@@ -3227,7 +3291,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3227
3291
|
_iterator.f();
|
3228
3292
|
}
|
3229
3293
|
}
|
3230
|
-
return ((_optionsMap$value2 = optionsMap.value) === null || _optionsMap$value2 === void 0 || (_optionsMap$value2 = _optionsMap$value2.get(tmpValue)) === null || _optionsMap$value2 === void 0 ? void 0 : _optionsMap$value2.optionName) || listMap.value[tmpValue] ||
|
3294
|
+
return ((_optionsMap$value2 = optionsMap.value) === null || _optionsMap$value2 === void 0 || (_optionsMap$value2 = _optionsMap$value2.get(tmpValue)) === null || _optionsMap$value2 === void 0 ? void 0 : _optionsMap$value2.optionName) || listMap.value[tmpValue] || selectedCacheMap.value[tmpValue] || tmpValue;
|
3231
3295
|
};
|
3232
3296
|
// 设置selected选项
|
3233
3297
|
var handleSetSelectedData = function handleSetSelectedData() {
|
@@ -3240,7 +3304,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3240
3304
|
};
|
3241
3305
|
}));
|
3242
3306
|
} else {
|
3243
|
-
if (modelValue.value
|
3307
|
+
if (modelValue.value || allowEmptyValues.value.includes(modelValue.value)) {
|
3244
3308
|
selected.value = [{
|
3245
3309
|
value: modelValue.value,
|
3246
3310
|
label: handleGetLabelByValue(modelValue.value)
|
@@ -3250,9 +3314,18 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3250
3314
|
}
|
3251
3315
|
}
|
3252
3316
|
};
|
3317
|
+
// 手动设置selected值
|
3318
|
+
var setSelected = function setSelected(data) {
|
3319
|
+
selected.value = data.map(function (item) {
|
3320
|
+
return {
|
3321
|
+
label: item[displayKey.value],
|
3322
|
+
value: item[idKey.value]
|
3323
|
+
};
|
3324
|
+
});
|
3325
|
+
};
|
3253
3326
|
// 处理键盘事件
|
3254
3327
|
var handleDocumentKeydown = function handleDocumentKeydown(e) {
|
3255
|
-
if (!isPopoverShow.value ||
|
3328
|
+
if (!isPopoverShow.value || isEnableVirtualRender.value) return;
|
3256
3329
|
var availableOptions = options.value.filter(function (option) {
|
3257
3330
|
return !option.disabled && option.visible;
|
3258
3331
|
});
|
@@ -3307,16 +3380,9 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3307
3380
|
var event = _ref2.event;
|
3308
3381
|
var target = event.target;
|
3309
3382
|
if ((_triggerRef$value = triggerRef.value) !== null && _triggerRef$value !== void 0 && _triggerRef$value.contains(target) || triggerRef.value === target) return;
|
3310
|
-
|
3383
|
+
handleHidePopover();
|
3311
3384
|
handleBlur();
|
3312
3385
|
};
|
3313
|
-
var handlePopoverShow = function handlePopoverShow() {
|
3314
|
-
setTimeout(function () {
|
3315
|
-
var _virtualRenderRef$val, _virtualRenderRef$val2;
|
3316
|
-
// 虚拟滚动首次未更新问题
|
3317
|
-
enableVirtualRender.value && ((_virtualRenderRef$val = virtualRenderRef.value) === null || _virtualRenderRef$val === void 0 || (_virtualRenderRef$val2 = _virtualRenderRef$val.reset) === null || _virtualRenderRef$val2 === void 0 ? void 0 : _virtualRenderRef$val2.call(_virtualRenderRef$val));
|
3318
|
-
});
|
3319
|
-
};
|
3320
3386
|
(0,external_vue_namespaceObject.provide)(selectKey, (0,external_vue_namespaceObject.reactive)({
|
3321
3387
|
multiple: multiple,
|
3322
3388
|
selected: selected,
|
@@ -3335,10 +3401,14 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3335
3401
|
(0,external_vue_namespaceObject.onMounted)(function () {
|
3336
3402
|
handleSetSelectedData();
|
3337
3403
|
setTimeout(function () {
|
3338
|
-
showOnInit.value &&
|
3404
|
+
showOnInit.value && handleShowPopover();
|
3339
3405
|
autoFocus.value && focusInput();
|
3340
3406
|
});
|
3341
3407
|
});
|
3408
|
+
var handlePopoverShown = function handlePopoverShown() {
|
3409
|
+
var _virtualRenderRef$val;
|
3410
|
+
(_virtualRenderRef$val = virtualRenderRef.value) === null || _virtualRenderRef$val === void 0 || _virtualRenderRef$val.scrollTo(0, 1);
|
3411
|
+
};
|
3342
3412
|
return {
|
3343
3413
|
t: t,
|
3344
3414
|
selected: selected,
|
@@ -3353,8 +3423,8 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3353
3423
|
triggerRef: triggerRef,
|
3354
3424
|
contentRef: contentRef,
|
3355
3425
|
searchRef: searchRef,
|
3426
|
+
scrollContainerRef: scrollContainerRef,
|
3356
3427
|
selectTagInputRef: selectTagInputRef,
|
3357
|
-
virtualRenderRef: virtualRenderRef,
|
3358
3428
|
popoverRef: popoverRef,
|
3359
3429
|
searchLoading: searchLoading,
|
3360
3430
|
isOptionsEmpty: isOptionsEmpty,
|
@@ -3369,7 +3439,7 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3369
3439
|
isShowAll: isShowAll,
|
3370
3440
|
isShowSelectAll: isShowSelectAll,
|
3371
3441
|
virtualHeight: virtualHeight,
|
3372
|
-
|
3442
|
+
filterList: filterList,
|
3373
3443
|
isCollapseTags: isCollapseTags,
|
3374
3444
|
popoverConfig: popoverConfig,
|
3375
3445
|
isAllSelected: isAllSelected,
|
@@ -3391,26 +3461,33 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3391
3461
|
handleDeleteTag: handleDeleteTag,
|
3392
3462
|
handleInputChange: handleInputChange,
|
3393
3463
|
handleSelectedAllOptionMouseEnter: handleSelectedAllOptionMouseEnter,
|
3394
|
-
handlePopoverShow: handlePopoverShow,
|
3395
3464
|
localLoadingText: localLoadingText,
|
3396
3465
|
localPlaceholder: localPlaceholder,
|
3397
3466
|
localSearchPlaceholder: localSearchPlaceholder,
|
3398
3467
|
localSelectAllText: localSelectAllText,
|
3399
3468
|
resolveClassName: resolveClassName,
|
3400
|
-
handleCreateCustomOption: handleCreateCustomOption
|
3469
|
+
handleCreateCustomOption: handleCreateCustomOption,
|
3470
|
+
handlePopoverShown: handlePopoverShown,
|
3471
|
+
virtualLineHeight: virtualLineHeight,
|
3472
|
+
isEnableVirtualRender: isEnableVirtualRender,
|
3473
|
+
preloadItemCount: preloadItemCount,
|
3474
|
+
virtualRenderRef: virtualRenderRef,
|
3475
|
+
setSelected: setSelected
|
3401
3476
|
};
|
3402
3477
|
},
|
3403
3478
|
render: function render() {
|
3404
3479
|
var _this = this;
|
3405
3480
|
var selectClass = (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(this.resolveClassName('select')), true), 'popover-show', this.isPopoverShow), 'is-disabled', this.isDisabled), 'is-focus', this.isFocus), 'is-filterable', this.filterable), this.size, true), this.behavior, true));
|
3481
|
+
// 右侧ICON
|
3406
3482
|
var suffixIcon = function suffixIcon() {
|
3483
|
+
var _this$$slots, _this$$slots2, _this$$slots2$suffix;
|
3407
3484
|
if (_this.loading) {
|
3408
3485
|
return (0,external_vue_namespaceObject.createVNode)(loading_namespaceObject["default"], {
|
3409
|
-
"loading": true,
|
3410
|
-
"theme": "primary",
|
3411
3486
|
"class": "spinner",
|
3487
|
+
"loading": true,
|
3412
3488
|
"mode": "spin",
|
3413
|
-
"size": "mini"
|
3489
|
+
"size": "mini",
|
3490
|
+
"theme": "primary"
|
3414
3491
|
}, null);
|
3415
3492
|
}
|
3416
3493
|
if (_this.clearable && _this.isHover && _this.selected.length && !_this.isDisabled) {
|
@@ -3419,12 +3496,14 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3419
3496
|
"onClick": _this.handleClear
|
3420
3497
|
}, null);
|
3421
3498
|
}
|
3422
|
-
return (0,external_vue_namespaceObject.createVNode)(
|
3423
|
-
"class": "angle-
|
3499
|
+
return (_this$$slots = _this.$slots) !== null && _this$$slots !== void 0 && _this$$slots.suffix ? (0,external_vue_namespaceObject.createVNode)("span", {
|
3500
|
+
"class": "angle-down"
|
3501
|
+
}, [(_this$$slots2 = _this.$slots) === null || _this$$slots2 === void 0 || (_this$$slots2$suffix = _this$$slots2.suffix) === null || _this$$slots2$suffix === void 0 ? void 0 : _this$$slots2$suffix.call(_this$$slots2)]) : (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.AngleDown, {
|
3502
|
+
"class": "angle-down"
|
3424
3503
|
}, null);
|
3425
3504
|
};
|
3426
3505
|
var renderPrefix = function renderPrefix() {
|
3427
|
-
var _this$$
|
3506
|
+
var _this$$slots3;
|
3428
3507
|
if (_this.prefix) {
|
3429
3508
|
return function () {
|
3430
3509
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
@@ -3432,9 +3511,9 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3432
3511
|
}, [(0,external_vue_namespaceObject.createVNode)("span", null, [_this.prefix])]);
|
3433
3512
|
};
|
3434
3513
|
}
|
3435
|
-
return (_this$$
|
3436
|
-
var _this$$
|
3437
|
-
return (_this$$
|
3514
|
+
return (_this$$slots3 = _this.$slots) !== null && _this$$slots3 !== void 0 && _this$$slots3.prefix ? function () {
|
3515
|
+
var _this$$slots4, _this$$slots4$prefix;
|
3516
|
+
return (_this$$slots4 = _this.$slots) === null || _this$$slots4 === void 0 || (_this$$slots4$prefix = _this$$slots4.prefix) === null || _this$$slots4$prefix === void 0 ? void 0 : _this$$slots4$prefix.call(_this$$slots4);
|
3438
3517
|
} : undefined;
|
3439
3518
|
};
|
3440
3519
|
// 全选
|
@@ -3442,12 +3521,12 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3442
3521
|
if (!_this.isShowSelectAll) return;
|
3443
3522
|
return (0,external_vue_namespaceObject.createVNode)("li", {
|
3444
3523
|
"class": _this.resolveClassName('select-option'),
|
3445
|
-
"
|
3446
|
-
"
|
3524
|
+
"onClick": _this.toggleSelectAll,
|
3525
|
+
"onMouseenter": _this.handleSelectedAllOptionMouseEnter
|
3447
3526
|
}, [_this.selectedStyle === 'checkbox' && (0,external_vue_namespaceObject.createVNode)(checkbox_namespaceObject["default"], {
|
3448
3527
|
"class": _this.resolveClassName('select-checkbox'),
|
3449
|
-
"
|
3450
|
-
"
|
3528
|
+
"indeterminate": !_this.isAllSelected && !!_this.selected.length && !_this.isAll,
|
3529
|
+
"modelValue": _this.isAllSelected
|
3451
3530
|
}, null), _this.t.selectAll]);
|
3452
3531
|
};
|
3453
3532
|
// 全部
|
@@ -3463,33 +3542,38 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3463
3542
|
"class": "select-all-icon"
|
3464
3543
|
}, null), (0,external_vue_namespaceObject.createVNode)("span", null, [_this.t.all])])]);
|
3465
3544
|
};
|
3545
|
+
// 默认trigger输入框渲染
|
3466
3546
|
var renderTriggerInput = function renderTriggerInput() {
|
3467
|
-
var _this$$
|
3547
|
+
var _this$$slots9;
|
3468
3548
|
if (_this.multipleMode === 'tag') {
|
3469
|
-
var _this$$
|
3549
|
+
var _this$$slots5, _this$$slots7;
|
3470
3550
|
return (0,external_vue_namespaceObject.createVNode)(selectTagInput, {
|
3471
3551
|
"ref": "selectTagInputRef",
|
3472
3552
|
"modelValue": _this.customOptionName,
|
3473
3553
|
"onUpdate:modelValue": function onUpdateModelValue($event) {
|
3474
3554
|
return _this.customOptionName = $event;
|
3475
3555
|
},
|
3476
|
-
"selected": _this.selected,
|
3477
|
-
"tagTheme": _this.tagTheme,
|
3478
|
-
"placeholder": _this.localPlaceholder,
|
3479
|
-
"filterable": _this.isInput,
|
3480
|
-
"disabled": _this.isDisabled,
|
3481
3556
|
"behavior": _this.behavior,
|
3482
|
-
"onRemove": _this.handleDeleteTag,
|
3483
3557
|
"collapseTags": _this.isCollapseTags,
|
3484
|
-
"
|
3558
|
+
"disabled": _this.isDisabled,
|
3559
|
+
"filterable": _this.isInput,
|
3560
|
+
"placeholder": _this.localPlaceholder,
|
3561
|
+
"selected": _this.selected,
|
3562
|
+
"tagTheme": _this.tagTheme,
|
3563
|
+
"onEnter": _this.handleCreateCustomOption,
|
3564
|
+
"onRemove": _this.handleDeleteTag
|
3485
3565
|
}, {
|
3486
3566
|
prefix: renderPrefix(),
|
3487
|
-
"default": ((_this$$
|
3488
|
-
var _this$$
|
3489
|
-
return (_this$$
|
3567
|
+
"default": ((_this$$slots5 = _this.$slots) === null || _this$$slots5 === void 0 ? void 0 : _this$$slots5.tag) && function () {
|
3568
|
+
var _this$$slots6;
|
3569
|
+
return (_this$$slots6 = _this.$slots) === null || _this$$slots6 === void 0 ? void 0 : _this$$slots6.tag({
|
3490
3570
|
selected: _this.selected
|
3491
3571
|
});
|
3492
3572
|
},
|
3573
|
+
tagRender: ((_this$$slots7 = _this.$slots) === null || _this$$slots7 === void 0 ? void 0 : _this$$slots7.tagRender) && function (item) {
|
3574
|
+
var _this$$slots8;
|
3575
|
+
return (_this$$slots8 = _this.$slots) === null || _this$$slots8 === void 0 ? void 0 : _this$$slots8.tagRender(item);
|
3576
|
+
},
|
3493
3577
|
suffix: function suffix() {
|
3494
3578
|
return suffixIcon();
|
3495
3579
|
}
|
@@ -3497,24 +3581,24 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3497
3581
|
}
|
3498
3582
|
return (0,external_vue_namespaceObject.createVNode)(input_namespaceObject["default"], (0,external_vue_namespaceObject.mergeProps)({
|
3499
3583
|
"ref": "inputRef",
|
3500
|
-
"
|
3584
|
+
"behavior": _this.behavior,
|
3585
|
+
"disabled": _this.isDisabled,
|
3501
3586
|
"modelValue": _this.isInput ? _this.customOptionName : _this.selectedLabel.join(','),
|
3502
3587
|
"placeholder": _this.isInput ? _this.selectedLabel.join(',') || _this.localPlaceholder : _this.localPlaceholder,
|
3503
3588
|
"readonly": !_this.isInput,
|
3504
3589
|
"selectReadonly": true,
|
3505
|
-
"disabled": _this.isDisabled,
|
3506
|
-
"behavior": _this.behavior,
|
3507
3590
|
"size": _this.size,
|
3508
|
-
"withValidate": false,
|
3509
3591
|
"stopPropagation": false,
|
3510
|
-
"
|
3511
|
-
"
|
3592
|
+
"type": "text",
|
3593
|
+
"withValidate": false,
|
3594
|
+
"onEnter": _this.handleCreateCustomOption,
|
3595
|
+
"onInput": _this.handleInputChange
|
3512
3596
|
}, _this.prefix ? {
|
3513
3597
|
prefix: _this.prefix
|
3514
|
-
} : null), select_objectSpread(select_objectSpread({}, typeof ((_this$$
|
3598
|
+
} : null), select_objectSpread(select_objectSpread({}, typeof ((_this$$slots9 = _this.$slots) === null || _this$$slots9 === void 0 ? void 0 : _this$$slots9.prefix) === 'function' ? {
|
3515
3599
|
prefix: function prefix() {
|
3516
|
-
var _this$$
|
3517
|
-
return (_this$$
|
3600
|
+
var _this$$slots10, _this$$slots10$prefix;
|
3601
|
+
return (_this$$slots10 = _this.$slots) === null || _this$$slots10 === void 0 || (_this$$slots10$prefix = _this$$slots10.prefix) === null || _this$$slots10$prefix === void 0 ? void 0 : _this$$slots10$prefix.call(_this$$slots10);
|
3518
3602
|
}
|
3519
3603
|
} : null), {}, {
|
3520
3604
|
suffix: function suffix() {
|
@@ -3522,71 +3606,44 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3522
3606
|
}
|
3523
3607
|
}));
|
3524
3608
|
};
|
3609
|
+
// 渲染trigger
|
3525
3610
|
var renderSelectTrigger = function renderSelectTrigger() {
|
3526
|
-
var _this$$
|
3611
|
+
var _this$$slots11, _this$$slots11$trigge;
|
3527
3612
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
3528
|
-
"
|
3613
|
+
"ref": "triggerRef",
|
3529
3614
|
"style": {
|
3530
3615
|
height: _this.autoHeight && _this.collapseTags ? '32px' : ''
|
3531
3616
|
},
|
3532
|
-
"
|
3617
|
+
"class": _this.resolveClassName('select-trigger'),
|
3533
3618
|
"onClick": _this.handleTogglePopover,
|
3534
3619
|
"onMouseenter": _this.setHover,
|
3535
3620
|
"onMouseleave": _this.cancelHover
|
3536
|
-
}, [((_this$$
|
3621
|
+
}, [((_this$$slots11 = _this.$slots) === null || _this$$slots11 === void 0 || (_this$$slots11$trigge = _this$$slots11.trigger) === null || _this$$slots11$trigge === void 0 ? void 0 : _this$$slots11$trigge.call(_this$$slots11, {
|
3537
3622
|
selected: _this.selected
|
3538
3623
|
})) || renderTriggerInput()]);
|
3539
3624
|
};
|
3540
|
-
|
3541
|
-
|
3542
|
-
return (0,external_vue_namespaceObject.createVNode)("
|
3543
|
-
"
|
3544
|
-
"ref": "contentRef"
|
3545
|
-
}, [renderAll(), _this.filterable && !_this.inputSearch && (0,external_vue_namespaceObject.createVNode)("div", {
|
3546
|
-
"class": _this.resolveClassName('select-search-wrapper')
|
3547
|
-
}, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Search, {
|
3548
|
-
"class": "icon-search",
|
3549
|
-
"width": 16,
|
3550
|
-
"height": 16
|
3551
|
-
}, null), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("input", {
|
3552
|
-
"ref": "searchRef",
|
3553
|
-
"class": _this.resolveClassName('select-search-input'),
|
3554
|
-
"placeholder": _this.localSearchPlaceholder,
|
3555
|
-
"onUpdate:modelValue": function onUpdateModelValue($event) {
|
3556
|
-
return _this.searchValue = $event;
|
3557
|
-
}
|
3558
|
-
}, null), [[external_vue_namespaceObject.vModelText, _this.searchValue]])]), !_this.isShowSelectContent && (0,external_vue_namespaceObject.createVNode)("div", {
|
3559
|
-
"class": _this.resolveClassName('select-empty')
|
3560
|
-
}, [_this.searchLoading && (0,external_vue_namespaceObject.createVNode)(loading_namespaceObject["default"], {
|
3561
|
-
"class": "mr5",
|
3562
|
-
"theme": "primary",
|
3563
|
-
"loading": true,
|
3564
|
-
"mode": "spin",
|
3565
|
-
"size": "mini"
|
3566
|
-
}, null), (0,external_vue_namespaceObject.createVNode)("span", null, [_this.curContentText])]), (0,external_vue_namespaceObject.createVNode)("div", {
|
3567
|
-
"class": _this.resolveClassName('select-content')
|
3568
|
-
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
3569
|
-
"class": _this.enableVirtualRender ? '' : _this.resolveClassName('select-dropdown'),
|
3570
|
-
"style": {
|
3571
|
-
maxHeight: "".concat(_this.scrollHeight, "px")
|
3572
|
-
},
|
3573
|
-
"onScroll": _this.handleScroll
|
3574
|
-
}, [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("ul", {
|
3575
|
-
"class": _this.resolveClassName('select-options')
|
3576
|
-
}, [renderSelectAll(), _this.enableVirtualRender ? (0,external_vue_namespaceObject.createVNode)(virtual_render_namespaceObject["default"], {
|
3577
|
-
"list": _this.virtualList,
|
3625
|
+
// 渲染列表模式
|
3626
|
+
var renderList = function renderList() {
|
3627
|
+
return _this.isEnableVirtualRender ? (0,external_vue_namespaceObject.createVNode)(virtual_render_namespaceObject["default"], {
|
3628
|
+
"ref": "virtualRenderRef",
|
3578
3629
|
"height": _this.virtualHeight,
|
3579
|
-
"lineHeight":
|
3580
|
-
"
|
3630
|
+
"lineHeight": _this.virtualLineHeight,
|
3631
|
+
"list": _this.filterList,
|
3632
|
+
"preloadItemCount": _this.preloadItemCount,
|
3633
|
+
"scrollbar": {
|
3634
|
+
enabled: true,
|
3635
|
+
size: 'small'
|
3636
|
+
}
|
3581
3637
|
}, {
|
3582
3638
|
"default": function _default(_ref3) {
|
3583
|
-
var _this$$
|
3639
|
+
var _this$$slots12, _this$$slots13;
|
3584
3640
|
var data = _ref3.data;
|
3585
|
-
|
3641
|
+
// 兼容以前slots
|
3642
|
+
var optionRender = ((_this$$slots12 = _this.$slots) === null || _this$$slots12 === void 0 ? void 0 : _this$$slots12.optionRender) || ((_this$$slots13 = _this.$slots) === null || _this$$slots13 === void 0 ? void 0 : _this$$slots13.virtualScrollRender);
|
3586
3643
|
return data.map(function (item) {
|
3587
3644
|
return (0,external_vue_namespaceObject.createVNode)(src_option, {
|
3588
|
-
"key": item[_this.idKey],
|
3589
3645
|
"id": item[_this.idKey],
|
3646
|
+
"key": item[_this.idKey],
|
3590
3647
|
"name": item[_this.displayKey]
|
3591
3648
|
}, typeof optionRender === 'function' ? {
|
3592
3649
|
"default": function _default() {
|
@@ -3597,38 +3654,80 @@ function select_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { v
|
|
3597
3654
|
} : null);
|
3598
3655
|
});
|
3599
3656
|
}
|
3600
|
-
}) : _this.
|
3601
|
-
var _this$$
|
3657
|
+
}) : _this.filterList.map(function (item) {
|
3658
|
+
var _this$$slots14, _this$$slots15;
|
3659
|
+
// 兼容以前slots
|
3660
|
+
var optionRender = ((_this$$slots14 = _this.$slots) === null || _this$$slots14 === void 0 ? void 0 : _this$$slots14.optionRender) || ((_this$$slots15 = _this.$slots) === null || _this$$slots15 === void 0 ? void 0 : _this$$slots15.virtualScrollRender);
|
3602
3661
|
return (0,external_vue_namespaceObject.createVNode)(src_option, {
|
3603
|
-
"key": item[_this.idKey],
|
3604
3662
|
"id": item[_this.idKey],
|
3663
|
+
"key": item[_this.idKey],
|
3605
3664
|
"name": item[_this.displayKey]
|
3606
|
-
},
|
3665
|
+
}, typeof optionRender === 'function' ? {
|
3607
3666
|
"default": function _default() {
|
3608
|
-
|
3609
|
-
return (_this$$slots11 = _this.$slots) === null || _this$$slots11 === void 0 || (_this$$slots11$option = _this$$slots11.optionRender) === null || _this$$slots11$option === void 0 ? void 0 : _this$$slots11$option.call(_this$$slots11, {
|
3667
|
+
return optionRender({
|
3610
3668
|
item: item
|
3611
3669
|
});
|
3612
3670
|
}
|
3613
3671
|
} : null);
|
3614
|
-
})
|
3672
|
+
});
|
3673
|
+
};
|
3674
|
+
// 渲染内容
|
3675
|
+
var renderSelectContent = function renderSelectContent() {
|
3676
|
+
var _this$$slots16, _this$$slots16$defaul, _this$$slots17, _this$$slots18;
|
3677
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
3678
|
+
"ref": "contentRef",
|
3679
|
+
"class": _this.resolveClassName('select-content-wrapper')
|
3680
|
+
}, [renderAll(), _this.filterable && !_this.inputSearch && (0,external_vue_namespaceObject.createVNode)("div", {
|
3681
|
+
"class": _this.resolveClassName('select-search-wrapper')
|
3682
|
+
}, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Search, {
|
3683
|
+
"width": 16,
|
3684
|
+
"height": 16,
|
3685
|
+
"class": "icon-search"
|
3686
|
+
}, null), (0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("input", {
|
3687
|
+
"ref": "searchRef",
|
3688
|
+
"class": _this.resolveClassName('select-search-input'),
|
3689
|
+
"onUpdate:modelValue": function onUpdateModelValue($event) {
|
3690
|
+
return _this.searchValue = $event;
|
3691
|
+
},
|
3692
|
+
"placeholder": _this.localSearchPlaceholder
|
3693
|
+
}, null), [[external_vue_namespaceObject.vModelText, _this.searchValue]])]), !_this.isShowSelectContent && (0,external_vue_namespaceObject.createVNode)("div", {
|
3694
|
+
"class": _this.resolveClassName('select-empty')
|
3695
|
+
}, [_this.searchLoading && (0,external_vue_namespaceObject.createVNode)(loading_namespaceObject["default"], {
|
3696
|
+
"class": "mr5",
|
3697
|
+
"loading": true,
|
3698
|
+
"mode": "spin",
|
3699
|
+
"size": "mini",
|
3700
|
+
"theme": "primary"
|
3701
|
+
}, null), (0,external_vue_namespaceObject.createVNode)("span", null, [_this.curContentText])]), (0,external_vue_namespaceObject.createVNode)("div", {
|
3702
|
+
"class": _this.resolveClassName('select-content')
|
3703
|
+
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
3704
|
+
"ref": "scrollContainerRef",
|
3705
|
+
"style": {
|
3706
|
+
maxHeight: "".concat(_this.scrollHeight, "px"),
|
3707
|
+
minHeight: "".concat(_this.minHeight, "px")
|
3708
|
+
},
|
3709
|
+
"class": _this.isEnableVirtualRender ? '' : _this.resolveClassName('select-dropdown'),
|
3710
|
+
"onScroll": _this.handleScroll
|
3711
|
+
}, [(0,external_vue_namespaceObject.createVNode)("ul", {
|
3712
|
+
"class": _this.resolveClassName('select-options')
|
3713
|
+
}, [renderSelectAll(), renderList(), (_this$$slots16 = _this.$slots) === null || _this$$slots16 === void 0 || (_this$$slots16$defaul = _this$$slots16["default"]) === null || _this$$slots16$defaul === void 0 ? void 0 : _this$$slots16$defaul.call(_this$$slots16), _this.scrollLoading && (0,external_vue_namespaceObject.createVNode)("li", {
|
3615
3714
|
"class": _this.resolveClassName('select-options-loading')
|
3616
3715
|
}, [(0,external_vue_namespaceObject.createVNode)(loading_namespaceObject["default"], {
|
3617
3716
|
"class": "spinner mr5",
|
3618
|
-
"theme": "primary",
|
3619
3717
|
"loading": true,
|
3620
3718
|
"mode": "spin",
|
3621
|
-
"size": "mini"
|
3622
|
-
|
3719
|
+
"size": "mini",
|
3720
|
+
"theme": "primary"
|
3721
|
+
}, null), (0,external_vue_namespaceObject.createVNode)("span", null, [_this.localLoadingText])])])]), ((_this$$slots17 = _this.$slots) === null || _this$$slots17 === void 0 ? void 0 : _this$$slots17.extension) && (0,external_vue_namespaceObject.createVNode)("div", {
|
3623
3722
|
"class": _this.resolveClassName('select-extension')
|
3624
|
-
}, [(_this$$
|
3723
|
+
}, [(_this$$slots18 = _this.$slots) === null || _this$$slots18 === void 0 ? void 0 : _this$$slots18.extension()])])]);
|
3625
3724
|
};
|
3626
3725
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
3627
3726
|
"class": selectClass
|
3628
3727
|
}, [(0,external_vue_namespaceObject.createVNode)(popover_namespaceObject["default"], (0,external_vue_namespaceObject.mergeProps)(this.popoverConfig, {
|
3629
|
-
"
|
3630
|
-
"onAfterShow": this.
|
3631
|
-
"
|
3728
|
+
"ref": "popoverRef",
|
3729
|
+
"onAfterShow": this.handlePopoverShown,
|
3730
|
+
"onClickoutside": this.handleClickOutside
|
3632
3731
|
}), {
|
3633
3732
|
"default": function _default() {
|
3634
3733
|
return renderSelectTrigger();
|