bkui-vue 0.0.1-beta.9 → 0.0.1-beta.92
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 +31 -19
- package/dist/index.cjs.js +57 -0
- package/dist/index.esm.js +24958 -0
- package/dist/index.umd.js +57 -0
- package/dist/style.css +1 -2348
- package/lib/affix/affix.css +3 -0
- package/lib/affix/affix.d.ts +47 -0
- package/lib/affix/affix.less +5 -0
- package/lib/affix/affix.variable.css +102 -0
- package/lib/affix/index.d.ts +143 -0
- package/lib/affix/index.js +1 -0
- package/lib/alert/alert.css +5 -3
- package/lib/alert/alert.d.ts +24 -15
- package/lib/alert/alert.less +7 -3
- package/lib/alert/alert.variable.css +34 -3
- package/lib/alert/index.d.ts +180 -0
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/animate-number.d.ts +12 -7
- package/lib/animate-number/index.d.ts +97 -0
- package/lib/animate-number/index.js +1 -1
- package/lib/backtop/backtop.d.ts +27 -13
- package/lib/backtop/backtop.variable.css +29 -0
- package/lib/backtop/index.d.ts +166 -0
- package/lib/backtop/index.js +1 -1
- package/lib/badge/badge.css +5 -5
- package/lib/badge/badge.d.ts +64 -22
- package/lib/badge/badge.less +5 -6
- package/lib/badge/badge.variable.css +34 -5
- package/lib/badge/index.d.ts +267 -0
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb-item.d.ts +13 -9
- package/lib/breadcrumb/breadcrumb.css +18 -1
- package/lib/breadcrumb/breadcrumb.d.ts +37 -9
- package/lib/breadcrumb/breadcrumb.less +13 -2
- package/lib/breadcrumb/breadcrumb.variable.css +47 -1
- package/lib/breadcrumb/index.d.ts +194 -0
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button-group.d.ts +3 -5
- package/lib/button/button.css +73 -44
- package/lib/button/button.d.ts +67 -31
- package/lib/button/button.less +68 -47
- package/lib/button/button.variable.css +102 -44
- package/lib/button/index.d.ts +237 -0
- package/lib/button/index.js +1 -1
- package/lib/card/card.css +53 -1
- package/lib/card/card.d.ts +74 -18
- package/lib/card/card.less +50 -2
- package/lib/card/card.variable.css +82 -1
- package/lib/card/index.d.ts +283 -0
- package/lib/card/index.js +1 -1
- package/lib/cascader/cascader-panel.d.ts +48 -0
- package/lib/cascader/cascader.css +130 -0
- package/lib/cascader/cascader.d.ts +271 -0
- package/lib/cascader/cascader.less +146 -0
- package/lib/cascader/cascader.variable.css +229 -0
- package/lib/cascader/index.d.ts +721 -0
- package/lib/cascader/index.js +1 -0
- package/lib/cascader/interface.d.ts +44 -0
- package/lib/cascader/node.d.ts +24 -0
- package/lib/cascader/store.d.ts +15 -0
- package/lib/checkbox/checkbox-group.d.ts +13 -9
- package/lib/checkbox/checkbox.css +15 -2
- package/lib/checkbox/checkbox.d.ts +33 -30
- package/lib/checkbox/checkbox.less +20 -2
- package/lib/checkbox/checkbox.variable.css +44 -2
- package/lib/checkbox/common.d.ts +3 -3
- package/lib/checkbox/index.d.ts +253 -0
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +4 -8
- package/lib/code-diff/code-diff.css +186 -0
- package/lib/code-diff/code-diff.d.ts +80 -0
- package/lib/code-diff/code-diff.less +238 -0
- package/lib/code-diff/code-diff.variable.css +285 -0
- package/lib/code-diff/index.d.ts +154 -0
- package/lib/code-diff/index.js +1 -0
- package/lib/collapse/collapse.css +25 -1
- package/lib/collapse/collapse.d.ts +51 -22
- package/lib/collapse/collapse.less +34 -2
- package/lib/collapse/collapse.variable.css +124 -1
- package/lib/collapse/index.d.ts +182 -0
- package/lib/collapse/index.js +1 -1
- package/lib/collapse/utils.d.ts +11 -0
- package/lib/components.d.ts +27 -4
- package/lib/components.js +1 -0
- package/lib/container/col.d.ts +51 -0
- package/lib/container/container.css +48 -0
- package/lib/container/container.d.ts +83 -0
- package/lib/container/container.less +20 -0
- package/lib/container/container.variable.css +147 -0
- package/lib/container/index.d.ts +223 -0
- package/lib/container/index.js +1 -0
- package/lib/container/row.d.ts +4 -0
- package/lib/date-picker/date-picker.css +408 -0
- package/lib/date-picker/date-picker.d.ts +312 -0
- package/lib/date-picker/date-picker.less +527 -0
- package/lib/date-picker/date-picker.variable.css +507 -0
- package/lib/date-picker/fecha.d.ts +6 -0
- package/lib/date-picker/index.d.ts +753 -0
- package/lib/date-picker/index.js +1 -0
- package/lib/date-picker/interface.d.ts +22 -0
- package/lib/date-picker/props.d.ts +118 -0
- package/lib/date-picker/utils.d.ts +97 -0
- package/lib/dialog/dialog.css +66 -14
- package/lib/dialog/dialog.d.ts +305 -52
- package/lib/dialog/dialog.less +34 -14
- package/lib/dialog/dialog.variable.css +66 -14
- package/lib/dialog/index.d.ts +772 -0
- package/lib/dialog/index.js +1 -1
- package/lib/directives/clickoutside.d.ts +3 -23
- package/lib/directives/index.d.ts +3 -0
- package/lib/directives/index.js +2 -15
- package/lib/directives/index.js.LICENSE.txt +14 -0
- package/lib/directives/tooltips.d.ts +17 -0
- package/lib/dist.index.js +1 -0
- package/lib/divider/divider.css +38 -0
- package/lib/divider/divider.d.ts +48 -0
- package/lib/divider/divider.less +53 -0
- package/lib/divider/divider.variable.css +137 -0
- package/lib/divider/index.d.ts +142 -0
- package/lib/divider/index.js +1 -0
- package/lib/divider/props.d.ts +21 -0
- package/lib/dropdown/dropdown-item.d.ts +19 -0
- package/lib/dropdown/dropdown-menu.d.ts +16 -0
- package/lib/dropdown/dropdown.css +47 -0
- package/lib/dropdown/dropdown.d.ts +63 -0
- package/lib/dropdown/dropdown.less +59 -0
- package/lib/dropdown/dropdown.variable.css +146 -0
- package/lib/dropdown/index.d.ts +200 -0
- package/lib/dropdown/index.js +1 -0
- package/lib/exception/exception.d.ts +11 -9
- package/lib/exception/exception.variable.css +29 -0
- package/lib/exception/index.d.ts +96 -0
- package/lib/exception/index.js +1 -1
- package/lib/fixed-navbar/fixed-navbar.d.ts +29 -9
- package/lib/fixed-navbar/fixed-navbar.variable.css +29 -0
- package/lib/fixed-navbar/index.d.ts +147 -0
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/form/compose-form-item.d.ts +16 -0
- package/lib/form/form-item.d.ts +155 -0
- package/lib/form/form.css +125 -0
- package/lib/form/form.d.ts +81 -0
- package/lib/form/form.less +152 -0
- package/lib/form/form.variable.css +224 -0
- package/lib/form/index.d.ts +303 -0
- package/lib/form/index.js +1 -0
- package/lib/form/type.d.ts +23 -0
- package/lib/form/validator.d.ts +9 -0
- package/lib/icon/angle-double-down-line.d.ts +4 -0
- package/lib/icon/angle-double-down-line.js +1 -0
- package/lib/icon/angle-double-left-line.d.ts +4 -0
- package/lib/icon/angle-double-left-line.js +1 -0
- package/lib/icon/angle-double-left.d.ts +4 -0
- package/lib/icon/angle-double-left.js +1 -0
- package/lib/icon/angle-double-right-line.d.ts +4 -0
- package/lib/icon/angle-double-right-line.js +1 -0
- package/lib/icon/angle-double-right.d.ts +4 -0
- package/lib/icon/angle-double-right.js +1 -0
- package/lib/icon/angle-double-up-line.d.ts +4 -0
- package/lib/icon/angle-double-up-line.js +1 -0
- package/lib/icon/angle-down-fill.d.ts +4 -0
- package/lib/icon/angle-down-fill.js +1 -0
- package/lib/icon/angle-down-line.d.ts +4 -0
- package/lib/icon/angle-down-line.js +1 -0
- package/lib/icon/angle-down.d.ts +4 -0
- package/lib/icon/angle-down.js +1 -0
- package/lib/icon/angle-left.d.ts +4 -0
- package/lib/icon/angle-left.js +1 -0
- package/lib/icon/angle-right.d.ts +4 -0
- package/lib/icon/angle-right.js +1 -0
- package/lib/icon/angle-up-fill.d.ts +4 -0
- package/lib/icon/angle-up-fill.js +1 -0
- package/lib/icon/angle-up.js +1 -0
- package/lib/icon/archive-fill.d.ts +4 -0
- package/lib/icon/archive-fill.js +1 -0
- package/lib/icon/arrows-left.d.ts +4 -0
- package/lib/icon/arrows-left.js +1 -0
- package/lib/icon/arrows-right.d.ts +4 -0
- package/lib/icon/arrows-right.js +1 -0
- package/lib/icon/audio-fill.d.ts +4 -0
- package/lib/icon/audio-fill.js +1 -0
- package/lib/icon/bk.d.ts +4 -0
- package/lib/icon/bk.js +1 -0
- package/lib/icon/circle.d.ts +4 -0
- package/lib/icon/circle.js +1 -0
- package/lib/icon/close-line.d.ts +4 -0
- package/lib/icon/close-line.js +1 -0
- package/lib/icon/close.js +1 -0
- package/lib/icon/code.d.ts +4 -0
- package/lib/icon/code.js +1 -0
- package/lib/icon/cog-shape.d.ts +4 -0
- package/lib/icon/cog-shape.js +1 -0
- package/lib/icon/collapse-left.d.ts +4 -0
- package/lib/icon/collapse-left.js +1 -0
- package/lib/icon/copy.d.ts +4 -0
- package/lib/icon/copy.js +1 -0
- package/lib/icon/data-shape.d.ts +4 -0
- package/lib/icon/data-shape.js +1 -0
- package/lib/icon/del.d.ts +4 -0
- package/lib/icon/del.js +1 -0
- package/lib/icon/doc-fill.d.ts +4 -0
- package/lib/icon/doc-fill.js +1 -0
- package/lib/icon/done.d.ts +4 -0
- package/lib/icon/done.js +1 -0
- package/lib/icon/down-shape.d.ts +4 -0
- package/lib/icon/down-shape.js +1 -0
- package/lib/icon/down-small.js +1 -0
- package/lib/icon/edit-line.d.ts +4 -0
- package/lib/icon/edit-line.js +1 -0
- package/lib/icon/ellipsis.d.ts +4 -0
- package/lib/icon/ellipsis.js +1 -0
- package/lib/icon/error.d.ts +4 -0
- package/lib/icon/error.js +1 -0
- package/lib/icon/excel-fill.d.ts +4 -0
- package/lib/icon/excel-fill.js +1 -0
- package/lib/icon/exclamation-circle-shape.d.ts +4 -0
- package/lib/icon/exclamation-circle-shape.js +1 -0
- package/lib/icon/eye.js +1 -0
- package/lib/icon/folder-open.d.ts +4 -0
- package/lib/icon/folder-open.js +1 -0
- package/lib/icon/folder-shape-open.d.ts +4 -0
- package/lib/icon/folder-shape-open.js +1 -0
- package/lib/icon/folder-shape.d.ts +4 -0
- package/lib/icon/folder-shape.js +1 -0
- package/lib/icon/folder.d.ts +4 -0
- package/lib/icon/funnel.d.ts +4 -0
- package/lib/icon/funnel.js +1 -0
- package/lib/icon/help-document-fill.js +1 -0
- package/lib/icon/help-fill.js +1 -0
- package/lib/icon/help.js +1 -0
- package/lib/icon/image-fill.d.ts +4 -0
- package/lib/icon/image-fill.js +1 -0
- package/lib/icon/index.d.ts +69 -0
- package/lib/icon/index.js +1 -15
- package/lib/icon/info-line.js +1 -0
- package/lib/icon/info.d.ts +4 -0
- package/lib/icon/info.js +1 -0
- package/lib/icon/left-shape.d.ts +4 -0
- package/lib/icon/left-shape.js +1 -0
- package/lib/icon/pdf-fill.d.ts +4 -0
- package/lib/icon/pdf-fill.js +1 -0
- package/lib/icon/play-shape.d.ts +4 -0
- package/lib/icon/play-shape.js +1 -0
- package/lib/icon/plus.d.ts +4 -0
- package/lib/icon/plus.js +1 -0
- package/lib/icon/ppt-fill.d.ts +4 -0
- package/lib/icon/ppt-fill.js +1 -0
- package/lib/icon/qq.d.ts +4 -0
- package/lib/icon/qq.js +1 -0
- package/lib/icon/right-shape.d.ts +4 -0
- package/lib/icon/right-shape.js +1 -0
- package/lib/icon/search.js +1 -0
- package/lib/icon/share.d.ts +4 -0
- package/lib/icon/share.js +1 -0
- package/lib/icon/spinner.d.ts +4 -0
- package/lib/icon/spinner.js +1 -0
- package/lib/icon/success.d.ts +4 -0
- package/lib/icon/success.js +1 -0
- package/lib/icon/switcher-loading.js +1 -0
- package/lib/icon/text-file.d.ts +4 -0
- package/lib/icon/text-file.js +1 -0
- package/lib/icon/text-fill.d.ts +4 -0
- package/lib/icon/text-fill.js +1 -0
- package/lib/icon/tree-application-shape.d.ts +4 -0
- package/lib/icon/tree-application-shape.js +1 -0
- package/lib/icon/unvisible.js +1 -0
- package/lib/icon/up-shape.d.ts +4 -0
- package/lib/icon/up-shape.js +1 -0
- package/lib/icon/upload.d.ts +4 -0
- package/lib/icon/upload.js +1 -0
- package/lib/icon/video-fill.d.ts +4 -0
- package/lib/icon/video-fill.js +1 -0
- package/lib/icon/warn.d.ts +4 -0
- package/lib/icon/warn.js +1 -0
- package/lib/icon/weixin.d.ts +4 -0
- package/lib/icon/weixin.js +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -0
- package/lib/input/index.d.ts +541 -0
- package/lib/input/index.js +1 -15
- package/lib/input/input.css +82 -5
- package/lib/input/input.d.ts +181 -51
- package/lib/input/input.less +93 -9
- package/lib/input/input.variable.css +112 -5
- package/lib/link/index.d.ts +164 -0
- package/lib/link/index.js +1 -1
- package/lib/link/link.d.ts +25 -13
- package/lib/link/link.variable.css +29 -0
- package/lib/loading/index.d.ts +172 -0
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.css +122 -75
- package/lib/loading/loading.d.ts +67 -20
- package/lib/loading/loading.less +79 -60
- package/lib/loading/loading.variable.css +151 -75
- package/lib/menu/index.d.ts +176 -0
- package/lib/menu/index.js +1 -0
- package/lib/menu/menu-group.d.ts +14 -0
- package/lib/menu/menu-item.d.ts +16 -0
- package/lib/menu/menu.css +190 -0
- package/lib/menu/menu.d.ts +55 -0
- package/lib/menu/menu.less +180 -0
- package/lib/menu/menu.variable.css +289 -0
- package/lib/menu/submenu.css +3 -0
- package/lib/menu/submenu.d.ts +22 -0
- package/lib/menu/submenu.less +5 -0
- package/lib/menu/submenu.variable.css +102 -0
- package/lib/menu/utils.d.ts +41 -0
- package/lib/message/{message.d.ts → index.d.ts} +0 -0
- package/lib/message/index.js +1 -1
- package/lib/message/message.css +27 -1
- package/lib/message/message.less +30 -1
- package/lib/message/message.variable.css +56 -1
- package/lib/message/messageConstructor.d.ts +71 -20
- package/lib/modal/index.d.ts +605 -0
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.css +30 -1
- package/lib/modal/modal.d.ts +195 -24
- package/lib/modal/modal.less +39 -1
- package/lib/modal/modal.variable.css +30 -1
- package/lib/modal/props.mixin.d.ts +82 -10
- package/lib/navigation/index.d.ts +292 -0
- package/lib/navigation/index.js +1 -0
- package/lib/navigation/navigation-title.d.ts +25 -0
- package/lib/navigation/navigation.css +184 -0
- package/lib/navigation/navigation.d.ts +111 -0
- package/lib/navigation/navigation.less +210 -0
- package/lib/navigation/navigation.variable.css +283 -0
- package/lib/notify/index.d.ts +2 -0
- package/lib/notify/index.js +1 -0
- package/lib/notify/notify.css +65 -0
- package/lib/notify/notify.less +76 -0
- package/lib/notify/notify.variable.css +164 -0
- package/lib/notify/notifyConstructor.d.ts +135 -0
- package/lib/pagination/index.d.ts +395 -0
- package/lib/pagination/index.js +1 -0
- package/lib/pagination/pagination.css +179 -0
- package/lib/pagination/pagination.d.ts +220 -0
- package/lib/pagination/pagination.less +201 -0
- package/lib/pagination/pagination.variable.css +278 -0
- package/lib/pagination/type.d.ts +6 -0
- package/lib/pagination/use-limit.d.ts +8 -0
- package/lib/pagination/use-list.d.ts +8 -0
- package/lib/pagination/use-small-list.d.ts +5 -0
- package/lib/pagination/use-total.d.ts +5 -0
- package/lib/popover/index.d.ts +387 -0
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.css +28 -16
- package/lib/popover/popover.d.ts +122 -45
- package/lib/popover/popover.less +59 -46
- package/lib/popover/popover.variable.css +57 -16
- package/lib/popover/props.d.ts +104 -0
- package/lib/preset.d.ts +2 -3
- package/lib/preset.js +1 -0
- package/lib/process/index.d.ts +205 -0
- package/lib/process/index.js +1 -0
- package/lib/process/process.css +138 -0
- package/lib/process/process.d.ts +131 -0
- package/lib/process/process.less +178 -0
- package/lib/process/process.variable.css +237 -0
- package/lib/progress/index.d.ts +398 -0
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +8 -3
- package/lib/progress/progress.d.ts +89 -36
- package/lib/progress/progress.less +0 -4
- package/lib/progress/progress.variable.css +37 -3
- package/lib/radio/common.d.ts +5 -5
- package/lib/radio/index.d.ts +277 -0
- package/lib/radio/index.js +1 -1
- package/lib/radio/radio-button.d.ts +28 -20
- package/lib/radio/radio-group.d.ts +11 -10
- package/lib/radio/radio.css +14 -8
- package/lib/radio/radio.d.ts +27 -17
- package/lib/radio/radio.less +16 -9
- package/lib/radio/radio.variable.css +44 -9
- package/lib/radio/type.d.ts +10 -5
- package/lib/rate/index.d.ts +113 -0
- package/lib/rate/index.js +1 -1
- package/lib/rate/rate.d.ts +13 -10
- package/lib/rate/star.d.ts +33 -16
- package/lib/resize-layout/index.d.ts +336 -0
- package/lib/resize-layout/index.js +1 -0
- package/lib/resize-layout/resize-layout.css +189 -0
- package/lib/resize-layout/resize-layout.d.ts +127 -0
- package/lib/resize-layout/resize-layout.less +233 -0
- package/lib/resize-layout/resize-layout.variable.css +288 -0
- package/lib/select/common.d.ts +23 -17
- package/lib/select/index.d.ts +1675 -0
- package/lib/select/index.js +1 -1
- package/lib/select/option.d.ts +15 -20
- package/lib/select/optionGroup.d.ts +54 -0
- package/lib/select/select.css +229 -41
- package/lib/select/select.d.ts +381 -157
- package/lib/select/select.less +242 -53
- package/lib/select/select.variable.css +258 -41
- package/lib/select/selectTagInput.d.ts +71 -0
- package/lib/select/type.d.ts +35 -0
- package/lib/shared/{bk-helper-core.d.ts → helper.d.ts} +6 -1
- package/lib/shared/index.d.ts +73 -0
- package/lib/shared/index.js +1 -1
- package/lib/shared/{bk-mask-manager.d.ts → mask-manager.d.ts} +33 -3
- package/lib/shared/{bk-pop-manager.d.ts → pop-manager.d.ts} +10 -2
- package/lib/shared/{bk-popover.d.ts → popover.d.ts} +60 -6
- package/lib/shared/token.d.ts +4 -0
- package/lib/shared/utils.d.ts +6 -0
- package/lib/shared/vue-types.d.ts +12 -7
- package/lib/shared/z-index-manager.d.ts +6 -1
- package/lib/sideslider/index.d.ts +533 -0
- package/lib/sideslider/index.js +1 -1
- package/lib/sideslider/sideslider.css +48 -3
- package/lib/sideslider/sideslider.d.ts +205 -30
- package/lib/sideslider/sideslider.less +65 -6
- package/lib/sideslider/sideslider.variable.css +77 -3
- package/lib/slider/index.d.ts +440 -0
- package/lib/slider/index.js +1 -0
- package/lib/slider/slider-button.d.ts +80 -0
- package/lib/slider/slider.css +149 -0
- package/lib/slider/slider.d.ts +201 -0
- package/lib/slider/slider.less +179 -0
- package/lib/slider/slider.variable.css +248 -0
- package/lib/steps/index.d.ts +250 -0
- package/lib/steps/index.js +1 -15
- package/lib/steps/steps.css +15 -4
- package/lib/steps/steps.d.ts +42 -29
- package/lib/steps/steps.less +22 -4
- package/lib/steps/steps.variable.css +44 -4
- package/lib/styles/index.d.ts +51 -0
- package/lib/styles/mixins/clearfix.css +8 -0
- package/lib/styles/mixins/clearfix.less +10 -0
- package/lib/styles/mixins/clearfix.variable.css +8 -0
- package/lib/styles/mixins/mixins.css +8 -0
- package/lib/styles/mixins/mixins.less +1 -0
- package/lib/styles/mixins/mixins.variable.css +8 -0
- package/lib/styles/mixins/popper.css +43 -0
- package/lib/styles/mixins/popper.less +52 -0
- package/lib/styles/mixins/popper.variable.css +43 -0
- package/lib/styles/mixins/size.less +9 -0
- package/lib/styles/reset.css +273 -0
- package/lib/styles/reset.less +313 -0
- package/lib/styles/reset.variable.css +273 -0
- package/lib/styles/themes/themes.less +45 -1
- package/lib/swiper/index.d.ts +181 -0
- package/lib/swiper/index.js +1 -0
- package/lib/swiper/swiper.css +91 -0
- package/lib/swiper/swiper.d.ts +65 -0
- package/lib/swiper/swiper.less +107 -0
- package/lib/swiper/swiper.variable.css +91 -0
- package/lib/switcher/index.d.ts +286 -0
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +157 -135
- package/lib/switcher/switcher.d.ts +51 -35
- package/lib/switcher/switcher.less +211 -153
- package/lib/switcher/switcher.variable.css +186 -135
- package/lib/tab/index.d.ts +440 -0
- package/lib/tab/index.js +1 -0
- package/lib/tab/props.d.ts +194 -0
- package/lib/tab/tab-nav.d.ts +169 -0
- package/lib/tab/tab-panel.d.ts +73 -0
- package/lib/tab/tab.css +167 -0
- package/lib/tab/tab.d.ts +139 -0
- package/lib/tab/tab.less +228 -0
- package/lib/tab/tab.variable.css +266 -0
- package/lib/table/const.d.ts +43 -0
- package/lib/table/index.d.ts +547 -0
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/head-filter.css +68 -0
- package/lib/table/plugins/head-filter.less +83 -0
- package/lib/table/plugins/head-filter.variable.css +167 -0
- package/lib/table/plugins/head-sort.css +22 -0
- package/lib/table/plugins/head-sort.less +28 -0
- package/lib/table/plugins/head-sort.variable.css +121 -0
- package/lib/table/plugins/settings.css +110 -0
- package/lib/table/plugins/settings.less +136 -0
- package/lib/table/plugins/settings.variable.css +209 -0
- package/lib/table/props.d.ts +243 -0
- package/lib/table/render.d.ts +118 -0
- package/lib/table/table.css +436 -0
- package/lib/table/table.d.ts +194 -32
- package/lib/table/table.less +282 -1
- package/lib/table/table.variable.css +465 -0
- package/lib/table/use-common.d.ts +71 -0
- package/lib/table/utils.d.ts +102 -0
- package/lib/tag/index.d.ts +229 -0
- package/lib/tag/index.js +1 -1
- package/lib/tag/tag.css +97 -0
- package/lib/tag/tag.d.ts +83 -53
- package/lib/tag/tag.less +110 -2
- package/lib/tag/tag.variable.css +126 -0
- package/lib/tag-input/common.d.ts +24 -0
- package/lib/tag-input/index.d.ts +894 -0
- package/lib/tag-input/index.js +1 -0
- package/lib/tag-input/list-tag-render.d.ts +47 -0
- package/lib/tag-input/tag-input.css +209 -0
- package/lib/tag-input/tag-input.d.ts +374 -0
- package/lib/tag-input/tag-input.less +251 -0
- package/lib/tag-input/tag-input.variable.css +308 -0
- package/lib/tag-input/tag-props.d.ts +131 -0
- package/lib/tag-input/tag-render.d.ts +38 -0
- package/lib/timeline/index.d.ts +129 -0
- package/lib/timeline/index.js +1 -0
- package/lib/timeline/timeline.css +235 -0
- package/lib/timeline/timeline.d.ts +81 -0
- package/lib/timeline/timeline.less +240 -0
- package/lib/timeline/timeline.variable.css +334 -0
- package/lib/transfer/const.d.ts +5 -0
- package/lib/transfer/index.d.ts +365 -0
- package/lib/transfer/index.js +1 -0
- package/lib/transfer/props.d.ts +54 -0
- package/lib/transfer/transfer.css +139 -0
- package/lib/transfer/transfer.d.ts +160 -0
- package/lib/transfer/transfer.less +144 -0
- package/lib/transfer/transfer.variable.css +238 -0
- package/lib/tree/constant.d.ts +43 -0
- package/lib/tree/index.d.ts +472 -0
- package/lib/tree/index.js +1 -0
- package/lib/tree/props.d.ts +168 -0
- package/lib/tree/tree.css +53 -0
- package/lib/tree/tree.d.ts +204 -0
- package/lib/tree/tree.less +66 -0
- package/lib/tree/tree.variable.css +152 -0
- package/lib/tree/use-empty.d.ts +6 -0
- package/lib/tree/use-node-action.d.ts +11 -0
- package/lib/tree/use-node-async.d.ts +5 -0
- package/lib/tree/use-node-attribute.d.ts +31 -0
- package/lib/tree/use-node-drag.d.ts +3 -0
- package/lib/tree/use-search.d.ts +11 -0
- package/lib/tree/use-tree-init.d.ts +15 -0
- package/lib/tree/util.d.ts +66 -0
- package/lib/upload/index.d.ts +2 -0
- package/lib/upload/index.js +1 -0
- package/lib/upload/props.d.ts +113 -0
- package/lib/upload/upload-list.d.ts +46 -0
- package/lib/upload/upload-trigger.d.ts +54 -0
- package/lib/upload/upload.css +374 -0
- package/lib/upload/upload.d.ts +252 -0
- package/lib/upload/upload.less +455 -0
- package/lib/upload/upload.type.d.ts +78 -0
- package/lib/upload/upload.variable.css +473 -0
- package/lib/upload/use-ajax-upload.d.ts +3 -0
- package/lib/upload/use-file-handler.d.ts +44 -0
- package/lib/use-message.d.ts +2 -0
- package/lib/virtual-render/index.d.ts +579 -0
- package/lib/virtual-render/index.js +1 -0
- package/lib/virtual-render/props.d.ts +167 -0
- package/lib/virtual-render/use-tag-render.d.ts +7 -0
- package/lib/virtual-render/v-virtual-render.d.ts +6 -0
- package/lib/virtual-render/virtual-render.css +33 -0
- package/lib/virtual-render/virtual-render.d.ts +255 -0
- package/lib/virtual-render/virtual-render.less +43 -0
- package/lib/virtual-render/virtual-render.variable.css +33 -0
- package/package.json +108 -81
- package/dist/bkui-vue.cjs.js +0 -5171
- package/dist/bkui-vue.esm.js +0 -5137
- package/dist/bkui-vue.umd.js +0 -5174
- package/lib/styles/index.js +0 -1
- package/lib/table/common.d.ts +0 -3
- package/lib/table/table-layout.d.ts +0 -14
- package/lib/table/type.d.ts +0 -12
@@ -0,0 +1,11 @@
|
|
1
|
+
import { SearchOption, TreePropTypes } from './props';
|
2
|
+
declare const _default: (props: TreePropTypes) => {
|
3
|
+
searchFn: (itemValue: string | number, item: any) => any;
|
4
|
+
refSearch: import("vue").Ref<string | number | boolean | SearchOption>;
|
5
|
+
isSearchActive: import("vue").ComputedRef<boolean>;
|
6
|
+
isSearchDisabled: boolean;
|
7
|
+
openResultNode: boolean;
|
8
|
+
resultType: string;
|
9
|
+
isTreeUI: boolean;
|
10
|
+
};
|
11
|
+
export default _default;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { TreePropTypes } from './props';
|
2
|
+
declare const _default: (props: TreePropTypes) => {
|
3
|
+
flatData: {
|
4
|
+
data: any[];
|
5
|
+
schema: any[] | Map<string, any>;
|
6
|
+
levelLineSchema: {};
|
7
|
+
};
|
8
|
+
schemaValues: import("vue").ComputedRef<any[]>;
|
9
|
+
asyncNodeClick: (item: any) => Promise<any>;
|
10
|
+
deepAutoOpen: () => void;
|
11
|
+
afterDataUpdate: (callFn: (d: any) => any) => void;
|
12
|
+
registerNextLoop: (key: string, event: any, reset?: boolean) => void;
|
13
|
+
onSelected: (event: (d: any) => void) => void;
|
14
|
+
};
|
15
|
+
export default _default;
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { TreePropTypes } from './props';
|
2
|
+
/**
|
3
|
+
* 获取当前节点显示Label
|
4
|
+
* @param item 当前节点
|
5
|
+
* @param props Props
|
6
|
+
*/
|
7
|
+
export declare const getLabel: (item: any, props: TreePropTypes) => any;
|
8
|
+
/**
|
9
|
+
* 根据Props获取Tree样式设置
|
10
|
+
* @param item
|
11
|
+
* @param props
|
12
|
+
* @returns
|
13
|
+
*/
|
14
|
+
export declare const getTreeStyle: (item: any, props: TreePropTypes) => {
|
15
|
+
'--level-line': any;
|
16
|
+
'--lineHeight': string;
|
17
|
+
'--indent': string;
|
18
|
+
'--offset-left': string;
|
19
|
+
};
|
20
|
+
/**
|
21
|
+
* 获取节点样式配置
|
22
|
+
* @param item
|
23
|
+
* @param props
|
24
|
+
* @returns
|
25
|
+
*/
|
26
|
+
export declare const getNodeItemStyle: any;
|
27
|
+
/**
|
28
|
+
* 获取当前渲染节点Class List
|
29
|
+
* @param item
|
30
|
+
* @returns
|
31
|
+
*/
|
32
|
+
export declare const getNodeItemClass: (item: any, schema: any, props: TreePropTypes) => {
|
33
|
+
'is-root': any;
|
34
|
+
'bk-tree-node': boolean;
|
35
|
+
'is-open': any;
|
36
|
+
'is-virtual-render': boolean;
|
37
|
+
'level-line': any;
|
38
|
+
};
|
39
|
+
/**
|
40
|
+
* 获取当前渲染节点Class List
|
41
|
+
* @param item
|
42
|
+
* @returns
|
43
|
+
*/
|
44
|
+
export declare const getNodeRowClass: (item: any, schema: any) => {
|
45
|
+
[x: string]: any;
|
46
|
+
'is-checked': any;
|
47
|
+
'is-selected': any;
|
48
|
+
};
|
49
|
+
/**
|
50
|
+
* 根据路径更新指定节点Child-Data
|
51
|
+
* @param path 节点路径
|
52
|
+
* @param treeData Tree Data
|
53
|
+
* @param childKey Child Key
|
54
|
+
* @param nodekey 节点key
|
55
|
+
* @param nodeValue 节点值
|
56
|
+
*/
|
57
|
+
export declare const updateTreeNode: (path: string, treeData: any[], childKey: string, nodekey: string, nodeValue: any) => void;
|
58
|
+
/**
|
59
|
+
* 根据路径更新指定节点Child-Data
|
60
|
+
* @param path 节点路径
|
61
|
+
* @param treeData Tree Data
|
62
|
+
* @param childKey Child Key
|
63
|
+
* @param assignVal value
|
64
|
+
*/
|
65
|
+
export declare const assignTreeNode: (path: string, treeData: any[], childKey: string, assignVal: any) => void;
|
66
|
+
export declare const resolveNodeItem: (node: any) => any;
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("vue"),require("../shared"),require("../icon"),require("../progress"),require("../button"));else if("function"==typeof define&&define.amd)define(["vue","../shared","../icon","../progress","../button"],t);else{var r="object"==typeof exports?t(require("vue"),require("../shared"),require("../icon"),require("../progress"),require("../button")):t(e.vue,e["../shared"],e["../icon"],e["../progress"],e["../button"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,((e,t,r,n,a)=>(()=>{var o={7162:(e,t,r)=>{e.exports=r(5047)},5047:e=>{var t=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var a=t&&t.prototype instanceof m?t:m,o=Object.create(a.prototype),i=new V(n||[]);return o._invoke=function(e,t,r){var n=f;return function(a,o){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===a)throw o;return U()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var u=N(i,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=s(e,t,r);if("normal"===c.type){if(n=r.done?h:d,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,i),o}function s(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",p="executing",h="completed",v={};function m(){}function y(){}function g(){}var b={};c(b,o,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(T([])));_&&_!==r&&n.call(_,o)&&(b=_);var x=g.prototype=m.prototype=Object.create(b);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(a,o,i,u){var c=s(e[a],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,u)}),(function(e){r("throw",e,i,u)})):t.resolve(f).then((function(e){l.value=e,i(l)}),(function(e){return r("throw",e,i,u)}))}u(c.arg)}var a;this._invoke=function(e,n){function o(){return new t((function(t,a){r(e,n,t,a)}))}return a=a?a.then(o,o):o()}}function N(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var a=s(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function V(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function T(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}return{next:U}}function U(){return{value:t,done:!0}}return y.prototype=g,c(x,"constructor",g),c(g,"constructor",y),y.displayName=c(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},A(S.prototype),c(S.prototype,i,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new S(l(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(x),c(x,u,"Generator"),c(x,o,(function(){return this})),c(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=T,V.prototype={constructor:V,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return u.type="throw",u.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;L(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},4791:e=>{e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],a=e[2],o=e[3];n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&a)+t[1]-389564586|0)<<12|o>>>20)+r|0)&r|~o&n)+t[2]+606105819|0)<<17|a>>>15)+o|0)&o|~a&r)+t[3]-1044525330|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&a)+t[5]+1200080426|0)<<12|o>>>20)+r|0)&r|~o&n)+t[6]-1473231341|0)<<17|a>>>15)+o|0)&o|~a&r)+t[7]-45705983|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&a)+t[9]-1958414417|0)<<12|o>>>20)+r|0)&r|~o&n)+t[10]-42063|0)<<17|a>>>15)+o|0)&o|~a&r)+t[11]-1990404162|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&a|~n&o)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&a)+t[13]-40341101|0)<<12|o>>>20)+r|0)&r|~o&n)+t[14]-1502002290|0)<<17|a>>>15)+o|0)&o|~a&r)+t[15]+1236535329|0)<<22|n>>>10)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[1]-165796510|0)<<5|r>>>27)+n|0)&a|n&~a)+t[6]-1069501632|0)<<9|o>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|a>>>18)+o|0)&r|o&~r)+t[0]-373897302|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[5]-701558691|0)<<5|r>>>27)+n|0)&a|n&~a)+t[10]+38016083|0)<<9|o>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|a>>>18)+o|0)&r|o&~r)+t[4]-405537848|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[9]+568446438|0)<<5|r>>>27)+n|0)&a|n&~a)+t[14]-1019803690|0)<<9|o>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|a>>>18)+o|0)&r|o&~r)+t[8]+1163531501|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n&o|a&~o)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&a|n&~a)+t[2]-51403784|0)<<9|o>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|a>>>18)+o|0)&r|o&~r)+t[12]-1926607734|0)<<20|n>>>12)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^a)+t[8]-2022574463|0)<<11|o>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|a>>>16)+o|0)^o^r)+t[14]-35309556|0)<<23|n>>>9)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^a)+t[4]+1272893353|0)<<11|o>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|a>>>16)+o|0)^o^r)+t[10]-1094730640|0)<<23|n>>>9)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^a)+t[0]-358537222|0)<<11|o>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|a>>>16)+o|0)^o^r)+t[6]+76029189|0)<<23|n>>>9)+a|0,n=((n+=((a=((a+=((o=((o+=((r=((r+=(n^a^o)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^a)+t[12]-421815835|0)<<11|o>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|a>>>16)+o|0)^o^r)+t[2]-995338651|0)<<23|n>>>9)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~a))+t[7]+1126891415|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[14]-1416354905|0)<<15|a>>>17)+o|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~a))+t[3]-1894986606|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[10]-1051523|0)<<15|a>>>17)+o|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~a))+t[15]-30611744|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[6]-1560198380|0)<<15|a>>>17)+o|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+a|0,n=((n+=((o=((o+=(n^((r=((r+=(a^(n|~o))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~a))+t[11]-1120210379|0)<<10|o>>>22)+r|0)^((a=((a+=(r^(o|~n))+t[2]+718787259|0)<<15|a>>>17)+o|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+a|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=a+e[2]|0,e[3]=o+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function a(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function o(e){var t,a,o,i,u,c,l=e.length,s=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)r(s,n(e.substring(t-64,t)));for(a=(e=e.substring(t-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<a;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(s,o),t=0;t<16;t+=1)o[t]=0;return i=(i=8*l).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(i[2],16),c=parseInt(i[1],16)||0,o[14]=u,o[15]=c,r(s,o),s}function i(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function u(e){var t;for(t=0;t<e.length;t+=1)e[t]=i(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e){var t,r=[],n=e.length;for(t=0;t<n-1;t+=2)r.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,r)}function s(){this.reset()}return u(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,r){var n,a,o,i,u=this.byteLength,c=e(t,u),l=u;return undefined!==r&&(l=e(r,u)),c>l?new ArrayBuffer(0):(n=l-c,a=new ArrayBuffer(n),o=new Uint8Array(a),i=new Uint8Array(this,c,n),o.set(i),a)}}(),s.prototype.append=function(e){return this.appendBinary(c(e)),this},s.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,a=this._buff.length;for(t=64;t<=a;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},s.prototype.end=function(e){var t,r,n=this._buff,a=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<a;t+=1)o[t>>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(o,a),r=u(this._hash),e&&(r=l(r)),this.reset(),r},s.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},s.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},s.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},s.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},s.prototype._finish=function(e,t){var n,a,o,i=t;if(e[i>>2]|=128<<(i%4<<3),i>55)for(r(this._hash,e),i=0;i<16;i+=1)e[i]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(n[2],16),o=parseInt(n[1],16)||0,e[14]=a,e[15]=o,r(this._hash,e)},s.hash=function(e,t){return s.hashBinary(c(e),t)},s.hashBinary=function(e,t){var r=u(o(e));return t?l(r):r},s.ArrayBuffer=function(){this.reset()},s.ArrayBuffer.prototype.append=function(e){var t,n,o,i,u,c=(n=this._buff.buffer,o=e,i=!0,(u=new Uint8Array(n.byteLength+o.byteLength)).set(new Uint8Array(n)),u.set(new Uint8Array(o),n.byteLength),i?u:u.buffer),l=c.length;for(this._length+=e.byteLength,t=64;t<=l;t+=64)r(this._hash,a(c.subarray(t-64,t)));return this._buff=t-64<l?new Uint8Array(c.buffer.slice(t-64)):new Uint8Array(0),this},s.ArrayBuffer.prototype.end=function(e){var t,r,n=this._buff,a=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<a;t+=1)o[t>>2]|=n[t]<<(t%4<<3);return this._finish(o,a),r=u(this._hash),e&&(r=l(r)),this.reset(),r},s.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},s.ArrayBuffer.prototype.getState=function(){var e,t=s.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},s.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,a=new ArrayBuffer(n),o=new Uint8Array(a);for(r=0;r<n;r+=1)o[r]=e.charCodeAt(r);return t?o:a}(e.buff,!0),s.prototype.setState.call(this,e)},s.ArrayBuffer.prototype.destroy=s.prototype.destroy,s.ArrayBuffer.prototype._finish=s.prototype._finish,s.ArrayBuffer.hash=function(e,t){var n=u(function(e){var t,n,o,i,u,c,l=e.length,s=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)r(s,a(e.subarray(t-64,t)));for(n=(e=t-64<l?e.subarray(t-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<n;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(r(s,o),t=0;t<16;t+=1)o[t]=0;return i=(i=8*l).toString(16).match(/(.*?)(.{0,8})$/),u=parseInt(i[2],16),c=parseInt(i[1],16)||0,o[14]=u,o[15]=c,r(s,o),s}(new Uint8Array(e)));return t?l(n):n},s}()},4976:e=>{"use strict";e.exports=a},6870:e=>{"use strict";e.exports=r},3522:e=>{"use strict";e.exports=n},4212:e=>{"use strict";e.exports=t},748:t=>{"use strict";t.exports=e}},i={};function u(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,u),r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}u.r(c),u.d(c,{default:()=>k});var t=u(748),r=u(7162),n=u.n(r);function a(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{c(n.next(e))}catch(e){o(e)}}function u(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,u)}c((n=n.apply(e,t||[])).next())}))}Object.create,Object.create;var o,i,l=u(4212),s="bk-upload";!function(e){e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture"}(o||(o={})),function(e){e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail"}(i||(i={}));var f=[o.BUTTON,o.DRAGGABLE,o.PICTURE];const d={theme:{type:String,default:"draggable",validator:function(e){return!(e&&!f.includes(e)&&(console.error("invalid theme, ".concat(e,", the theme must be one of 【").concat(f.join(" | "),"】")),1))}},files:{type:Array,default:function(){return[]}},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default:function(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default:function(e){return!(!e||0!==e.code)}},headers:{type:Object,default:function(){return{}}},header:{type:[Array,Object],default:function(){return[]}},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:function(){return[]}},formDataAttributes:{type:[Array,Object],default:function(){return[]}},extCls:{type:String,default:""},customRequest:Function,beforeUpload:{type:Function,default:null},beforeRemove:{type:Function,default:null},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=u(6870),y=u(3522),g=u.n(y);function b(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!(0,t.isVNode)(e)}const w=(0,t.defineComponent)({name:"UploadList",props:{theme:d.theme,disabled:d.disabled,files:d.files,multiple:d.multiple},emits:["remove"],setup:function(r,n){var a=n.slots,i=n.emit,u=(0,t.toRefs)(r),c=u.theme,f=u.disabled,d=u.multiple,p="".concat(s,"-list"),h=(0,t.computed)((function(){return c.value===o.PICTURE})),y=(0,t.computed)((function(){return h.value&&!d.value})),w=(0,t.computed)((function(){var t;return(0,l.classes)((e(t={},p,!0),e(t,"".concat(p,"--").concat(c.value),!0),e(t,"".concat(p,"--disabled"),f.value),t))}));function _(e,t){i("remove",e,t)}var x=function(e){return[(0,t.withDirectives)((0,t.createVNode)("img",{src:e.url,class:"".concat(p,"__picture-item-thumbnail"),alt:""},null),[[t.vShow,"uploading"!==e.status]]),(0,t.createVNode)(t.Fragment,null,["uploading"===e.status&&(0,t.createVNode)(g(),{class:"".concat(p,"__picture-item-progress"),type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:e.percentage},null)]),(0,t.createVNode)(t.Fragment,null,[!f.value&&(0,t.createVNode)("div",{class:"".concat(p,"__picture-item-actions")},[(0,t.createVNode)(m.Del,{class:"action-icon",onClick:function(t){return _(e,t)}},null)])])]},A=function(e){var r,n=null===(r=null==e?void 0:e.raw)||void 0===r?void 0:r.type,a=v((null==n?void 0:n.split("/"))||"",1)[0],o={text:m.TextFill,image:m.ImageFill,application:m.TextFill,video:m.VideoFill,audio:m.AudioFill}[a]||m.TextFill;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(n)&&(o=m.ArchiveFill),(0,t.h)(o,{class:"".concat(p,"__item-file-icon")})},S=function(e){return[(0,t.createVNode)("div",{class:"".concat(p,"__item-icon")},[e.isPic?(0,t.createVNode)("img",{src:e.url,class:"".concat(p,"__item-thumbnail"),alt:""},null):A(e)]),(0,t.createVNode)("div",{class:"".concat(p,"__item-summary")},[(0,t.createVNode)("div",{class:"".concat(p,"__item-name"),title:e.name},[e.name]),"uploading"!==e.status&&(0,t.createVNode)("div",{class:"".concat(p,"__item-message"),title:e.statusText},["success"===e.status&&(0,t.createVNode)("span",null,[(0,t.createVNode)(m.Done,{class:"".concat(p,"__item-message-success-icon")},null),e.statusText||"上传成功"]),"fail"===e.status&&(0,t.createVNode)("span",null,[e.statusText||"上传失败"])]),"uploading"===e.status&&(0,t.createVNode)(g(),{class:"".concat(p,"__item-progress"),showText:!1,percent:e.percentage,size:"small"},null),"fail"!==e.status&&(0,t.createVNode)("div",{class:"".concat(p,"__item-speed")},[(0,t.withDirectives)((0,t.createVNode)("span",{class:"".concat(p,"__item-speed-size")},[(r=e.size,n=Math.floor(Math.log(r)/Math.log(1024)),a=r/Math.pow(1024,n),"".concat(a.toFixed(2)).concat(["Bytes","KB","MB","GB","TB"][n]))]),[[t.vShow,e.size]]),(0,t.withDirectives)((0,t.createVNode)("span",{class:"".concat(p,"__item-speed-percentage")},[e.percentage,(0,t.createTextVNode)("%")]),[[t.vShow,"uploading"===e.status]])]),!f.value&&(0,t.createVNode)("div",{class:"".concat(p,"__item-actions")},[(0,t.createVNode)(m.Del,{class:"".concat(p,"__item-del-icon"),onClick:function(t){return _(e,t)}},null)])])];var r,n,a};return function(){var n,o,i;return(0,t.createVNode)(t.Fragment,null,[y.value?(null==a?void 0:a.innerTrigger)&&(null==a?void 0:a.innerTrigger(null===(n=r.files)||void 0===n?void 0:n[0])):(0,t.createVNode)("ul",{class:w.value},[h.value?(0,t.createVNode)(t.TransitionGroup,{name:"".concat(p,"__item")},b(i=r.files.map((function(r){var n,o=(0,l.classes)((e(n={},"".concat(p,"__item"),!0),e(n,"".concat(p,"__item-picture"),!0),e(n,"".concat(p,"__item--").concat(r.status),!0),n));return(0,t.createVNode)("li",{key:r.uid,class:o},[(null==a?void 0:a.file)?a.file(r):x(r)])})))?i:{default:function(){return[i]}}):(0,t.createVNode)(t.TransitionGroup,{name:"".concat(p,"__item")},b(o=r.files.map((function(r){var n,o=(0,l.classes)((e(n={},"".concat(p,"__item"),!0),e(n,"".concat(p,"__item--").concat(r.status),!0),n));return(0,t.createVNode)("li",{key:r.uid,class:o},[(null==a?void 0:a.file)?a.file(r):S(r)])})))?o:{default:function(){return[o]}}),(null==a?void 0:a.innerTrigger)&&(null==a?void 0:a.innerTrigger())])])}}});var _=u(4976),x=u.n(_);const A=(0,t.defineComponent)({name:"UploadTrigger",props:{theme:d.theme,disabled:d.disabled,multiple:d.multiple,accept:d.accept,file:{type:Object,default:null}},emits:["change","remove"],setup:function(r,n){var a=n.slots,i=n.emit,u=(0,t.toRefs)(r),c=u.theme,f=u.disabled,d=u.file,p=u.multiple,h=u.accept,v="".concat(s,"-trigger"),y=(0,t.computed)((function(){return c.value===o.BUTTON})),b=(0,t.computed)((function(){return c.value===o.DRAGGABLE})),w=(0,t.computed)((function(){return c.value===o.PICTURE})),_=(0,t.computed)((function(){return w.value&&!p.value})),A=(0,t.computed)((function(){return w.value&&!h.value?"image/png,image/jpeg,image/jpg":h.value})),S=(0,t.ref)(null),N=(0,t.computed)((function(){var t,r,n,a;return(0,l.classes)((e(t={},v,!0),e(t,"".concat(v,"--").concat(c.value),!0),e(t,"".concat(v,"--single-picture"),_.value),e(t,"".concat(v,"--has-file"),null!==(r=d.value)&&void 0!==r&&r),e(t,"".concat(v,"--").concat(null===(n=d.value)||void 0===n?void 0:n.status),null!==(a=d.value)&&void 0!==a&&a),e(t,"".concat(v,"--dragover"),U.value),e(t,"".concat(v,"--disabled"),f.value),t))})),E=function(){S.value.value=null,S.value.click()},L=function(e){var t=e.target.files;i("change",Array.from(t))},V=function(){r.disabled||E()},T=function(e){e.defaultPrevented||e.target!==e.currentTarget||("Enter"!==e.code&&"Space"!==e.code||E(),e.preventDefault())},U=(0,t.ref)(!1),j=function(e){return[(0,t.withDirectives)((0,t.createVNode)("img",{src:e.url,class:"".concat(v,"__picture-thumbnail"),alt:""},null),[[t.vShow,"uploading"!==e.status]]),(0,t.createVNode)(t.Fragment,null,["uploading"===e.status&&(0,t.createVNode)(g(),{class:"".concat(v,"__picture-progress"),type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:e.percentage},null)]),(0,t.createVNode)(t.Fragment,null,[!r.disabled&&(0,t.createVNode)("div",{class:"".concat(v,"__picture-actions")},[(0,t.createVNode)(m.Del,{class:"action-icon",onClick:function(t){return function(e,t){i("remove",e,t),t.stopPropagation(),t.preventDefault()}(e,t)}},null)])])]};return function(){var n;return(0,t.createVNode)("div",{class:N.value,tabindex:"0",onClick:V,onKeydown:T},[a.trigger?[a.trigger(),null===(n=null==a?void 0:a.default)||void 0===n?void 0:n.call(a)]:y.value?(0,t.createVNode)(x(),{disabled:f.value},{default:function(){return[(0,t.createVNode)(m.Upload,{class:"".concat(v,"__button-icon")},null),(0,t.createVNode)("span",{class:"".concat(v,"__button-text")},[(0,t.createTextVNode)("上传文件")])]}}):b.value?function(){var r=(0,l.classes)(e({},"".concat(v,"__draggable"),!0));return(0,t.createVNode)("div",{class:r,onDrop:function(e){if(!f.value){e.preventDefault(),U.value=!1;var t=Array.from(e.dataTransfer.files);if(A.value){var r=t.filter((function(e){var t=e.type,r=e.name,n=r.includes(".")?".".concat(r.split(".").pop()):"",a=t.replace(/\/.*$/,"");return A.value.split(",").map((function(e){return e.trim()})).filter((function(e){return e})).some((function(e){return e.startsWith(".")?n===e:/\/\*$/.test(e)?a===e.replace(/\/\*$/,""):!!/^[^/]+\/[^/]+$/.test(e)&&t===e}))}));i("change",r)}else i("change",t)}},onDragover:function(e){e.preventDefault(),U.value=!0},onDragleave:function(){U.value=!1}},[a.default?a.default():(0,t.createVNode)(t.Fragment,null,[(0,t.createVNode)(m.Upload,{class:"".concat(v,"__draggable-icon")},null),(0,t.createVNode)("div",{class:"".concat(v,"__draggable-text")},[(0,t.createTextVNode)("将文件拖到此处或"),(0,t.createVNode)("span",{class:"".concat(v,"__draggable-upload-link")},[(0,t.createTextVNode)("点击上传")])])])])}():w.value?(0,t.createVNode)(t.Fragment,null,[_.value&&r.file?j(r.file):(0,t.createVNode)(t.Fragment,null,[a.default?a.default():(0,t.createVNode)("div",{class:"".concat(v,"__picture-inner")},[(0,t.createVNode)(m.Plus,{class:"".concat(v,"__picture-icon")},null),(0,t.createVNode)("div",{class:"".concat(v,"__picture-text")},[(0,t.createTextVNode)("点击上传")])])])]):void 0,(0,t.createVNode)("input",{ref:S,class:"bk-upload__input-file",tabindex:"-1",onChange:L,accept:A.value,multiple:p.value,disabled:f.value,type:"file"},null)])}}});function S(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var N=u(4791),E=u.n(N);function L(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(e){return t}}var V=function(e){if("undefined"==typeof XMLHttpRequest)throw new Error("XMLHttpRequest is undefined");var t=new XMLHttpRequest,r=e.action;t.upload&&t.upload.addEventListener("progress",(function(t){var r=t;r.percent=t.total>0?t.loaded/t.total*100:0,e.onProgress(r)}));var n=new FormData;if(e.data){var a=e.data;Array.isArray(a)||(a=[a]),a.forEach((function(e){for(var t=0,r=Object.entries(e);t<r.length;t++){var a=v(r[t],2),o=a[0],i=a[1];Array.isArray(i)?n.append.apply(n,[o].concat(S(i))):n.append(o,i)}}))}if(e.formDataAttributes){var o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach((function(e){Array.isArray(e.value)?n.append.apply(n,[e.name].concat(S(e.value))):n.append(e.name,e.value)}))}if(n.append(e.filename,e.file,e.file.name),t.addEventListener("error",(function(){e.onError(new Error("An error occurred during upload"))})),t.addEventListener("load",(function(){if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(L(t))})),t.addEventListener("loadend",(function(){e.onComplete()})),t.open(e.method,r,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach((function(e){var r=e.name,n=e.value;t.setRequestHeader(r,n)}));else{var i=e.header.name,u=e.header.value;t.setRequestHeader(i,u)}var c=e.headers||{};if(c instanceof Headers)c.forEach((function(e,r){return t.setRequestHeader(r,e)}));else for(var s=0,f=Object.entries(c);s<f.length;s++){var d=v(f[s],2),p=d[0],h=d[1];(0,l.isNullOrUndef)(h)||t.setRequestHeader(p,String(h))}return t.send(n),t},T=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,U=function(e){return a(void 0,void 0,void 0,n().mark((function t(){var r,a,o,i,u;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1024*e.chunkSize*1024,a=e.file){t.next=4;break}throw new Error("File not found");case 4:return o=Math.ceil(a.size/r),t.next=7,C(a,r);case 7:return i=t.sent,j(e,a,o,i,u=[],r),t.next=12,Promise.all(u).then((function(){var t={size:a.size,name:a.name,total:o,hash:i},r=new XMLHttpRequest;r.open(e.method,e.mergeUrl,!0),r.onreadystatechange=function(){if(4===r.readyState){if(r.status<200||r.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(L(r))}},r.onloadend=function(){e.onComplete()},r.setRequestHeader("Content-type","application/JSON"),r.send(JSON.stringify(t))}));case 12:case"end":return t.stop()}}),t)})))},j=function(e,t,r,n,a,o){for(var i=function(i){var u=new Promise((function(a,u){var c=i*o,s=Math.min(t.size,c+o),f=new FormData;if(e.data){var d=e.data;Array.isArray(d)||(d=[d]),d.forEach((function(e){for(var t=0,r=Object.entries(e);t<r.length;t++){var n=v(r[t],2),a=n[0],o=n[1];Array.isArray(o)?f.append.apply(f,[a].concat(S(o))):f.append(a,o)}}))}if(e.formDataAttributes){var p=e.formDataAttributes;Array.isArray(p)||(p=[p]),p.forEach((function(e){Array.isArray(e.value)?f.append.apply(f,[e.name].concat(S(e.value))):f.append(e.name,e.value)}))}f.append("file",T.call(t,c,s)),f.append("name",t.name),f.append("total",r.toString()),f.append("index",i.toString()),f.append("size",t.size.toString()),f.append("hash",n.toString());var h=new XMLHttpRequest;if(h.onreadystatechange=function(){if(4===h.readyState){var t=L(h);h.status<200||h.status>=300?(u(t),e.onError(new Error("An error occurred during upload"))):a("reponseText")}},h.upload.addEventListener("progress",(function(t){var r=t;e.onProgress(r,i)}),!1),e.withCredentials&&"withCredentials"in h&&(h.withCredentials=!0),h.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach((function(e){var t=e.name,r=e.value;h.setRequestHeader(t,r)}));else{var m=e.header.name,y=e.header.value;h.setRequestHeader(m,y)}var g=e.headers||{};if(g instanceof Headers)g.forEach((function(e,t){return h.setRequestHeader(t,e)}));else for(var b=0,w=Object.entries(g);b<w.length;b++){var _=v(w[b],2),x=_[0],A=_[1];(0,l.isNullOrUndef)(A)||h.setRequestHeader(x,String(A))}h.send(f)}));a.push(u)},u=0;u<r;u++)i(u)},C=function(e,t){return new Promise((function(r,n){var a=Math.ceil(e.size/t),o=0,i=new(E().ArrayBuffer),u=new FileReader;function c(){var r=o*t,n=r+t>=e.size?e.size:r+t;u.readAsArrayBuffer(T.call(e,r,n))}u.onload=function(t){if(i.append(t.target.result),(o+=1)<a)c();else{var n=i.end(),u=new(E());u.append(n),u.append(e.name);var l=u.end();r(l)}},u.onerror=function(){n(new Error("File slcie failed"))},c()})).catch((function(e){console.log(e)}))};function O(e){return Date.now()+e}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const F=(0,t.defineComponent)({name:"BkUpload",props:d,emits:["on-exceed","on-progress","on-success","on-error","on-delete","on-done"],setup:function(r,u){var c=u.slots,f=u.emit,d=(0,t.shallowRef)({}),p=(0,t.computed)((function(){return r.theme===o.PICTURE})),h=(0,t.computed)((function(){return p.value&&!r.multiple})),v=(0,t.computed)((function(){var t,n;return(0,l.classes)((e(t={},s,!0),e(t,"".concat(s,"--").concat(r.theme),!0),e(t,"".concat(s,"--disabled"),r.disabled),e(t,"".concat(s,"--single-picture"),h.value),e(t,r.extCls,null!==(n=r.extCls)&&void 0!==n&&n),t))})),m={theme:r.theme,multiple:r.multiple,disabled:r.disabled,accept:r.accept},y=function(e,r){var o=(0,t.computed)((function(){var t;return"number"==typeof e.size?e.size:null===(t=null==e?void 0:e.size)||void 0===t?void 0:t.maxImgSize})),u=(0,t.computed)((function(){var t;return"number"==typeof e.size?e.size:null===(t=null==e?void 0:e.size)||void 0===t?void 0:t.maxImgSize})),c=(0,t.ref)([]);function l(e){return c.value.find((function(t){return t.uid===e.uid}))}var s=0;return(0,t.watch)((function(){return e.files}),(function(e){c.value=e.map((function(e){var t,r;return s+=1,Object.assign(Object.assign({},e),{uid:null!==(t=e.uid)&&void 0!==t?t:O(s),status:null!==(r=e.status)&&void 0!==r?r:i.SUCCESS})}))}),{immediate:!0,deep:!0}),{fileList:c,handlePreprocess:function(t){var r;s+=1,t.uid=O(s);var n={uid:t.uid,name:t.name,status:i.NEW,size:t.size,raw:t},a=t.type.startsWith("image/"),l=null;if(a){try{n.url=window.URL.createObjectURL(t)}catch(e){console.error(e)}n.isPic=!0}return e.validateName&&!(null===(r=e.validateName)||void 0===r?void 0:r.test(n.name))&&(n.status=i.FAIL,n.statusText="invalid filename",l=new Error(n.statusText)),a&&t.size>o.value*Math.pow(1024,2)&&(n.status=i.FAIL,n.statusText="invalid file size",l=new Error(n.statusText)),!a&&t.size>u.value*Math.pow(1024,2)&&(n.status=i.FAIL,n.statusText="invalid file size",l=new Error(n.statusText)),c.value.push(n),l},handleRemove:function(t){var o;return a(this,void 0,void 0,n().mark((function a(){var i,u;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i=t instanceof File?l(t):t,u=function(e){var t;r.onRemove(e,c.value),c.value.splice(c.value.indexOf(i),1),(null===(t=e.url)||void 0===t?void 0:t.startsWith("blob:"))&&URL.revokeObjectURL(e.url)},!e.beforeRemove){n.next=9;break}return n.next=5,null===(o=e.beforeRemove)||void 0===o?void 0:o.call(e,i,c.value);case 5:!1!==n.sent&&u(i),n.next=10;break;case 9:u(i);case 10:case"end":return n.stop()}}),a)})))},handleError:function(e,t){return a(this,void 0,void 0,n().mark((function r(){var a;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=l(t)){r.next=3;break}return r.abrupt("return");case 3:a.status="fail",a.statusText=e.message;case 5:case"end":return r.stop()}}),r)})))},handleSuccess:function(e,t){return a(this,void 0,void 0,n().mark((function r(){var a;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=l(t)){r.next=3;break}return r.abrupt("return");case 3:a.status="success",a.response=e;case 5:case"end":return r.stop()}}),r)})))},handleProgress:function(e,t){return a(this,void 0,void 0,n().mark((function r(){var a;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=l(t)){r.next=3;break}return r.abrupt("return");case 3:a.status="uploading",a.percentage=Math.round(e.percent);case 5:case"end":return r.stop()}}),r)})))}}}(r,{onRemove:function(t,r){!function(t){var r=d.value;t&&(r=e({},t.uid,d.value[t.uid])),Object.keys(r).forEach((function(e){if(r[e]instanceof XMLHttpRequest){var t=r[e];null==t||t.abort()}delete d.value[e]}))}(t),f("on-delete",t,r)}}),g=y.fileList,b=y.handlePreprocess,_=y.handleRemove,x=y.handleProgress,S=y.handleSuccess,N=y.handleError;function E(e){if(e.length)if(r.limit&&g.value.length+e.length>r.limit)f("on-exceed",e,g.value);else{var t=e;r.multiple&&1!==r.limit||(t=e.slice(0,1));var n,a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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,i=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){u=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(u)throw o}}}}(t);try{for(a.s();!(n=a.n()).done;){var o=n.value,i=b(o);if(i)return void f("on-error",o,g.value,i);r.autoUpload&&L(o,t)}}catch(e){a.e(e)}finally{a.f()}}}function L(e,t){var o;return a(this,void 0,void 0,n().mark((function a(){var i;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r.beforeUpload){n.next=2;break}return n.abrupt("return",T(e,t));case 2:return n.prev=2,n.next=5,null===(o=r.beforeUpload)||void 0===o?void 0:o.call(r,e);case 5:i=n.sent,n.next=11;break;case 8:n.prev=8,n.t0=n.catch(2),i=!1;case 11:if(!1!==i){n.next=14;break}return _(e),n.abrupt("return");case 14:T(e,t);case 15:case"end":return n.stop()}}),a,null,[[2,8]])})))}function T(e,t){var n=r.headers,a=r.header,o=r.data,i=r.formDataAttributes,u=r.method,c=r.withCredentials,l=r.name,s=r.url,p=r.sliceUrl,h=r.mergeUrl,v=r.chunkSize,m=r.customRequest,y=e.uid,b={headers:n,header:a,withCredentials:c,file:e,data:o,formDataAttributes:i,method:u,filename:l,action:s,sliceUrl:p,mergeUrl:h,chunkSize:v,onProgress:function(t){x(t,e),f("on-progress",t,e,g.value)},onSuccess:function(t){var n,a=t;if(null===(n=null==r?void 0:r.handleResCode)||void 0===n?void 0:n.call(r,a))S(t,e),f("on-success",t,e,g.value);else{var o=new Error((null==a?void 0:a.message)||"unknow error");N(o,e),f("on-error",e,g.value,o)}delete d.value[y]},onError:function(t){N(t,e),f("on-error",e,g.value,t),delete d.value[y]},onComplete:function(){t.indexOf(e)===t.length-1&&f("on-done",g.value)}},w=r.sliceUpload?U:V;m&&(w=m);var _=w(b);d.value[y]=_,_ instanceof Promise&&_.then(b.onSuccess,b.onError)}return(0,t.onBeforeUnmount)((function(){g.value.forEach((function(e){var t=e.url;(null==t?void 0:t.startsWith("blob:"))&&URL.revokeObjectURL(t)}))})),function(){return(0,t.createVNode)("div",{class:v.value},[!p.value&&(0,t.createVNode)(A,(0,t.mergeProps)(m,{onChange:E}),c),c.tip?c.tip():r.tip&&(0,t.createVNode)("div",{class:"".concat(s,"__tip")},[r.tip]),(0,t.createVNode)(w,{files:g.value,theme:r.theme,disabled:r.disabled,multiple:r.multiple,onRemove:_},{innerTrigger:function(e){return p.value&&(0,t.createVNode)(A,(0,t.mergeProps)(m,{file:e,onChange:E,onRemove:_}),c)}})])}}});F.install=function(e){e.component(F.name,F)};const k=F})(),c})()));
|
@@ -0,0 +1,113 @@
|
|
1
|
+
import type { PropType } from 'vue';
|
2
|
+
import { APIResponse, EThemes, ExtraFormData, FormDataAttr, HeaderDataAttr, MaxSize, UploadFile, UploadRawFile, UploadRequestHandler } from './upload.type';
|
3
|
+
declare const _default: {
|
4
|
+
theme: {
|
5
|
+
type: PropType<"button" | "picture" | "draggable">;
|
6
|
+
default: "button" | "picture" | "draggable";
|
7
|
+
validator: (val: EThemes) => boolean;
|
8
|
+
};
|
9
|
+
files: {
|
10
|
+
type: PropType<UploadFile[]>;
|
11
|
+
default: () => UploadFile[];
|
12
|
+
};
|
13
|
+
name: {
|
14
|
+
type: StringConstructor;
|
15
|
+
default: string;
|
16
|
+
};
|
17
|
+
multiple: {
|
18
|
+
type: BooleanConstructor;
|
19
|
+
default: boolean;
|
20
|
+
};
|
21
|
+
disabled: {
|
22
|
+
type: BooleanConstructor;
|
23
|
+
default: boolean;
|
24
|
+
};
|
25
|
+
autoUpload: {
|
26
|
+
type: BooleanConstructor;
|
27
|
+
default: boolean;
|
28
|
+
};
|
29
|
+
accept: {
|
30
|
+
type: StringConstructor;
|
31
|
+
};
|
32
|
+
delayTime: {
|
33
|
+
type: NumberConstructor;
|
34
|
+
default: number;
|
35
|
+
};
|
36
|
+
url: {
|
37
|
+
type: StringConstructor;
|
38
|
+
required: boolean;
|
39
|
+
};
|
40
|
+
method: {
|
41
|
+
type: StringConstructor;
|
42
|
+
default: string;
|
43
|
+
};
|
44
|
+
size: {
|
45
|
+
type: PropType<number | MaxSize>;
|
46
|
+
default(): {
|
47
|
+
maxFileSize: number;
|
48
|
+
maxImgSize: number;
|
49
|
+
};
|
50
|
+
};
|
51
|
+
handleResCode: {
|
52
|
+
type: PropType<(res: APIResponse) => boolean>;
|
53
|
+
default(res: APIResponse): boolean;
|
54
|
+
};
|
55
|
+
headers: {
|
56
|
+
type: PropType<Headers>;
|
57
|
+
default: () => {};
|
58
|
+
};
|
59
|
+
header: {
|
60
|
+
type: PropType<HeaderDataAttr | HeaderDataAttr[]>;
|
61
|
+
default: () => any[];
|
62
|
+
};
|
63
|
+
tip: {
|
64
|
+
type: StringConstructor;
|
65
|
+
default: string;
|
66
|
+
};
|
67
|
+
validateName: {
|
68
|
+
type: RegExpConstructor;
|
69
|
+
};
|
70
|
+
withCredentials: {
|
71
|
+
type: BooleanConstructor;
|
72
|
+
default: boolean;
|
73
|
+
};
|
74
|
+
limit: NumberConstructor;
|
75
|
+
data: {
|
76
|
+
type: PropType<ExtraFormData | ExtraFormData[]>;
|
77
|
+
default: () => any[];
|
78
|
+
};
|
79
|
+
formDataAttributes: {
|
80
|
+
type: PropType<FormDataAttr | FormDataAttr[]>;
|
81
|
+
default: () => any[];
|
82
|
+
};
|
83
|
+
extCls: {
|
84
|
+
type: StringConstructor;
|
85
|
+
default: string;
|
86
|
+
};
|
87
|
+
customRequest: PropType<UploadRequestHandler>;
|
88
|
+
beforeUpload: {
|
89
|
+
type: PropType<(file: UploadRawFile) => Promise<boolean> | boolean>;
|
90
|
+
default: any;
|
91
|
+
};
|
92
|
+
beforeRemove: {
|
93
|
+
type: PropType<(file: UploadFile, uploadFiles: UploadFile[]) => Promise<boolean> | boolean>;
|
94
|
+
default: any;
|
95
|
+
};
|
96
|
+
sliceUpload: {
|
97
|
+
type: BooleanConstructor;
|
98
|
+
default: boolean;
|
99
|
+
};
|
100
|
+
sliceUrl: {
|
101
|
+
type: StringConstructor;
|
102
|
+
default: string;
|
103
|
+
};
|
104
|
+
mergeUrl: {
|
105
|
+
type: StringConstructor;
|
106
|
+
default: string;
|
107
|
+
};
|
108
|
+
chunkSize: {
|
109
|
+
type: NumberConstructor;
|
110
|
+
default: number;
|
111
|
+
};
|
112
|
+
};
|
113
|
+
export default _default;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { EThemes, UploadFile } from './upload.type';
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
3
|
+
theme: {
|
4
|
+
type: import("vue").PropType<"button" | "picture" | "draggable">;
|
5
|
+
default: "button" | "picture" | "draggable";
|
6
|
+
validator: (val: EThemes) => boolean;
|
7
|
+
};
|
8
|
+
disabled: {
|
9
|
+
type: BooleanConstructor;
|
10
|
+
default: boolean;
|
11
|
+
};
|
12
|
+
files: {
|
13
|
+
type: import("vue").PropType<UploadFile[]>;
|
14
|
+
default: () => UploadFile[];
|
15
|
+
};
|
16
|
+
multiple: {
|
17
|
+
type: BooleanConstructor;
|
18
|
+
default: boolean;
|
19
|
+
};
|
20
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "remove"[], "remove", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
21
|
+
theme: {
|
22
|
+
type: import("vue").PropType<"button" | "picture" | "draggable">;
|
23
|
+
default: "button" | "picture" | "draggable";
|
24
|
+
validator: (val: EThemes) => boolean;
|
25
|
+
};
|
26
|
+
disabled: {
|
27
|
+
type: BooleanConstructor;
|
28
|
+
default: boolean;
|
29
|
+
};
|
30
|
+
files: {
|
31
|
+
type: import("vue").PropType<UploadFile[]>;
|
32
|
+
default: () => UploadFile[];
|
33
|
+
};
|
34
|
+
multiple: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: boolean;
|
37
|
+
};
|
38
|
+
}>> & {
|
39
|
+
onRemove?: (...args: any[]) => any;
|
40
|
+
}, {
|
41
|
+
disabled: boolean;
|
42
|
+
theme: "button" | "picture" | "draggable";
|
43
|
+
multiple: boolean;
|
44
|
+
files: UploadFile[];
|
45
|
+
}>;
|
46
|
+
export default _default;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { PropType } from 'vue';
|
2
|
+
import { EThemes, UploadFile } from './upload.type';
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
4
|
+
theme: {
|
5
|
+
type: PropType<"button" | "picture" | "draggable">;
|
6
|
+
default: "button" | "picture" | "draggable";
|
7
|
+
validator: (val: EThemes) => boolean;
|
8
|
+
};
|
9
|
+
disabled: {
|
10
|
+
type: BooleanConstructor;
|
11
|
+
default: boolean;
|
12
|
+
};
|
13
|
+
multiple: {
|
14
|
+
type: BooleanConstructor;
|
15
|
+
default: boolean;
|
16
|
+
};
|
17
|
+
accept: {
|
18
|
+
type: StringConstructor;
|
19
|
+
};
|
20
|
+
file: {
|
21
|
+
type: PropType<UploadFile>;
|
22
|
+
default: any;
|
23
|
+
};
|
24
|
+
}, () => 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<{
|
25
|
+
theme: {
|
26
|
+
type: PropType<"button" | "picture" | "draggable">;
|
27
|
+
default: "button" | "picture" | "draggable";
|
28
|
+
validator: (val: EThemes) => boolean;
|
29
|
+
};
|
30
|
+
disabled: {
|
31
|
+
type: BooleanConstructor;
|
32
|
+
default: boolean;
|
33
|
+
};
|
34
|
+
multiple: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: boolean;
|
37
|
+
};
|
38
|
+
accept: {
|
39
|
+
type: StringConstructor;
|
40
|
+
};
|
41
|
+
file: {
|
42
|
+
type: PropType<UploadFile>;
|
43
|
+
default: any;
|
44
|
+
};
|
45
|
+
}>> & {
|
46
|
+
onChange?: (...args: any[]) => any;
|
47
|
+
onRemove?: (...args: any[]) => any;
|
48
|
+
}, {
|
49
|
+
disabled: boolean;
|
50
|
+
theme: "button" | "picture" | "draggable";
|
51
|
+
multiple: boolean;
|
52
|
+
file: UploadFile;
|
53
|
+
}>;
|
54
|
+
export default _default;
|