bkui-vue 2.0.1-beta.11 → 2.0.1-beta.110
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 +142 -168
- package/dist/index.esm.js +29125 -32074
- package/dist/index.umd.js +142 -168
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +1 -0
- package/lib/affix/index.d.ts +111 -57
- package/lib/affix/index.js +24 -24
- package/lib/alert/alert.d.ts +5 -12
- package/lib/alert/alert.variable.css +1 -0
- package/lib/alert/index.d.ts +131 -93
- package/lib/alert/index.js +25 -25
- package/lib/animate-number/index.d.ts +96 -33
- package/lib/animate-number/index.js +7 -8
- package/lib/backtop/backtop.d.ts +1 -1
- package/lib/backtop/backtop.variable.css +1 -0
- package/lib/backtop/index.d.ts +118 -70
- package/lib/backtop/index.js +16 -17
- package/lib/badge/badge.variable.css +1 -0
- package/lib/badge/index.d.ts +152 -119
- package/lib/badge/index.js +20 -20
- package/lib/breadcrumb/breadcrumb.variable.css +1 -0
- package/lib/breadcrumb/index.d.ts +119 -67
- package/lib/breadcrumb/index.js +17 -17
- package/lib/button/button.css +188 -144
- package/lib/button/button.d.ts +10 -10
- package/lib/button/button.less +74 -71
- package/lib/button/button.variable.css +189 -144
- package/lib/button/index.d.ts +160 -124
- package/lib/button/index.js +26 -26
- package/lib/card/card.variable.css +1 -0
- package/lib/card/index.d.ts +157 -128
- package/lib/card/index.js +22 -20
- package/lib/cascader/cascader-panel.d.ts +6 -1
- package/lib/cascader/cascader.css +4 -0
- package/lib/cascader/cascader.d.ts +8 -4
- package/lib/cascader/cascader.less +5 -0
- package/lib/cascader/cascader.variable.css +5 -0
- package/lib/cascader/index.d.ts +355 -393
- package/lib/cascader/index.js +377 -308
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox-group.d.ts +0 -16
- package/lib/checkbox/checkbox.css +8 -0
- package/lib/checkbox/checkbox.d.ts +40 -8
- package/lib/checkbox/checkbox.less +12 -0
- package/lib/checkbox/checkbox.variable.css +9 -0
- package/lib/checkbox/index.d.ts +194 -127
- package/lib/checkbox/index.js +65 -52
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/code-diff/code-diff.variable.css +1 -0
- package/lib/code-diff/index.d.ts +82 -65
- package/lib/code-diff/index.js +446 -389
- package/lib/collapse/collapse-panel.d.ts +5 -5
- package/lib/collapse/collapse.variable.css +1 -0
- package/lib/collapse/index.d.ts +180 -161
- package/lib/collapse/index.js +31 -30
- package/lib/collapse/props.d.ts +2 -2
- package/lib/collapse/utils.d.ts +2 -2
- package/lib/collapse-transition/collapse-transition.variable.css +1 -0
- package/lib/collapse-transition/index.d.ts +94 -19
- package/lib/collapse-transition/index.js +3 -4
- package/lib/color-picker/color-picker.d.ts +17 -1
- package/lib/color-picker/color-picker.variable.css +1 -0
- package/lib/color-picker/index.d.ts +168 -124
- package/lib/color-picker/index.js +93 -88
- package/lib/components.d.ts +30 -32
- package/lib/components.js +29 -31
- package/lib/config-provider/config-provider.variable.css +1 -0
- package/lib/config-provider/index.d.ts +228 -161
- package/lib/config-provider/index.js +17 -17
- package/lib/container/container.d.ts +1 -1
- package/lib/container/container.variable.css +1 -0
- package/lib/container/index.d.ts +85 -74
- package/lib/container/index.js +32 -35
- 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 +2 -2
- package/lib/date-picker/base/time-spinner.d.ts +3 -3
- package/lib/date-picker/base/year-table.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +7 -15
- package/lib/date-picker/date-picker.variable.css +1 -0
- package/lib/date-picker/index.d.ts +356 -399
- package/lib/date-picker/index.js +343 -297
- package/lib/date-picker/interface.d.ts +9 -9
- package/lib/date-picker/panel/date-range.d.ts +6 -6
- package/lib/date-picker/panel/date.d.ts +2 -2
- package/lib/date-picker/panel/time-range.d.ts +3 -12
- package/lib/date-picker/panel/time.d.ts +3 -12
- package/lib/date-picker/props.d.ts +1 -5
- package/lib/date-picker/time-picker.d.ts +7 -14
- package/lib/date-picker/utils.d.ts +1 -1
- package/lib/dialog/dialog.d.ts +47 -31
- package/lib/dialog/dialog.variable.css +1 -0
- package/lib/dialog/index.d.ts +309 -305
- package/lib/dialog/index.js +252 -249
- package/lib/dialog/props.d.ts +20 -13
- package/lib/directives/index.d.ts +4 -3
- package/lib/directives/index.js +219 -197
- package/lib/directives/tooltips.d.ts +1 -1
- package/lib/dist.index.js +2 -4
- package/lib/divider/divider.d.ts +5 -5
- package/lib/divider/divider.variable.css +1 -0
- package/lib/divider/index.d.ts +116 -62
- package/lib/divider/index.js +4 -5
- 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.d.ts +7 -7
- package/lib/dropdown/dropdown.variable.css +1 -0
- package/lib/dropdown/index.d.ts +144 -102
- package/lib/dropdown/index.js +32 -32
- package/lib/exception/exception.d.ts +9 -9
- package/lib/exception/exception.variable.css +1 -0
- package/lib/exception/index.d.ts +107 -46
- package/lib/exception/index.js +31 -31
- package/lib/exception/typings/index.d.ts +1 -1
- package/lib/fixed-navbar/fixed-navbar.variable.css +1 -0
- package/lib/fixed-navbar/index.d.ts +113 -59
- package/lib/fixed-navbar/index.js +4 -5
- package/lib/form/form-item.d.ts +7 -19
- package/lib/form/form.d.ts +3 -3
- package/lib/form/form.variable.css +1 -0
- package/lib/form/index.d.ts +139 -94
- package/lib/form/index.js +44 -42
- package/lib/form/type.d.ts +2 -2
- package/lib/icon/angle-double-down-line.js +17 -17
- package/lib/icon/angle-double-left-line.js +17 -17
- package/lib/icon/angle-double-left.js +17 -17
- package/lib/icon/angle-double-right-line.js +17 -17
- package/lib/icon/angle-double-right.js +17 -17
- package/lib/icon/angle-double-up-line.js +17 -17
- package/lib/icon/angle-down-fill.js +17 -17
- package/lib/icon/angle-down-line.js +17 -17
- package/lib/icon/angle-down.js +17 -17
- package/lib/icon/angle-left.js +17 -17
- package/lib/icon/angle-right.js +17 -17
- package/lib/icon/angle-up-fill.js +17 -17
- package/lib/icon/angle-up.js +17 -17
- package/lib/icon/archive-fill.js +17 -17
- package/lib/icon/arrows-left.js +17 -17
- package/lib/icon/arrows-right.js +17 -17
- package/lib/icon/assistant.js +17 -17
- package/lib/icon/audio-fill.js +17 -17
- package/lib/icon/bk.js +17 -17
- package/lib/icon/circle.js +17 -17
- package/lib/icon/close-line.js +17 -17
- package/lib/icon/close.js +17 -17
- package/lib/icon/code.js +17 -17
- package/lib/icon/cog-shape.js +17 -17
- package/lib/icon/collapse-left.js +17 -17
- package/lib/icon/copy-shape.js +17 -17
- package/lib/icon/copy.js +17 -17
- package/lib/icon/data-shape.js +17 -17
- package/lib/icon/del.js +17 -17
- package/lib/icon/doc-fill.js +17 -17
- package/lib/icon/done.js +17 -17
- package/lib/icon/down-shape.js +17 -17
- package/lib/icon/down-small.js +17 -17
- package/lib/icon/edit-line.js +17 -17
- package/lib/icon/ellipsis.js +17 -17
- package/lib/icon/enlarge-line.js +17 -17
- package/lib/icon/error.js +17 -17
- package/lib/icon/excel-fill.js +17 -17
- package/lib/icon/exclamation-circle-shape.js +17 -17
- package/lib/icon/eye.js +17 -17
- package/lib/icon/filliscreen-line.js +17 -17
- package/lib/icon/fix-line.js +17 -17
- package/lib/icon/fix-shape.js +17 -17
- package/lib/icon/folder-open.js +17 -17
- package/lib/icon/folder-shape-open.js +17 -17
- package/lib/icon/folder-shape.js +17 -17
- package/lib/icon/folder.js +17 -17
- package/lib/icon/funnel.js +17 -17
- package/lib/icon/grag-fill.js +17 -17
- package/lib/icon/help-document-fill.js +17 -17
- package/lib/icon/help-fill.js +17 -17
- package/lib/icon/help.js +17 -17
- package/lib/icon/image-fill.js +17 -17
- package/lib/icon/img-error.js +17 -17
- package/lib/icon/img-placehoulder.js +17 -17
- package/lib/icon/index.d.ts +11 -11
- package/lib/icon/index.js +11 -11
- package/lib/icon/info-line.js +17 -17
- package/lib/icon/info.js +17 -17
- package/lib/icon/left-shape.js +17 -17
- package/lib/icon/left-turn-line.js +17 -17
- package/lib/icon/loading.js +17 -17
- package/lib/icon/narrow-line.js +17 -17
- package/lib/icon/original.js +17 -17
- package/lib/icon/pdf-fill.js +17 -17
- package/lib/icon/play-shape.js +17 -17
- package/lib/icon/plus.js +17 -17
- package/lib/icon/ppt-fill.js +17 -17
- package/lib/icon/qq.js +17 -17
- package/lib/icon/right-shape.js +17 -17
- package/lib/icon/right-turn-line.js +17 -17
- package/lib/icon/search.js +17 -17
- package/lib/icon/share.js +17 -17
- package/lib/icon/spinner.js +17 -17
- package/lib/icon/success.js +17 -17
- package/lib/icon/switcher-loading.js +17 -17
- package/lib/icon/text-all.js +17 -17
- package/lib/icon/text-file.js +17 -17
- package/lib/icon/text-fill.js +17 -17
- package/lib/icon/transfer.js +17 -17
- package/lib/icon/tree-application-shape.js +17 -17
- package/lib/icon/unfull-screen.js +17 -17
- package/lib/icon/unvisible.js +17 -17
- package/lib/icon/up-shape.js +17 -17
- package/lib/icon/upload.js +17 -17
- package/lib/icon/video-fill.js +17 -17
- package/lib/icon/warn.js +17 -17
- package/lib/icon/weixin-pro.js +17 -17
- package/lib/icon/weixin.js +17 -17
- package/lib/image/image-viewer.d.ts +1 -1
- package/lib/image/image-viewer.variable.css +1 -0
- package/lib/image/image.variable.css +1 -0
- package/lib/image/index.d.ts +149 -113
- package/lib/image/index.js +46 -48
- package/lib/index.d.ts +9 -3
- package/lib/index.js +5 -29
- package/lib/info-box/index.js +250 -250
- package/lib/info-box/info-box.d.ts +15 -15
- package/lib/info-box/info-box.variable.css +1 -0
- package/lib/input/index.d.ts +299 -332
- package/lib/input/index.js +110 -561
- package/lib/input/input.css +23 -1
- package/lib/input/input.d.ts +15 -15
- package/lib/input/input.less +30 -1
- package/lib/input/input.variable.css +24 -1
- package/lib/link/index.d.ts +127 -78
- package/lib/link/index.js +5 -5
- package/lib/link/link.d.ts +5 -5
- package/lib/link/link.variable.css +1 -0
- package/lib/loading/index.d.ts +162 -135
- package/lib/loading/index.js +43 -40
- package/lib/loading/loading.d.ts +9 -9
- package/lib/loading/loading.variable.css +1 -0
- package/lib/locale/index.d.ts +1 -1
- package/lib/menu/index.d.ts +131 -51
- package/lib/menu/index.js +46 -27
- package/lib/menu/menu-group.d.ts +9 -0
- package/lib/menu/menu-item.d.ts +9 -0
- package/lib/menu/menu.css +29 -17
- package/lib/menu/menu.less +33 -18
- package/lib/menu/menu.variable.css +30 -17
- package/lib/menu/submenu.d.ts +1 -0
- package/lib/menu/submenu.variable.css +1 -0
- package/lib/menu/utils.d.ts +3 -3
- package/lib/message/index.js +43 -42
- package/lib/message/message.css +2 -1
- package/lib/message/message.less +3 -2
- package/lib/message/message.variable.css +3 -1
- package/lib/message/messageConstructor.d.ts +21 -21
- package/lib/modal/index.d.ts +214 -159
- package/lib/modal/index.js +68 -47
- package/lib/modal/modal.d.ts +24 -8
- package/lib/modal/modal.variable.css +1 -0
- package/lib/modal/props.mixin.d.ts +10 -3
- package/lib/navigation/index.d.ts +188 -152
- package/lib/navigation/index.js +27 -29
- package/lib/navigation/navigation.d.ts +1 -1
- package/lib/navigation/navigation.variable.css +1 -0
- package/lib/notify/index.js +25 -24
- package/lib/notify/notify.variable.css +1 -0
- package/lib/notify/notifyConstructor.d.ts +5 -5
- package/lib/overflow-title/components/overflow-title.d.ts +45 -16
- package/lib/overflow-title/index.d.ts +298 -328
- package/lib/overflow-title/index.js +85 -28
- package/lib/overflow-title/overflow-title.css +3 -0
- package/lib/overflow-title/overflow-title.less +4 -0
- package/lib/overflow-title/overflow-title.variable.css +3 -0
- package/lib/overflow-title/props.d.ts +36 -21
- package/lib/pagination/index.d.ts +198 -203
- package/lib/pagination/index.js +128 -68
- package/lib/pagination/pagination.css +8 -8
- package/lib/pagination/pagination.d.ts +0 -13
- package/lib/pagination/pagination.less +14 -13
- package/lib/pagination/pagination.variable.css +9 -8
- 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 +311 -304
- package/lib/pop-confirm/index.d.ts +162 -148
- package/lib/pop-confirm/index.js +40 -35
- package/lib/pop-confirm/pop-confirm.css +3 -1
- package/lib/pop-confirm/pop-confirm.d.ts +10 -20
- package/lib/pop-confirm/pop-confirm.less +3 -1
- package/lib/pop-confirm/pop-confirm.variable.css +4 -1
- package/lib/pop-confirm/props.d.ts +8 -11
- package/lib/popover/const.d.ts +3 -3
- package/lib/popover/content.d.ts +6 -3
- package/lib/popover/index.d.ts +411 -380
- package/lib/popover/index.js +311 -304
- package/lib/popover/plugin-popover.d.ts +1 -1
- package/lib/popover/popover.d.ts +51 -8
- package/lib/popover/popover.variable.css +1 -0
- package/lib/popover/props.d.ts +28 -4
- package/lib/popover/use-floating.d.ts +2 -2
- package/lib/popover/use-popover-init.d.ts +2 -1
- package/lib/popover/utils.d.ts +2 -0
- package/lib/popover2/index.d.ts +83 -8
- package/lib/popover2/index.js +2 -2
- package/lib/preset.d.ts +0 -1
- package/lib/preset.js +0 -1
- package/lib/process/index.d.ts +137 -93
- package/lib/process/index.js +229 -229
- package/lib/process/process.variable.css +1 -0
- package/lib/progress/index.d.ts +192 -183
- package/lib/progress/index.js +31 -33
- package/lib/progress/progress.d.ts +9 -9
- package/lib/progress/progress.variable.css +1 -0
- package/lib/radio/index.d.ts +155 -106
- package/lib/radio/index.js +76 -63
- package/lib/radio/radio-button.d.ts +7 -7
- package/lib/radio/radio-group.d.ts +7 -7
- package/lib/radio/radio.d.ts +7 -7
- package/lib/radio/radio.variable.css +1 -0
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.d.ts +112 -55
- package/lib/rate/index.js +28 -27
- package/lib/rate/rate.variable.css +1 -0
- package/lib/resize-layout/index.d.ts +204 -157
- package/lib/resize-layout/index.js +54 -34
- package/lib/resize-layout/resize-layout.d.ts +18 -7
- package/lib/resize-layout/resize-layout.variable.css +1 -0
- package/lib/scrollbar/css/scrollbar.css +109 -0
- package/lib/scrollbar/css/scrollbar.less +139 -0
- package/lib/scrollbar/{scrollbar.variable.css → css/scrollbar.variable.css} +96 -61
- 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 +1380 -18482
- 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 +946 -701
- package/lib/search-select/index.js +644 -486
- package/lib/search-select/input.d.ts +20 -8
- package/lib/search-select/menu.d.ts +13 -1
- package/lib/search-select/search-select.css +45 -47
- package/lib/search-select/search-select.d.ts +207 -160
- package/lib/search-select/search-select.less +41 -41
- package/lib/search-select/search-select.variable.css +46 -47
- package/lib/search-select/selected.d.ts +209 -127
- package/lib/search-select/utils.d.ts +6 -6
- package/lib/select/common.d.ts +4 -4
- package/lib/select/index.d.ts +1457 -1384
- package/lib/select/index.js +603 -477
- package/lib/select/option.d.ts +6 -6
- package/lib/select/select.css +9 -4
- package/lib/select/select.d.ts +285 -148
- package/lib/select/select.less +11 -4
- package/lib/select/select.variable.css +10 -4
- package/lib/select/selectTagInput.d.ts +9 -8
- 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 +166 -101
- package/lib/shared/popover.d.ts +3 -3
- package/lib/shared/token.d.ts +1 -1
- package/lib/shared/vue-types.d.ts +50 -50
- package/lib/shared/z-index-manager.d.ts +6 -6
- package/lib/sideslider/index.d.ts +220 -182
- package/lib/sideslider/index.js +239 -237
- package/lib/sideslider/sideslider.css +7 -8
- package/lib/sideslider/sideslider.d.ts +24 -8
- package/lib/sideslider/sideslider.less +7 -8
- package/lib/sideslider/sideslider.variable.css +8 -8
- package/lib/slider/index.d.ts +210 -214
- package/lib/slider/index.js +246 -249
- package/lib/slider/slider.variable.css +1 -0
- package/lib/steps/index.d.ts +155 -131
- package/lib/steps/index.js +234 -234
- package/lib/steps/steps.d.ts +8 -18
- package/lib/steps/steps.variable.css +1 -0
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/mixins/animate.variable.css +1 -0
- package/lib/styles/mixins/popper.variable.css +1 -0
- package/lib/styles/mixins/scroll.variable.css +1 -0
- package/lib/styles/reset.variable.css +1 -0
- package/lib/styles/themes/themes.less +1 -0
- package/lib/swiper/index.d.ts +127 -81
- package/lib/swiper/index.js +23 -23
- package/lib/swiper/swiper.variable.css +1 -0
- package/lib/switcher/index.d.ts +179 -157
- package/lib/switcher/index.js +24 -22
- package/lib/switcher/switcher.d.ts +9 -9
- package/lib/switcher/switcher.variable.css +1 -0
- package/lib/tab/index.d.ts +220 -258
- package/lib/tab/index.js +79 -69
- package/lib/tab/props.d.ts +27 -52
- package/lib/tab/tab-nav.d.ts +26 -66
- package/lib/tab/tab-panel.d.ts +27 -5
- package/lib/tab/tab.css +64 -0
- package/lib/tab/tab.d.ts +10 -54
- package/lib/tab/tab.less +91 -4
- package/lib/tab/tab.variable.css +65 -0
- 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 +24 -127
- 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-checkbox-tooltip.d.ts +11 -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 +138 -0
- package/lib/table/{plugins → hooks}/use-shift-key.d.ts +4 -2
- package/lib/table/index.d.ts +412 -1029
- package/lib/table/index.js +4698 -20825
- package/lib/table/plugins/head-filter.css +5 -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 +6 -0
- package/lib/table/plugins/head-sort.variable.css +1 -0
- package/lib/table/plugins/settings.css +11 -1
- package/lib/table/plugins/settings.less +12 -1
- package/lib/table/plugins/settings.variable.css +12 -1
- package/lib/table/props.d.ts +127 -62
- package/lib/table/table.css +503 -302
- package/lib/table/table.d.ts +51 -185
- package/lib/table/table.less +244 -112
- package/lib/table/table.variable.css +504 -302
- package/lib/table/utils.d.ts +44 -21
- package/lib/table-column/index.d.ts +156 -369
- package/lib/table-column/index.js +143 -62
- package/lib/tag/index.d.ts +147 -100
- package/lib/tag/index.js +21 -22
- package/lib/tag/tag.css +1 -1
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag/tag.less +1 -1
- package/lib/tag/tag.variable.css +2 -1
- package/lib/tag-input/common.d.ts +2 -2
- package/lib/tag-input/index.d.ts +595 -712
- package/lib/tag-input/index.js +150 -17391
- package/lib/tag-input/tag-input.css +12 -9
- package/lib/tag-input/tag-input.d.ts +60 -24
- package/lib/tag-input/tag-input.less +13 -9
- package/lib/tag-input/tag-input.variable.css +13 -9
- package/lib/tag-input/tag-props.d.ts +25 -2
- package/lib/time-picker/index.d.ts +391 -455
- package/lib/time-picker/time-picker.variable.css +1 -0
- package/lib/timeline/index.d.ts +131 -64
- package/lib/timeline/index.js +8 -8
- package/lib/timeline/timeline.variable.css +1 -0
- package/lib/transfer/const.d.ts +2 -2
- package/lib/transfer/index.d.ts +206 -191
- package/lib/transfer/index.js +3 -5
- package/lib/transfer/transfer.variable.css +1 -0
- package/lib/tree/constant.d.ts +22 -20
- package/lib/tree/index.d.ts +329 -357
- package/lib/tree/index.js +176 -17389
- package/lib/tree/props.d.ts +18 -11
- package/lib/tree/tree.css +103 -69
- package/lib/tree/tree.d.ts +16 -10
- package/lib/tree/tree.variable.css +104 -69
- 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 +294 -286
- package/lib/upload/index.js +398 -316
- package/lib/upload/props.d.ts +11 -2
- package/lib/upload/upload-list.d.ts +11 -1
- package/lib/upload/upload-trigger.d.ts +11 -1
- package/lib/upload/upload.d.ts +25 -4
- package/lib/upload/upload.type.d.ts +12 -6
- package/lib/upload/upload.variable.css +1 -0
- package/lib/upload/use-file-handler.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +247 -373
- package/lib/virtual-render/index.js +223 -162
- 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 +96 -70
- package/lib/virtual-render/virtual-render.d.ts +7 -23
- package/lib/virtual-render/virtual-render.less +2 -11
- package/lib/virtual-render/virtual-render.variable.css +96 -69
- 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/upload/index.js
CHANGED
@@ -761,304 +761,304 @@ var _typeof = (__webpack_require__(7425)["default"]);
|
|
761
761
|
function _regeneratorRuntime() {
|
762
762
|
"use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
763
763
|
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
764
|
-
return
|
764
|
+
return exports;
|
765
765
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
766
|
-
var
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
t[e] = r.value;
|
766
|
+
var exports = {},
|
767
|
+
Op = Object.prototype,
|
768
|
+
hasOwn = Op.hasOwnProperty,
|
769
|
+
defineProperty = Object.defineProperty || function (obj, key, desc) {
|
770
|
+
obj[key] = desc.value;
|
772
771
|
},
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
function define(
|
778
|
-
return Object.defineProperty(
|
779
|
-
value:
|
772
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
773
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
774
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
775
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
776
|
+
function define(obj, key, value) {
|
777
|
+
return Object.defineProperty(obj, key, {
|
778
|
+
value: value,
|
780
779
|
enumerable: !0,
|
781
780
|
configurable: !0,
|
782
781
|
writable: !0
|
783
|
-
}),
|
782
|
+
}), obj[key];
|
784
783
|
}
|
785
784
|
try {
|
786
785
|
define({}, "");
|
787
|
-
} catch (
|
788
|
-
define = function define(
|
789
|
-
return
|
786
|
+
} catch (err) {
|
787
|
+
define = function define(obj, key, value) {
|
788
|
+
return obj[key] = value;
|
790
789
|
};
|
791
790
|
}
|
792
|
-
function wrap(
|
793
|
-
var
|
794
|
-
|
795
|
-
|
796
|
-
return
|
797
|
-
value: makeInvokeMethod(
|
798
|
-
}),
|
791
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
792
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
793
|
+
generator = Object.create(protoGenerator.prototype),
|
794
|
+
context = new Context(tryLocsList || []);
|
795
|
+
return defineProperty(generator, "_invoke", {
|
796
|
+
value: makeInvokeMethod(innerFn, self, context)
|
797
|
+
}), generator;
|
799
798
|
}
|
800
|
-
function tryCatch(
|
799
|
+
function tryCatch(fn, obj, arg) {
|
801
800
|
try {
|
802
801
|
return {
|
803
802
|
type: "normal",
|
804
|
-
arg:
|
803
|
+
arg: fn.call(obj, arg)
|
805
804
|
};
|
806
|
-
} catch (
|
805
|
+
} catch (err) {
|
807
806
|
return {
|
808
807
|
type: "throw",
|
809
|
-
arg:
|
808
|
+
arg: err
|
810
809
|
};
|
811
810
|
}
|
812
811
|
}
|
813
|
-
|
814
|
-
var
|
815
|
-
l = "suspendedYield",
|
816
|
-
f = "executing",
|
817
|
-
s = "completed",
|
818
|
-
y = {};
|
812
|
+
exports.wrap = wrap;
|
813
|
+
var ContinueSentinel = {};
|
819
814
|
function Generator() {}
|
820
815
|
function GeneratorFunction() {}
|
821
816
|
function GeneratorFunctionPrototype() {}
|
822
|
-
var
|
823
|
-
define(
|
817
|
+
var IteratorPrototype = {};
|
818
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
824
819
|
return this;
|
825
820
|
});
|
826
|
-
var
|
827
|
-
|
828
|
-
|
829
|
-
var
|
830
|
-
function defineIteratorMethods(
|
831
|
-
["next", "throw", "return"].forEach(function (
|
832
|
-
define(
|
833
|
-
return this._invoke(
|
821
|
+
var getProto = Object.getPrototypeOf,
|
822
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
823
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
824
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
825
|
+
function defineIteratorMethods(prototype) {
|
826
|
+
["next", "throw", "return"].forEach(function (method) {
|
827
|
+
define(prototype, method, function (arg) {
|
828
|
+
return this._invoke(method, arg);
|
834
829
|
});
|
835
830
|
});
|
836
831
|
}
|
837
|
-
function AsyncIterator(
|
838
|
-
function invoke(
|
839
|
-
var
|
840
|
-
if ("throw" !==
|
841
|
-
var
|
842
|
-
|
843
|
-
return
|
844
|
-
invoke("next",
|
845
|
-
}, function (
|
846
|
-
invoke("throw",
|
847
|
-
}) :
|
848
|
-
|
849
|
-
}, function (
|
850
|
-
return invoke("throw",
|
832
|
+
function AsyncIterator(generator, PromiseImpl) {
|
833
|
+
function invoke(method, arg, resolve, reject) {
|
834
|
+
var record = tryCatch(generator[method], generator, arg);
|
835
|
+
if ("throw" !== record.type) {
|
836
|
+
var result = record.arg,
|
837
|
+
value = result.value;
|
838
|
+
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
839
|
+
invoke("next", value, resolve, reject);
|
840
|
+
}, function (err) {
|
841
|
+
invoke("throw", err, resolve, reject);
|
842
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
843
|
+
result.value = unwrapped, resolve(result);
|
844
|
+
}, function (error) {
|
845
|
+
return invoke("throw", error, resolve, reject);
|
851
846
|
});
|
852
847
|
}
|
853
|
-
|
848
|
+
reject(record.arg);
|
854
849
|
}
|
855
|
-
var
|
856
|
-
|
857
|
-
value: function value(
|
850
|
+
var previousPromise;
|
851
|
+
defineProperty(this, "_invoke", {
|
852
|
+
value: function value(method, arg) {
|
858
853
|
function callInvokeWithMethodAndArg() {
|
859
|
-
return new
|
860
|
-
invoke(
|
854
|
+
return new PromiseImpl(function (resolve, reject) {
|
855
|
+
invoke(method, arg, resolve, reject);
|
861
856
|
});
|
862
857
|
}
|
863
|
-
return
|
858
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
864
859
|
}
|
865
860
|
});
|
866
861
|
}
|
867
|
-
function makeInvokeMethod(
|
868
|
-
var
|
869
|
-
return function (
|
870
|
-
if (
|
871
|
-
if (
|
872
|
-
if ("throw" ===
|
873
|
-
return
|
874
|
-
value: t,
|
875
|
-
done: !0
|
876
|
-
};
|
862
|
+
function makeInvokeMethod(innerFn, self, context) {
|
863
|
+
var state = "suspendedStart";
|
864
|
+
return function (method, arg) {
|
865
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
866
|
+
if ("completed" === state) {
|
867
|
+
if ("throw" === method) throw arg;
|
868
|
+
return doneResult();
|
877
869
|
}
|
878
|
-
for (
|
879
|
-
var
|
880
|
-
if (
|
881
|
-
var
|
882
|
-
if (
|
883
|
-
if (
|
884
|
-
return
|
870
|
+
for (context.method = method, context.arg = arg;;) {
|
871
|
+
var delegate = context.delegate;
|
872
|
+
if (delegate) {
|
873
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
874
|
+
if (delegateResult) {
|
875
|
+
if (delegateResult === ContinueSentinel) continue;
|
876
|
+
return delegateResult;
|
885
877
|
}
|
886
878
|
}
|
887
|
-
if ("next" ===
|
888
|
-
if (
|
889
|
-
|
890
|
-
} else "return" ===
|
891
|
-
|
892
|
-
var
|
893
|
-
if ("normal" ===
|
894
|
-
if (
|
879
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
880
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
881
|
+
context.dispatchException(context.arg);
|
882
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
883
|
+
state = "executing";
|
884
|
+
var record = tryCatch(innerFn, self, context);
|
885
|
+
if ("normal" === record.type) {
|
886
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
895
887
|
return {
|
896
|
-
value:
|
897
|
-
done:
|
888
|
+
value: record.arg,
|
889
|
+
done: context.done
|
898
890
|
};
|
899
891
|
}
|
900
|
-
"throw" ===
|
892
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
901
893
|
}
|
902
894
|
};
|
903
895
|
}
|
904
|
-
function maybeInvokeDelegate(
|
905
|
-
var
|
906
|
-
|
907
|
-
if (
|
908
|
-
var
|
909
|
-
if ("throw" ===
|
910
|
-
var
|
911
|
-
return
|
896
|
+
function maybeInvokeDelegate(delegate, context) {
|
897
|
+
var methodName = context.method,
|
898
|
+
method = delegate.iterator[methodName];
|
899
|
+
if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
|
900
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
901
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
902
|
+
var info = record.arg;
|
903
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
912
904
|
}
|
913
|
-
function pushTryEntry(
|
914
|
-
var
|
915
|
-
tryLoc:
|
905
|
+
function pushTryEntry(locs) {
|
906
|
+
var entry = {
|
907
|
+
tryLoc: locs[0]
|
916
908
|
};
|
917
|
-
1 in
|
909
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
918
910
|
}
|
919
|
-
function resetTryEntry(
|
920
|
-
var
|
921
|
-
|
911
|
+
function resetTryEntry(entry) {
|
912
|
+
var record = entry.completion || {};
|
913
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
922
914
|
}
|
923
|
-
function Context(
|
915
|
+
function Context(tryLocsList) {
|
924
916
|
this.tryEntries = [{
|
925
917
|
tryLoc: "root"
|
926
|
-
}],
|
918
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
927
919
|
}
|
928
|
-
function values(
|
929
|
-
if (
|
930
|
-
var
|
931
|
-
if (
|
932
|
-
if ("function" == typeof
|
933
|
-
if (!isNaN(
|
934
|
-
var
|
935
|
-
|
936
|
-
for (; ++
|
937
|
-
return next.value =
|
920
|
+
function values(iterable) {
|
921
|
+
if (iterable) {
|
922
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
923
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
924
|
+
if ("function" == typeof iterable.next) return iterable;
|
925
|
+
if (!isNaN(iterable.length)) {
|
926
|
+
var i = -1,
|
927
|
+
next = function next() {
|
928
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
929
|
+
return next.value = undefined, next.done = !0, next;
|
938
930
|
};
|
939
|
-
return
|
931
|
+
return next.next = next;
|
940
932
|
}
|
941
933
|
}
|
942
|
-
|
934
|
+
return {
|
935
|
+
next: doneResult
|
936
|
+
};
|
937
|
+
}
|
938
|
+
function doneResult() {
|
939
|
+
return {
|
940
|
+
value: undefined,
|
941
|
+
done: !0
|
942
|
+
};
|
943
943
|
}
|
944
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
944
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
|
945
945
|
value: GeneratorFunctionPrototype,
|
946
946
|
configurable: !0
|
947
|
-
}),
|
947
|
+
}), defineProperty(GeneratorFunctionPrototype, "constructor", {
|
948
948
|
value: GeneratorFunction,
|
949
949
|
configurable: !0
|
950
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
951
|
-
var
|
952
|
-
return !!
|
953
|
-
},
|
954
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
955
|
-
},
|
950
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
951
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
952
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
953
|
+
}, exports.mark = function (genFun) {
|
954
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
955
|
+
}, exports.awrap = function (arg) {
|
956
956
|
return {
|
957
|
-
__await:
|
957
|
+
__await: arg
|
958
958
|
};
|
959
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
959
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
960
960
|
return this;
|
961
|
-
}),
|
962
|
-
void 0 ===
|
963
|
-
var
|
964
|
-
return
|
965
|
-
return
|
961
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
962
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
963
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
964
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
965
|
+
return result.done ? result.value : iter.next();
|
966
966
|
});
|
967
|
-
}, defineIteratorMethods(
|
967
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
968
968
|
return this;
|
969
|
-
}), define(
|
969
|
+
}), define(Gp, "toString", function () {
|
970
970
|
return "[object Generator]";
|
971
|
-
}),
|
972
|
-
var
|
973
|
-
|
974
|
-
for (var
|
975
|
-
return
|
976
|
-
for (;
|
977
|
-
var
|
978
|
-
if (
|
971
|
+
}), exports.keys = function (val) {
|
972
|
+
var object = Object(val),
|
973
|
+
keys = [];
|
974
|
+
for (var key in object) keys.push(key);
|
975
|
+
return keys.reverse(), function next() {
|
976
|
+
for (; keys.length;) {
|
977
|
+
var key = keys.pop();
|
978
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
979
979
|
}
|
980
980
|
return next.done = !0, next;
|
981
981
|
};
|
982
|
-
},
|
982
|
+
}, exports.values = values, Context.prototype = {
|
983
983
|
constructor: Context,
|
984
|
-
reset: function reset(
|
985
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
984
|
+
reset: function reset(skipTempReset) {
|
985
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
986
986
|
},
|
987
987
|
stop: function stop() {
|
988
988
|
this.done = !0;
|
989
|
-
var
|
990
|
-
if ("throw" ===
|
989
|
+
var rootRecord = this.tryEntries[0].completion;
|
990
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
991
991
|
return this.rval;
|
992
992
|
},
|
993
|
-
dispatchException: function dispatchException(
|
994
|
-
if (this.done) throw
|
995
|
-
var
|
996
|
-
function handle(
|
997
|
-
return
|
993
|
+
dispatchException: function dispatchException(exception) {
|
994
|
+
if (this.done) throw exception;
|
995
|
+
var context = this;
|
996
|
+
function handle(loc, caught) {
|
997
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
998
998
|
}
|
999
|
-
for (var
|
1000
|
-
var
|
1001
|
-
|
1002
|
-
if ("root" ===
|
1003
|
-
if (
|
1004
|
-
var
|
1005
|
-
|
1006
|
-
if (
|
1007
|
-
if (this.prev <
|
1008
|
-
if (this.prev <
|
1009
|
-
} else if (
|
1010
|
-
if (this.prev <
|
999
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
1000
|
+
var entry = this.tryEntries[i],
|
1001
|
+
record = entry.completion;
|
1002
|
+
if ("root" === entry.tryLoc) return handle("end");
|
1003
|
+
if (entry.tryLoc <= this.prev) {
|
1004
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
1005
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
1006
|
+
if (hasCatch && hasFinally) {
|
1007
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
1008
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
1009
|
+
} else if (hasCatch) {
|
1010
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
1011
1011
|
} else {
|
1012
|
-
if (!
|
1013
|
-
if (this.prev <
|
1012
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
1013
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
1014
1014
|
}
|
1015
1015
|
}
|
1016
1016
|
}
|
1017
1017
|
},
|
1018
|
-
abrupt: function abrupt(
|
1019
|
-
for (var
|
1020
|
-
var
|
1021
|
-
if (
|
1022
|
-
var
|
1018
|
+
abrupt: function abrupt(type, arg) {
|
1019
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
1020
|
+
var entry = this.tryEntries[i];
|
1021
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
1022
|
+
var finallyEntry = entry;
|
1023
1023
|
break;
|
1024
1024
|
}
|
1025
1025
|
}
|
1026
|
-
|
1027
|
-
var
|
1028
|
-
return
|
1026
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
1027
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
1028
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
1029
1029
|
},
|
1030
|
-
complete: function complete(
|
1031
|
-
if ("throw" ===
|
1032
|
-
return "break" ===
|
1030
|
+
complete: function complete(record, afterLoc) {
|
1031
|
+
if ("throw" === record.type) throw record.arg;
|
1032
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
1033
1033
|
},
|
1034
|
-
finish: function finish(
|
1035
|
-
for (var
|
1036
|
-
var
|
1037
|
-
if (
|
1034
|
+
finish: function finish(finallyLoc) {
|
1035
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
1036
|
+
var entry = this.tryEntries[i];
|
1037
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
1038
1038
|
}
|
1039
1039
|
},
|
1040
|
-
"catch": function _catch(
|
1041
|
-
for (var
|
1042
|
-
var
|
1043
|
-
if (
|
1044
|
-
var
|
1045
|
-
if ("throw" ===
|
1046
|
-
var
|
1047
|
-
resetTryEntry(
|
1040
|
+
"catch": function _catch(tryLoc) {
|
1041
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
1042
|
+
var entry = this.tryEntries[i];
|
1043
|
+
if (entry.tryLoc === tryLoc) {
|
1044
|
+
var record = entry.completion;
|
1045
|
+
if ("throw" === record.type) {
|
1046
|
+
var thrown = record.arg;
|
1047
|
+
resetTryEntry(entry);
|
1048
1048
|
}
|
1049
|
-
return
|
1049
|
+
return thrown;
|
1050
1050
|
}
|
1051
1051
|
}
|
1052
1052
|
throw new Error("illegal catch attempt");
|
1053
1053
|
},
|
1054
|
-
delegateYield: function delegateYield(
|
1054
|
+
delegateYield: function delegateYield(iterable, resultName, nextLoc) {
|
1055
1055
|
return this.delegate = {
|
1056
|
-
iterator: values(
|
1057
|
-
resultName:
|
1058
|
-
nextLoc:
|
1059
|
-
}, "next" === this.method && (this.arg =
|
1056
|
+
iterator: values(iterable),
|
1057
|
+
resultName: resultName,
|
1058
|
+
nextLoc: nextLoc
|
1059
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
1060
1060
|
}
|
1061
|
-
},
|
1061
|
+
}, exports;
|
1062
1062
|
}
|
1063
1063
|
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
1064
1064
|
|
@@ -1067,14 +1067,14 @@ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.e
|
|
1067
1067
|
/***/ 7425:
|
1068
1068
|
/***/ ((module) => {
|
1069
1069
|
|
1070
|
-
function _typeof(
|
1070
|
+
function _typeof(obj) {
|
1071
1071
|
"@babel/helpers - typeof";
|
1072
1072
|
|
1073
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
1074
|
-
return typeof
|
1075
|
-
} : function (
|
1076
|
-
return
|
1077
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(
|
1073
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
1074
|
+
return typeof obj;
|
1075
|
+
} : function (obj) {
|
1076
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
1077
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
1078
1078
|
}
|
1079
1079
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
1080
1080
|
|
@@ -1204,38 +1204,38 @@ function _asyncToGenerator(fn) {
|
|
1204
1204
|
};
|
1205
1205
|
}
|
1206
1206
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
|
1207
|
-
function _typeof(
|
1207
|
+
function _typeof(obj) {
|
1208
1208
|
"@babel/helpers - typeof";
|
1209
1209
|
|
1210
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
1211
|
-
return typeof
|
1212
|
-
} : function (
|
1213
|
-
return
|
1214
|
-
}, _typeof(
|
1210
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
1211
|
+
return typeof obj;
|
1212
|
+
} : function (obj) {
|
1213
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
1214
|
+
}, _typeof(obj);
|
1215
1215
|
}
|
1216
1216
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
1217
1217
|
|
1218
|
-
function
|
1219
|
-
if ("object"
|
1220
|
-
var
|
1221
|
-
if (
|
1222
|
-
var
|
1223
|
-
if ("object"
|
1218
|
+
function _toPrimitive(input, hint) {
|
1219
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
1220
|
+
var prim = input[Symbol.toPrimitive];
|
1221
|
+
if (prim !== undefined) {
|
1222
|
+
var res = prim.call(input, hint || "default");
|
1223
|
+
if (_typeof(res) !== "object") return res;
|
1224
1224
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
1225
1225
|
}
|
1226
|
-
return ("string"
|
1226
|
+
return (hint === "string" ? String : Number)(input);
|
1227
1227
|
}
|
1228
1228
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
1229
1229
|
|
1230
1230
|
|
1231
|
-
function
|
1232
|
-
var
|
1233
|
-
return "symbol"
|
1231
|
+
function _toPropertyKey(arg) {
|
1232
|
+
var key = _toPrimitive(arg, "string");
|
1233
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
1234
1234
|
}
|
1235
1235
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
1236
1236
|
|
1237
1237
|
function _defineProperty(obj, key, value) {
|
1238
|
-
key =
|
1238
|
+
key = _toPropertyKey(key);
|
1239
1239
|
if (key in obj) {
|
1240
1240
|
Object.defineProperty(obj, key, {
|
1241
1241
|
value: value,
|
@@ -1292,12 +1292,17 @@ var EThemes;
|
|
1292
1292
|
EThemes["DRAGGABLE"] = "draggable";
|
1293
1293
|
EThemes["PICTURE"] = "picture";
|
1294
1294
|
})(EThemes || (EThemes = {}));
|
1295
|
+
var ETypes;
|
1296
|
+
(function (ETypes) {
|
1297
|
+
ETypes["BINARY"] = "binary";
|
1298
|
+
ETypes["FORMDATA"] = "formdata";
|
1299
|
+
})(ETypes || (ETypes = {}));
|
1295
1300
|
var EUploadStatus;
|
1296
1301
|
(function (EUploadStatus) {
|
1302
|
+
EUploadStatus["FAIL"] = "fail";
|
1297
1303
|
EUploadStatus["NEW"] = "new";
|
1298
|
-
EUploadStatus["UPLOADING"] = "uploading";
|
1299
1304
|
EUploadStatus["SUCCESS"] = "success";
|
1300
|
-
EUploadStatus["
|
1305
|
+
EUploadStatus["UPLOADING"] = "uploading";
|
1301
1306
|
})(EUploadStatus || (EUploadStatus = {}));
|
1302
1307
|
;// CONCATENATED MODULE: ../../packages/upload/src/props.ts
|
1303
1308
|
/*
|
@@ -1327,7 +1332,19 @@ var EUploadStatus;
|
|
1327
1332
|
*/
|
1328
1333
|
|
1329
1334
|
var themes = [EThemes.BUTTON, EThemes.DRAGGABLE, EThemes.PICTURE];
|
1335
|
+
var types = [ETypes.FORMDATA, ETypes.BINARY];
|
1330
1336
|
/* harmony default export */ const props = ({
|
1337
|
+
type: {
|
1338
|
+
type: String,
|
1339
|
+
"default": 'formdata',
|
1340
|
+
validator: function validator(val) {
|
1341
|
+
if (!val || types.includes(val)) {
|
1342
|
+
return true;
|
1343
|
+
}
|
1344
|
+
console.error("invalid type, ".concat(val, ", the type must be one of \u3010").concat(types.join(' | '), "\u3011"));
|
1345
|
+
return false;
|
1346
|
+
}
|
1347
|
+
},
|
1331
1348
|
theme: {
|
1332
1349
|
type: String,
|
1333
1350
|
"default": 'draggable',
|
@@ -1459,6 +1476,11 @@ var themes = [EThemes.BUTTON, EThemes.DRAGGABLE, EThemes.PICTURE];
|
|
1459
1476
|
chunkSize: {
|
1460
1477
|
type: Number,
|
1461
1478
|
"default": 10
|
1479
|
+
},
|
1480
|
+
// 是否显示预览按钮
|
1481
|
+
isShowPreview: {
|
1482
|
+
type: Boolean,
|
1483
|
+
"default": true
|
1462
1484
|
}
|
1463
1485
|
});
|
1464
1486
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
@@ -1466,31 +1488,31 @@ function _arrayWithHoles(arr) {
|
|
1466
1488
|
if (Array.isArray(arr)) return arr;
|
1467
1489
|
}
|
1468
1490
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
1469
|
-
function _iterableToArrayLimit(
|
1470
|
-
var
|
1471
|
-
if (null !=
|
1472
|
-
var
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1491
|
+
function _iterableToArrayLimit(arr, i) {
|
1492
|
+
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
1493
|
+
if (null != _i) {
|
1494
|
+
var _s,
|
1495
|
+
_e,
|
1496
|
+
_x,
|
1497
|
+
_r,
|
1498
|
+
_arr = [],
|
1499
|
+
_n = !0,
|
1500
|
+
_d = !1;
|
1479
1501
|
try {
|
1480
|
-
if (
|
1481
|
-
if (Object(
|
1482
|
-
|
1483
|
-
} else for (; !(
|
1484
|
-
} catch (
|
1485
|
-
|
1502
|
+
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
1503
|
+
if (Object(_i) !== _i) return;
|
1504
|
+
_n = !1;
|
1505
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
1506
|
+
} catch (err) {
|
1507
|
+
_d = !0, _e = err;
|
1486
1508
|
} finally {
|
1487
1509
|
try {
|
1488
|
-
if (!
|
1510
|
+
if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
|
1489
1511
|
} finally {
|
1490
|
-
if (
|
1512
|
+
if (_d) throw _e;
|
1491
1513
|
}
|
1492
1514
|
}
|
1493
|
-
return
|
1515
|
+
return _arr;
|
1494
1516
|
}
|
1495
1517
|
}
|
1496
1518
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
@@ -1524,7 +1546,7 @@ function _slicedToArray(arr, i) {
|
|
1524
1546
|
;// CONCATENATED MODULE: external "../icon"
|
1525
1547
|
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1526
1548
|
var icon_y = x => () => x
|
1527
|
-
const icon_namespaceObject = icon_x({ ["ArchiveFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ArchiveFill, ["AudioFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AudioFill, ["Del"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Del, ["Done"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Done, ["ImageFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ImageFill, ["Plus"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Plus, ["RightTurnLine"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.RightTurnLine, ["TextFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.TextFill, ["Upload"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Upload, ["VideoFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.VideoFill });
|
1549
|
+
const icon_namespaceObject = icon_x({ ["ArchiveFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ArchiveFill, ["AudioFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.AudioFill, ["Del"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Del, ["Done"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Done, ["Eye"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Eye, ["ImageFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.ImageFill, ["Plus"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Plus, ["RightTurnLine"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.RightTurnLine, ["TextFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.TextFill, ["Upload"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.Upload, ["VideoFill"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_icon_a97c79c3__.VideoFill });
|
1528
1550
|
;// CONCATENATED MODULE: external "../progress"
|
1529
1551
|
var progress_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1530
1552
|
var progress_y = x => () => x
|
@@ -1579,9 +1601,10 @@ function _isSlot(s) {
|
|
1579
1601
|
theme: props.theme,
|
1580
1602
|
disabled: props.disabled,
|
1581
1603
|
files: props.files,
|
1582
|
-
multiple: props.multiple
|
1604
|
+
multiple: props.multiple,
|
1605
|
+
isShowPreview: props.isShowPreview
|
1583
1606
|
},
|
1584
|
-
emits: ['remove', 'retry'],
|
1607
|
+
emits: ['remove', 'preview', 'retry'],
|
1585
1608
|
setup: function setup(props, _ref) {
|
1586
1609
|
var slots = _ref.slots,
|
1587
1610
|
emit = _ref.emit;
|
@@ -1591,7 +1614,8 @@ function _isSlot(s) {
|
|
1591
1614
|
var _toRefs = (0,external_vue_namespaceObject.toRefs)(props),
|
1592
1615
|
theme = _toRefs.theme,
|
1593
1616
|
disabled = _toRefs.disabled,
|
1594
|
-
multiple = _toRefs.multiple
|
1617
|
+
multiple = _toRefs.multiple,
|
1618
|
+
isShowPreview = _toRefs.isShowPreview;
|
1595
1619
|
var classBlock = "".concat(resolveClassName(CLASS_PREFIX), "-list");
|
1596
1620
|
var isPhotowall = (0,external_vue_namespaceObject.computed)(function () {
|
1597
1621
|
return theme.value === EThemes.PICTURE;
|
@@ -1600,7 +1624,8 @@ function _isSlot(s) {
|
|
1600
1624
|
return isPhotowall.value && !multiple.value;
|
1601
1625
|
});
|
1602
1626
|
var classNames = (0,external_vue_namespaceObject.computed)(function () {
|
1603
|
-
|
1627
|
+
var _classes;
|
1628
|
+
return (0,shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, classBlock, true), _defineProperty(_classes, "".concat(classBlock, "--").concat(theme.value), true), _defineProperty(_classes, "".concat(classBlock, "--disabled"), disabled.value), _classes));
|
1604
1629
|
});
|
1605
1630
|
function formatSize(value) {
|
1606
1631
|
var uints = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
|
@@ -1608,6 +1633,9 @@ function _isSlot(s) {
|
|
1608
1633
|
var size = value / Math.pow(1024, index);
|
1609
1634
|
return "".concat(size.toFixed(2)).concat(uints[index]);
|
1610
1635
|
}
|
1636
|
+
function handlePreview(file, files, e) {
|
1637
|
+
emit('preview', file, files, e);
|
1638
|
+
}
|
1611
1639
|
function handleRemove(file, e) {
|
1612
1640
|
emit('remove', file, e);
|
1613
1641
|
}
|
@@ -1619,7 +1647,8 @@ function _isSlot(s) {
|
|
1619
1647
|
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.TransitionGroup, {
|
1620
1648
|
"name": "".concat(classBlock, "__item")
|
1621
1649
|
}, _isSlot(_slot = props.files.map(function (file) {
|
1622
|
-
var
|
1650
|
+
var _classes2;
|
1651
|
+
var classNames = (0,shared_namespaceObject.classes)((_classes2 = {}, _defineProperty(_classes2, "".concat(classBlock, "__item"), true), _defineProperty(_classes2, "".concat(classBlock, "__item-picture"), true), _defineProperty(_classes2, "".concat(classBlock, "__item--").concat(file.status), true), _classes2));
|
1623
1652
|
return (0,external_vue_namespaceObject.createVNode)("li", {
|
1624
1653
|
"key": file.uid,
|
1625
1654
|
"class": classNames
|
@@ -1634,22 +1663,27 @@ function _isSlot(s) {
|
|
1634
1663
|
};
|
1635
1664
|
var PhotoItem = function PhotoItem(file) {
|
1636
1665
|
return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("img", {
|
1637
|
-
"src": file.url,
|
1638
1666
|
"class": "".concat(classBlock, "__picture-item-thumbnail"),
|
1639
|
-
"alt": ""
|
1667
|
+
"alt": "",
|
1668
|
+
"src": file.url
|
1640
1669
|
}, null), [[external_vue_namespaceObject.vShow, file.status !== 'uploading']]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [file.status === 'uploading' && (0,external_vue_namespaceObject.createVNode)(progress_namespaceObject["default"], {
|
1670
|
+
"width": 50,
|
1641
1671
|
"class": "".concat(classBlock, "__picture-item-progress"),
|
1642
|
-
"type": "circle",
|
1643
|
-
"color": "#3a84ff",
|
1644
1672
|
"bgColor": "#333",
|
1645
|
-
"
|
1673
|
+
"color": "#3a84ff",
|
1674
|
+
"percent": file.percentage,
|
1646
1675
|
"titleStyle": {
|
1647
1676
|
color: '#fff'
|
1648
1677
|
},
|
1649
|
-
"
|
1678
|
+
"type": "circle"
|
1650
1679
|
}, null)]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!disabled.value && (0,external_vue_namespaceObject.createVNode)("div", {
|
1651
1680
|
"class": "".concat(classBlock, "__picture-item-actions")
|
1652
|
-
}, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.
|
1681
|
+
}, [isShowPreview.value && (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Eye, {
|
1682
|
+
"class": "action-icon",
|
1683
|
+
"onClick": function onClick(e) {
|
1684
|
+
return handlePreview(file, props.files, e);
|
1685
|
+
}
|
1686
|
+
}, null), (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Del, {
|
1653
1687
|
"class": "action-icon",
|
1654
1688
|
"onClick": function onClick(e) {
|
1655
1689
|
return handleRemove(file, e);
|
@@ -1661,7 +1695,8 @@ function _isSlot(s) {
|
|
1661
1695
|
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.TransitionGroup, {
|
1662
1696
|
"name": "".concat(classBlock, "__item")
|
1663
1697
|
}, _isSlot(_slot2 = props.files.map(function (file) {
|
1664
|
-
var
|
1698
|
+
var _classes3;
|
1699
|
+
var classNames = (0,shared_namespaceObject.classes)((_classes3 = {}, _defineProperty(_classes3, "".concat(classBlock, "__item"), true), _defineProperty(_classes3, "".concat(classBlock, "__item--").concat(file.status), true), _classes3));
|
1665
1700
|
return (0,external_vue_namespaceObject.createVNode)("li", {
|
1666
1701
|
"key": file.uid,
|
1667
1702
|
"class": classNames
|
@@ -1700,9 +1735,9 @@ function _isSlot(s) {
|
|
1700
1735
|
return [(0,external_vue_namespaceObject.createVNode)("div", {
|
1701
1736
|
"class": "".concat(classBlock, "__item-icon")
|
1702
1737
|
}, [file.isPic ? (0,external_vue_namespaceObject.createVNode)("img", {
|
1703
|
-
"src": file.url,
|
1704
1738
|
"class": "".concat(classBlock, "__item-thumbnail"),
|
1705
|
-
"alt": ""
|
1739
|
+
"alt": "",
|
1740
|
+
"src": file.url
|
1706
1741
|
}, null) : FileIcon(file)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
1707
1742
|
"class": "".concat(classBlock, "__item-summary")
|
1708
1743
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
@@ -1715,8 +1750,8 @@ function _isSlot(s) {
|
|
1715
1750
|
"class": "".concat(classBlock, "__item-message-success-icon")
|
1716
1751
|
}, null), file.statusText || t.value.uploadSuccess]), file.status === 'fail' && (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [file.statusText || t.value.uploadFailed])]), file.status === 'uploading' && (0,external_vue_namespaceObject.createVNode)(progress_namespaceObject["default"], {
|
1717
1752
|
"class": "".concat(classBlock, "__item-progress"),
|
1718
|
-
"showText": false,
|
1719
1753
|
"percent": file.percentage,
|
1754
|
+
"showText": false,
|
1720
1755
|
"size": "small"
|
1721
1756
|
}, null), file.status !== 'fail' && (0,external_vue_namespaceObject.createVNode)("div", {
|
1722
1757
|
"class": "".concat(classBlock, "__item-speed")
|
@@ -1739,10 +1774,10 @@ function _isSlot(s) {
|
|
1739
1774
|
}, null)])])];
|
1740
1775
|
};
|
1741
1776
|
return function () {
|
1742
|
-
var _props$files;
|
1743
|
-
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [isSinglePhoto.value ?
|
1777
|
+
var _slots$innerTrigger, _props$files, _slots$innerTrigger2;
|
1778
|
+
return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [isSinglePhoto.value ? slots === null || slots === void 0 || (_slots$innerTrigger = slots.innerTrigger) === null || _slots$innerTrigger === void 0 ? void 0 : _slots$innerTrigger.call(slots, (_props$files = props.files) === null || _props$files === void 0 ? void 0 : _props$files[0]) : (0,external_vue_namespaceObject.createVNode)("ul", {
|
1744
1779
|
"class": classNames.value
|
1745
|
-
}, [isPhotowall.value ? Photowall() : Normal(),
|
1780
|
+
}, [isPhotowall.value ? Photowall() : Normal(), slots === null || slots === void 0 || (_slots$innerTrigger2 = slots.innerTrigger) === null || _slots$innerTrigger2 === void 0 ? void 0 : _slots$innerTrigger2.call(slots)])]);
|
1746
1781
|
};
|
1747
1782
|
}
|
1748
1783
|
}));
|
@@ -1802,9 +1837,10 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1802
1837
|
file: {
|
1803
1838
|
type: Object
|
1804
1839
|
},
|
1805
|
-
selectChange: props.selectChange
|
1840
|
+
selectChange: props.selectChange,
|
1841
|
+
isShowPreview: props.isShowPreview
|
1806
1842
|
},
|
1807
|
-
emits: ['change', 'remove'],
|
1843
|
+
emits: ['change', 'remove', 'preview'],
|
1808
1844
|
setup: function setup(props, _ref) {
|
1809
1845
|
var slots = _ref.slots,
|
1810
1846
|
emit = _ref.emit;
|
@@ -1816,7 +1852,8 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1816
1852
|
disabled = _toRefs.disabled,
|
1817
1853
|
file = _toRefs.file,
|
1818
1854
|
multiple = _toRefs.multiple,
|
1819
|
-
accept = _toRefs.accept
|
1855
|
+
accept = _toRefs.accept,
|
1856
|
+
isShowPreview = _toRefs.isShowPreview;
|
1820
1857
|
var classBlock = "".concat(resolveClassName(CLASS_PREFIX), "-trigger");
|
1821
1858
|
var isButton = (0,external_vue_namespaceObject.computed)(function () {
|
1822
1859
|
return theme.value === EThemes.BUTTON;
|
@@ -1835,8 +1872,8 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1835
1872
|
});
|
1836
1873
|
var inputEl = (0,external_vue_namespaceObject.ref)(null);
|
1837
1874
|
var classNames = (0,external_vue_namespaceObject.computed)(function () {
|
1838
|
-
var _file$value, _file$value2, _file$value3;
|
1839
|
-
return (0,shared_namespaceObject.classes)(
|
1875
|
+
var _file$value, _file$value2, _file$value3, _classes;
|
1876
|
+
return (0,shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, classBlock, true), _defineProperty(_classes, "".concat(classBlock, "--").concat(theme.value), true), _defineProperty(_classes, "".concat(classBlock, "--single-picture"), isSinglePicture.value), _defineProperty(_classes, "".concat(classBlock, "--has-file"), (_file$value = file.value) !== null && _file$value !== void 0 ? _file$value : false), _defineProperty(_classes, "".concat(classBlock, "--").concat((_file$value2 = file.value) === null || _file$value2 === void 0 ? void 0 : _file$value2.status), (_file$value3 = file.value) !== null && _file$value3 !== void 0 ? _file$value3 : false), _defineProperty(_classes, "".concat(classBlock, "--dragover"), dragover.value), _defineProperty(_classes, "".concat(classBlock, "--disabled"), disabled.value), _classes));
|
1840
1877
|
});
|
1841
1878
|
var invoke = function invoke() {
|
1842
1879
|
inputEl.value.value = null;
|
@@ -1870,6 +1907,11 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1870
1907
|
e.stopPropagation();
|
1871
1908
|
e.preventDefault();
|
1872
1909
|
}
|
1910
|
+
function handlePreview(file, e) {
|
1911
|
+
emit('preview', file, [file], e);
|
1912
|
+
e.stopPropagation();
|
1913
|
+
e.preventDefault();
|
1914
|
+
}
|
1873
1915
|
var dragover = (0,external_vue_namespaceObject.ref)(false);
|
1874
1916
|
var Dragger = function Dragger() {
|
1875
1917
|
var handleDrop = function handleDrop(e) {
|
@@ -1895,9 +1937,9 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1895
1937
|
var classNames = (0,shared_namespaceObject.classes)(_defineProperty({}, "".concat(classBlock, "__draggable"), true));
|
1896
1938
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
1897
1939
|
"class": classNames,
|
1898
|
-
"
|
1940
|
+
"onDragleave": handleDragleave,
|
1899
1941
|
"onDragover": handleDragover,
|
1900
|
-
"
|
1942
|
+
"onDrop": handleDrop
|
1901
1943
|
}, [slots["default"] ? slots["default"]() : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Upload, {
|
1902
1944
|
"class": "".concat(classBlock, "__draggable-icon")
|
1903
1945
|
}, null), (0,external_vue_namespaceObject.createVNode)("div", {
|
@@ -1920,22 +1962,27 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1920
1962
|
};
|
1921
1963
|
var SinglePicture = function SinglePicture(file) {
|
1922
1964
|
return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("img", {
|
1923
|
-
"src": file.url,
|
1924
1965
|
"class": "".concat(classBlock, "__picture-thumbnail"),
|
1925
|
-
"alt": ""
|
1966
|
+
"alt": "",
|
1967
|
+
"src": file.url
|
1926
1968
|
}, null), [[external_vue_namespaceObject.vShow, file.status !== 'uploading']]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [file.status === 'uploading' && (0,external_vue_namespaceObject.createVNode)(progress_namespaceObject["default"], {
|
1969
|
+
"width": 50,
|
1927
1970
|
"class": "".concat(classBlock, "__picture-progress"),
|
1928
|
-
"type": "circle",
|
1929
|
-
"color": "#3a84ff",
|
1930
1971
|
"bgColor": "#333",
|
1931
|
-
"
|
1972
|
+
"color": "#3a84ff",
|
1973
|
+
"percent": file.percentage,
|
1932
1974
|
"titleStyle": {
|
1933
1975
|
color: '#fff'
|
1934
1976
|
},
|
1935
|
-
"
|
1977
|
+
"type": "circle"
|
1936
1978
|
}, null)]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!props.disabled && (0,external_vue_namespaceObject.createVNode)("div", {
|
1937
1979
|
"class": "".concat(classBlock, "__picture-actions")
|
1938
|
-
}, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.
|
1980
|
+
}, [isShowPreview.value && (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Eye, {
|
1981
|
+
"class": "action-icon",
|
1982
|
+
"onClick": function onClick(e) {
|
1983
|
+
return handlePreview(file, e);
|
1984
|
+
}
|
1985
|
+
}, null), (0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Del, {
|
1939
1986
|
"class": "action-icon",
|
1940
1987
|
"onClick": function onClick(e) {
|
1941
1988
|
return handleRemove(file, e);
|
@@ -1970,12 +2017,12 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1970
2017
|
}, [slots.trigger ? [slots.trigger(), slots === null || slots === void 0 || (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots)] : Trigger(), (0,external_vue_namespaceObject.createVNode)("input", {
|
1971
2018
|
"ref": inputEl,
|
1972
2019
|
"class": "".concat(classBlock, "__input-file"),
|
1973
|
-
"tabindex": "-1",
|
1974
|
-
"onChange": handleFileChange,
|
1975
2020
|
"accept": acceptTypes.value,
|
1976
|
-
"multiple": multiple.value,
|
1977
2021
|
"disabled": disabled.value,
|
1978
|
-
"
|
2022
|
+
"multiple": multiple.value,
|
2023
|
+
"tabindex": "-1",
|
2024
|
+
"type": "file",
|
2025
|
+
"onChange": handleFileChange
|
1979
2026
|
}, null)]);
|
1980
2027
|
};
|
1981
2028
|
}
|
@@ -2036,10 +2083,11 @@ var spark_md5_default = /*#__PURE__*/__webpack_require__.n(spark_md5);
|
|
2036
2083
|
*/
|
2037
2084
|
|
2038
2085
|
|
2086
|
+
var errMsg = 'An error occurred during upload';
|
2039
2087
|
function getRes(xhr) {
|
2040
2088
|
var res = xhr.responseText || xhr.response;
|
2041
2089
|
if (!res) {
|
2042
|
-
return res;
|
2090
|
+
return res || {};
|
2043
2091
|
}
|
2044
2092
|
try {
|
2045
2093
|
return JSON.parse(res);
|
@@ -2052,7 +2100,9 @@ var ajaxUpload = function ajaxUpload(option) {
|
|
2052
2100
|
throw new Error('XMLHttpRequest is undefined');
|
2053
2101
|
}
|
2054
2102
|
var xhr = new XMLHttpRequest();
|
2055
|
-
var action = option.action
|
2103
|
+
var action = option.action,
|
2104
|
+
type = option.type;
|
2105
|
+
var isFormdata = type === 'formdata';
|
2056
2106
|
if (xhr.upload) {
|
2057
2107
|
xhr.upload.addEventListener('progress', function (event) {
|
2058
2108
|
var progressEvent = event;
|
@@ -2061,7 +2111,7 @@ var ajaxUpload = function ajaxUpload(option) {
|
|
2061
2111
|
});
|
2062
2112
|
}
|
2063
2113
|
var formData = new FormData();
|
2064
|
-
if (option.data) {
|
2114
|
+
if (isFormdata && option.data) {
|
2065
2115
|
var appendData = option.data;
|
2066
2116
|
if (!Array.isArray(appendData)) {
|
2067
2117
|
appendData = [appendData];
|
@@ -2075,7 +2125,7 @@ var ajaxUpload = function ajaxUpload(option) {
|
|
2075
2125
|
}
|
2076
2126
|
});
|
2077
2127
|
}
|
2078
|
-
if (option.formDataAttributes) {
|
2128
|
+
if (isFormdata && option.formDataAttributes) {
|
2079
2129
|
var _appendData = option.formDataAttributes;
|
2080
2130
|
if (!Array.isArray(_appendData)) {
|
2081
2131
|
_appendData = [_appendData];
|
@@ -2084,13 +2134,27 @@ var ajaxUpload = function ajaxUpload(option) {
|
|
2084
2134
|
if (Array.isArray(item.value)) formData.append.apply(formData, [item.name].concat(_toConsumableArray(item.value)));else formData.append(item.name, item.value);
|
2085
2135
|
});
|
2086
2136
|
}
|
2087
|
-
|
2137
|
+
if (isFormdata) {
|
2138
|
+
formData.append(option.filename, option.file, option.file.name);
|
2139
|
+
}
|
2088
2140
|
xhr.addEventListener('error', function () {
|
2089
|
-
|
2141
|
+
var msg = new Error(errMsg);
|
2142
|
+
var responseText = getRes(xhr);
|
2143
|
+
if (responseText) {
|
2144
|
+
msg = new Error(responseText.message || errMsg);
|
2145
|
+
}
|
2146
|
+
console.log(responseText, msg);
|
2147
|
+
option.onError(msg);
|
2148
|
+
// option.onError(new Error('An error occurred during upload'));
|
2090
2149
|
});
|
2091
2150
|
xhr.addEventListener('load', function () {
|
2092
2151
|
if (xhr.status < 200 || xhr.status >= 300) {
|
2093
|
-
|
2152
|
+
var responseText = getRes(xhr);
|
2153
|
+
var msg = new Error(errMsg);
|
2154
|
+
if (responseText) {
|
2155
|
+
msg = new Error(responseText.message || errMsg);
|
2156
|
+
}
|
2157
|
+
return option.onError(msg);
|
2094
2158
|
}
|
2095
2159
|
option.onSuccess(getRes(xhr));
|
2096
2160
|
});
|
@@ -2128,13 +2192,13 @@ var ajaxUpload = function ajaxUpload(option) {
|
|
2128
2192
|
xhr.setRequestHeader(key, String(value));
|
2129
2193
|
}
|
2130
2194
|
}
|
2131
|
-
xhr.send(formData);
|
2195
|
+
xhr.send(isFormdata ? formData : option.file);
|
2132
2196
|
return xhr;
|
2133
2197
|
};
|
2134
2198
|
// 该方法用于在不同的浏览器使用不同的方式
|
2135
2199
|
var blobSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;
|
2136
2200
|
var ajaxSliceUpload = /*#__PURE__*/function () {
|
2137
|
-
var _ref = _asyncToGenerator(
|
2201
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee(option) {
|
2138
2202
|
var chunkSize, file, blockCount, hash, progressList;
|
2139
2203
|
return regenerator_default().wrap(function _callee$(_context) {
|
2140
2204
|
while (1) switch (_context.prev = _context.next) {
|
@@ -2168,10 +2232,15 @@ var ajaxSliceUpload = /*#__PURE__*/function () {
|
|
2168
2232
|
req.open(option.method, option.mergeUrl, true);
|
2169
2233
|
req.onreadystatechange = function () {
|
2170
2234
|
if (req.readyState === 4) {
|
2235
|
+
var responseText = getRes(req);
|
2171
2236
|
if (req.status < 200 || req.status >= 300) {
|
2172
|
-
|
2237
|
+
var msg = new Error(errMsg);
|
2238
|
+
if (responseText) {
|
2239
|
+
msg = new Error(responseText.message || errMsg);
|
2240
|
+
}
|
2241
|
+
return option.onError(msg);
|
2173
2242
|
}
|
2174
|
-
option.onSuccess(
|
2243
|
+
option.onSuccess(responseText);
|
2175
2244
|
}
|
2176
2245
|
};
|
2177
2246
|
req.onloadend = function () {
|
@@ -2193,7 +2262,6 @@ var ajaxSliceUpload = /*#__PURE__*/function () {
|
|
2193
2262
|
// 请求分片上传,保存在progressList中
|
2194
2263
|
var sliceSend = function sliceSend(option, file, blockCount, hash, progressList, chunkSize) {
|
2195
2264
|
var _loop = function _loop(i) {
|
2196
|
-
// eslint-disable-next-line no-loop-func
|
2197
2265
|
var pooltask = new Promise(function (resolve, reject) {
|
2198
2266
|
var start = i * chunkSize;
|
2199
2267
|
var end = Math.min(file.size, start + chunkSize);
|
@@ -2231,10 +2299,14 @@ var sliceSend = function sliceSend(option, file, blockCount, hash, progressList,
|
|
2231
2299
|
var xhr = new XMLHttpRequest();
|
2232
2300
|
xhr.onreadystatechange = function () {
|
2233
2301
|
if (xhr.readyState === 4) {
|
2234
|
-
var
|
2302
|
+
var responseText = getRes(xhr);
|
2235
2303
|
if (xhr.status < 200 || xhr.status >= 300) {
|
2236
|
-
reject(
|
2237
|
-
|
2304
|
+
reject(responseText);
|
2305
|
+
var msg = new Error(errMsg);
|
2306
|
+
if (responseText) {
|
2307
|
+
msg = new Error(responseText.message || errMsg);
|
2308
|
+
}
|
2309
|
+
option.onError(msg);
|
2238
2310
|
} else {
|
2239
2311
|
resolve('reponseText');
|
2240
2312
|
}
|
@@ -2312,7 +2384,7 @@ var hashFile = function hashFile(file, chunkSize) {
|
|
2312
2384
|
}
|
2313
2385
|
};
|
2314
2386
|
fileReader.onerror = function () {
|
2315
|
-
reject(new Error('File
|
2387
|
+
reject(new Error('File slice failed'));
|
2316
2388
|
};
|
2317
2389
|
loadNext();
|
2318
2390
|
})["catch"](function (err) {
|
@@ -2423,7 +2495,7 @@ function buildFileId(index) {
|
|
2423
2495
|
return _handleRemove.apply(this, arguments);
|
2424
2496
|
}
|
2425
2497
|
function _handleRemove() {
|
2426
|
-
_handleRemove = _asyncToGenerator(
|
2498
|
+
_handleRemove = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee(file) {
|
2427
2499
|
var uploadFile, remove, _props$beforeRemove, before;
|
2428
2500
|
return regenerator_default().wrap(function _callee$(_context) {
|
2429
2501
|
while (1) switch (_context.prev = _context.next) {
|
@@ -2464,7 +2536,7 @@ function buildFileId(index) {
|
|
2464
2536
|
return _handleError.apply(this, arguments);
|
2465
2537
|
}
|
2466
2538
|
function _handleError() {
|
2467
|
-
_handleError = _asyncToGenerator(
|
2539
|
+
_handleError = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee2(err, rawFile, res) {
|
2468
2540
|
var file;
|
2469
2541
|
return regenerator_default().wrap(function _callee2$(_context2) {
|
2470
2542
|
while (1) switch (_context2.prev = _context2.next) {
|
@@ -2491,7 +2563,7 @@ function buildFileId(index) {
|
|
2491
2563
|
return _handleSuccess.apply(this, arguments);
|
2492
2564
|
}
|
2493
2565
|
function _handleSuccess() {
|
2494
|
-
_handleSuccess = _asyncToGenerator(
|
2566
|
+
_handleSuccess = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee3(res, rawFile) {
|
2495
2567
|
var file;
|
2496
2568
|
return regenerator_default().wrap(function _callee3$(_context3) {
|
2497
2569
|
while (1) switch (_context3.prev = _context3.next) {
|
@@ -2517,7 +2589,7 @@ function buildFileId(index) {
|
|
2517
2589
|
return _handleProgress.apply(this, arguments);
|
2518
2590
|
}
|
2519
2591
|
function _handleProgress() {
|
2520
|
-
_handleProgress = _asyncToGenerator(
|
2592
|
+
_handleProgress = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee4(event, rawFile) {
|
2521
2593
|
var file;
|
2522
2594
|
return regenerator_default().wrap(function _callee4$(_context4) {
|
2523
2595
|
while (1) switch (_context4.prev = _context4.next) {
|
@@ -2569,9 +2641,9 @@ function buildFileId(index) {
|
|
2569
2641
|
|
2570
2642
|
|
2571
2643
|
|
2572
|
-
function _createForOfIteratorHelper(
|
2573
|
-
function upload_unsupportedIterableToArray(
|
2574
|
-
function upload_arrayLikeToArray(
|
2644
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = upload_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
2645
|
+
function upload_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return upload_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? upload_arrayLikeToArray(r, a) : void 0; } }
|
2646
|
+
function upload_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
2575
2647
|
/*
|
2576
2648
|
* Tencent is pleased to support the open source community by making
|
2577
2649
|
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
@@ -2609,7 +2681,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2609
2681
|
/* harmony default export */ const upload = ((0,external_vue_namespaceObject.defineComponent)({
|
2610
2682
|
name: 'Upload',
|
2611
2683
|
props: props,
|
2612
|
-
emits: ['exceed', 'progress', 'success', 'error', 'delete', 'done'],
|
2684
|
+
emits: ['exceed', 'progress', 'success', 'error', 'delete', 'done', 'preview'],
|
2613
2685
|
setup: function setup(props, _ref) {
|
2614
2686
|
var slots = _ref.slots,
|
2615
2687
|
emit = _ref.emit,
|
@@ -2624,8 +2696,8 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2624
2696
|
return isPhotowall.value && !props.multiple;
|
2625
2697
|
});
|
2626
2698
|
var classNames = (0,external_vue_namespaceObject.computed)(function () {
|
2627
|
-
var _props$extCls;
|
2628
|
-
return (0,shared_namespaceObject.classes)(
|
2699
|
+
var _props$extCls, _classes;
|
2700
|
+
return (0,shared_namespaceObject.classes)((_classes = {}, _defineProperty(_classes, "".concat(resolveClassName(CLASS_PREFIX)), true), _defineProperty(_classes, "".concat(resolveClassName(CLASS_PREFIX), "--").concat(props.theme), true), _defineProperty(_classes, "".concat(resolveClassName(CLASS_PREFIX), "--disabled"), props.disabled), _defineProperty(_classes, "".concat(resolveClassName(CLASS_PREFIX), "--single-picture"), isSinglePhoto.value), _defineProperty(_classes, props.extCls, (_props$extCls = props.extCls) !== null && _props$extCls !== void 0 ? _props$extCls : false), _classes));
|
2629
2701
|
});
|
2630
2702
|
var triggerProps = (0,external_vue_namespaceObject.computed)(function () {
|
2631
2703
|
return {
|
@@ -2633,6 +2705,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2633
2705
|
multiple: props.multiple,
|
2634
2706
|
disabled: props.disabled,
|
2635
2707
|
accept: props.accept,
|
2708
|
+
isShowPreview: props.isShowPreview,
|
2636
2709
|
selectChange: props.selectChange
|
2637
2710
|
};
|
2638
2711
|
});
|
@@ -2687,6 +2760,9 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2687
2760
|
_iterator.f();
|
2688
2761
|
}
|
2689
2762
|
}
|
2763
|
+
function handlePreview(file, files) {
|
2764
|
+
emit('preview', file, files);
|
2765
|
+
}
|
2690
2766
|
function handleRetry(file) {
|
2691
2767
|
send(file.raw);
|
2692
2768
|
}
|
@@ -2694,7 +2770,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2694
2770
|
return _upload.apply(this, arguments);
|
2695
2771
|
}
|
2696
2772
|
function _upload() {
|
2697
|
-
_upload = _asyncToGenerator(
|
2773
|
+
_upload = _asyncToGenerator(/*#__PURE__*/regenerator_default().mark(function _callee(file, sendFiles) {
|
2698
2774
|
var beforeResult, _props$beforeUpload;
|
2699
2775
|
return regenerator_default().wrap(function _callee$(_context) {
|
2700
2776
|
while (1) switch (_context.prev = _context.next) {
|
@@ -2707,7 +2783,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2707
2783
|
case 2:
|
2708
2784
|
_context.prev = 2;
|
2709
2785
|
_context.next = 5;
|
2710
|
-
return (_props$beforeUpload = props.beforeUpload) === null || _props$beforeUpload === void 0 ? void 0 : _props$beforeUpload.call(props, file);
|
2786
|
+
return (_props$beforeUpload = props.beforeUpload) === null || _props$beforeUpload === void 0 ? void 0 : _props$beforeUpload.call(props, file, sendFiles);
|
2711
2787
|
case 5:
|
2712
2788
|
beforeResult = _context.sent;
|
2713
2789
|
_context.next = 11;
|
@@ -2734,7 +2810,8 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2734
2810
|
return _upload.apply(this, arguments);
|
2735
2811
|
}
|
2736
2812
|
function send(file, sendFiles) {
|
2737
|
-
var
|
2813
|
+
var type = props.type,
|
2814
|
+
headers = props.headers,
|
2738
2815
|
header = props.header,
|
2739
2816
|
data = props.data,
|
2740
2817
|
formDataAttributes = props.formDataAttributes,
|
@@ -2748,6 +2825,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2748
2825
|
customRequest = props.customRequest;
|
2749
2826
|
var uid = file.uid;
|
2750
2827
|
var options = {
|
2828
|
+
type: type,
|
2751
2829
|
headers: headers,
|
2752
2830
|
header: header,
|
2753
2831
|
withCredentials: withCredentials,
|
@@ -2806,7 +2884,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2806
2884
|
Object.keys(reqs).forEach(function (uid) {
|
2807
2885
|
if (reqs[uid] instanceof XMLHttpRequest) {
|
2808
2886
|
var xhr = reqs[uid];
|
2809
|
-
xhr === null || xhr === void 0
|
2887
|
+
xhr === null || xhr === void 0 ? void 0 : xhr.abort();
|
2810
2888
|
}
|
2811
2889
|
delete requests.value[uid];
|
2812
2890
|
});
|
@@ -2818,6 +2896,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2818
2896
|
});
|
2819
2897
|
});
|
2820
2898
|
expose({
|
2899
|
+
handlePreview: handlePreview,
|
2821
2900
|
handleRemove: handleRemove,
|
2822
2901
|
handleRetry: handleRetry
|
2823
2902
|
});
|
@@ -2829,10 +2908,12 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2829
2908
|
}), slots), slots.tip ? slots.tip() : props.tip && (0,external_vue_namespaceObject.createVNode)("div", {
|
2830
2909
|
"class": "".concat(resolveClassName(CLASS_PREFIX), "__tip")
|
2831
2910
|
}, [props.tip]), (0,external_vue_namespaceObject.createVNode)(upload_list, {
|
2832
|
-
"files": fileList.value,
|
2833
|
-
"theme": props.theme,
|
2834
2911
|
"disabled": props.disabled,
|
2912
|
+
"files": fileList.value,
|
2913
|
+
"isShowPreview": props.isShowPreview,
|
2835
2914
|
"multiple": props.multiple,
|
2915
|
+
"theme": props.theme,
|
2916
|
+
"onPreview": handlePreview,
|
2836
2917
|
"onRemove": handleRemove,
|
2837
2918
|
"onRetry": handleRetry
|
2838
2919
|
}, {
|
@@ -2840,6 +2921,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2840
2921
|
return isPhotowall.value && (0,external_vue_namespaceObject.createVNode)(upload_trigger, (0,external_vue_namespaceObject.mergeProps)(triggerProps.value, {
|
2841
2922
|
"file": file,
|
2842
2923
|
"onChange": handleFiles,
|
2924
|
+
"onPreview": handlePreview,
|
2843
2925
|
"onRemove": handleRemove
|
2844
2926
|
}), slots);
|
2845
2927
|
},
|