bkui-vue 1.0.3-beta.9 → 2.0.1-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +162 -164
- package/dist/index.esm.js +31999 -29678
- package/dist/index.umd.js +162 -164
- package/dist/locale/en.esm.js +1 -1
- package/dist/locale/en.esm.js.map +1 -1
- package/dist/locale/en.umd.js +1 -1
- package/dist/locale/en.umd.js.map +1 -1
- package/dist/locale/zh-cn.esm.js +1 -1
- package/dist/locale/zh-cn.esm.js.map +1 -1
- package/dist/locale/zh-cn.umd.js +1 -1
- package/dist/locale/zh-cn.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/affix.variable.css +3 -0
- package/lib/affix/index.js +7 -7
- package/lib/alert/alert.d.ts +5 -5
- package/lib/alert/alert.variable.css +3 -0
- package/lib/alert/index.d.ts +11 -11
- package/lib/backtop/backtop.d.ts +1 -1
- package/lib/backtop/backtop.variable.css +3 -0
- package/lib/backtop/index.d.ts +3 -3
- package/lib/backtop/index.js +6 -6
- package/lib/badge/badge.variable.css +3 -0
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb.variable.css +3 -0
- package/lib/button/button.d.ts +7 -7
- package/lib/button/button.variable.css +3 -0
- package/lib/button/index.d.ts +8 -8
- package/lib/button/index.js +6 -6
- package/lib/card/card.variable.css +3 -0
- package/lib/cascader/cascader-panel.d.ts +1 -1
- package/lib/cascader/cascader.css +3 -3
- package/lib/cascader/cascader.d.ts +1 -1
- package/lib/cascader/cascader.less +4 -4
- package/lib/cascader/cascader.variable.css +6 -3
- package/lib/cascader/index.js +35 -36
- package/lib/cascader/interface.d.ts +1 -1
- package/lib/checkbox/checkbox.variable.css +3 -0
- package/lib/checkbox/index.js +7 -7
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/code-diff/code-diff.variable.css +3 -0
- package/lib/code-diff/index.js +8 -8
- package/lib/collapse/collapse.css +11 -0
- package/lib/collapse/collapse.d.ts +11 -0
- package/lib/collapse/collapse.less +15 -1
- package/lib/collapse/collapse.variable.css +14 -0
- package/lib/collapse/index.d.ts +23 -0
- package/lib/collapse/index.js +11 -3
- package/lib/collapse/props.d.ts +8 -0
- package/lib/collapse/utils.d.ts +2 -2
- package/lib/collapse-transition/collapse-transition.variable.css +3 -0
- package/lib/color-picker/color-picker.css +3 -3
- package/lib/color-picker/color-picker.less +3 -3
- package/lib/color-picker/color-picker.variable.css +6 -3
- package/lib/color-picker/index.js +45 -45
- package/lib/components.d.ts +32 -30
- package/lib/components.js +31 -29
- package/lib/config-provider/config-provider.d.ts +3 -0
- package/lib/config-provider/config-provider.variable.css +3 -0
- package/lib/config-provider/index.d.ts +5 -1
- package/lib/config-provider/token.d.ts +1 -0
- package/lib/container/container.variable.css +3 -0
- package/lib/container/index.js +6 -6
- package/lib/date-picker/base/date-table.d.ts +1 -1
- package/lib/date-picker/base/month-table.d.ts +3 -3
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -1
- package/lib/date-picker/base/year-table.d.ts +3 -3
- package/lib/date-picker/date-picker.d.ts +1 -0
- package/lib/date-picker/date-picker.variable.css +3 -0
- package/lib/date-picker/index.d.ts +3 -0
- package/lib/date-picker/index.js +340 -224
- package/lib/date-picker/interface.d.ts +9 -9
- package/lib/date-picker/panel/date-range.d.ts +2 -64
- package/lib/date-picker/panel/date.d.ts +1 -1
- package/lib/date-picker/panel/time-range.d.ts +1 -1
- package/lib/date-picker/panel/time.d.ts +1 -1
- package/lib/date-picker/props.d.ts +1 -1
- package/lib/date-picker/time-picker.d.ts +1 -0
- package/lib/date-picker/utils.d.ts +9 -1
- package/lib/dialog/dialog.css +172 -150
- package/lib/dialog/dialog.d.ts +55 -124
- package/lib/dialog/dialog.less +51 -124
- package/lib/dialog/dialog.variable.css +175 -150
- package/lib/dialog/index.d.ts +132 -296
- package/lib/dialog/index.js +244 -246
- package/lib/dialog/props.d.ts +16 -41
- package/lib/directives/index.d.ts +3 -3
- package/lib/directives/index.js +166 -167
- package/lib/directives/tooltips.d.ts +1 -1
- package/lib/dist.index.js +2 -2
- package/lib/divider/divider.d.ts +5 -5
- package/lib/divider/divider.variable.css +3 -0
- 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.css +3 -1
- package/lib/dropdown/dropdown.d.ts +5 -5
- package/lib/dropdown/dropdown.variable.css +6 -1
- package/lib/dropdown/index.d.ts +11 -11
- package/lib/dropdown/index.js +7 -7
- package/lib/exception/exception.d.ts +9 -9
- package/lib/exception/exception.variable.css +3 -0
- 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.variable.css +3 -0
- package/lib/fixed-navbar/index.js +2 -2
- package/lib/form/form.d.ts +2 -2
- package/lib/form/form.variable.css +3 -0
- package/lib/form/index.js +17 -15
- package/lib/form/type.d.ts +2 -2
- package/lib/icon/image-fill.js +82 -167
- package/lib/icon/img-error.js +82 -167
- package/lib/icon/img-placehoulder.js +82 -167
- package/lib/icon/index.d.ts +12 -11
- package/lib/icon/index.js +87 -2427
- package/lib/icon/info-line.js +82 -167
- package/lib/icon/info.js +82 -167
- package/lib/icon/left-shape.js +82 -167
- package/lib/icon/left-turn-line.js +82 -167
- package/lib/icon/loading.js +82 -167
- package/lib/icon/narrow-line.js +82 -167
- package/lib/icon/original.js +82 -167
- package/lib/icon/pdf-fill.js +82 -167
- package/lib/icon/play-shape.js +82 -167
- package/lib/icon/plus.js +82 -167
- package/lib/icon/ppt-fill.js +82 -167
- package/lib/icon/qq.js +82 -167
- package/lib/icon/right-shape.js +82 -167
- package/lib/icon/right-turn-line.js +82 -167
- package/lib/icon/search.js +82 -167
- package/lib/icon/share.js +82 -167
- package/lib/icon/spinner.js +82 -167
- package/lib/icon/success.js +82 -167
- package/lib/icon/switcher-loading.js +82 -167
- package/lib/icon/text-all.d.ts +4 -0
- package/lib/icon/text-all.js +191 -0
- package/lib/icon/text-file.js +82 -167
- package/lib/icon/text-fill.js +82 -167
- package/lib/icon/transfer.js +82 -167
- package/lib/icon/tree-application-shape.js +82 -167
- package/lib/icon/unfull-screen.js +82 -167
- package/lib/icon/unvisible.js +82 -167
- package/lib/icon/up-shape.js +82 -167
- package/lib/icon/upload.js +82 -167
- package/lib/icon/video-fill.js +82 -167
- package/lib/icon/warn.js +82 -167
- package/lib/icon/weixin-pro.js +82 -167
- package/lib/icon/weixin.js +82 -167
- package/lib/image/image-viewer.d.ts +1 -1
- package/lib/image/image-viewer.variable.css +3 -0
- package/lib/image/image.variable.css +3 -0
- package/lib/image/index.js +25 -22
- package/lib/index.d.ts +3 -3
- package/lib/index.js +3 -3
- package/lib/info-box/index.d.ts +2 -2
- package/lib/info-box/index.js +257 -516
- package/lib/info-box/info-box.css +58 -28
- package/lib/info-box/info-box.d.ts +25 -23
- package/lib/info-box/info-box.less +82 -51
- package/lib/info-box/info-box.variable.css +61 -28
- package/lib/info-box/render-component.d.ts +4 -0
- package/lib/input/index.d.ts +15 -15
- package/lib/input/index.js +23 -17
- package/lib/input/input.d.ts +15 -15
- package/lib/input/input.variable.css +3 -0
- package/lib/link/index.d.ts +11 -11
- package/lib/link/index.js +3 -3
- package/lib/link/link.d.ts +5 -5
- package/lib/link/link.variable.css +3 -0
- package/lib/loading/index.d.ts +4 -4
- package/lib/loading/index.js +6 -6
- package/lib/loading/loading.d.ts +6 -6
- package/lib/loading/loading.variable.css +3 -0
- package/lib/locale/index.d.ts +1 -1
- package/lib/locale/index.js +4 -2
- package/lib/locale/lang/en.d.ts +1 -0
- package/lib/menu/index.js +0 -1
- package/lib/menu/menu.variable.css +3 -0
- package/lib/menu/submenu.variable.css +3 -0
- package/lib/menu/utils.d.ts +3 -3
- package/lib/message/index.js +18 -18
- package/lib/message/message.variable.css +3 -0
- package/lib/message/messageConstructor.d.ts +11 -11
- package/lib/modal/hooks.d.ts +6 -0
- package/lib/modal/index.d.ts +44 -312
- package/lib/modal/index.js +286 -672
- package/lib/modal/mask.d.ts +6 -0
- package/lib/modal/modal.css +151 -76
- package/lib/modal/modal.d.ts +19 -117
- package/lib/modal/modal.less +103 -56
- package/lib/modal/modal.variable.css +154 -76
- package/lib/modal/props.mixin.d.ts +5 -41
- package/lib/navigation/index.js +20 -20
- package/lib/navigation/navigation.d.ts +1 -1
- package/lib/navigation/navigation.variable.css +3 -0
- package/lib/notify/index.js +4 -4
- package/lib/notify/notify.variable.css +3 -0
- package/lib/overflow-title/components/overflow-title.d.ts +9 -9
- package/lib/overflow-title/index.d.ts +19 -19
- package/lib/overflow-title/index.js +107 -63
- package/lib/overflow-title/props.d.ts +18 -18
- package/lib/pagination/index.js +16 -15
- package/lib/pagination/pagination.variable.css +3 -0
- 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.d.ts +1 -1
- package/lib/plugin-popover/index.js +62 -44
- package/lib/pop-confirm/index.js +17 -14
- package/lib/pop-confirm/pop-confirm.variable.css +3 -0
- package/lib/pop-confirm/props.d.ts +2 -2
- package/lib/popover/const.d.ts +3 -3
- package/lib/popover/content.d.ts +1 -1
- package/lib/popover/index.d.ts +19 -19
- package/lib/popover/index.js +62 -44
- package/lib/popover/plugin-popover.d.ts +4 -1
- package/lib/popover/popover.css +3 -1
- package/lib/popover/popover.d.ts +7 -7
- package/lib/popover/popover.less +4 -1
- package/lib/popover/popover.variable.css +6 -1
- package/lib/popover/props.d.ts +4 -4
- package/lib/preset.d.ts +2 -0
- package/lib/process/index.js +3 -3
- package/lib/process/process.variable.css +3 -0
- package/lib/progress/index.d.ts +11 -11
- package/lib/progress/index.js +10 -10
- package/lib/progress/progress.d.ts +7 -7
- package/lib/progress/progress.variable.css +3 -0
- package/lib/radio/index.d.ts +29 -0
- package/lib/radio/index.js +49 -31
- package/lib/radio/radio-button.d.ts +10 -0
- package/lib/radio/radio-group.d.ts +10 -0
- package/lib/radio/radio.d.ts +10 -0
- package/lib/radio/radio.variable.css +3 -0
- package/lib/radio/type.d.ts +1 -1
- package/lib/rate/index.js +8 -8
- package/lib/rate/rate.css +27 -0
- package/lib/rate/rate.less +33 -0
- package/lib/rate/rate.variable.css +30 -0
- package/lib/resize-layout/index.d.ts +11 -11
- package/lib/resize-layout/index.js +8 -9
- package/lib/resize-layout/resize-layout.d.ts +5 -5
- package/lib/resize-layout/resize-layout.variable.css +3 -0
- package/lib/scrollbar/index.d.ts +15 -0
- package/lib/scrollbar/index.js +18762 -0
- package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +2 -0
- package/lib/scrollbar/scrollbar-core/helpers.d.ts +5 -0
- package/lib/scrollbar/scrollbar-core/index.d.ts +241 -0
- package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +5 -0
- package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +1 -0
- package/lib/scrollbar/scrollbar.css +75 -0
- package/lib/scrollbar/scrollbar.less +94 -0
- package/lib/{rate/star.variable.css → scrollbar/scrollbar.variable.css} +70 -19
- package/lib/search-select/index.d.ts +375 -16
- package/lib/search-select/index.js +754 -419
- package/lib/search-select/input.d.ts +14 -5
- package/lib/search-select/menu.d.ts +1 -1
- package/lib/search-select/search-select.css +20 -6
- package/lib/search-select/search-select.d.ts +129 -7
- package/lib/search-select/search-select.less +16 -12
- package/lib/search-select/search-select.variable.css +23 -6
- package/lib/search-select/selected.d.ts +117 -7
- package/lib/search-select/utils.d.ts +22 -9
- package/lib/select/index.d.ts +185 -67
- package/lib/select/index.js +1396 -136
- package/lib/select/option.d.ts +3 -1
- package/lib/select/pinyin/core.d.ts +14 -0
- package/lib/select/pinyin/dict.d.ts +34 -0
- package/lib/select/pinyin/index.d.ts +2 -0
- package/lib/select/select.css +56 -14
- package/lib/select/select.d.ts +74 -26
- package/lib/select/select.less +70 -21
- package/lib/select/select.variable.css +59 -14
- package/lib/select/selectTagInput.d.ts +13 -6
- package/lib/select/type.d.ts +4 -5
- package/lib/shared/index.d.ts +1 -2
- package/lib/shared/index.js +108 -96
- package/lib/shared/popover.d.ts +3 -3
- package/lib/shared/token.d.ts +1 -1
- package/lib/shared/utils.d.ts +12 -0
- package/lib/shared/vue-types.d.ts +51 -46
- package/lib/shared/z-index-manager.d.ts +6 -6
- package/lib/sideslider/index.d.ts +58 -188
- package/lib/sideslider/index.js +83 -57
- package/lib/sideslider/sideslider.css +26 -90
- package/lib/sideslider/sideslider.d.ts +26 -88
- package/lib/sideslider/sideslider.less +56 -132
- package/lib/sideslider/sideslider.variable.css +29 -90
- package/lib/slider/index.d.ts +19 -0
- package/lib/slider/index.js +64 -26
- package/lib/slider/slider.css +14 -0
- package/lib/slider/slider.d.ts +9 -0
- package/lib/slider/slider.less +15 -0
- package/lib/slider/slider.variable.css +17 -0
- package/lib/steps/index.d.ts +11 -11
- package/lib/steps/index.js +3 -3
- package/lib/steps/steps.d.ts +7 -7
- package/lib/steps/steps.variable.css +3 -0
- package/lib/styles/index.d.ts +0 -1
- package/lib/styles/mixins/animate.variable.css +3 -0
- package/lib/styles/mixins/popper.variable.css +3 -0
- package/lib/styles/mixins/scroll.variable.css +3 -0
- package/lib/styles/reset.css +1 -3
- package/lib/styles/reset.less +3 -6
- package/lib/styles/reset.variable.css +4 -3
- package/lib/styles/themes/themes.less +5 -0
- package/lib/swiper/index.js +5 -5
- package/lib/swiper/swiper.variable.css +3 -0
- package/lib/switcher/index.js +2 -2
- package/lib/switcher/switcher.d.ts +2 -2
- package/lib/switcher/switcher.variable.css +3 -0
- package/lib/tab/index.d.ts +22 -22
- package/lib/tab/index.js +15 -15
- package/lib/tab/props.d.ts +15 -15
- package/lib/tab/tab-nav.d.ts +10 -10
- package/lib/tab/tab.d.ts +10 -10
- package/lib/tab/tab.variable.css +3 -0
- package/lib/table/cache.d.ts +11 -3
- package/lib/table/components/table-cell.d.ts +3 -2
- package/lib/table/components/table-column.d.ts +30 -100
- package/lib/table/const.d.ts +12 -12
- package/lib/table/events.d.ts +21 -21
- package/lib/table/index.d.ts +220 -305
- package/lib/table/index.js +18165 -688
- package/lib/table/plugins/head-filter.css +8 -4
- package/lib/table/plugins/head-filter.less +6 -3
- package/lib/table/plugins/head-filter.variable.css +11 -4
- package/lib/table/plugins/head-sort.variable.css +3 -0
- package/lib/table/plugins/settings.variable.css +3 -0
- package/lib/table/plugins/use-active-columns.d.ts +2 -2
- package/lib/table/plugins/use-column-template.d.ts +7 -0
- package/lib/table/plugins/use-draggable.d.ts +2 -2
- package/lib/table/plugins/use-fixed-column.d.ts +1 -1
- package/lib/table/plugins/use-observer-resize.d.ts +5 -0
- package/lib/table/plugins/use-pagination.d.ts +3 -1
- package/lib/table/plugins/use-shift-key.d.ts +13 -0
- package/lib/table/props.d.ts +49 -39
- package/lib/table/table.css +112 -58
- package/lib/table/table.d.ts +58 -47
- package/lib/table/table.less +46 -58
- package/lib/table/table.variable.css +115 -58
- package/lib/table/use-attributes.d.ts +9 -46
- package/lib/table/use-column.d.ts +18 -139
- package/lib/table/use-common.d.ts +5 -5
- package/lib/table/use-render.d.ts +1 -1
- package/lib/table/utils.d.ts +6 -6
- package/lib/table-column/index.d.ts +127 -431
- package/lib/table-column/index.js +43 -117
- package/lib/tag/index.d.ts +11 -11
- package/lib/tag/index.js +2 -2
- package/lib/tag/tag.d.ts +5 -5
- package/lib/tag/tag.variable.css +3 -0
- package/lib/tag-input/common.d.ts +1 -1
- package/lib/tag-input/index.d.ts +12 -12
- package/lib/tag-input/index.js +30 -30
- package/lib/tag-input/tag-input.d.ts +6 -6
- package/lib/tag-input/tag-input.variable.css +3 -0
- package/lib/tag-input/tag-props.d.ts +3 -3
- package/lib/tag-input/tag-render.d.ts +1 -1
- package/lib/time-picker/index.d.ts +38 -35
- package/lib/time-picker/time-picker.variable.css +3 -0
- package/lib/timeline/index.d.ts +80 -44
- package/lib/timeline/index.js +56 -67
- package/lib/timeline/timeline.d.ts +46 -29
- package/lib/timeline/timeline.variable.css +3 -0
- package/lib/transfer/const.d.ts +2 -2
- package/lib/transfer/index.js +19 -19
- package/lib/transfer/transfer.css +9 -9
- package/lib/transfer/transfer.less +3 -3
- package/lib/transfer/transfer.variable.css +12 -9
- package/lib/tree/constant.d.ts +22 -20
- package/lib/tree/index.d.ts +64 -20
- package/lib/tree/index.js +17595 -72
- package/lib/tree/props.d.ts +24 -6
- package/lib/tree/tree.css +76 -2
- package/lib/tree/tree.d.ts +34 -8
- package/lib/tree/tree.less +1 -1
- package/lib/tree/tree.variable.css +79 -2
- package/lib/tree/use-empty.d.ts +1 -1
- package/lib/tree/use-intersection-observer.d.ts +27 -0
- package/lib/tree/use-node-action.d.ts +2 -2
- package/lib/tree/use-node-attribute.d.ts +9 -0
- package/lib/tree/use-search.d.ts +1 -1
- package/lib/tree/util.d.ts +1 -1
- package/lib/upload/index.d.ts +12 -0
- package/lib/upload/index.js +62 -65
- package/lib/upload/props.d.ts +4 -1
- package/lib/upload/upload-trigger.d.ts +6 -0
- package/lib/upload/upload.d.ts +6 -0
- package/lib/upload/upload.type.d.ts +7 -7
- package/lib/upload/upload.variable.css +3 -0
- package/lib/upload/use-file-handler.d.ts +1 -1
- package/lib/virtual-render/index.d.ts +36 -9
- package/lib/virtual-render/index.js +295 -80
- package/lib/virtual-render/props.d.ts +16 -0
- package/lib/virtual-render/use-fix-top.d.ts +2 -7
- package/lib/virtual-render/use-scrollbar.d.ts +24 -0
- package/lib/virtual-render/v-virtual-render.d.ts +2 -1
- package/lib/virtual-render/virtual-render.css +76 -2
- package/lib/virtual-render/virtual-render.d.ts +16 -3
- package/lib/virtual-render/virtual-render.less +3 -3
- package/lib/virtual-render/virtual-render.variable.css +79 -2
- package/package.json +13 -49
- package/lib/rate/star.css +0 -27
- package/lib/rate/star.less +0 -34
- package/lib/shared/mask.d.ts +0 -11
package/lib/upload/index.js
CHANGED
@@ -1255,6 +1255,10 @@ const external_vue_namespaceObject = external_vue_x({ ["Fragment"]: () => __WEBP
|
|
1255
1255
|
// EXTERNAL MODULE: ../../node_modules/@babel/runtime/regenerator/index.js
|
1256
1256
|
var regenerator = __webpack_require__(2841);
|
1257
1257
|
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
1258
|
+
;// CONCATENATED MODULE: external "../config-provider"
|
1259
|
+
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1260
|
+
var config_provider_y = x => () => x
|
1261
|
+
const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale, ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.usePrefix });
|
1258
1262
|
;// CONCATENATED MODULE: ../../packages/upload/src/upload.type.ts
|
1259
1263
|
/*
|
1260
1264
|
* Tencent is pleased to support the open source community by making
|
@@ -1281,7 +1285,7 @@ var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
1281
1285
|
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1282
1286
|
* IN THE SOFTWARE.
|
1283
1287
|
*/
|
1284
|
-
var CLASS_PREFIX = '
|
1288
|
+
var CLASS_PREFIX = 'upload';
|
1285
1289
|
var EThemes;
|
1286
1290
|
(function (EThemes) {
|
1287
1291
|
EThemes["BUTTON"] = "button";
|
@@ -1290,10 +1294,10 @@ var EThemes;
|
|
1290
1294
|
})(EThemes || (EThemes = {}));
|
1291
1295
|
var EUploadStatus;
|
1292
1296
|
(function (EUploadStatus) {
|
1297
|
+
EUploadStatus["FAIL"] = "fail";
|
1293
1298
|
EUploadStatus["NEW"] = "new";
|
1294
|
-
EUploadStatus["UPLOADING"] = "uploading";
|
1295
1299
|
EUploadStatus["SUCCESS"] = "success";
|
1296
|
-
EUploadStatus["
|
1300
|
+
EUploadStatus["UPLOADING"] = "uploading";
|
1297
1301
|
})(EUploadStatus || (EUploadStatus = {}));
|
1298
1302
|
;// CONCATENATED MODULE: ../../packages/upload/src/props.ts
|
1299
1303
|
/*
|
@@ -1431,6 +1435,9 @@ var themes = [EThemes.BUTTON, EThemes.DRAGGABLE, EThemes.PICTURE];
|
|
1431
1435
|
"default": ''
|
1432
1436
|
},
|
1433
1437
|
customRequest: Function,
|
1438
|
+
selectChange: {
|
1439
|
+
type: Function
|
1440
|
+
},
|
1434
1441
|
beforeUpload: {
|
1435
1442
|
type: Function
|
1436
1443
|
},
|
@@ -1514,10 +1521,6 @@ function _nonIterableRest() {
|
|
1514
1521
|
function _slicedToArray(arr, i) {
|
1515
1522
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
1516
1523
|
}
|
1517
|
-
;// CONCATENATED MODULE: external "../config-provider"
|
1518
|
-
var config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1519
|
-
var config_provider_y = x => () => x
|
1520
|
-
const config_provider_namespaceObject = config_provider_x({ ["useLocale"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_config_provider_fe8577a3__.useLocale });
|
1521
1524
|
;// CONCATENATED MODULE: external "../icon"
|
1522
1525
|
var icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
1523
1526
|
var icon_y = x => () => x
|
@@ -1583,11 +1586,13 @@ function _isSlot(s) {
|
|
1583
1586
|
var slots = _ref.slots,
|
1584
1587
|
emit = _ref.emit;
|
1585
1588
|
var t = (0,config_provider_namespaceObject.useLocale)('upload');
|
1589
|
+
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
1590
|
+
resolveClassName = _usePrefix.resolveClassName;
|
1586
1591
|
var _toRefs = (0,external_vue_namespaceObject.toRefs)(props),
|
1587
1592
|
theme = _toRefs.theme,
|
1588
1593
|
disabled = _toRefs.disabled,
|
1589
1594
|
multiple = _toRefs.multiple;
|
1590
|
-
var classBlock = "".concat(CLASS_PREFIX, "-list");
|
1595
|
+
var classBlock = "".concat(resolveClassName(CLASS_PREFIX), "-list");
|
1591
1596
|
var isPhotowall = (0,external_vue_namespaceObject.computed)(function () {
|
1592
1597
|
return theme.value === EThemes.PICTURE;
|
1593
1598
|
});
|
@@ -1629,19 +1634,19 @@ function _isSlot(s) {
|
|
1629
1634
|
};
|
1630
1635
|
var PhotoItem = function PhotoItem(file) {
|
1631
1636
|
return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("img", {
|
1632
|
-
"src": file.url,
|
1633
1637
|
"class": "".concat(classBlock, "__picture-item-thumbnail"),
|
1634
|
-
"alt": ""
|
1638
|
+
"alt": "",
|
1639
|
+
"src": file.url
|
1635
1640
|
}, 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"], {
|
1641
|
+
"width": 50,
|
1636
1642
|
"class": "".concat(classBlock, "__picture-item-progress"),
|
1637
|
-
"type": "circle",
|
1638
|
-
"color": "#3a84ff",
|
1639
1643
|
"bgColor": "#333",
|
1640
|
-
"
|
1644
|
+
"color": "#3a84ff",
|
1645
|
+
"percent": file.percentage,
|
1641
1646
|
"titleStyle": {
|
1642
1647
|
color: '#fff'
|
1643
1648
|
},
|
1644
|
-
"
|
1649
|
+
"type": "circle"
|
1645
1650
|
}, null)]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!disabled.value && (0,external_vue_namespaceObject.createVNode)("div", {
|
1646
1651
|
"class": "".concat(classBlock, "__picture-item-actions")
|
1647
1652
|
}, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Del, {
|
@@ -1695,9 +1700,9 @@ function _isSlot(s) {
|
|
1695
1700
|
return [(0,external_vue_namespaceObject.createVNode)("div", {
|
1696
1701
|
"class": "".concat(classBlock, "__item-icon")
|
1697
1702
|
}, [file.isPic ? (0,external_vue_namespaceObject.createVNode)("img", {
|
1698
|
-
"src": file.url,
|
1699
1703
|
"class": "".concat(classBlock, "__item-thumbnail"),
|
1700
|
-
"alt": ""
|
1704
|
+
"alt": "",
|
1705
|
+
"src": file.url
|
1701
1706
|
}, null) : FileIcon(file)]), (0,external_vue_namespaceObject.createVNode)("div", {
|
1702
1707
|
"class": "".concat(classBlock, "__item-summary")
|
1703
1708
|
}, [(0,external_vue_namespaceObject.createVNode)("div", {
|
@@ -1710,8 +1715,8 @@ function _isSlot(s) {
|
|
1710
1715
|
"class": "".concat(classBlock, "__item-message-success-icon")
|
1711
1716
|
}, 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"], {
|
1712
1717
|
"class": "".concat(classBlock, "__item-progress"),
|
1713
|
-
"showText": false,
|
1714
1718
|
"percent": file.percentage,
|
1719
|
+
"showText": false,
|
1715
1720
|
"size": "small"
|
1716
1721
|
}, null), file.status !== 'fail' && (0,external_vue_namespaceObject.createVNode)("div", {
|
1717
1722
|
"class": "".concat(classBlock, "__item-speed")
|
@@ -1796,20 +1801,23 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1796
1801
|
accept: props.accept,
|
1797
1802
|
file: {
|
1798
1803
|
type: Object
|
1799
|
-
}
|
1804
|
+
},
|
1805
|
+
selectChange: props.selectChange
|
1800
1806
|
},
|
1801
1807
|
emits: ['change', 'remove'],
|
1802
1808
|
setup: function setup(props, _ref) {
|
1803
1809
|
var slots = _ref.slots,
|
1804
1810
|
emit = _ref.emit;
|
1805
1811
|
var t = (0,config_provider_namespaceObject.useLocale)('upload');
|
1812
|
+
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
1813
|
+
resolveClassName = _usePrefix.resolveClassName;
|
1806
1814
|
var _toRefs = (0,external_vue_namespaceObject.toRefs)(props),
|
1807
1815
|
theme = _toRefs.theme,
|
1808
1816
|
disabled = _toRefs.disabled,
|
1809
1817
|
file = _toRefs.file,
|
1810
1818
|
multiple = _toRefs.multiple,
|
1811
1819
|
accept = _toRefs.accept;
|
1812
|
-
var classBlock = "".concat(CLASS_PREFIX, "-trigger");
|
1820
|
+
var classBlock = "".concat(resolveClassName(CLASS_PREFIX), "-trigger");
|
1813
1821
|
var isButton = (0,external_vue_namespaceObject.computed)(function () {
|
1814
1822
|
return theme.value === EThemes.BUTTON;
|
1815
1823
|
});
|
@@ -1835,6 +1843,10 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1835
1843
|
inputEl.value.click();
|
1836
1844
|
};
|
1837
1845
|
var handleFileChange = function handleFileChange(e) {
|
1846
|
+
var _props$selectChange;
|
1847
|
+
if (props.selectChange && ((_props$selectChange = props.selectChange) === null || _props$selectChange === void 0 ? void 0 : _props$selectChange.call(props, e)) === false) {
|
1848
|
+
return false;
|
1849
|
+
}
|
1838
1850
|
var files = e.target.files;
|
1839
1851
|
emit('change', Array.from(files));
|
1840
1852
|
};
|
@@ -1861,39 +1873,17 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1861
1873
|
var dragover = (0,external_vue_namespaceObject.ref)(false);
|
1862
1874
|
var Dragger = function Dragger() {
|
1863
1875
|
var handleDrop = function handleDrop(e) {
|
1876
|
+
var _props$selectChange2;
|
1864
1877
|
if (disabled.value) {
|
1865
1878
|
return;
|
1866
1879
|
}
|
1867
1880
|
e.preventDefault();
|
1868
1881
|
dragover.value = false;
|
1869
|
-
|
1870
|
-
|
1871
|
-
emit('change', files);
|
1872
|
-
return;
|
1882
|
+
if (props.selectChange && ((_props$selectChange2 = props.selectChange) === null || _props$selectChange2 === void 0 ? void 0 : _props$selectChange2.call(props, e)) === false) {
|
1883
|
+
return false;
|
1873
1884
|
}
|
1874
|
-
var
|
1875
|
-
|
1876
|
-
name = file.name;
|
1877
|
-
var extension = name.includes('.') ? ".".concat(name.split('.').pop()) : '';
|
1878
|
-
var baseType = type.replace(/\/.*$/, '');
|
1879
|
-
return acceptTypes.value.split(',').map(function (type) {
|
1880
|
-
return type.trim();
|
1881
|
-
}).filter(function (type) {
|
1882
|
-
return type;
|
1883
|
-
}).some(function (acceptedType) {
|
1884
|
-
if (acceptedType.startsWith('.')) {
|
1885
|
-
return extension === acceptedType;
|
1886
|
-
}
|
1887
|
-
if (/\/\*$/.test(acceptedType)) {
|
1888
|
-
return baseType === acceptedType.replace(/\/\*$/, '');
|
1889
|
-
}
|
1890
|
-
if (/^[^/]+\/[^/]+$/.test(acceptedType)) {
|
1891
|
-
return type === acceptedType;
|
1892
|
-
}
|
1893
|
-
return false;
|
1894
|
-
});
|
1895
|
-
});
|
1896
|
-
emit('change', filesFiltered);
|
1885
|
+
var files = Array.from(e.dataTransfer.files);
|
1886
|
+
emit('change', files);
|
1897
1887
|
};
|
1898
1888
|
var handleDragover = function handleDragover(e) {
|
1899
1889
|
e.preventDefault();
|
@@ -1905,9 +1895,9 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1905
1895
|
var classNames = (0,shared_namespaceObject.classes)(_defineProperty({}, "".concat(classBlock, "__draggable"), true));
|
1906
1896
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
1907
1897
|
"class": classNames,
|
1908
|
-
"
|
1898
|
+
"onDragleave": handleDragleave,
|
1909
1899
|
"onDragover": handleDragover,
|
1910
|
-
"
|
1900
|
+
"onDrop": handleDrop
|
1911
1901
|
}, [slots["default"] ? slots["default"]() : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Upload, {
|
1912
1902
|
"class": "".concat(classBlock, "__draggable-icon")
|
1913
1903
|
}, null), (0,external_vue_namespaceObject.createVNode)("div", {
|
@@ -1930,19 +1920,19 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1930
1920
|
};
|
1931
1921
|
var SinglePicture = function SinglePicture(file) {
|
1932
1922
|
return [(0,external_vue_namespaceObject.withDirectives)((0,external_vue_namespaceObject.createVNode)("img", {
|
1933
|
-
"src": file.url,
|
1934
1923
|
"class": "".concat(classBlock, "__picture-thumbnail"),
|
1935
|
-
"alt": ""
|
1924
|
+
"alt": "",
|
1925
|
+
"src": file.url
|
1936
1926
|
}, 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"], {
|
1927
|
+
"width": 50,
|
1937
1928
|
"class": "".concat(classBlock, "__picture-progress"),
|
1938
|
-
"type": "circle",
|
1939
|
-
"color": "#3a84ff",
|
1940
1929
|
"bgColor": "#333",
|
1941
|
-
"
|
1930
|
+
"color": "#3a84ff",
|
1931
|
+
"percent": file.percentage,
|
1942
1932
|
"titleStyle": {
|
1943
1933
|
color: '#fff'
|
1944
1934
|
},
|
1945
|
-
"
|
1935
|
+
"type": "circle"
|
1946
1936
|
}, null)]), (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [!props.disabled && (0,external_vue_namespaceObject.createVNode)("div", {
|
1947
1937
|
"class": "".concat(classBlock, "__picture-actions")
|
1948
1938
|
}, [(0,external_vue_namespaceObject.createVNode)(icon_namespaceObject.Del, {
|
@@ -1980,12 +1970,12 @@ const button_less_namespaceObject = button_less_x({ });
|
|
1980
1970
|
}, [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", {
|
1981
1971
|
"ref": inputEl,
|
1982
1972
|
"class": "".concat(classBlock, "__input-file"),
|
1983
|
-
"tabindex": "-1",
|
1984
|
-
"onChange": handleFileChange,
|
1985
1973
|
"accept": acceptTypes.value,
|
1986
|
-
"multiple": multiple.value,
|
1987
1974
|
"disabled": disabled.value,
|
1988
|
-
"
|
1975
|
+
"multiple": multiple.value,
|
1976
|
+
"tabindex": "-1",
|
1977
|
+
"type": "file",
|
1978
|
+
"onChange": handleFileChange
|
1989
1979
|
}, null)]);
|
1990
1980
|
};
|
1991
1981
|
}
|
@@ -2203,7 +2193,6 @@ var ajaxSliceUpload = /*#__PURE__*/function () {
|
|
2203
2193
|
// 请求分片上传,保存在progressList中
|
2204
2194
|
var sliceSend = function sliceSend(option, file, blockCount, hash, progressList, chunkSize) {
|
2205
2195
|
var _loop = function _loop(i) {
|
2206
|
-
// eslint-disable-next-line no-loop-func
|
2207
2196
|
var pooltask = new Promise(function (resolve, reject) {
|
2208
2197
|
var start = i * chunkSize;
|
2209
2198
|
var end = Math.min(file.size, start + chunkSize);
|
@@ -2615,6 +2604,7 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2615
2604
|
|
2616
2605
|
|
2617
2606
|
|
2607
|
+
|
2618
2608
|
/* harmony default export */ const upload = ((0,external_vue_namespaceObject.defineComponent)({
|
2619
2609
|
name: 'Upload',
|
2620
2610
|
props: props,
|
@@ -2623,6 +2613,8 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2623
2613
|
var slots = _ref.slots,
|
2624
2614
|
emit = _ref.emit,
|
2625
2615
|
expose = _ref.expose;
|
2616
|
+
var _usePrefix = (0,config_provider_namespaceObject.usePrefix)(),
|
2617
|
+
resolveClassName = _usePrefix.resolveClassName;
|
2626
2618
|
var requests = (0,external_vue_namespaceObject.shallowRef)({});
|
2627
2619
|
var isPhotowall = (0,external_vue_namespaceObject.computed)(function () {
|
2628
2620
|
return props.theme === EThemes.PICTURE;
|
@@ -2632,14 +2624,15 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2632
2624
|
});
|
2633
2625
|
var classNames = (0,external_vue_namespaceObject.computed)(function () {
|
2634
2626
|
var _props$extCls;
|
2635
|
-
return (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, CLASS_PREFIX, true), "".concat(CLASS_PREFIX, "--").concat(props.theme), true), "".concat(CLASS_PREFIX, "--disabled"), props.disabled), "".concat(CLASS_PREFIX, "--single-picture"), isSinglePhoto.value), props.extCls, (_props$extCls = props.extCls) !== null && _props$extCls !== void 0 ? _props$extCls : false));
|
2627
|
+
return (0,shared_namespaceObject.classes)(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(resolveClassName(CLASS_PREFIX)), true), "".concat(resolveClassName(CLASS_PREFIX), "--").concat(props.theme), true), "".concat(resolveClassName(CLASS_PREFIX), "--disabled"), props.disabled), "".concat(resolveClassName(CLASS_PREFIX), "--single-picture"), isSinglePhoto.value), props.extCls, (_props$extCls = props.extCls) !== null && _props$extCls !== void 0 ? _props$extCls : false));
|
2636
2628
|
});
|
2637
2629
|
var triggerProps = (0,external_vue_namespaceObject.computed)(function () {
|
2638
2630
|
return {
|
2639
2631
|
theme: props.theme,
|
2640
2632
|
multiple: props.multiple,
|
2641
2633
|
disabled: props.disabled,
|
2642
|
-
accept: props.accept
|
2634
|
+
accept: props.accept,
|
2635
|
+
selectChange: props.selectChange
|
2643
2636
|
};
|
2644
2637
|
});
|
2645
2638
|
function onRemove(file, fileList) {
|
@@ -2660,10 +2653,14 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2660
2653
|
return;
|
2661
2654
|
}
|
2662
2655
|
// limit检查
|
2663
|
-
if (props.limit && fileList.value.length + files.length > props.limit) {
|
2656
|
+
if (props.limit > 1 && fileList.value.length + files.length > props.limit) {
|
2664
2657
|
emit('exceed', files, fileList.value);
|
2665
2658
|
return;
|
2666
2659
|
}
|
2660
|
+
// 限制1个时使用替换方式,将之前的列表清空
|
2661
|
+
if (!props.multiple && props.limit === 1) {
|
2662
|
+
fileList.value = [];
|
2663
|
+
}
|
2667
2664
|
var sendFiles = files;
|
2668
2665
|
if (!props.multiple || props.limit === 1) {
|
2669
2666
|
sendFiles = files.slice(0, 1);
|
@@ -2829,12 +2826,12 @@ function upload_arrayLikeToArray(arr, len) { if (len == null || len > arr.length
|
|
2829
2826
|
}, [!isPhotowall.value && (0,external_vue_namespaceObject.createVNode)(upload_trigger, (0,external_vue_namespaceObject.mergeProps)(triggerProps.value, {
|
2830
2827
|
"onChange": handleFiles
|
2831
2828
|
}), slots), slots.tip ? slots.tip() : props.tip && (0,external_vue_namespaceObject.createVNode)("div", {
|
2832
|
-
"class": "".concat(CLASS_PREFIX, "__tip")
|
2829
|
+
"class": "".concat(resolveClassName(CLASS_PREFIX), "__tip")
|
2833
2830
|
}, [props.tip]), (0,external_vue_namespaceObject.createVNode)(upload_list, {
|
2834
|
-
"files": fileList.value,
|
2835
|
-
"theme": props.theme,
|
2836
2831
|
"disabled": props.disabled,
|
2832
|
+
"files": fileList.value,
|
2837
2833
|
"multiple": props.multiple,
|
2834
|
+
"theme": props.theme,
|
2838
2835
|
"onRemove": handleRemove,
|
2839
2836
|
"onRetry": handleRetry
|
2840
2837
|
}, {
|
package/lib/upload/props.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { PropType } from 'vue';
|
2
1
|
import { APIResponse, EThemes, ExtraFormData, FormDataAttr, HeaderDataAttr, MaxSize, UploadFile, UploadRawFile, UploadRequestHandler } from './upload.type';
|
2
|
+
import type { PropType } from 'vue';
|
3
3
|
declare const _default: {
|
4
4
|
theme: {
|
5
5
|
type: PropType<"button" | "picture" | "draggable">;
|
@@ -85,6 +85,9 @@ declare const _default: {
|
|
85
85
|
default: string;
|
86
86
|
};
|
87
87
|
customRequest: PropType<UploadRequestHandler>;
|
88
|
+
selectChange: {
|
89
|
+
type: PropType<(event: Event) => boolean | void>;
|
90
|
+
};
|
88
91
|
beforeUpload: {
|
89
92
|
type: PropType<(file: UploadRawFile) => Promise<boolean> | boolean>;
|
90
93
|
};
|
@@ -20,6 +20,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
20
20
|
file: {
|
21
21
|
type: PropType<UploadFile>;
|
22
22
|
};
|
23
|
+
selectChange: {
|
24
|
+
type: PropType<(event: Event) => boolean | void>;
|
25
|
+
};
|
23
26
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "remove")[], "change" | "remove", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
24
27
|
theme: {
|
25
28
|
type: PropType<"button" | "picture" | "draggable">;
|
@@ -40,6 +43,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
40
43
|
file: {
|
41
44
|
type: PropType<UploadFile>;
|
42
45
|
};
|
46
|
+
selectChange: {
|
47
|
+
type: PropType<(event: Event) => boolean | void>;
|
48
|
+
};
|
43
49
|
}>> & {
|
44
50
|
onChange?: (...args: any[]) => any;
|
45
51
|
onRemove?: (...args: any[]) => any;
|
package/lib/upload/upload.d.ts
CHANGED
@@ -84,6 +84,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
84
84
|
default: string;
|
85
85
|
};
|
86
86
|
customRequest: import("vue").PropType<import("./upload.type").UploadRequestHandler>;
|
87
|
+
selectChange: {
|
88
|
+
type: import("vue").PropType<(event: Event) => boolean | void>;
|
89
|
+
};
|
87
90
|
beforeUpload: {
|
88
91
|
type: import("vue").PropType<(file: UploadRawFile) => boolean | Promise<boolean>>;
|
89
92
|
};
|
@@ -191,6 +194,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
191
194
|
default: string;
|
192
195
|
};
|
193
196
|
customRequest: import("vue").PropType<import("./upload.type").UploadRequestHandler>;
|
197
|
+
selectChange: {
|
198
|
+
type: import("vue").PropType<(event: Event) => boolean | void>;
|
199
|
+
};
|
194
200
|
beforeUpload: {
|
195
201
|
type: import("vue").PropType<(file: UploadRawFile) => boolean | Promise<boolean>>;
|
196
202
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
2
2
|
import uploadProps from './props';
|
3
|
-
export declare const CLASS_PREFIX = "
|
3
|
+
export declare const CLASS_PREFIX = "upload";
|
4
4
|
export declare const enum EThemes {
|
5
5
|
BUTTON = "button",
|
6
6
|
DRAGGABLE = "draggable",
|
@@ -8,21 +8,21 @@ export declare const enum EThemes {
|
|
8
8
|
}
|
9
9
|
export type Theme = Lowercase<keyof typeof EThemes>;
|
10
10
|
export declare const enum EUploadStatus {
|
11
|
+
FAIL = "fail",
|
11
12
|
NEW = "new",
|
12
|
-
UPLOADING = "uploading",
|
13
13
|
SUCCESS = "success",
|
14
|
-
|
14
|
+
UPLOADING = "uploading"
|
15
15
|
}
|
16
16
|
export type UploadStatus = Lowercase<keyof typeof EUploadStatus>;
|
17
17
|
export type FormDataAttr = {
|
18
18
|
name: string;
|
19
|
-
value:
|
19
|
+
value: [Blob | string, string] | Blob | string;
|
20
20
|
};
|
21
21
|
export type HeaderDataAttr = {
|
22
22
|
name: string;
|
23
23
|
value: string;
|
24
24
|
};
|
25
|
-
export type ExtraFormData = Record<string,
|
25
|
+
export type ExtraFormData = Record<string, [Blob | string, string] | Blob | string>;
|
26
26
|
export type UploadFiles = UploadFile[];
|
27
27
|
export type UploadFile = {
|
28
28
|
name: string;
|
@@ -60,7 +60,7 @@ export interface UploadRequestOptions {
|
|
60
60
|
formDataAttributes?: FormDataAttr | FormDataAttr[];
|
61
61
|
filename: string;
|
62
62
|
file: File;
|
63
|
-
headers?: Headers | Record<string,
|
63
|
+
headers?: Headers | Record<string, null | number | string | undefined>;
|
64
64
|
header?: HeaderDataAttr | HeaderDataAttr[];
|
65
65
|
withCredentials: boolean;
|
66
66
|
sliceUrl: string;
|
@@ -71,7 +71,7 @@ export interface UploadRequestOptions {
|
|
71
71
|
onSuccess: (res: SuccessResponse) => void;
|
72
72
|
onComplete: () => void;
|
73
73
|
}
|
74
|
-
export type UploadRequestHandler = (options: UploadRequestOptions) =>
|
74
|
+
export type UploadRequestHandler = (options: UploadRequestOptions) => Promise<unknown> | XMLHttpRequest;
|
75
75
|
export type HookHandler = (uploadFile: UploadFile, uploadFiles: UploadFiles) => void;
|
76
76
|
export interface UploadHanderHooks {
|
77
77
|
onRemove: HookHandler;
|
@@ -12,6 +12,7 @@
|
|
12
12
|
--whitesmoke-color: #fafbfd;
|
13
13
|
--disable-color: #dcdee5;
|
14
14
|
--disable-bg-color: #f9fafd;
|
15
|
+
--border-color: #dcdee5;
|
15
16
|
--font-size-base: 12px;
|
16
17
|
--font-size-medium: 14px;
|
17
18
|
--font-size-large: 16px;
|
@@ -123,6 +124,8 @@
|
|
123
124
|
--search-select-placeholder-color: var(--light-gray);
|
124
125
|
--search-select-message-color: var(--danger-color);
|
125
126
|
--search-select-menu-border-color: var(--disable-color);
|
127
|
+
--select-active-color: #e1ecff;
|
128
|
+
--select-hover-color: #f5f7fa;
|
126
129
|
}
|
127
130
|
@keyframes loading-scale-animate {
|
128
131
|
0% {
|
@@ -2,7 +2,7 @@ import { SuccessResponse, UploadFile, UploadHanderHooks, UploadProgressEvent, Up
|
|
2
2
|
declare const _default: (props: UploadProps, hooks: UploadHanderHooks) => {
|
3
3
|
fileList: import("vue").Ref<{
|
4
4
|
name: string;
|
5
|
-
status: "success" | "
|
5
|
+
status: "success" | "fail" | "new" | "uploading";
|
6
6
|
statusText?: string;
|
7
7
|
percentage?: number;
|
8
8
|
response?: unknown;
|
@@ -124,6 +124,7 @@ declare const BkVirtualRender: {
|
|
124
124
|
} & {
|
125
125
|
default: boolean;
|
126
126
|
};
|
127
|
+
scrollbar: import("vue-types").VueTypeDef<import("./props").IScrollbarOption>;
|
127
128
|
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
128
129
|
default: boolean;
|
129
130
|
} & {
|
@@ -132,6 +133,11 @@ declare const BkVirtualRender: {
|
|
132
133
|
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
133
134
|
default: any;
|
134
135
|
};
|
136
|
+
autoIndex: import("vue-types").VueTypeValidableDef<boolean> & {
|
137
|
+
default: boolean;
|
138
|
+
} & {
|
139
|
+
default: boolean;
|
140
|
+
};
|
135
141
|
}>> & {
|
136
142
|
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
|
137
143
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -261,6 +267,7 @@ declare const BkVirtualRender: {
|
|
261
267
|
} & {
|
262
268
|
default: boolean;
|
263
269
|
};
|
270
|
+
scrollbar: import("vue-types").VueTypeDef<import("./props").IScrollbarOption>;
|
264
271
|
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
265
272
|
default: boolean;
|
266
273
|
} & {
|
@@ -269,12 +276,20 @@ declare const BkVirtualRender: {
|
|
269
276
|
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
270
277
|
default: any;
|
271
278
|
};
|
279
|
+
autoIndex: import("vue-types").VueTypeValidableDef<boolean> & {
|
280
|
+
default: boolean;
|
281
|
+
} & {
|
282
|
+
default: boolean;
|
283
|
+
};
|
272
284
|
}>> & {
|
273
285
|
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
|
274
286
|
}, {
|
275
287
|
width: string | number;
|
276
288
|
height: string | number;
|
277
289
|
maxHeight: number;
|
290
|
+
contentClassName: string | {
|
291
|
+
[key: string]: any;
|
292
|
+
};
|
278
293
|
enabled: boolean;
|
279
294
|
list: unknown[];
|
280
295
|
minHeight: number;
|
@@ -284,9 +299,6 @@ declare const BkVirtualRender: {
|
|
284
299
|
};
|
285
300
|
lineHeight: any;
|
286
301
|
scrollEvent: boolean;
|
287
|
-
contentClassName: string | {
|
288
|
-
[key: string]: any;
|
289
|
-
};
|
290
302
|
contentStyle: {
|
291
303
|
[key: string]: any;
|
292
304
|
};
|
@@ -303,6 +315,7 @@ declare const BkVirtualRender: {
|
|
303
315
|
rowKey: string;
|
304
316
|
keepAlive: boolean;
|
305
317
|
autoReset: boolean;
|
318
|
+
autoIndex: boolean;
|
306
319
|
}, true, {}, import("vue").SlotsType<{
|
307
320
|
default?: any;
|
308
321
|
beforeContent?: any;
|
@@ -440,6 +453,7 @@ declare const BkVirtualRender: {
|
|
440
453
|
} & {
|
441
454
|
default: boolean;
|
442
455
|
};
|
456
|
+
scrollbar: import("vue-types").VueTypeDef<import("./props").IScrollbarOption>;
|
443
457
|
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
444
458
|
default: boolean;
|
445
459
|
} & {
|
@@ -448,6 +462,11 @@ declare const BkVirtualRender: {
|
|
448
462
|
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
449
463
|
default: any;
|
450
464
|
};
|
465
|
+
autoIndex: import("vue-types").VueTypeValidableDef<boolean> & {
|
466
|
+
default: boolean;
|
467
|
+
} & {
|
468
|
+
default: boolean;
|
469
|
+
};
|
451
470
|
}>> & {
|
452
471
|
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
|
453
472
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -456,6 +475,9 @@ declare const BkVirtualRender: {
|
|
456
475
|
width: string | number;
|
457
476
|
height: string | number;
|
458
477
|
maxHeight: number;
|
478
|
+
contentClassName: string | {
|
479
|
+
[key: string]: any;
|
480
|
+
};
|
459
481
|
enabled: boolean;
|
460
482
|
list: unknown[];
|
461
483
|
minHeight: number;
|
@@ -465,9 +487,6 @@ declare const BkVirtualRender: {
|
|
465
487
|
};
|
466
488
|
lineHeight: any;
|
467
489
|
scrollEvent: boolean;
|
468
|
-
contentClassName: string | {
|
469
|
-
[key: string]: any;
|
470
|
-
};
|
471
490
|
contentStyle: {
|
472
491
|
[key: string]: any;
|
473
492
|
};
|
@@ -484,6 +503,7 @@ declare const BkVirtualRender: {
|
|
484
503
|
rowKey: string;
|
485
504
|
keepAlive: boolean;
|
486
505
|
autoReset: boolean;
|
506
|
+
autoIndex: boolean;
|
487
507
|
}>;
|
488
508
|
__isFragment?: never;
|
489
509
|
__isTeleport?: never;
|
@@ -613,6 +633,7 @@ declare const BkVirtualRender: {
|
|
613
633
|
} & {
|
614
634
|
default: boolean;
|
615
635
|
};
|
636
|
+
scrollbar: import("vue-types").VueTypeDef<import("./props").IScrollbarOption>;
|
616
637
|
autoReset: import("vue-types").VueTypeValidableDef<boolean> & {
|
617
638
|
default: boolean;
|
618
639
|
} & {
|
@@ -621,6 +642,11 @@ declare const BkVirtualRender: {
|
|
621
642
|
wrapperStyle: import("vue-types").VueTypeValidableDef<any> & {
|
622
643
|
default: any;
|
623
644
|
};
|
645
|
+
autoIndex: import("vue-types").VueTypeValidableDef<boolean> & {
|
646
|
+
default: boolean;
|
647
|
+
} & {
|
648
|
+
default: boolean;
|
649
|
+
};
|
624
650
|
}>> & {
|
625
651
|
[x: `on${Capitalize<string>}`]: (...args: any[]) => any;
|
626
652
|
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
@@ -629,6 +655,9 @@ declare const BkVirtualRender: {
|
|
629
655
|
width: string | number;
|
630
656
|
height: string | number;
|
631
657
|
maxHeight: number;
|
658
|
+
contentClassName: string | {
|
659
|
+
[key: string]: any;
|
660
|
+
};
|
632
661
|
enabled: boolean;
|
633
662
|
list: unknown[];
|
634
663
|
minHeight: number;
|
@@ -638,9 +667,6 @@ declare const BkVirtualRender: {
|
|
638
667
|
};
|
639
668
|
lineHeight: any;
|
640
669
|
scrollEvent: boolean;
|
641
|
-
contentClassName: string | {
|
642
|
-
[key: string]: any;
|
643
|
-
};
|
644
670
|
contentStyle: {
|
645
671
|
[key: string]: any;
|
646
672
|
};
|
@@ -657,6 +683,7 @@ declare const BkVirtualRender: {
|
|
657
683
|
rowKey: string;
|
658
684
|
keepAlive: boolean;
|
659
685
|
autoReset: boolean;
|
686
|
+
autoIndex: boolean;
|
660
687
|
}, {}, string, import("vue").SlotsType<{
|
661
688
|
default?: any;
|
662
689
|
beforeContent?: any;
|