vxe-pc-ui 3.16.0 → 3.16.2
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/es/alert/index.js +12 -0
- package/es/alert/src/alert.js +99 -0
- package/es/alert/style.css +129 -0
- package/es/alert/style.min.css +1 -0
- package/es/anchor/index.js +12 -0
- package/es/anchor/src/anchor-link.js +137 -0
- package/es/anchor/src/anchor.js +249 -0
- package/es/anchor/src/util.js +19 -0
- package/es/anchor/style.css +42 -0
- package/es/anchor/style.min.css +1 -0
- package/es/anchor-link/index.js +12 -0
- package/es/anchor-link/style.css +0 -0
- package/es/anchor-link/style.min.css +0 -0
- package/es/avatar/index.js +12 -0
- package/es/avatar/src/avatar.js +126 -0
- package/es/avatar/style.css +98 -0
- package/es/avatar/style.min.css +1 -0
- package/es/backtop/index.js +12 -0
- package/es/backtop/src/backtop.js +305 -0
- package/es/backtop/style.css +72 -0
- package/es/backtop/style.min.css +1 -0
- package/es/badge/index.js +12 -0
- package/es/badge/src/badge.js +74 -0
- package/es/badge/style.css +42 -0
- package/es/badge/style.min.css +1 -0
- package/es/breadcrumb/index.js +12 -0
- package/es/breadcrumb/src/breadcrumb-item.js +102 -0
- package/es/breadcrumb/src/breadcrumb.js +76 -0
- package/es/breadcrumb/style.css +33 -0
- package/es/breadcrumb/style.min.css +1 -0
- package/es/breadcrumb-item/index.js +12 -0
- package/es/breadcrumb-item/style.css +0 -0
- package/es/breadcrumb-item/style.min.css +0 -0
- package/es/button/index.js +12 -0
- package/es/button/src/button-group.js +97 -0
- package/es/button/src/button.js +875 -0
- package/es/button/style.css +638 -0
- package/es/button/style.min.css +1 -0
- package/es/button-group/index.js +12 -0
- package/es/button-group/style.css +27 -0
- package/es/button-group/style.min.css +1 -0
- package/es/calendar/index.js +12 -0
- package/es/calendar/src/calendar.js +1469 -0
- package/es/calendar/style.css +350 -0
- package/es/calendar/style.min.css +1 -0
- package/es/card/index.js +12 -0
- package/es/card/src/card.js +149 -0
- package/es/card/style.css +107 -0
- package/es/card/style.min.css +1 -0
- package/es/carousel/index.js +12 -0
- package/es/carousel/src/carousel-item.js +102 -0
- package/es/carousel/src/carousel.js +429 -0
- package/es/carousel/src/util.js +17 -0
- package/es/carousel/style.css +185 -0
- package/es/carousel/style.min.css +1 -0
- package/es/carousel-item/index.js +12 -0
- package/es/carousel-item/style.css +0 -0
- package/es/carousel-item/style.min.css +0 -0
- package/es/cascader/index.js +12 -0
- package/es/cascader/src/cascader.js +1985 -0
- package/es/cascader/src/util.js +7 -0
- package/es/cascader/style.css +346 -0
- package/es/cascader/style.min.css +1 -0
- package/es/checkbox/index.js +12 -0
- package/es/checkbox/src/button.js +244 -0
- package/es/checkbox/src/checkbox.js +217 -0
- package/es/checkbox/src/group.js +280 -0
- package/es/checkbox/style.css +113 -0
- package/es/checkbox/style.min.css +1 -0
- package/es/checkbox-button/index.js +12 -0
- package/es/checkbox-button/style.css +202 -0
- package/es/checkbox-button/style.min.css +1 -0
- package/es/checkbox-group/index.js +12 -0
- package/es/checkbox-group/style.css +0 -0
- package/es/checkbox-group/style.min.css +0 -0
- package/es/col/index.js +12 -0
- package/es/col/style.css +0 -0
- package/es/col/style.min.css +0 -0
- package/es/collapse/index.js +12 -0
- package/es/collapse/src/collapse-pane.js +116 -0
- package/es/collapse/src/collapse.js +360 -0
- package/es/collapse/src/util.js +17 -0
- package/es/collapse/style.css +83 -0
- package/es/collapse/style.min.css +1 -0
- package/es/collapse-pane/index.js +12 -0
- package/es/collapse-pane/style.css +0 -0
- package/es/collapse-pane/style.min.css +0 -0
- package/es/color-picker/index.js +12 -0
- package/es/color-picker/src/color-picker.js +1221 -0
- package/es/color-picker/src/util.js +190 -0
- package/es/color-picker/style.css +485 -0
- package/es/color-picker/style.min.css +1 -0
- package/es/components.js +299 -0
- package/es/context-menu/index.js +46 -0
- package/es/context-menu/src/context-menu.js +684 -0
- package/es/context-menu/style.css +109 -0
- package/es/context-menu/style.min.css +1 -0
- package/es/countdown/index.js +12 -0
- package/es/countdown/src/countdown.js +249 -0
- package/es/countdown/style.css +38 -0
- package/es/countdown/style.min.css +1 -0
- package/es/date-panel/index.js +12 -0
- package/es/date-panel/src/date-panel.js +2013 -0
- package/es/date-panel/src/util.js +295 -0
- package/es/date-panel/style.css +453 -0
- package/es/date-panel/style.min.css +1 -0
- package/es/date-picker/index.js +13 -0
- package/es/date-picker/src/date-picker.js +1833 -0
- package/es/date-picker/style.css +283 -0
- package/es/date-picker/style.min.css +1 -0
- package/es/date-range-picker/index.js +12 -0
- package/es/date-range-picker/src/date-range-picker.js +1679 -0
- package/es/date-range-picker/style.css +289 -0
- package/es/date-range-picker/style.min.css +1 -0
- package/es/drawer/index.js +68 -0
- package/es/drawer/src/drawer.js +735 -0
- package/es/drawer/style.css +270 -0
- package/es/drawer/style.min.css +1 -0
- package/es/dynamics/index.js +107 -0
- package/es/empty/index.js +12 -0
- package/es/empty/src/empty.js +73 -0
- package/es/empty/style.css +54 -0
- package/es/empty/style.min.css +1 -0
- package/es/form/index.js +12 -0
- package/es/form/render/index.js +588 -0
- package/es/form/src/form-config-item.js +73 -0
- package/es/form/src/form-group.js +108 -0
- package/es/form/src/form-item.js +198 -0
- package/es/form/src/form.js +1012 -0
- package/es/form/src/itemInfo.js +76 -0
- package/es/form/src/render.js +357 -0
- package/es/form/src/util.js +78 -0
- package/es/form/style.css +621 -0
- package/es/form/style.min.css +1 -0
- package/es/form-gather/index.js +13 -0
- package/es/form-gather/style.css +0 -0
- package/es/form-gather/style.min.css +0 -0
- package/es/form-group/index.js +12 -0
- package/es/form-group/style.css +0 -0
- package/es/form-group/style.min.css +0 -0
- package/es/form-item/index.js +12 -0
- package/es/form-item/style.css +0 -0
- package/es/form-item/style.min.css +0 -0
- package/es/icon/iconfont.1783571795939.ttf +0 -0
- package/es/icon/iconfont.1783571795939.woff +0 -0
- package/es/icon/iconfont.1783571795939.woff2 +0 -0
- package/es/icon/index.js +12 -0
- package/es/icon/src/icon.js +62 -0
- package/es/icon/style.css +1034 -0
- package/es/icon/style.min.css +1 -0
- package/es/icon-picker/index.js +12 -0
- package/es/icon-picker/src/icon-picker.js +834 -0
- package/es/icon-picker/style.css +242 -0
- package/es/icon-picker/style.min.css +1 -0
- package/es/iconfont.1783571795939.ttf +0 -0
- package/es/iconfont.1783571795939.woff +0 -0
- package/es/iconfont.1783571795939.woff2 +0 -0
- package/es/image/index.js +12 -0
- package/es/image/src/group.js +144 -0
- package/es/image/src/image.js +274 -0
- package/es/image/src/preview.js +707 -0
- package/es/image/src/util.js +59 -0
- package/es/image/style.css +17 -0
- package/es/image/style.min.css +1 -0
- package/es/image-group/index.js +12 -0
- package/es/image-group/style.css +3 -0
- package/es/image-group/style.min.css +1 -0
- package/es/image-preview/index.js +14 -0
- package/es/image-preview/style.css +218 -0
- package/es/image-preview/style.min.css +1 -0
- package/es/index.esm.js +6 -0
- package/es/input/index.js +12 -0
- package/es/input/src/input.js +3084 -0
- package/es/input/style.css +1025 -0
- package/es/input/style.min.css +1 -0
- package/es/language/ar-EG.d.ts +2 -0
- package/es/language/ar-EG.js +874 -0
- package/es/language/de-DE.d.ts +2 -0
- package/es/language/de-DE.js +874 -0
- package/es/language/en-US.d.ts +2 -0
- package/es/language/en-US.js +874 -0
- package/es/language/es-ES.d.ts +2 -0
- package/es/language/es-ES.js +874 -0
- package/es/language/fr-FR.d.ts +2 -0
- package/es/language/fr-FR.js +874 -0
- package/es/language/hu-HU.d.ts +2 -0
- package/es/language/hu-HU.js +874 -0
- package/es/language/hy-AM.d.ts +2 -0
- package/es/language/hy-AM.js +874 -0
- package/es/language/id-ID.d.ts +2 -0
- package/es/language/id-ID.js +874 -0
- package/es/language/it-IT.d.ts +2 -0
- package/es/language/it-IT.js +874 -0
- package/es/language/ja-JP.d.ts +2 -0
- package/es/language/ja-JP.js +874 -0
- package/es/language/ko-KR.d.ts +2 -0
- package/es/language/ko-KR.js +874 -0
- package/es/language/ms-MY.d.ts +2 -0
- package/es/language/ms-MY.js +874 -0
- package/es/language/nb-NO.d.ts +2 -0
- package/es/language/nb-NO.js +874 -0
- package/es/language/pt-BR.d.ts +2 -0
- package/es/language/pt-BR.js +874 -0
- package/es/language/ru-RU.d.ts +2 -0
- package/es/language/ru-RU.js +874 -0
- package/es/language/th-TH.d.ts +2 -0
- package/es/language/th-TH.js +874 -0
- package/es/language/ug-CN.d.ts +2 -0
- package/es/language/ug-CN.js +874 -0
- package/es/language/uk-UA.d.ts +2 -0
- package/es/language/uk-UA.js +874 -0
- package/es/language/uz-UZ.d.ts +2 -0
- package/es/language/uz-UZ.js +874 -0
- package/es/language/vi-VN.d.ts +2 -0
- package/es/language/vi-VN.js +874 -0
- package/es/language/zh-CHT.d.ts +2 -0
- package/es/language/zh-CHT.js +874 -0
- package/es/language/zh-CN.d.ts +2 -0
- package/es/language/zh-CN.js +874 -0
- package/es/language/zh-HK.d.ts +2 -0
- package/es/language/zh-HK.js +2 -0
- package/es/language/zh-MO.d.ts +2 -0
- package/es/language/zh-MO.js +2 -0
- package/es/language/zh-TC.js +2 -0
- package/es/language/zh-TW.d.ts +2 -0
- package/es/language/zh-TW.js +2 -0
- package/es/layout-aside/index.js +12 -0
- package/es/layout-aside/src/layout-aside.js +111 -0
- package/es/layout-aside/style.css +26 -0
- package/es/layout-aside/style.min.css +1 -0
- package/es/layout-body/index.js +12 -0
- package/es/layout-body/src/layout-body.js +127 -0
- package/es/layout-body/style.css +16 -0
- package/es/layout-body/style.min.css +1 -0
- package/es/layout-container/index.js +12 -0
- package/es/layout-container/src/layout-container.js +54 -0
- package/es/layout-container/style.css +28 -0
- package/es/layout-container/style.min.css +1 -0
- package/es/layout-footer/index.js +12 -0
- package/es/layout-footer/src/layout-footer.js +45 -0
- package/es/layout-footer/style.css +14 -0
- package/es/layout-footer/style.min.css +1 -0
- package/es/layout-header/index.js +12 -0
- package/es/layout-header/src/layout-header.js +43 -0
- package/es/layout-header/style.css +11 -0
- package/es/layout-header/style.min.css +1 -0
- package/es/link/index.js +12 -0
- package/es/link/src/link.js +137 -0
- package/es/link/style.css +111 -0
- package/es/link/style.min.css +1 -0
- package/es/list/index.js +12 -0
- package/es/list/src/list.js +2242 -0
- package/es/list/src/store.js +8 -0
- package/es/list/src/util.js +8 -0
- package/es/list/style.css +379 -0
- package/es/list/style.min.css +1 -0
- package/es/loading/index.js +27 -0
- package/es/loading/src/loading.js +147 -0
- package/es/loading/style.css +120 -0
- package/es/loading/style.min.css +1 -0
- package/es/mention/index.js +12 -0
- package/es/mention/src/mention.js +44 -0
- package/es/mention/style.css +0 -0
- package/es/mention/style.min.css +0 -0
- package/es/menu/index.js +12 -0
- package/es/menu/src/menu.js +589 -0
- package/es/menu/style.css +140 -0
- package/es/menu/style.min.css +1 -0
- package/es/modal/index.js +130 -0
- package/es/modal/src/modal.js +1608 -0
- package/es/modal/style.css +415 -0
- package/es/modal/style.min.css +1 -0
- package/es/notice-bar/index.js +12 -0
- package/es/notice-bar/src/notice-bar.js +163 -0
- package/es/notice-bar/style.css +78 -0
- package/es/notice-bar/style.min.css +1 -0
- package/es/number-input/index.js +12 -0
- package/es/number-input/src/number-input.js +1201 -0
- package/es/number-input/src/util.js +22 -0
- package/es/number-input/style.css +274 -0
- package/es/number-input/style.min.css +1 -0
- package/es/optgroup/index.js +12 -0
- package/es/optgroup/style.css +0 -0
- package/es/optgroup/style.min.css +0 -0
- package/es/option/index.js +12 -0
- package/es/option/style.css +0 -0
- package/es/option/style.min.css +0 -0
- package/es/pager/index.js +12 -0
- package/es/pager/src/pager.js +844 -0
- package/es/pager/style.css +341 -0
- package/es/pager/style.min.css +1 -0
- package/es/password-input/index.js +12 -0
- package/es/password-input/src/password-input.js +428 -0
- package/es/password-input/style.css +598 -0
- package/es/password-input/style.min.css +1 -0
- package/es/print/index.js +14 -0
- package/es/print/src/page-break.js +66 -0
- package/es/print/src/print.js +252 -0
- package/es/print/src/util.js +261 -0
- package/es/print/style.css +4 -0
- package/es/print/style.min.css +1 -0
- package/es/print-page-break/index.js +10 -0
- package/es/print-page-break/style.css +0 -0
- package/es/print-page-break/style.min.css +0 -0
- package/es/pulldown/index.js +12 -0
- package/es/pulldown/src/pulldown.js +502 -0
- package/es/pulldown/style.css +109 -0
- package/es/pulldown/style.min.css +1 -0
- package/es/radio/index.js +12 -0
- package/es/radio/src/button.js +265 -0
- package/es/radio/src/group.js +258 -0
- package/es/radio/src/radio.js +239 -0
- package/es/radio/style.css +108 -0
- package/es/radio/style.min.css +1 -0
- package/es/radio-button/index.js +12 -0
- package/es/radio-button/style.css +202 -0
- package/es/radio-button/style.min.css +1 -0
- package/es/radio-group/index.js +12 -0
- package/es/radio-group/style.css +0 -0
- package/es/radio-group/style.min.css +0 -0
- package/es/rate/index.js +12 -0
- package/es/rate/src/rate.js +178 -0
- package/es/rate/style.css +54 -0
- package/es/rate/style.min.css +1 -0
- package/es/result/index.js +12 -0
- package/es/result/src/result.js +86 -0
- package/es/result/style.css +68 -0
- package/es/result/style.min.css +1 -0
- package/es/row/index.js +12 -0
- package/es/row/src/col.js +115 -0
- package/es/row/src/row.js +99 -0
- package/es/row/style.css +116 -0
- package/es/row/style.min.css +1 -0
- package/es/segmented/index.js +12 -0
- package/es/segmented/src/segmented.js +255 -0
- package/es/segmented/style.css +197 -0
- package/es/segmented/style.min.css +1 -0
- package/es/select/index.js +12 -0
- package/es/select/src/optgroup.js +90 -0
- package/es/select/src/option-info.js +16 -0
- package/es/select/src/option.js +86 -0
- package/es/select/src/select.js +2065 -0
- package/es/select/src/util.js +36 -0
- package/es/select/style.css +370 -0
- package/es/select/style.min.css +1 -0
- package/es/slider/index.js +12 -0
- package/es/slider/src/slider.js +307 -0
- package/es/slider/style.css +143 -0
- package/es/slider/style.min.css +1 -0
- package/es/split/index.js +12 -0
- package/es/split/style.css +295 -0
- package/es/split/style.min.css +1 -0
- package/es/split-pane/index.js +13 -0
- package/es/split-pane/style.css +0 -0
- package/es/split-pane/style.min.css +0 -0
- package/es/splitter/index.js +12 -0
- package/es/splitter/src/splitter-panel.js +149 -0
- package/es/splitter/src/splitter.js +1002 -0
- package/es/splitter/src/util.js +17 -0
- package/es/splitter/style.css +295 -0
- package/es/splitter/style.min.css +1 -0
- package/es/splitter-panel/index.js +12 -0
- package/es/splitter-panel/style.css +0 -0
- package/es/splitter-panel/style.min.css +0 -0
- package/es/steps/index.js +12 -0
- package/es/steps/src/steps.js +49 -0
- package/es/steps/style.css +0 -0
- package/es/steps/style.min.css +0 -0
- package/es/style.css +1 -0
- package/es/style.min.css +1 -0
- package/es/switch/index.js +12 -0
- package/es/switch/src/switch.js +261 -0
- package/es/switch/style.css +111 -0
- package/es/switch/style.min.css +1 -0
- package/es/tab-pane/index.js +12 -0
- package/es/tab-pane/style.css +0 -0
- package/es/tab-pane/style.min.css +0 -0
- package/es/table-select/index.js +12 -0
- package/es/table-select/src/table-select.js +839 -0
- package/es/table-select/style.css +134 -0
- package/es/table-select/style.min.css +1 -0
- package/es/table-transfer/index.js +12 -0
- package/es/table-transfer/src/table-transfer.js +71 -0
- package/es/table-transfer/style.css +0 -0
- package/es/table-transfer/style.min.css +0 -0
- package/es/tabs/index.js +12 -0
- package/es/tabs/src/tab-pane.js +119 -0
- package/es/tabs/src/tabs.js +958 -0
- package/es/tabs/src/util.js +17 -0
- package/es/tabs/style.css +705 -0
- package/es/tabs/style.min.css +1 -0
- package/es/tag/index.js +12 -0
- package/es/tag/src/tag.js +177 -0
- package/es/tag/style.css +187 -0
- package/es/tag/style.min.css +1 -0
- package/es/text/index.js +12 -0
- package/es/text/src/text.js +239 -0
- package/es/text/style.css +138 -0
- package/es/text/style.min.css +1 -0
- package/es/text-ellipsis/index.js +12 -0
- package/es/text-ellipsis/src/text-ellipsis.js +268 -0
- package/es/text-ellipsis/style.css +115 -0
- package/es/text-ellipsis/style.min.css +1 -0
- package/es/textarea/index.js +12 -0
- package/es/textarea/src/textarea.js +456 -0
- package/es/textarea/style.css +119 -0
- package/es/textarea/style.min.css +1 -0
- package/es/timeline/index.js +12 -0
- package/es/timeline/src/timeline-item.js +35 -0
- package/es/timeline/src/timeline.js +44 -0
- package/es/timeline/style.css +0 -0
- package/es/timeline/style.min.css +0 -0
- package/es/timeline-item/index.js +12 -0
- package/es/timeline-item/style.css +0 -0
- package/es/timeline-item/style.min.css +0 -0
- package/es/tip/index.js +14 -0
- package/es/tip/src/tip.js +100 -0
- package/es/tip/style.css +107 -0
- package/es/tip/style.min.css +1 -0
- package/es/tooltip/index.js +12 -0
- package/es/tooltip/src/tooltip.js +657 -0
- package/es/tooltip/style.css +117 -0
- package/es/tooltip/style.min.css +1 -0
- package/es/tour/index.js +12 -0
- package/es/tour/src/tour.js +44 -0
- package/es/tour/style.css +0 -0
- package/es/tour/style.min.css +0 -0
- package/es/transfer/index.js +12 -0
- package/es/transfer/src/transfer.js +86 -0
- package/es/transfer/style.css +0 -0
- package/es/transfer/style.min.css +0 -0
- package/es/tree/index.js +12 -0
- package/es/tree/src/store.js +8 -0
- package/es/tree/src/tree.js +3699 -0
- package/es/tree/src/util.js +46 -0
- package/es/tree/style.css +385 -0
- package/es/tree/style.min.css +1 -0
- package/es/tree-select/index.js +12 -0
- package/es/tree-select/src/tree-select.js +1160 -0
- package/es/tree-select/style.css +194 -0
- package/es/tree-select/style.min.css +1 -0
- package/es/ui/index.js +695 -0
- package/es/ui/src/anime.js +46 -0
- package/es/ui/src/comp.js +1 -0
- package/es/ui/src/dom.js +255 -0
- package/es/ui/src/log.js +15 -0
- package/es/ui/src/utils.js +52 -0
- package/es/ui/src/vn.js +51 -0
- package/es/ui/style.css +0 -0
- package/es/ui/style.min.css +0 -0
- package/es/upload/index.js +15 -0
- package/es/upload/src/upload.js +2080 -0
- package/es/upload/src/util.js +103 -0
- package/es/upload/style.css +483 -0
- package/es/upload/style.min.css +1 -0
- package/es/vxe-alert/index.js +3 -0
- package/es/vxe-alert/style.css +129 -0
- package/es/vxe-alert/style.min.css +1 -0
- package/es/vxe-anchor/index.js +3 -0
- package/es/vxe-anchor/style.css +42 -0
- package/es/vxe-anchor/style.min.css +1 -0
- package/es/vxe-anchor-link/index.js +3 -0
- package/es/vxe-anchor-link/style.css +0 -0
- package/es/vxe-anchor-link/style.min.css +0 -0
- package/es/vxe-avatar/index.js +3 -0
- package/es/vxe-avatar/style.css +98 -0
- package/es/vxe-avatar/style.min.css +1 -0
- package/es/vxe-backtop/index.js +3 -0
- package/es/vxe-backtop/style.css +72 -0
- package/es/vxe-backtop/style.min.css +1 -0
- package/es/vxe-badge/index.js +3 -0
- package/es/vxe-badge/style.css +42 -0
- package/es/vxe-badge/style.min.css +1 -0
- package/es/vxe-breadcrumb/index.js +3 -0
- package/es/vxe-breadcrumb/style.css +33 -0
- package/es/vxe-breadcrumb/style.min.css +1 -0
- package/es/vxe-breadcrumb-item/index.js +3 -0
- package/es/vxe-breadcrumb-item/style.css +0 -0
- package/es/vxe-breadcrumb-item/style.min.css +0 -0
- package/es/vxe-button/index.js +3 -0
- package/es/vxe-button/style.css +638 -0
- package/es/vxe-button/style.min.css +1 -0
- package/es/vxe-button-group/index.js +3 -0
- package/es/vxe-button-group/style.css +27 -0
- package/es/vxe-button-group/style.min.css +1 -0
- package/es/vxe-calendar/index.js +3 -0
- package/es/vxe-calendar/style.css +350 -0
- package/es/vxe-calendar/style.min.css +1 -0
- package/es/vxe-card/index.js +3 -0
- package/es/vxe-card/style.css +107 -0
- package/es/vxe-card/style.min.css +1 -0
- package/es/vxe-carousel/index.js +3 -0
- package/es/vxe-carousel/style.css +185 -0
- package/es/vxe-carousel/style.min.css +1 -0
- package/es/vxe-carousel-item/index.js +3 -0
- package/es/vxe-carousel-item/style.css +0 -0
- package/es/vxe-carousel-item/style.min.css +0 -0
- package/es/vxe-cascader/index.js +3 -0
- package/es/vxe-cascader/style.css +346 -0
- package/es/vxe-cascader/style.min.css +1 -0
- package/es/vxe-checkbox/index.js +3 -0
- package/es/vxe-checkbox/style.css +113 -0
- package/es/vxe-checkbox/style.min.css +1 -0
- package/es/vxe-checkbox-button/index.js +3 -0
- package/es/vxe-checkbox-button/style.css +202 -0
- package/es/vxe-checkbox-button/style.min.css +1 -0
- package/es/vxe-checkbox-group/index.js +3 -0
- package/es/vxe-checkbox-group/style.css +0 -0
- package/es/vxe-checkbox-group/style.min.css +0 -0
- package/es/vxe-col/index.js +3 -0
- package/es/vxe-col/style.css +0 -0
- package/es/vxe-col/style.min.css +0 -0
- package/es/vxe-collapse/index.js +3 -0
- package/es/vxe-collapse/style.css +83 -0
- package/es/vxe-collapse/style.min.css +1 -0
- package/es/vxe-collapse-pane/index.js +3 -0
- package/es/vxe-collapse-pane/style.css +0 -0
- package/es/vxe-collapse-pane/style.min.css +0 -0
- package/es/vxe-color-picker/index.js +3 -0
- package/es/vxe-color-picker/style.css +485 -0
- package/es/vxe-color-picker/style.min.css +1 -0
- package/es/vxe-context-menu/index.js +3 -0
- package/es/vxe-context-menu/style.css +109 -0
- package/es/vxe-context-menu/style.min.css +1 -0
- package/es/vxe-countdown/index.js +3 -0
- package/es/vxe-countdown/style.css +38 -0
- package/es/vxe-countdown/style.min.css +1 -0
- package/es/vxe-date-panel/index.js +3 -0
- package/es/vxe-date-panel/style.css +453 -0
- package/es/vxe-date-panel/style.min.css +1 -0
- package/es/vxe-date-picker/index.js +3 -0
- package/es/vxe-date-picker/style.css +283 -0
- package/es/vxe-date-picker/style.min.css +1 -0
- package/es/vxe-date-range-picker/index.js +3 -0
- package/es/vxe-date-range-picker/style.css +289 -0
- package/es/vxe-date-range-picker/style.min.css +1 -0
- package/es/vxe-drawer/index.js +3 -0
- package/es/vxe-drawer/style.css +270 -0
- package/es/vxe-drawer/style.min.css +1 -0
- package/es/vxe-empty/index.js +3 -0
- package/es/vxe-empty/style.css +54 -0
- package/es/vxe-empty/style.min.css +1 -0
- package/es/vxe-form/index.js +3 -0
- package/es/vxe-form/style.css +621 -0
- package/es/vxe-form/style.min.css +1 -0
- package/es/vxe-form-gather/index.js +3 -0
- package/es/vxe-form-gather/style.css +0 -0
- package/es/vxe-form-gather/style.min.css +0 -0
- package/es/vxe-form-group/index.js +3 -0
- package/es/vxe-form-group/style.css +0 -0
- package/es/vxe-form-group/style.min.css +0 -0
- package/es/vxe-form-item/index.js +3 -0
- package/es/vxe-form-item/style.css +0 -0
- package/es/vxe-form-item/style.min.css +0 -0
- package/es/vxe-icon/index.js +3 -0
- package/es/vxe-icon/style.css +1034 -0
- package/es/vxe-icon/style.min.css +1 -0
- package/es/vxe-icon-picker/index.js +3 -0
- package/es/vxe-icon-picker/style.css +242 -0
- package/es/vxe-icon-picker/style.min.css +1 -0
- package/es/vxe-image/index.js +3 -0
- package/es/vxe-image/style.css +17 -0
- package/es/vxe-image/style.min.css +1 -0
- package/es/vxe-image-group/index.js +3 -0
- package/es/vxe-image-group/style.css +3 -0
- package/es/vxe-image-group/style.min.css +1 -0
- package/es/vxe-image-preview/index.js +3 -0
- package/es/vxe-image-preview/style.css +218 -0
- package/es/vxe-image-preview/style.min.css +1 -0
- package/es/vxe-input/index.js +3 -0
- package/es/vxe-input/style.css +1025 -0
- package/es/vxe-input/style.min.css +1 -0
- package/es/vxe-layout-aside/index.js +3 -0
- package/es/vxe-layout-aside/style.css +26 -0
- package/es/vxe-layout-aside/style.min.css +1 -0
- package/es/vxe-layout-body/index.js +3 -0
- package/es/vxe-layout-body/style.css +16 -0
- package/es/vxe-layout-body/style.min.css +1 -0
- package/es/vxe-layout-container/index.js +3 -0
- package/es/vxe-layout-container/style.css +28 -0
- package/es/vxe-layout-container/style.min.css +1 -0
- package/es/vxe-layout-footer/index.js +3 -0
- package/es/vxe-layout-footer/style.css +14 -0
- package/es/vxe-layout-footer/style.min.css +1 -0
- package/es/vxe-layout-header/index.js +3 -0
- package/es/vxe-layout-header/style.css +11 -0
- package/es/vxe-layout-header/style.min.css +1 -0
- package/es/vxe-link/index.js +3 -0
- package/es/vxe-link/style.css +111 -0
- package/es/vxe-link/style.min.css +1 -0
- package/es/vxe-list/index.js +3 -0
- package/es/vxe-list/style.css +379 -0
- package/es/vxe-list/style.min.css +1 -0
- package/es/vxe-loading/index.js +3 -0
- package/es/vxe-loading/style.css +120 -0
- package/es/vxe-loading/style.min.css +1 -0
- package/es/vxe-mention/index.js +3 -0
- package/es/vxe-mention/style.css +0 -0
- package/es/vxe-mention/style.min.css +0 -0
- package/es/vxe-menu/index.js +3 -0
- package/es/vxe-menu/style.css +140 -0
- package/es/vxe-menu/style.min.css +1 -0
- package/es/vxe-modal/index.js +3 -0
- package/es/vxe-modal/style.css +415 -0
- package/es/vxe-modal/style.min.css +1 -0
- package/es/vxe-notice-bar/index.js +3 -0
- package/es/vxe-notice-bar/style.css +78 -0
- package/es/vxe-notice-bar/style.min.css +1 -0
- package/es/vxe-number-input/index.js +3 -0
- package/es/vxe-number-input/style.css +274 -0
- package/es/vxe-number-input/style.min.css +1 -0
- package/es/vxe-optgroup/index.js +3 -0
- package/es/vxe-optgroup/style.css +0 -0
- package/es/vxe-optgroup/style.min.css +0 -0
- package/es/vxe-option/index.js +3 -0
- package/es/vxe-option/style.css +0 -0
- package/es/vxe-option/style.min.css +0 -0
- package/es/vxe-pager/index.js +3 -0
- package/es/vxe-pager/style.css +341 -0
- package/es/vxe-pager/style.min.css +1 -0
- package/es/vxe-password-input/index.js +3 -0
- package/es/vxe-password-input/style.css +598 -0
- package/es/vxe-password-input/style.min.css +1 -0
- package/es/vxe-print/index.js +3 -0
- package/es/vxe-print/style.css +4 -0
- package/es/vxe-print/style.min.css +1 -0
- package/es/vxe-print-page-break/index.js +3 -0
- package/es/vxe-print-page-break/style.css +0 -0
- package/es/vxe-print-page-break/style.min.css +0 -0
- package/es/vxe-pulldown/index.js +3 -0
- package/es/vxe-pulldown/style.css +109 -0
- package/es/vxe-pulldown/style.min.css +1 -0
- package/es/vxe-radio/index.js +3 -0
- package/es/vxe-radio/style.css +108 -0
- package/es/vxe-radio/style.min.css +1 -0
- package/es/vxe-radio-button/index.js +3 -0
- package/es/vxe-radio-button/style.css +202 -0
- package/es/vxe-radio-button/style.min.css +1 -0
- package/es/vxe-radio-group/index.js +3 -0
- package/es/vxe-radio-group/style.css +0 -0
- package/es/vxe-radio-group/style.min.css +0 -0
- package/es/vxe-rate/index.js +3 -0
- package/es/vxe-rate/style.css +54 -0
- package/es/vxe-rate/style.min.css +1 -0
- package/es/vxe-result/index.js +3 -0
- package/es/vxe-result/style.css +68 -0
- package/es/vxe-result/style.min.css +1 -0
- package/es/vxe-row/index.js +3 -0
- package/es/vxe-row/style.css +116 -0
- package/es/vxe-row/style.min.css +1 -0
- package/es/vxe-segmented/index.js +3 -0
- package/es/vxe-segmented/style.css +197 -0
- package/es/vxe-segmented/style.min.css +1 -0
- package/es/vxe-select/index.js +3 -0
- package/es/vxe-select/style.css +370 -0
- package/es/vxe-select/style.min.css +1 -0
- package/es/vxe-slider/index.js +3 -0
- package/es/vxe-slider/style.css +143 -0
- package/es/vxe-slider/style.min.css +1 -0
- package/es/vxe-split/index.js +3 -0
- package/es/vxe-split/style.css +295 -0
- package/es/vxe-split/style.min.css +1 -0
- package/es/vxe-split-pane/index.js +3 -0
- package/es/vxe-split-pane/style.css +0 -0
- package/es/vxe-split-pane/style.min.css +0 -0
- package/es/vxe-splitter/index.js +3 -0
- package/es/vxe-splitter/style.css +295 -0
- package/es/vxe-splitter/style.min.css +1 -0
- package/es/vxe-splitter-panel/index.js +3 -0
- package/es/vxe-splitter-panel/style.css +0 -0
- package/es/vxe-splitter-panel/style.min.css +0 -0
- package/es/vxe-steps/index.js +3 -0
- package/es/vxe-steps/style.css +0 -0
- package/es/vxe-steps/style.min.css +0 -0
- package/es/vxe-switch/index.js +3 -0
- package/es/vxe-switch/style.css +111 -0
- package/es/vxe-switch/style.min.css +1 -0
- package/es/vxe-tab-pane/index.js +3 -0
- package/es/vxe-tab-pane/style.css +0 -0
- package/es/vxe-tab-pane/style.min.css +0 -0
- package/es/vxe-table-select/index.js +3 -0
- package/es/vxe-table-select/style.css +134 -0
- package/es/vxe-table-select/style.min.css +1 -0
- package/es/vxe-table-transfer/index.js +3 -0
- package/es/vxe-table-transfer/style.css +0 -0
- package/es/vxe-table-transfer/style.min.css +0 -0
- package/es/vxe-tabs/index.js +3 -0
- package/es/vxe-tabs/style.css +705 -0
- package/es/vxe-tabs/style.min.css +1 -0
- package/es/vxe-tag/index.js +3 -0
- package/es/vxe-tag/style.css +187 -0
- package/es/vxe-tag/style.min.css +1 -0
- package/es/vxe-text/index.js +3 -0
- package/es/vxe-text/style.css +138 -0
- package/es/vxe-text/style.min.css +1 -0
- package/es/vxe-text-ellipsis/index.js +3 -0
- package/es/vxe-text-ellipsis/style.css +115 -0
- package/es/vxe-text-ellipsis/style.min.css +1 -0
- package/es/vxe-textarea/index.js +3 -0
- package/es/vxe-textarea/style.css +119 -0
- package/es/vxe-textarea/style.min.css +1 -0
- package/es/vxe-timeline/index.js +3 -0
- package/es/vxe-timeline/style.css +0 -0
- package/es/vxe-timeline/style.min.css +0 -0
- package/es/vxe-timeline-item/index.js +3 -0
- package/es/vxe-timeline-item/style.css +0 -0
- package/es/vxe-timeline-item/style.min.css +0 -0
- package/es/vxe-tip/index.js +3 -0
- package/es/vxe-tip/style.css +107 -0
- package/es/vxe-tip/style.min.css +1 -0
- package/es/vxe-tooltip/index.js +3 -0
- package/es/vxe-tooltip/style.css +117 -0
- package/es/vxe-tooltip/style.min.css +1 -0
- package/es/vxe-tour/index.js +3 -0
- package/es/vxe-tour/style.css +0 -0
- package/es/vxe-tour/style.min.css +0 -0
- package/es/vxe-transfer/index.js +3 -0
- package/es/vxe-transfer/style.css +0 -0
- package/es/vxe-transfer/style.min.css +0 -0
- package/es/vxe-tree/index.js +3 -0
- package/es/vxe-tree/style.css +385 -0
- package/es/vxe-tree/style.min.css +1 -0
- package/es/vxe-tree-select/index.js +3 -0
- package/es/vxe-tree-select/style.css +194 -0
- package/es/vxe-tree-select/style.min.css +1 -0
- package/es/vxe-u-i/index.js +3 -0
- package/es/vxe-ui/index.js +3 -0
- package/es/vxe-ui/style.css +0 -0
- package/es/vxe-ui/style.min.css +0 -0
- package/es/vxe-upload/index.js +3 -0
- package/es/vxe-upload/style.css +483 -0
- package/es/vxe-upload/style.min.css +1 -0
- package/es/vxe-watermark/index.js +3 -0
- package/es/vxe-watermark/style.css +30 -0
- package/es/vxe-watermark/style.min.css +1 -0
- package/es/watermark/index.js +24 -0
- package/es/watermark/src/util.js +149 -0
- package/es/watermark/src/watermark.js +148 -0
- package/es/watermark/style.css +30 -0
- package/es/watermark/style.min.css +1 -0
- package/lib/alert/index.js +19 -0
- package/lib/alert/index.min.js +1 -0
- package/lib/alert/src/alert.js +101 -0
- package/lib/alert/src/alert.min.js +1 -0
- package/lib/alert/style/index.js +1 -0
- package/lib/alert/style/style.css +129 -0
- package/lib/alert/style/style.min.css +1 -0
- package/lib/anchor/index.js +19 -0
- package/lib/anchor/index.min.js +1 -0
- package/lib/anchor/src/anchor-link.js +146 -0
- package/lib/anchor/src/anchor-link.min.js +1 -0
- package/lib/anchor/src/anchor.js +263 -0
- package/lib/anchor/src/anchor.min.js +1 -0
- package/lib/anchor/src/util.js +31 -0
- package/lib/anchor/src/util.min.js +1 -0
- package/lib/anchor/style/index.js +1 -0
- package/lib/anchor/style/style.css +42 -0
- package/lib/anchor/style/style.min.css +1 -0
- package/lib/anchor-link/index.js +19 -0
- package/lib/anchor-link/index.min.js +1 -0
- package/lib/anchor-link/style/index.js +1 -0
- package/lib/anchor-link/style/style.css +0 -0
- package/lib/anchor-link/style/style.min.css +0 -0
- package/lib/avatar/index.js +19 -0
- package/lib/avatar/index.min.js +1 -0
- package/lib/avatar/src/avatar.js +139 -0
- package/lib/avatar/src/avatar.min.js +1 -0
- package/lib/avatar/style/index.js +1 -0
- package/lib/avatar/style/style.css +98 -0
- package/lib/avatar/style/style.min.css +1 -0
- package/lib/backtop/index.js +19 -0
- package/lib/backtop/index.min.js +1 -0
- package/lib/backtop/src/backtop.js +347 -0
- package/lib/backtop/src/backtop.min.js +1 -0
- package/lib/backtop/style/index.js +1 -0
- package/lib/backtop/style/style.css +72 -0
- package/lib/backtop/style/style.min.css +1 -0
- package/lib/badge/index.js +19 -0
- package/lib/badge/index.min.js +1 -0
- package/lib/badge/src/badge.js +81 -0
- package/lib/badge/src/badge.min.js +1 -0
- package/lib/badge/style/index.js +1 -0
- package/lib/badge/style/style.css +42 -0
- package/lib/badge/style/style.min.css +1 -0
- package/lib/breadcrumb/index.js +19 -0
- package/lib/breadcrumb/index.min.js +1 -0
- package/lib/breadcrumb/src/breadcrumb-item.js +102 -0
- package/lib/breadcrumb/src/breadcrumb-item.min.js +1 -0
- package/lib/breadcrumb/src/breadcrumb.js +88 -0
- package/lib/breadcrumb/src/breadcrumb.min.js +1 -0
- package/lib/breadcrumb/style/index.js +1 -0
- package/lib/breadcrumb/style/style.css +33 -0
- package/lib/breadcrumb/style/style.min.css +1 -0
- package/lib/breadcrumb-item/index.js +19 -0
- package/lib/breadcrumb-item/index.min.js +1 -0
- package/lib/breadcrumb-item/style/index.js +1 -0
- package/lib/breadcrumb-item/style/style.css +0 -0
- package/lib/breadcrumb-item/style/style.min.css +0 -0
- package/lib/button/index.js +19 -0
- package/lib/button/index.min.js +1 -0
- package/lib/button/src/button-group.js +110 -0
- package/lib/button/src/button-group.min.js +1 -0
- package/lib/button/src/button.js +874 -0
- package/lib/button/src/button.min.js +1 -0
- package/lib/button/style/index.js +1 -0
- package/lib/button/style/style.css +638 -0
- package/lib/button/style/style.min.css +1 -0
- package/lib/button-group/index.js +19 -0
- package/lib/button-group/index.min.js +1 -0
- package/lib/button-group/style/index.js +1 -0
- package/lib/button-group/style/style.css +27 -0
- package/lib/button-group/style/style.min.css +1 -0
- package/lib/calendar/index.js +19 -0
- package/lib/calendar/index.min.js +1 -0
- package/lib/calendar/src/calendar.js +1563 -0
- package/lib/calendar/src/calendar.min.js +1 -0
- package/lib/calendar/style/index.js +1 -0
- package/lib/calendar/style/style.css +350 -0
- package/lib/calendar/style/style.min.css +1 -0
- package/lib/card/index.js +19 -0
- package/lib/card/index.min.js +1 -0
- package/lib/card/src/card.js +151 -0
- package/lib/card/src/card.min.js +1 -0
- package/lib/card/style/index.js +1 -0
- package/lib/card/style/style.css +107 -0
- package/lib/card/style/style.min.css +1 -0
- package/lib/carousel/index.js +19 -0
- package/lib/carousel/index.min.js +1 -0
- package/lib/carousel/src/carousel-item.js +110 -0
- package/lib/carousel/src/carousel-item.min.js +1 -0
- package/lib/carousel/src/carousel.js +448 -0
- package/lib/carousel/src/carousel.min.js +1 -0
- package/lib/carousel/src/util.js +27 -0
- package/lib/carousel/src/util.min.js +1 -0
- package/lib/carousel/style/index.js +1 -0
- package/lib/carousel/style/style.css +185 -0
- package/lib/carousel/style/style.min.css +1 -0
- package/lib/carousel-item/index.js +19 -0
- package/lib/carousel-item/index.min.js +1 -0
- package/lib/carousel-item/style/index.js +1 -0
- package/lib/carousel-item/style/style.css +0 -0
- package/lib/carousel-item/style/style.min.css +0 -0
- package/lib/cascader/index.js +19 -0
- package/lib/cascader/index.min.js +1 -0
- package/lib/cascader/src/cascader.js +2097 -0
- package/lib/cascader/src/cascader.min.js +1 -0
- package/lib/cascader/src/util.js +15 -0
- package/lib/cascader/src/util.min.js +1 -0
- package/lib/cascader/style/index.js +1 -0
- package/lib/cascader/style/style.css +346 -0
- package/lib/cascader/style/style.min.css +1 -0
- package/lib/checkbox/index.js +19 -0
- package/lib/checkbox/index.min.js +1 -0
- package/lib/checkbox/src/button.js +239 -0
- package/lib/checkbox/src/button.min.js +1 -0
- package/lib/checkbox/src/checkbox.js +227 -0
- package/lib/checkbox/src/checkbox.min.js +1 -0
- package/lib/checkbox/src/group.js +300 -0
- package/lib/checkbox/src/group.min.js +1 -0
- package/lib/checkbox/style/index.js +1 -0
- package/lib/checkbox/style/style.css +113 -0
- package/lib/checkbox/style/style.min.css +1 -0
- package/lib/checkbox-button/index.js +19 -0
- package/lib/checkbox-button/index.min.js +1 -0
- package/lib/checkbox-button/style/index.js +1 -0
- package/lib/checkbox-button/style/style.css +202 -0
- package/lib/checkbox-button/style/style.min.css +1 -0
- package/lib/checkbox-group/index.js +19 -0
- package/lib/checkbox-group/index.min.js +1 -0
- package/lib/checkbox-group/style/index.js +1 -0
- package/lib/checkbox-group/style/style.css +0 -0
- package/lib/checkbox-group/style/style.min.css +0 -0
- package/lib/col/index.js +19 -0
- package/lib/col/index.min.js +1 -0
- package/lib/col/style/index.js +1 -0
- package/lib/col/style/style.css +0 -0
- package/lib/col/style/style.min.css +0 -0
- package/lib/collapse/index.js +19 -0
- package/lib/collapse/index.min.js +1 -0
- package/lib/collapse/src/collapse-pane.js +126 -0
- package/lib/collapse/src/collapse-pane.min.js +1 -0
- package/lib/collapse/src/collapse.js +377 -0
- package/lib/collapse/src/collapse.min.js +1 -0
- package/lib/collapse/src/util.js +29 -0
- package/lib/collapse/src/util.min.js +1 -0
- package/lib/collapse/style/index.js +1 -0
- package/lib/collapse/style/style.css +83 -0
- package/lib/collapse/style/style.min.css +1 -0
- package/lib/collapse-pane/index.js +19 -0
- package/lib/collapse-pane/index.min.js +1 -0
- package/lib/collapse-pane/style/index.js +1 -0
- package/lib/collapse-pane/style/style.css +0 -0
- package/lib/collapse-pane/style/style.min.css +0 -0
- package/lib/color-picker/index.js +19 -0
- package/lib/color-picker/index.min.js +1 -0
- package/lib/color-picker/src/color-picker.js +1183 -0
- package/lib/color-picker/src/color-picker.min.js +1 -0
- package/lib/color-picker/src/util.js +215 -0
- package/lib/color-picker/src/util.min.js +1 -0
- package/lib/color-picker/style/index.js +1 -0
- package/lib/color-picker/style/style.css +485 -0
- package/lib/color-picker/style/style.min.css +1 -0
- package/lib/components.js +1154 -0
- package/lib/components.min.js +1 -0
- package/lib/context-menu/index.js +56 -0
- package/lib/context-menu/index.min.js +1 -0
- package/lib/context-menu/src/context-menu.js +682 -0
- package/lib/context-menu/src/context-menu.min.js +1 -0
- package/lib/context-menu/style/index.js +1 -0
- package/lib/context-menu/style/style.css +109 -0
- package/lib/context-menu/style/style.min.css +1 -0
- package/lib/countdown/index.js +19 -0
- package/lib/countdown/index.min.js +1 -0
- package/lib/countdown/src/countdown.js +251 -0
- package/lib/countdown/src/countdown.min.js +1 -0
- package/lib/countdown/style/index.js +1 -0
- package/lib/countdown/style/style.css +38 -0
- package/lib/countdown/style/style.min.css +1 -0
- package/lib/date-panel/index.js +19 -0
- package/lib/date-panel/index.min.js +1 -0
- package/lib/date-panel/src/date-panel.js +2132 -0
- package/lib/date-panel/src/date-panel.min.js +1 -0
- package/lib/date-panel/src/util.js +327 -0
- package/lib/date-panel/src/util.min.js +1 -0
- package/lib/date-panel/style/index.js +1 -0
- package/lib/date-panel/style/style.css +453 -0
- package/lib/date-panel/style/style.min.css +1 -0
- package/lib/date-picker/index.js +20 -0
- package/lib/date-picker/index.min.js +1 -0
- package/lib/date-picker/src/date-picker.js +1878 -0
- package/lib/date-picker/src/date-picker.min.js +1 -0
- package/lib/date-picker/style/index.js +1 -0
- package/lib/date-picker/style/style.css +283 -0
- package/lib/date-picker/style/style.min.css +1 -0
- package/lib/date-range-picker/index.js +19 -0
- package/lib/date-range-picker/index.min.js +1 -0
- package/lib/date-range-picker/src/date-range-picker.js +1722 -0
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -0
- package/lib/date-range-picker/style/index.js +1 -0
- package/lib/date-range-picker/style/style.css +289 -0
- package/lib/date-range-picker/style/style.min.css +1 -0
- package/lib/drawer/index.js +84 -0
- package/lib/drawer/index.min.js +1 -0
- package/lib/drawer/src/drawer.js +801 -0
- package/lib/drawer/src/drawer.min.js +1 -0
- package/lib/drawer/style/index.js +1 -0
- package/lib/drawer/style/style.css +270 -0
- package/lib/drawer/style/style.min.css +1 -0
- package/lib/dynamics/index.js +110 -0
- package/lib/dynamics/index.min.js +1 -0
- package/lib/empty/index.js +19 -0
- package/lib/empty/index.min.js +1 -0
- package/lib/empty/src/empty.js +78 -0
- package/lib/empty/src/empty.min.js +1 -0
- package/lib/empty/style/index.js +1 -0
- package/lib/empty/style/style.css +54 -0
- package/lib/empty/style/style.min.css +1 -0
- package/lib/form/index.js +19 -0
- package/lib/form/index.min.js +1 -0
- package/lib/form/render/index.js +650 -0
- package/lib/form/render/index.min.js +1 -0
- package/lib/form/src/form-config-item.js +87 -0
- package/lib/form/src/form-config-item.min.js +1 -0
- package/lib/form/src/form-group.js +125 -0
- package/lib/form/src/form-group.min.js +1 -0
- package/lib/form/src/form-item.js +211 -0
- package/lib/form/src/form-item.min.js +1 -0
- package/lib/form/src/form.js +1130 -0
- package/lib/form/src/form.min.js +1 -0
- package/lib/form/src/itemInfo.js +95 -0
- package/lib/form/src/itemInfo.min.js +1 -0
- package/lib/form/src/render.js +406 -0
- package/lib/form/src/render.min.js +1 -0
- package/lib/form/src/util.js +106 -0
- package/lib/form/src/util.min.js +1 -0
- package/lib/form/style/index.js +1 -0
- package/lib/form/style/style.css +621 -0
- package/lib/form/style/style.min.css +1 -0
- package/lib/form-gather/index.js +22 -0
- package/lib/form-gather/index.min.js +1 -0
- package/lib/form-gather/style/index.js +1 -0
- package/lib/form-gather/style/style.css +0 -0
- package/lib/form-gather/style/style.min.css +0 -0
- package/lib/form-group/index.js +19 -0
- package/lib/form-group/index.min.js +1 -0
- package/lib/form-group/style/index.js +1 -0
- package/lib/form-group/style/style.css +0 -0
- package/lib/form-group/style/style.min.css +0 -0
- package/lib/form-item/index.js +19 -0
- package/lib/form-item/index.min.js +1 -0
- package/lib/form-item/style/index.js +1 -0
- package/lib/form-item/style/style.css +0 -0
- package/lib/form-item/style/style.min.css +0 -0
- package/lib/icon/index.js +19 -0
- package/lib/icon/index.min.js +1 -0
- package/lib/icon/src/icon.js +75 -0
- package/lib/icon/src/icon.min.js +1 -0
- package/lib/icon/style/iconfont.1783571795939.ttf +0 -0
- package/lib/icon/style/iconfont.1783571795939.woff +0 -0
- package/lib/icon/style/iconfont.1783571795939.woff2 +0 -0
- package/lib/icon/style/index.js +1 -0
- package/lib/icon/style/style.css +1034 -0
- package/lib/icon/style/style.min.css +1034 -0
- package/lib/icon-picker/index.js +19 -0
- package/lib/icon-picker/index.min.js +1 -0
- package/lib/icon-picker/src/icon-picker.js +829 -0
- package/lib/icon-picker/src/icon-picker.min.js +1 -0
- package/lib/icon-picker/style/index.js +1 -0
- package/lib/icon-picker/style/style.css +242 -0
- package/lib/icon-picker/style/style.min.css +1 -0
- package/lib/iconfont.1783571795939.ttf +0 -0
- package/lib/iconfont.1783571795939.woff +0 -0
- package/lib/iconfont.1783571795939.woff2 +0 -0
- package/lib/image/index.js +19 -0
- package/lib/image/index.min.js +1 -0
- package/lib/image/src/group.js +171 -0
- package/lib/image/src/group.min.js +1 -0
- package/lib/image/src/image.js +317 -0
- package/lib/image/src/image.min.js +1 -0
- package/lib/image/src/preview.js +683 -0
- package/lib/image/src/preview.min.js +1 -0
- package/lib/image/src/util.js +70 -0
- package/lib/image/src/util.min.js +1 -0
- package/lib/image/style/index.js +1 -0
- package/lib/image/style/style.css +17 -0
- package/lib/image/style/style.min.css +1 -0
- package/lib/image-group/index.js +19 -0
- package/lib/image-group/index.min.js +1 -0
- package/lib/image-group/style/index.js +1 -0
- package/lib/image-group/style/style.css +3 -0
- package/lib/image-group/style/style.min.css +1 -0
- package/lib/image-preview/index.js +21 -0
- package/lib/image-preview/index.min.js +1 -0
- package/lib/image-preview/style/index.js +1 -0
- package/lib/image-preview/style/style.css +218 -0
- package/lib/image-preview/style/style.min.css +1 -0
- package/lib/index.common.js +25 -0
- package/lib/index.umd.js +70070 -0
- package/lib/index.umd.min.js +1 -0
- package/lib/input/index.js +19 -0
- package/lib/input/index.min.js +1 -0
- package/lib/input/src/input.js +3098 -0
- package/lib/input/src/input.min.js +1 -0
- package/lib/input/style/index.js +1 -0
- package/lib/input/style/style.css +1025 -0
- package/lib/input/style/style.min.css +1 -0
- package/lib/language/ar-EG.d.ts +2 -0
- package/lib/language/ar-EG.js +880 -0
- package/lib/language/ar-EG.min.js +1 -0
- package/lib/language/ar-EG.umd.js +894 -0
- package/lib/language/de-DE.d.ts +2 -0
- package/lib/language/de-DE.js +880 -0
- package/lib/language/de-DE.min.js +1 -0
- package/lib/language/de-DE.umd.js +894 -0
- package/lib/language/en-US.d.ts +2 -0
- package/lib/language/en-US.js +880 -0
- package/lib/language/en-US.min.js +1 -0
- package/lib/language/en-US.umd.js +894 -0
- package/lib/language/es-ES.d.ts +2 -0
- package/lib/language/es-ES.js +880 -0
- package/lib/language/es-ES.min.js +1 -0
- package/lib/language/es-ES.umd.js +894 -0
- package/lib/language/fr-FR.d.ts +2 -0
- package/lib/language/fr-FR.js +880 -0
- package/lib/language/fr-FR.min.js +1 -0
- package/lib/language/fr-FR.umd.js +894 -0
- package/lib/language/hu-HU.d.ts +2 -0
- package/lib/language/hu-HU.js +880 -0
- package/lib/language/hu-HU.min.js +1 -0
- package/lib/language/hu-HU.umd.js +894 -0
- package/lib/language/hy-AM.d.ts +2 -0
- package/lib/language/hy-AM.js +880 -0
- package/lib/language/hy-AM.min.js +1 -0
- package/lib/language/hy-AM.umd.js +894 -0
- package/lib/language/id-ID.d.ts +2 -0
- package/lib/language/id-ID.js +880 -0
- package/lib/language/id-ID.min.js +1 -0
- package/lib/language/id-ID.umd.js +894 -0
- package/lib/language/it-IT.d.ts +2 -0
- package/lib/language/it-IT.js +880 -0
- package/lib/language/it-IT.min.js +1 -0
- package/lib/language/it-IT.umd.js +894 -0
- package/lib/language/ja-JP.d.ts +2 -0
- package/lib/language/ja-JP.js +880 -0
- package/lib/language/ja-JP.min.js +1 -0
- package/lib/language/ja-JP.umd.js +894 -0
- package/lib/language/ko-KR.d.ts +2 -0
- package/lib/language/ko-KR.js +880 -0
- package/lib/language/ko-KR.min.js +1 -0
- package/lib/language/ko-KR.umd.js +894 -0
- package/lib/language/ms-MY.d.ts +2 -0
- package/lib/language/ms-MY.js +880 -0
- package/lib/language/ms-MY.min.js +1 -0
- package/lib/language/ms-MY.umd.js +894 -0
- package/lib/language/nb-NO.d.ts +2 -0
- package/lib/language/nb-NO.js +880 -0
- package/lib/language/nb-NO.min.js +1 -0
- package/lib/language/nb-NO.umd.js +894 -0
- package/lib/language/pt-BR.d.ts +2 -0
- package/lib/language/pt-BR.js +880 -0
- package/lib/language/pt-BR.min.js +1 -0
- package/lib/language/pt-BR.umd.js +894 -0
- package/lib/language/ru-RU.d.ts +2 -0
- package/lib/language/ru-RU.js +880 -0
- package/lib/language/ru-RU.min.js +1 -0
- package/lib/language/ru-RU.umd.js +894 -0
- package/lib/language/th-TH.d.ts +2 -0
- package/lib/language/th-TH.js +880 -0
- package/lib/language/th-TH.min.js +1 -0
- package/lib/language/th-TH.umd.js +894 -0
- package/lib/language/ug-CN.d.ts +2 -0
- package/lib/language/ug-CN.js +880 -0
- package/lib/language/ug-CN.min.js +1 -0
- package/lib/language/ug-CN.umd.js +894 -0
- package/lib/language/uk-UA.d.ts +2 -0
- package/lib/language/uk-UA.js +880 -0
- package/lib/language/uk-UA.min.js +1 -0
- package/lib/language/uk-UA.umd.js +894 -0
- package/lib/language/uz-UZ.d.ts +2 -0
- package/lib/language/uz-UZ.js +880 -0
- package/lib/language/uz-UZ.min.js +1 -0
- package/lib/language/uz-UZ.umd.js +894 -0
- package/lib/language/vi-VN.d.ts +2 -0
- package/lib/language/vi-VN.js +880 -0
- package/lib/language/vi-VN.min.js +1 -0
- package/lib/language/vi-VN.umd.js +894 -0
- package/lib/language/zh-CHT.d.ts +2 -0
- package/lib/language/zh-CHT.js +880 -0
- package/lib/language/zh-CHT.min.js +1 -0
- package/lib/language/zh-CHT.umd.js +894 -0
- package/lib/language/zh-CN.d.ts +2 -0
- package/lib/language/zh-CN.js +880 -0
- package/lib/language/zh-CN.min.js +1 -0
- package/lib/language/zh-CN.umd.js +894 -0
- package/lib/language/zh-HK.d.ts +2 -0
- package/lib/language/zh-HK.js +9 -0
- package/lib/language/zh-HK.min.js +1 -0
- package/lib/language/zh-HK.umd.js +23 -0
- package/lib/language/zh-MO.d.ts +2 -0
- package/lib/language/zh-MO.js +9 -0
- package/lib/language/zh-MO.min.js +1 -0
- package/lib/language/zh-MO.umd.js +23 -0
- package/lib/language/zh-TC.js +9 -0
- package/lib/language/zh-TC.min.js +1 -0
- package/lib/language/zh-TW.d.ts +2 -0
- package/lib/language/zh-TW.js +9 -0
- package/lib/language/zh-TW.min.js +1 -0
- package/lib/language/zh-TW.umd.js +23 -0
- package/lib/layout-aside/index.js +19 -0
- package/lib/layout-aside/index.min.js +1 -0
- package/lib/layout-aside/src/layout-aside.js +120 -0
- package/lib/layout-aside/src/layout-aside.min.js +1 -0
- package/lib/layout-aside/style/index.js +1 -0
- package/lib/layout-aside/style/style.css +26 -0
- package/lib/layout-aside/style/style.min.css +1 -0
- package/lib/layout-body/index.js +19 -0
- package/lib/layout-body/index.min.js +1 -0
- package/lib/layout-body/src/layout-body.js +141 -0
- package/lib/layout-body/src/layout-body.min.js +1 -0
- package/lib/layout-body/style/index.js +1 -0
- package/lib/layout-body/style/style.css +16 -0
- package/lib/layout-body/style/style.min.css +1 -0
- package/lib/layout-container/index.js +19 -0
- package/lib/layout-container/index.min.js +1 -0
- package/lib/layout-container/src/layout-container.js +65 -0
- package/lib/layout-container/src/layout-container.min.js +1 -0
- package/lib/layout-container/style/index.js +1 -0
- package/lib/layout-container/style/style.css +28 -0
- package/lib/layout-container/style/style.min.css +1 -0
- package/lib/layout-footer/index.js +19 -0
- package/lib/layout-footer/index.min.js +1 -0
- package/lib/layout-footer/src/layout-footer.js +56 -0
- package/lib/layout-footer/src/layout-footer.min.js +1 -0
- package/lib/layout-footer/style/index.js +1 -0
- package/lib/layout-footer/style/style.css +14 -0
- package/lib/layout-footer/style/style.min.css +1 -0
- package/lib/layout-header/index.js +19 -0
- package/lib/layout-header/index.min.js +1 -0
- package/lib/layout-header/src/layout-header.js +53 -0
- package/lib/layout-header/src/layout-header.min.js +1 -0
- package/lib/layout-header/style/index.js +1 -0
- package/lib/layout-header/style/style.css +11 -0
- package/lib/layout-header/style/style.min.css +1 -0
- package/lib/link/index.js +19 -0
- package/lib/link/index.min.js +1 -0
- package/lib/link/src/link.js +138 -0
- package/lib/link/src/link.min.js +1 -0
- package/lib/link/style/index.js +1 -0
- package/lib/link/style/style.css +111 -0
- package/lib/link/style/style.min.css +1 -0
- package/lib/list/index.js +19 -0
- package/lib/list/index.min.js +1 -0
- package/lib/list/src/list.js +2412 -0
- package/lib/list/src/list.min.js +1 -0
- package/lib/list/src/store.js +15 -0
- package/lib/list/src/store.min.js +1 -0
- package/lib/list/src/util.js +14 -0
- package/lib/list/src/util.min.js +1 -0
- package/lib/list/style/index.js +1 -0
- package/lib/list/style/style.css +379 -0
- package/lib/list/style/style.min.css +1 -0
- package/lib/loading/index.js +34 -0
- package/lib/loading/index.min.js +1 -0
- package/lib/loading/src/loading.js +151 -0
- package/lib/loading/src/loading.min.js +1 -0
- package/lib/loading/style/index.js +1 -0
- package/lib/loading/style/style.css +120 -0
- package/lib/loading/style/style.min.css +1 -0
- package/lib/mention/index.js +19 -0
- package/lib/mention/index.min.js +1 -0
- package/lib/mention/src/mention.js +54 -0
- package/lib/mention/src/mention.min.js +1 -0
- package/lib/mention/style/index.js +1 -0
- package/lib/mention/style/style.css +0 -0
- package/lib/mention/style/style.min.css +0 -0
- package/lib/menu/index.js +19 -0
- package/lib/menu/index.min.js +1 -0
- package/lib/menu/src/menu.js +613 -0
- package/lib/menu/src/menu.min.js +1 -0
- package/lib/menu/style/index.js +1 -0
- package/lib/menu/style/style.css +140 -0
- package/lib/menu/style/style.min.css +1 -0
- package/lib/modal/index.js +149 -0
- package/lib/modal/index.min.js +1 -0
- package/lib/modal/src/modal.js +1730 -0
- package/lib/modal/src/modal.min.js +1 -0
- package/lib/modal/style/index.js +1 -0
- package/lib/modal/style/style.css +415 -0
- package/lib/modal/style/style.min.css +1 -0
- package/lib/notice-bar/index.js +19 -0
- package/lib/notice-bar/index.min.js +1 -0
- package/lib/notice-bar/src/notice-bar.js +175 -0
- package/lib/notice-bar/src/notice-bar.min.js +1 -0
- package/lib/notice-bar/style/index.js +1 -0
- package/lib/notice-bar/style/style.css +78 -0
- package/lib/notice-bar/style/style.min.css +1 -0
- package/lib/number-input/index.js +19 -0
- package/lib/number-input/index.min.js +1 -0
- package/lib/number-input/src/number-input.js +1227 -0
- package/lib/number-input/src/number-input.min.js +1 -0
- package/lib/number-input/src/util.js +29 -0
- package/lib/number-input/src/util.min.js +1 -0
- package/lib/number-input/style/index.js +1 -0
- package/lib/number-input/style/style.css +274 -0
- package/lib/number-input/style/style.min.css +1 -0
- package/lib/optgroup/index.js +19 -0
- package/lib/optgroup/index.min.js +1 -0
- package/lib/optgroup/style/index.js +1 -0
- package/lib/optgroup/style/style.css +0 -0
- package/lib/optgroup/style/style.min.css +0 -0
- package/lib/option/index.js +19 -0
- package/lib/option/index.min.js +1 -0
- package/lib/option/style/index.js +1 -0
- package/lib/option/style/style.css +0 -0
- package/lib/option/style/style.min.css +0 -0
- package/lib/pager/index.js +19 -0
- package/lib/pager/index.min.js +1 -0
- package/lib/pager/src/pager.js +951 -0
- package/lib/pager/src/pager.min.js +1 -0
- package/lib/pager/style/index.js +1 -0
- package/lib/pager/style/style.css +341 -0
- package/lib/pager/style/style.min.css +1 -0
- package/lib/password-input/index.js +19 -0
- package/lib/password-input/index.min.js +1 -0
- package/lib/password-input/src/password-input.js +438 -0
- package/lib/password-input/src/password-input.min.js +1 -0
- package/lib/password-input/style/index.js +1 -0
- package/lib/password-input/style/style.css +598 -0
- package/lib/password-input/style/style.min.css +1 -0
- package/lib/print/index.js +21 -0
- package/lib/print/index.min.js +1 -0
- package/lib/print/src/page-break.js +76 -0
- package/lib/print/src/page-break.min.js +1 -0
- package/lib/print/src/print.js +258 -0
- package/lib/print/src/print.min.js +1 -0
- package/lib/print/src/util.js +239 -0
- package/lib/print/src/util.min.js +1 -0
- package/lib/print/style/index.js +1 -0
- package/lib/print/style/style.css +4 -0
- package/lib/print/style/style.min.css +1 -0
- package/lib/print-page-break/index.js +17 -0
- package/lib/print-page-break/index.min.js +1 -0
- package/lib/print-page-break/style/index.js +1 -0
- package/lib/print-page-break/style/style.css +0 -0
- package/lib/print-page-break/style/style.min.css +0 -0
- package/lib/pulldown/index.js +19 -0
- package/lib/pulldown/index.min.js +1 -0
- package/lib/pulldown/src/pulldown.js +522 -0
- package/lib/pulldown/src/pulldown.min.js +1 -0
- package/lib/pulldown/style/index.js +1 -0
- package/lib/pulldown/style/style.css +109 -0
- package/lib/pulldown/style/style.min.css +1 -0
- package/lib/radio/index.js +19 -0
- package/lib/radio/index.min.js +1 -0
- package/lib/radio/src/button.js +263 -0
- package/lib/radio/src/button.min.js +1 -0
- package/lib/radio/src/group.js +283 -0
- package/lib/radio/src/group.min.js +1 -0
- package/lib/radio/src/radio.js +252 -0
- package/lib/radio/src/radio.min.js +1 -0
- package/lib/radio/style/index.js +1 -0
- package/lib/radio/style/style.css +108 -0
- package/lib/radio/style/style.min.css +1 -0
- package/lib/radio-button/index.js +19 -0
- package/lib/radio-button/index.min.js +1 -0
- package/lib/radio-button/style/index.js +1 -0
- package/lib/radio-button/style/style.css +202 -0
- package/lib/radio-button/style/style.min.css +1 -0
- package/lib/radio-group/index.js +19 -0
- package/lib/radio-group/index.min.js +1 -0
- package/lib/radio-group/style/index.js +1 -0
- package/lib/radio-group/style/style.css +0 -0
- package/lib/radio-group/style/style.min.css +0 -0
- package/lib/rate/index.js +19 -0
- package/lib/rate/index.min.js +1 -0
- package/lib/rate/src/rate.js +187 -0
- package/lib/rate/src/rate.min.js +1 -0
- package/lib/rate/style/index.js +1 -0
- package/lib/rate/style/style.css +54 -0
- package/lib/rate/style/style.min.css +1 -0
- package/lib/result/index.js +19 -0
- package/lib/result/index.min.js +1 -0
- package/lib/result/src/result.js +88 -0
- package/lib/result/src/result.min.js +1 -0
- package/lib/result/style/index.js +1 -0
- package/lib/result/style/style.css +68 -0
- package/lib/result/style/style.min.css +1 -0
- package/lib/row/index.js +19 -0
- package/lib/row/index.min.js +1 -0
- package/lib/row/src/col.js +138 -0
- package/lib/row/src/col.min.js +1 -0
- package/lib/row/src/row.js +122 -0
- package/lib/row/src/row.min.js +1 -0
- package/lib/row/style/index.js +1 -0
- package/lib/row/style/style.css +116 -0
- package/lib/row/style/style.min.css +1 -0
- package/lib/segmented/index.js +19 -0
- package/lib/segmented/index.min.js +1 -0
- package/lib/segmented/src/segmented.js +260 -0
- package/lib/segmented/src/segmented.min.js +1 -0
- package/lib/segmented/style/index.js +1 -0
- package/lib/segmented/style/style.css +197 -0
- package/lib/segmented/style/style.min.css +1 -0
- package/lib/select/index.js +19 -0
- package/lib/select/index.min.js +1 -0
- package/lib/select/src/optgroup.js +98 -0
- package/lib/select/src/optgroup.min.js +1 -0
- package/lib/select/src/option-info.js +33 -0
- package/lib/select/src/option-info.min.js +1 -0
- package/lib/select/src/option.js +94 -0
- package/lib/select/src/option.min.js +1 -0
- package/lib/select/src/select.js +2112 -0
- package/lib/select/src/select.min.js +1 -0
- package/lib/select/src/util.js +51 -0
- package/lib/select/src/util.min.js +1 -0
- package/lib/select/style/index.js +1 -0
- package/lib/select/style/style.css +370 -0
- package/lib/select/style/style.min.css +1 -0
- package/lib/slider/index.js +19 -0
- package/lib/slider/index.min.js +1 -0
- package/lib/slider/src/slider.js +336 -0
- package/lib/slider/src/slider.min.js +1 -0
- package/lib/slider/style/index.js +1 -0
- package/lib/slider/style/style.css +143 -0
- package/lib/slider/style/style.min.css +1 -0
- package/lib/split/index.js +19 -0
- package/lib/split/index.min.js +1 -0
- package/lib/split/style/index.js +1 -0
- package/lib/split/style/style.css +295 -0
- package/lib/split/style/style.min.css +1 -0
- package/lib/split-pane/index.js +20 -0
- package/lib/split-pane/index.min.js +1 -0
- package/lib/split-pane/style/index.js +1 -0
- package/lib/split-pane/style/style.css +0 -0
- package/lib/split-pane/style/style.min.css +0 -0
- package/lib/splitter/index.js +19 -0
- package/lib/splitter/index.min.js +1 -0
- package/lib/splitter/src/splitter-panel.js +161 -0
- package/lib/splitter/src/splitter-panel.min.js +1 -0
- package/lib/splitter/src/splitter.js +1036 -0
- package/lib/splitter/src/splitter.min.js +1 -0
- package/lib/splitter/src/util.js +27 -0
- package/lib/splitter/src/util.min.js +1 -0
- package/lib/splitter/style/index.js +1 -0
- package/lib/splitter/style/style.css +295 -0
- package/lib/splitter/style/style.min.css +1 -0
- package/lib/splitter-panel/index.js +19 -0
- package/lib/splitter-panel/index.min.js +1 -0
- package/lib/splitter-panel/style/index.js +1 -0
- package/lib/splitter-panel/style/style.css +0 -0
- package/lib/splitter-panel/style/style.min.css +0 -0
- package/lib/steps/index.js +19 -0
- package/lib/steps/index.min.js +1 -0
- package/lib/steps/src/steps.js +58 -0
- package/lib/steps/src/steps.min.js +1 -0
- package/lib/steps/style/index.js +1 -0
- package/lib/steps/style/style.css +0 -0
- package/lib/steps/style/style.min.css +0 -0
- package/lib/style.css +1 -0
- package/lib/style.min.css +1 -0
- package/lib/switch/index.js +19 -0
- package/lib/switch/index.min.js +1 -0
- package/lib/switch/src/switch.js +256 -0
- package/lib/switch/src/switch.min.js +1 -0
- package/lib/switch/style/index.js +1 -0
- package/lib/switch/style/style.css +111 -0
- package/lib/switch/style/style.min.css +1 -0
- package/lib/tab-pane/index.js +19 -0
- package/lib/tab-pane/index.min.js +1 -0
- package/lib/tab-pane/style/index.js +1 -0
- package/lib/tab-pane/style/style.css +0 -0
- package/lib/tab-pane/style/style.min.css +0 -0
- package/lib/table-select/index.js +19 -0
- package/lib/table-select/index.min.js +1 -0
- package/lib/table-select/src/table-select.js +871 -0
- package/lib/table-select/src/table-select.min.js +1 -0
- package/lib/table-select/style/index.js +1 -0
- package/lib/table-select/style/style.css +134 -0
- package/lib/table-select/style/style.min.css +1 -0
- package/lib/table-transfer/index.js +19 -0
- package/lib/table-transfer/index.min.js +1 -0
- package/lib/table-transfer/src/table-transfer.js +84 -0
- package/lib/table-transfer/src/table-transfer.min.js +1 -0
- package/lib/table-transfer/style/index.js +1 -0
- package/lib/table-transfer/style/style.css +0 -0
- package/lib/table-transfer/style/style.min.css +0 -0
- package/lib/tabs/index.js +19 -0
- package/lib/tabs/index.min.js +1 -0
- package/lib/tabs/src/tab-pane.js +129 -0
- package/lib/tabs/src/tab-pane.min.js +1 -0
- package/lib/tabs/src/tabs.js +1031 -0
- package/lib/tabs/src/tabs.min.js +1 -0
- package/lib/tabs/src/util.js +29 -0
- package/lib/tabs/src/util.min.js +1 -0
- package/lib/tabs/style/index.js +1 -0
- package/lib/tabs/style/style.css +705 -0
- package/lib/tabs/style/style.min.css +1 -0
- package/lib/tag/index.js +19 -0
- package/lib/tag/index.min.js +1 -0
- package/lib/tag/src/tag.js +183 -0
- package/lib/tag/src/tag.min.js +1 -0
- package/lib/tag/style/index.js +1 -0
- package/lib/tag/style/style.css +187 -0
- package/lib/tag/style/style.min.css +1 -0
- package/lib/text/index.js +19 -0
- package/lib/text/index.min.js +1 -0
- package/lib/text/src/text.js +244 -0
- package/lib/text/src/text.min.js +1 -0
- package/lib/text/style/index.js +1 -0
- package/lib/text/style/style.css +138 -0
- package/lib/text/style/style.min.css +1 -0
- package/lib/text-ellipsis/index.js +19 -0
- package/lib/text-ellipsis/index.min.js +1 -0
- package/lib/text-ellipsis/src/text-ellipsis.js +282 -0
- package/lib/text-ellipsis/src/text-ellipsis.min.js +1 -0
- package/lib/text-ellipsis/style/index.js +1 -0
- package/lib/text-ellipsis/style/style.css +115 -0
- package/lib/text-ellipsis/style/style.min.css +1 -0
- package/lib/textarea/index.js +19 -0
- package/lib/textarea/index.min.js +1 -0
- package/lib/textarea/src/textarea.js +491 -0
- package/lib/textarea/src/textarea.min.js +1 -0
- package/lib/textarea/style/index.js +1 -0
- package/lib/textarea/style/style.css +119 -0
- package/lib/textarea/style/style.min.css +1 -0
- package/lib/timeline/index.js +19 -0
- package/lib/timeline/index.min.js +1 -0
- package/lib/timeline/src/timeline-item.js +45 -0
- package/lib/timeline/src/timeline-item.min.js +1 -0
- package/lib/timeline/src/timeline.js +54 -0
- package/lib/timeline/src/timeline.min.js +1 -0
- package/lib/timeline/style/index.js +1 -0
- package/lib/timeline/style/style.css +0 -0
- package/lib/timeline/style/style.min.css +0 -0
- package/lib/timeline-item/index.js +19 -0
- package/lib/timeline-item/index.min.js +1 -0
- package/lib/timeline-item/style/index.js +1 -0
- package/lib/timeline-item/style/style.css +0 -0
- package/lib/timeline-item/style/style.min.css +0 -0
- package/lib/tip/index.js +21 -0
- package/lib/tip/index.min.js +1 -0
- package/lib/tip/src/tip.js +102 -0
- package/lib/tip/src/tip.min.js +1 -0
- package/lib/tip/style/index.js +1 -0
- package/lib/tip/style/style.css +107 -0
- package/lib/tip/style/style.min.css +1 -0
- package/lib/tooltip/index.js +19 -0
- package/lib/tooltip/index.min.js +1 -0
- package/lib/tooltip/src/tooltip.js +721 -0
- package/lib/tooltip/src/tooltip.min.js +1 -0
- package/lib/tooltip/style/index.js +1 -0
- package/lib/tooltip/style/style.css +117 -0
- package/lib/tooltip/style/style.min.css +1 -0
- package/lib/tour/index.js +19 -0
- package/lib/tour/index.min.js +1 -0
- package/lib/tour/src/tour.js +54 -0
- package/lib/tour/src/tour.min.js +1 -0
- package/lib/tour/style/index.js +1 -0
- package/lib/tour/style/style.css +0 -0
- package/lib/tour/style/style.min.css +0 -0
- package/lib/transfer/index.js +19 -0
- package/lib/transfer/index.min.js +1 -0
- package/lib/transfer/src/transfer.js +93 -0
- package/lib/transfer/src/transfer.min.js +1 -0
- package/lib/transfer/style/index.js +1 -0
- package/lib/transfer/style/style.css +0 -0
- package/lib/transfer/style/style.min.css +0 -0
- package/lib/tree/index.js +19 -0
- package/lib/tree/index.min.js +1 -0
- package/lib/tree/src/store.js +15 -0
- package/lib/tree/src/store.min.js +1 -0
- package/lib/tree/src/tree.js +3952 -0
- package/lib/tree/src/tree.min.js +1 -0
- package/lib/tree/src/util.js +53 -0
- package/lib/tree/src/util.min.js +1 -0
- package/lib/tree/style/index.js +1 -0
- package/lib/tree/style/style.css +385 -0
- package/lib/tree/style/style.min.css +1 -0
- package/lib/tree-select/index.js +19 -0
- package/lib/tree-select/index.min.js +1 -0
- package/lib/tree-select/src/tree-select.js +1205 -0
- package/lib/tree-select/src/tree-select.min.js +1 -0
- package/lib/tree-select/style/index.js +1 -0
- package/lib/tree-select/style/style.css +194 -0
- package/lib/tree-select/style/style.min.css +1 -0
- package/lib/ui/index.js +719 -0
- package/lib/ui/index.min.js +1 -0
- package/lib/ui/src/anime.js +64 -0
- package/lib/ui/src/anime.min.js +1 -0
- package/lib/ui/src/comp.js +9 -0
- package/lib/ui/src/comp.min.js +1 -0
- package/lib/ui/src/dom.js +304 -0
- package/lib/ui/src/dom.min.js +1 -0
- package/lib/ui/src/log.js +22 -0
- package/lib/ui/src/log.min.js +1 -0
- package/lib/ui/src/utils.js +70 -0
- package/lib/ui/src/utils.min.js +1 -0
- package/lib/ui/src/vn.js +63 -0
- package/lib/ui/src/vn.min.js +1 -0
- package/lib/ui/style/index.js +1 -0
- package/lib/ui/style/style.css +0 -0
- package/lib/ui/style/style.min.css +0 -0
- package/lib/upload/index.js +22 -0
- package/lib/upload/index.min.js +1 -0
- package/lib/upload/src/upload.js +2174 -0
- package/lib/upload/src/upload.min.js +1 -0
- package/lib/upload/src/util.js +130 -0
- package/lib/upload/src/util.min.js +1 -0
- package/lib/upload/style/index.js +1 -0
- package/lib/upload/style/style.css +483 -0
- package/lib/upload/style/style.min.css +1 -0
- package/lib/vxe-alert/index.js +22 -0
- package/lib/vxe-alert/index.min.js +1 -0
- package/lib/vxe-alert/style/index.js +1 -0
- package/lib/vxe-alert/style/style.css +129 -0
- package/lib/vxe-alert/style/style.min.css +1 -0
- package/lib/vxe-anchor/index.js +22 -0
- package/lib/vxe-anchor/index.min.js +1 -0
- package/lib/vxe-anchor/style/index.js +1 -0
- package/lib/vxe-anchor/style/style.css +42 -0
- package/lib/vxe-anchor/style/style.min.css +1 -0
- package/lib/vxe-anchor-link/index.js +22 -0
- package/lib/vxe-anchor-link/index.min.js +1 -0
- package/lib/vxe-anchor-link/style/index.js +1 -0
- package/lib/vxe-anchor-link/style/style.css +0 -0
- package/lib/vxe-anchor-link/style/style.min.css +0 -0
- package/lib/vxe-avatar/index.js +22 -0
- package/lib/vxe-avatar/index.min.js +1 -0
- package/lib/vxe-avatar/style/index.js +1 -0
- package/lib/vxe-avatar/style/style.css +98 -0
- package/lib/vxe-avatar/style/style.min.css +1 -0
- package/lib/vxe-backtop/index.js +22 -0
- package/lib/vxe-backtop/index.min.js +1 -0
- package/lib/vxe-backtop/style/index.js +1 -0
- package/lib/vxe-backtop/style/style.css +72 -0
- package/lib/vxe-backtop/style/style.min.css +1 -0
- package/lib/vxe-badge/index.js +22 -0
- package/lib/vxe-badge/index.min.js +1 -0
- package/lib/vxe-badge/style/index.js +1 -0
- package/lib/vxe-badge/style/style.css +42 -0
- package/lib/vxe-badge/style/style.min.css +1 -0
- package/lib/vxe-breadcrumb/index.js +22 -0
- package/lib/vxe-breadcrumb/index.min.js +1 -0
- package/lib/vxe-breadcrumb/style/index.js +1 -0
- package/lib/vxe-breadcrumb/style/style.css +33 -0
- package/lib/vxe-breadcrumb/style/style.min.css +1 -0
- package/lib/vxe-breadcrumb-item/index.js +22 -0
- package/lib/vxe-breadcrumb-item/index.min.js +1 -0
- package/lib/vxe-breadcrumb-item/style/index.js +1 -0
- package/lib/vxe-breadcrumb-item/style/style.css +0 -0
- package/lib/vxe-breadcrumb-item/style/style.min.css +0 -0
- package/lib/vxe-button/index.js +22 -0
- package/lib/vxe-button/index.min.js +1 -0
- package/lib/vxe-button/style/index.js +1 -0
- package/lib/vxe-button/style/style.css +638 -0
- package/lib/vxe-button/style/style.min.css +1 -0
- package/lib/vxe-button-group/index.js +22 -0
- package/lib/vxe-button-group/index.min.js +1 -0
- package/lib/vxe-button-group/style/index.js +1 -0
- package/lib/vxe-button-group/style/style.css +27 -0
- package/lib/vxe-button-group/style/style.min.css +1 -0
- package/lib/vxe-calendar/index.js +22 -0
- package/lib/vxe-calendar/index.min.js +1 -0
- package/lib/vxe-calendar/style/index.js +1 -0
- package/lib/vxe-calendar/style/style.css +350 -0
- package/lib/vxe-calendar/style/style.min.css +1 -0
- package/lib/vxe-card/index.js +22 -0
- package/lib/vxe-card/index.min.js +1 -0
- package/lib/vxe-card/style/index.js +1 -0
- package/lib/vxe-card/style/style.css +107 -0
- package/lib/vxe-card/style/style.min.css +1 -0
- package/lib/vxe-carousel/index.js +22 -0
- package/lib/vxe-carousel/index.min.js +1 -0
- package/lib/vxe-carousel/style/index.js +1 -0
- package/lib/vxe-carousel/style/style.css +185 -0
- package/lib/vxe-carousel/style/style.min.css +1 -0
- package/lib/vxe-carousel-item/index.js +22 -0
- package/lib/vxe-carousel-item/index.min.js +1 -0
- package/lib/vxe-carousel-item/style/index.js +1 -0
- package/lib/vxe-carousel-item/style/style.css +0 -0
- package/lib/vxe-carousel-item/style/style.min.css +0 -0
- package/lib/vxe-cascader/index.js +22 -0
- package/lib/vxe-cascader/index.min.js +1 -0
- package/lib/vxe-cascader/style/index.js +1 -0
- package/lib/vxe-cascader/style/style.css +346 -0
- package/lib/vxe-cascader/style/style.min.css +1 -0
- package/lib/vxe-checkbox/index.js +22 -0
- package/lib/vxe-checkbox/index.min.js +1 -0
- package/lib/vxe-checkbox/style/index.js +1 -0
- package/lib/vxe-checkbox/style/style.css +113 -0
- package/lib/vxe-checkbox/style/style.min.css +1 -0
- package/lib/vxe-checkbox-button/index.js +22 -0
- package/lib/vxe-checkbox-button/index.min.js +1 -0
- package/lib/vxe-checkbox-button/style/index.js +1 -0
- package/lib/vxe-checkbox-button/style/style.css +202 -0
- package/lib/vxe-checkbox-button/style/style.min.css +1 -0
- package/lib/vxe-checkbox-group/index.js +22 -0
- package/lib/vxe-checkbox-group/index.min.js +1 -0
- package/lib/vxe-checkbox-group/style/index.js +1 -0
- package/lib/vxe-checkbox-group/style/style.css +0 -0
- package/lib/vxe-checkbox-group/style/style.min.css +0 -0
- package/lib/vxe-col/index.js +22 -0
- package/lib/vxe-col/index.min.js +1 -0
- package/lib/vxe-col/style/index.js +1 -0
- package/lib/vxe-col/style/style.css +0 -0
- package/lib/vxe-col/style/style.min.css +0 -0
- package/lib/vxe-collapse/index.js +22 -0
- package/lib/vxe-collapse/index.min.js +1 -0
- package/lib/vxe-collapse/style/index.js +1 -0
- package/lib/vxe-collapse/style/style.css +83 -0
- package/lib/vxe-collapse/style/style.min.css +1 -0
- package/lib/vxe-collapse-pane/index.js +22 -0
- package/lib/vxe-collapse-pane/index.min.js +1 -0
- package/lib/vxe-collapse-pane/style/index.js +1 -0
- package/lib/vxe-collapse-pane/style/style.css +0 -0
- package/lib/vxe-collapse-pane/style/style.min.css +0 -0
- package/lib/vxe-color-picker/index.js +22 -0
- package/lib/vxe-color-picker/index.min.js +1 -0
- package/lib/vxe-color-picker/style/index.js +1 -0
- package/lib/vxe-color-picker/style/style.css +485 -0
- package/lib/vxe-color-picker/style/style.min.css +1 -0
- package/lib/vxe-context-menu/index.js +22 -0
- package/lib/vxe-context-menu/index.min.js +1 -0
- package/lib/vxe-context-menu/style/index.js +1 -0
- package/lib/vxe-context-menu/style/style.css +109 -0
- package/lib/vxe-context-menu/style/style.min.css +1 -0
- package/lib/vxe-countdown/index.js +22 -0
- package/lib/vxe-countdown/index.min.js +1 -0
- package/lib/vxe-countdown/style/index.js +1 -0
- package/lib/vxe-countdown/style/style.css +38 -0
- package/lib/vxe-countdown/style/style.min.css +1 -0
- package/lib/vxe-date-panel/index.js +22 -0
- package/lib/vxe-date-panel/index.min.js +1 -0
- package/lib/vxe-date-panel/style/index.js +1 -0
- package/lib/vxe-date-panel/style/style.css +453 -0
- package/lib/vxe-date-panel/style/style.min.css +1 -0
- package/lib/vxe-date-picker/index.js +22 -0
- package/lib/vxe-date-picker/index.min.js +1 -0
- package/lib/vxe-date-picker/style/index.js +1 -0
- package/lib/vxe-date-picker/style/style.css +283 -0
- package/lib/vxe-date-picker/style/style.min.css +1 -0
- package/lib/vxe-date-range-picker/index.js +22 -0
- package/lib/vxe-date-range-picker/index.min.js +1 -0
- package/lib/vxe-date-range-picker/style/index.js +1 -0
- package/lib/vxe-date-range-picker/style/style.css +289 -0
- package/lib/vxe-date-range-picker/style/style.min.css +1 -0
- package/lib/vxe-drawer/index.js +22 -0
- package/lib/vxe-drawer/index.min.js +1 -0
- package/lib/vxe-drawer/style/index.js +1 -0
- package/lib/vxe-drawer/style/style.css +270 -0
- package/lib/vxe-drawer/style/style.min.css +1 -0
- package/lib/vxe-empty/index.js +22 -0
- package/lib/vxe-empty/index.min.js +1 -0
- package/lib/vxe-empty/style/index.js +1 -0
- package/lib/vxe-empty/style/style.css +54 -0
- package/lib/vxe-empty/style/style.min.css +1 -0
- package/lib/vxe-form/index.js +22 -0
- package/lib/vxe-form/index.min.js +1 -0
- package/lib/vxe-form/style/index.js +1 -0
- package/lib/vxe-form/style/style.css +621 -0
- package/lib/vxe-form/style/style.min.css +1 -0
- package/lib/vxe-form-gather/index.js +22 -0
- package/lib/vxe-form-gather/index.min.js +1 -0
- package/lib/vxe-form-gather/style/index.js +1 -0
- package/lib/vxe-form-gather/style/style.css +0 -0
- package/lib/vxe-form-gather/style/style.min.css +0 -0
- package/lib/vxe-form-group/index.js +22 -0
- package/lib/vxe-form-group/index.min.js +1 -0
- package/lib/vxe-form-group/style/index.js +1 -0
- package/lib/vxe-form-group/style/style.css +0 -0
- package/lib/vxe-form-group/style/style.min.css +0 -0
- package/lib/vxe-form-item/index.js +22 -0
- package/lib/vxe-form-item/index.min.js +1 -0
- package/lib/vxe-form-item/style/index.js +1 -0
- package/lib/vxe-form-item/style/style.css +0 -0
- package/lib/vxe-form-item/style/style.min.css +0 -0
- package/lib/vxe-icon/index.js +22 -0
- package/lib/vxe-icon/index.min.js +1 -0
- package/lib/vxe-icon/style/index.js +1 -0
- package/lib/vxe-icon/style/style.css +1034 -0
- package/lib/vxe-icon/style/style.min.css +1 -0
- package/lib/vxe-icon-picker/index.js +22 -0
- package/lib/vxe-icon-picker/index.min.js +1 -0
- package/lib/vxe-icon-picker/style/index.js +1 -0
- package/lib/vxe-icon-picker/style/style.css +242 -0
- package/lib/vxe-icon-picker/style/style.min.css +1 -0
- package/lib/vxe-image/index.js +22 -0
- package/lib/vxe-image/index.min.js +1 -0
- package/lib/vxe-image/style/index.js +1 -0
- package/lib/vxe-image/style/style.css +17 -0
- package/lib/vxe-image/style/style.min.css +1 -0
- package/lib/vxe-image-group/index.js +22 -0
- package/lib/vxe-image-group/index.min.js +1 -0
- package/lib/vxe-image-group/style/index.js +1 -0
- package/lib/vxe-image-group/style/style.css +3 -0
- package/lib/vxe-image-group/style/style.min.css +1 -0
- package/lib/vxe-image-preview/index.js +22 -0
- package/lib/vxe-image-preview/index.min.js +1 -0
- package/lib/vxe-image-preview/style/index.js +1 -0
- package/lib/vxe-image-preview/style/style.css +218 -0
- package/lib/vxe-image-preview/style/style.min.css +1 -0
- package/lib/vxe-input/index.js +22 -0
- package/lib/vxe-input/index.min.js +1 -0
- package/lib/vxe-input/style/index.js +1 -0
- package/lib/vxe-input/style/style.css +1025 -0
- package/lib/vxe-input/style/style.min.css +1 -0
- package/lib/vxe-layout-aside/index.js +22 -0
- package/lib/vxe-layout-aside/index.min.js +1 -0
- package/lib/vxe-layout-aside/style/index.js +1 -0
- package/lib/vxe-layout-aside/style/style.css +26 -0
- package/lib/vxe-layout-aside/style/style.min.css +1 -0
- package/lib/vxe-layout-body/index.js +22 -0
- package/lib/vxe-layout-body/index.min.js +1 -0
- package/lib/vxe-layout-body/style/index.js +1 -0
- package/lib/vxe-layout-body/style/style.css +16 -0
- package/lib/vxe-layout-body/style/style.min.css +1 -0
- package/lib/vxe-layout-container/index.js +22 -0
- package/lib/vxe-layout-container/index.min.js +1 -0
- package/lib/vxe-layout-container/style/index.js +1 -0
- package/lib/vxe-layout-container/style/style.css +28 -0
- package/lib/vxe-layout-container/style/style.min.css +1 -0
- package/lib/vxe-layout-footer/index.js +22 -0
- package/lib/vxe-layout-footer/index.min.js +1 -0
- package/lib/vxe-layout-footer/style/index.js +1 -0
- package/lib/vxe-layout-footer/style/style.css +14 -0
- package/lib/vxe-layout-footer/style/style.min.css +1 -0
- package/lib/vxe-layout-header/index.js +22 -0
- package/lib/vxe-layout-header/index.min.js +1 -0
- package/lib/vxe-layout-header/style/index.js +1 -0
- package/lib/vxe-layout-header/style/style.css +11 -0
- package/lib/vxe-layout-header/style/style.min.css +1 -0
- package/lib/vxe-link/index.js +22 -0
- package/lib/vxe-link/index.min.js +1 -0
- package/lib/vxe-link/style/index.js +1 -0
- package/lib/vxe-link/style/style.css +111 -0
- package/lib/vxe-link/style/style.min.css +1 -0
- package/lib/vxe-list/index.js +22 -0
- package/lib/vxe-list/index.min.js +1 -0
- package/lib/vxe-list/style/index.js +1 -0
- package/lib/vxe-list/style/style.css +379 -0
- package/lib/vxe-list/style/style.min.css +1 -0
- package/lib/vxe-loading/index.js +22 -0
- package/lib/vxe-loading/index.min.js +1 -0
- package/lib/vxe-loading/style/index.js +1 -0
- package/lib/vxe-loading/style/style.css +120 -0
- package/lib/vxe-loading/style/style.min.css +1 -0
- package/lib/vxe-mention/index.js +22 -0
- package/lib/vxe-mention/index.min.js +1 -0
- package/lib/vxe-mention/style/index.js +1 -0
- package/lib/vxe-mention/style/style.css +0 -0
- package/lib/vxe-mention/style/style.min.css +0 -0
- package/lib/vxe-menu/index.js +22 -0
- package/lib/vxe-menu/index.min.js +1 -0
- package/lib/vxe-menu/style/index.js +1 -0
- package/lib/vxe-menu/style/style.css +140 -0
- package/lib/vxe-menu/style/style.min.css +1 -0
- package/lib/vxe-modal/index.js +22 -0
- package/lib/vxe-modal/index.min.js +1 -0
- package/lib/vxe-modal/style/index.js +1 -0
- package/lib/vxe-modal/style/style.css +415 -0
- package/lib/vxe-modal/style/style.min.css +1 -0
- package/lib/vxe-notice-bar/index.js +22 -0
- package/lib/vxe-notice-bar/index.min.js +1 -0
- package/lib/vxe-notice-bar/style/index.js +1 -0
- package/lib/vxe-notice-bar/style/style.css +78 -0
- package/lib/vxe-notice-bar/style/style.min.css +1 -0
- package/lib/vxe-number-input/index.js +22 -0
- package/lib/vxe-number-input/index.min.js +1 -0
- package/lib/vxe-number-input/style/index.js +1 -0
- package/lib/vxe-number-input/style/style.css +274 -0
- package/lib/vxe-number-input/style/style.min.css +1 -0
- package/lib/vxe-optgroup/index.js +22 -0
- package/lib/vxe-optgroup/index.min.js +1 -0
- package/lib/vxe-optgroup/style/index.js +1 -0
- package/lib/vxe-optgroup/style/style.css +0 -0
- package/lib/vxe-optgroup/style/style.min.css +0 -0
- package/lib/vxe-option/index.js +22 -0
- package/lib/vxe-option/index.min.js +1 -0
- package/lib/vxe-option/style/index.js +1 -0
- package/lib/vxe-option/style/style.css +0 -0
- package/lib/vxe-option/style/style.min.css +0 -0
- package/lib/vxe-pager/index.js +22 -0
- package/lib/vxe-pager/index.min.js +1 -0
- package/lib/vxe-pager/style/index.js +1 -0
- package/lib/vxe-pager/style/style.css +341 -0
- package/lib/vxe-pager/style/style.min.css +1 -0
- package/lib/vxe-password-input/index.js +22 -0
- package/lib/vxe-password-input/index.min.js +1 -0
- package/lib/vxe-password-input/style/index.js +1 -0
- package/lib/vxe-password-input/style/style.css +598 -0
- package/lib/vxe-password-input/style/style.min.css +1 -0
- package/lib/vxe-print/index.js +22 -0
- package/lib/vxe-print/index.min.js +1 -0
- package/lib/vxe-print/style/index.js +1 -0
- package/lib/vxe-print/style/style.css +4 -0
- package/lib/vxe-print/style/style.min.css +1 -0
- package/lib/vxe-print-page-break/index.js +22 -0
- package/lib/vxe-print-page-break/index.min.js +1 -0
- package/lib/vxe-print-page-break/style/index.js +1 -0
- package/lib/vxe-print-page-break/style/style.css +0 -0
- package/lib/vxe-print-page-break/style/style.min.css +0 -0
- package/lib/vxe-pulldown/index.js +22 -0
- package/lib/vxe-pulldown/index.min.js +1 -0
- package/lib/vxe-pulldown/style/index.js +1 -0
- package/lib/vxe-pulldown/style/style.css +109 -0
- package/lib/vxe-pulldown/style/style.min.css +1 -0
- package/lib/vxe-radio/index.js +22 -0
- package/lib/vxe-radio/index.min.js +1 -0
- package/lib/vxe-radio/style/index.js +1 -0
- package/lib/vxe-radio/style/style.css +108 -0
- package/lib/vxe-radio/style/style.min.css +1 -0
- package/lib/vxe-radio-button/index.js +22 -0
- package/lib/vxe-radio-button/index.min.js +1 -0
- package/lib/vxe-radio-button/style/index.js +1 -0
- package/lib/vxe-radio-button/style/style.css +202 -0
- package/lib/vxe-radio-button/style/style.min.css +1 -0
- package/lib/vxe-radio-group/index.js +22 -0
- package/lib/vxe-radio-group/index.min.js +1 -0
- package/lib/vxe-radio-group/style/index.js +1 -0
- package/lib/vxe-radio-group/style/style.css +0 -0
- package/lib/vxe-radio-group/style/style.min.css +0 -0
- package/lib/vxe-rate/index.js +22 -0
- package/lib/vxe-rate/index.min.js +1 -0
- package/lib/vxe-rate/style/index.js +1 -0
- package/lib/vxe-rate/style/style.css +54 -0
- package/lib/vxe-rate/style/style.min.css +1 -0
- package/lib/vxe-result/index.js +22 -0
- package/lib/vxe-result/index.min.js +1 -0
- package/lib/vxe-result/style/index.js +1 -0
- package/lib/vxe-result/style/style.css +68 -0
- package/lib/vxe-result/style/style.min.css +1 -0
- package/lib/vxe-row/index.js +22 -0
- package/lib/vxe-row/index.min.js +1 -0
- package/lib/vxe-row/style/index.js +1 -0
- package/lib/vxe-row/style/style.css +116 -0
- package/lib/vxe-row/style/style.min.css +1 -0
- package/lib/vxe-segmented/index.js +22 -0
- package/lib/vxe-segmented/index.min.js +1 -0
- package/lib/vxe-segmented/style/index.js +1 -0
- package/lib/vxe-segmented/style/style.css +197 -0
- package/lib/vxe-segmented/style/style.min.css +1 -0
- package/lib/vxe-select/index.js +22 -0
- package/lib/vxe-select/index.min.js +1 -0
- package/lib/vxe-select/style/index.js +1 -0
- package/lib/vxe-select/style/style.css +370 -0
- package/lib/vxe-select/style/style.min.css +1 -0
- package/lib/vxe-slider/index.js +22 -0
- package/lib/vxe-slider/index.min.js +1 -0
- package/lib/vxe-slider/style/index.js +1 -0
- package/lib/vxe-slider/style/style.css +143 -0
- package/lib/vxe-slider/style/style.min.css +1 -0
- package/lib/vxe-split/index.js +22 -0
- package/lib/vxe-split/index.min.js +1 -0
- package/lib/vxe-split/style/index.js +1 -0
- package/lib/vxe-split/style/style.css +295 -0
- package/lib/vxe-split/style/style.min.css +1 -0
- package/lib/vxe-split-pane/index.js +22 -0
- package/lib/vxe-split-pane/index.min.js +1 -0
- package/lib/vxe-split-pane/style/index.js +1 -0
- package/lib/vxe-split-pane/style/style.css +0 -0
- package/lib/vxe-split-pane/style/style.min.css +0 -0
- package/lib/vxe-splitter/index.js +22 -0
- package/lib/vxe-splitter/index.min.js +1 -0
- package/lib/vxe-splitter/style/index.js +1 -0
- package/lib/vxe-splitter/style/style.css +295 -0
- package/lib/vxe-splitter/style/style.min.css +1 -0
- package/lib/vxe-splitter-panel/index.js +22 -0
- package/lib/vxe-splitter-panel/index.min.js +1 -0
- package/lib/vxe-splitter-panel/style/index.js +1 -0
- package/lib/vxe-splitter-panel/style/style.css +0 -0
- package/lib/vxe-splitter-panel/style/style.min.css +0 -0
- package/lib/vxe-steps/index.js +22 -0
- package/lib/vxe-steps/index.min.js +1 -0
- package/lib/vxe-steps/style/index.js +1 -0
- package/lib/vxe-steps/style/style.css +0 -0
- package/lib/vxe-steps/style/style.min.css +0 -0
- package/lib/vxe-switch/index.js +22 -0
- package/lib/vxe-switch/index.min.js +1 -0
- package/lib/vxe-switch/style/index.js +1 -0
- package/lib/vxe-switch/style/style.css +111 -0
- package/lib/vxe-switch/style/style.min.css +1 -0
- package/lib/vxe-tab-pane/index.js +22 -0
- package/lib/vxe-tab-pane/index.min.js +1 -0
- package/lib/vxe-tab-pane/style/index.js +1 -0
- package/lib/vxe-tab-pane/style/style.css +0 -0
- package/lib/vxe-tab-pane/style/style.min.css +0 -0
- package/lib/vxe-table-select/index.js +22 -0
- package/lib/vxe-table-select/index.min.js +1 -0
- package/lib/vxe-table-select/style/index.js +1 -0
- package/lib/vxe-table-select/style/style.css +134 -0
- package/lib/vxe-table-select/style/style.min.css +1 -0
- package/lib/vxe-table-transfer/index.js +22 -0
- package/lib/vxe-table-transfer/index.min.js +1 -0
- package/lib/vxe-table-transfer/style/index.js +1 -0
- package/lib/vxe-table-transfer/style/style.css +0 -0
- package/lib/vxe-table-transfer/style/style.min.css +0 -0
- package/lib/vxe-tabs/index.js +22 -0
- package/lib/vxe-tabs/index.min.js +1 -0
- package/lib/vxe-tabs/style/index.js +1 -0
- package/lib/vxe-tabs/style/style.css +705 -0
- package/lib/vxe-tabs/style/style.min.css +1 -0
- package/lib/vxe-tag/index.js +22 -0
- package/lib/vxe-tag/index.min.js +1 -0
- package/lib/vxe-tag/style/index.js +1 -0
- package/lib/vxe-tag/style/style.css +187 -0
- package/lib/vxe-tag/style/style.min.css +1 -0
- package/lib/vxe-text/index.js +22 -0
- package/lib/vxe-text/index.min.js +1 -0
- package/lib/vxe-text/style/index.js +1 -0
- package/lib/vxe-text/style/style.css +138 -0
- package/lib/vxe-text/style/style.min.css +1 -0
- package/lib/vxe-text-ellipsis/index.js +22 -0
- package/lib/vxe-text-ellipsis/index.min.js +1 -0
- package/lib/vxe-text-ellipsis/style/index.js +1 -0
- package/lib/vxe-text-ellipsis/style/style.css +115 -0
- package/lib/vxe-text-ellipsis/style/style.min.css +1 -0
- package/lib/vxe-textarea/index.js +22 -0
- package/lib/vxe-textarea/index.min.js +1 -0
- package/lib/vxe-textarea/style/index.js +1 -0
- package/lib/vxe-textarea/style/style.css +119 -0
- package/lib/vxe-textarea/style/style.min.css +1 -0
- package/lib/vxe-timeline/index.js +22 -0
- package/lib/vxe-timeline/index.min.js +1 -0
- package/lib/vxe-timeline/style/index.js +1 -0
- package/lib/vxe-timeline/style/style.css +0 -0
- package/lib/vxe-timeline/style/style.min.css +0 -0
- package/lib/vxe-timeline-item/index.js +22 -0
- package/lib/vxe-timeline-item/index.min.js +1 -0
- package/lib/vxe-timeline-item/style/index.js +1 -0
- package/lib/vxe-timeline-item/style/style.css +0 -0
- package/lib/vxe-timeline-item/style/style.min.css +0 -0
- package/lib/vxe-tip/index.js +22 -0
- package/lib/vxe-tip/index.min.js +1 -0
- package/lib/vxe-tip/style/index.js +1 -0
- package/lib/vxe-tip/style/style.css +107 -0
- package/lib/vxe-tip/style/style.min.css +1 -0
- package/lib/vxe-tooltip/index.js +22 -0
- package/lib/vxe-tooltip/index.min.js +1 -0
- package/lib/vxe-tooltip/style/index.js +1 -0
- package/lib/vxe-tooltip/style/style.css +117 -0
- package/lib/vxe-tooltip/style/style.min.css +1 -0
- package/lib/vxe-tour/index.js +22 -0
- package/lib/vxe-tour/index.min.js +1 -0
- package/lib/vxe-tour/style/index.js +1 -0
- package/lib/vxe-tour/style/style.css +0 -0
- package/lib/vxe-tour/style/style.min.css +0 -0
- package/lib/vxe-transfer/index.js +22 -0
- package/lib/vxe-transfer/index.min.js +1 -0
- package/lib/vxe-transfer/style/index.js +1 -0
- package/lib/vxe-transfer/style/style.css +0 -0
- package/lib/vxe-transfer/style/style.min.css +0 -0
- package/lib/vxe-tree/index.js +22 -0
- package/lib/vxe-tree/index.min.js +1 -0
- package/lib/vxe-tree/style/index.js +1 -0
- package/lib/vxe-tree/style/style.css +385 -0
- package/lib/vxe-tree/style/style.min.css +1 -0
- package/lib/vxe-tree-select/index.js +22 -0
- package/lib/vxe-tree-select/index.min.js +1 -0
- package/lib/vxe-tree-select/style/index.js +1 -0
- package/lib/vxe-tree-select/style/style.css +194 -0
- package/lib/vxe-tree-select/style/style.min.css +1 -0
- package/lib/vxe-u-i/index.js +22 -0
- package/lib/vxe-u-i/index.min.js +1 -0
- package/lib/vxe-ui/index.js +22 -0
- package/lib/vxe-ui/index.min.js +1 -0
- package/lib/vxe-ui/style/index.js +1 -0
- package/lib/vxe-ui/style/style.css +0 -0
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/lib/vxe-upload/index.js +22 -0
- package/lib/vxe-upload/index.min.js +1 -0
- package/lib/vxe-upload/style/index.js +1 -0
- package/lib/vxe-upload/style/style.css +483 -0
- package/lib/vxe-upload/style/style.min.css +1 -0
- package/lib/vxe-watermark/index.js +22 -0
- package/lib/vxe-watermark/index.min.js +1 -0
- package/lib/vxe-watermark/style/index.js +1 -0
- package/lib/vxe-watermark/style/style.css +30 -0
- package/lib/vxe-watermark/style/style.min.css +1 -0
- package/lib/watermark/index.js +31 -0
- package/lib/watermark/index.min.js +1 -0
- package/lib/watermark/src/util.js +164 -0
- package/lib/watermark/src/util.min.js +1 -0
- package/lib/watermark/src/watermark.js +170 -0
- package/lib/watermark/src/watermark.min.js +1 -0
- package/lib/watermark/style/index.js +1 -0
- package/lib/watermark/style/style.css +30 -0
- package/lib/watermark/style/style.min.css +1 -0
- package/package.json +1 -1
- package/packages/cascader/src/cascader.ts +7 -9
- package/packages/upload/src/upload.ts +5 -3
- package/types/all.d.ts +75 -1
|
@@ -0,0 +1,2080 @@
|
|
|
1
|
+
import { defineVxeComponent } from '../../ui/src/comp';
|
|
2
|
+
import XEUtils from 'xe-utils';
|
|
3
|
+
import { VxeUI, getConfig, getI18n, getIcon, globalMixins, createEvent, globalEvents, renderEmptyElement } from '../../ui';
|
|
4
|
+
import { getSlotVNs } from '../../ui/src/vn';
|
|
5
|
+
import { createComponentLog } from '../../ui/src/log';
|
|
6
|
+
import { initTpImg, getTpImg, getEventTargetNode, toCssUnit } from '../../ui/src/dom';
|
|
7
|
+
import { readLocalFile } from './util';
|
|
8
|
+
import VxeButtonComponent from '../../button/src/button';
|
|
9
|
+
const { warnLog, errLog } = createComponentLog('upload');
|
|
10
|
+
function getUniqueKey() {
|
|
11
|
+
return XEUtils.uniqueId();
|
|
12
|
+
}
|
|
13
|
+
function handleTransferFiles(items) {
|
|
14
|
+
const files = [];
|
|
15
|
+
XEUtils.arrayEach(items, item => {
|
|
16
|
+
const file = item.getAsFile();
|
|
17
|
+
if (file) {
|
|
18
|
+
files.push(file);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return files;
|
|
22
|
+
}
|
|
23
|
+
function showDropTip($xeUpload, evnt, dragEl, dragPos) {
|
|
24
|
+
const { xID } = $xeUpload;
|
|
25
|
+
const reactData = $xeUpload.reactData;
|
|
26
|
+
const { showMorePopup } = reactData;
|
|
27
|
+
const el = $xeUpload.$refs.refElem;
|
|
28
|
+
const popupEl = document.getElementById(`refPopupElem${xID}`);
|
|
29
|
+
const wrapperEl = showMorePopup ? popupEl : el;
|
|
30
|
+
if (!wrapperEl) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const wrapperRect = wrapperEl.getBoundingClientRect();
|
|
34
|
+
const ddLineEl = $xeUpload.$refs.refDragLineElem;
|
|
35
|
+
const mdLineEl = document.getElementById(`refModalDragLineElem${xID}`);
|
|
36
|
+
const currDLineEl = showMorePopup ? mdLineEl : ddLineEl;
|
|
37
|
+
if (currDLineEl) {
|
|
38
|
+
const dragRect = dragEl.getBoundingClientRect();
|
|
39
|
+
currDLineEl.style.display = 'block';
|
|
40
|
+
currDLineEl.style.top = `${Math.max(1, dragRect.y - wrapperRect.y)}px`;
|
|
41
|
+
currDLineEl.style.left = `${Math.max(1, dragRect.x - wrapperRect.x)}px`;
|
|
42
|
+
currDLineEl.style.height = `${dragRect.height}px`;
|
|
43
|
+
currDLineEl.style.width = `${dragRect.width - 1}px`;
|
|
44
|
+
currDLineEl.setAttribute('drag-pos', dragPos);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function hideDropTip($xeUpload) {
|
|
48
|
+
const { xID } = $xeUpload;
|
|
49
|
+
const ddLineEl = $xeUpload.$refs.refDragLineElem;
|
|
50
|
+
const mdLineEl = document.getElementById(`refModalDragLineElem${xID}`);
|
|
51
|
+
if (ddLineEl) {
|
|
52
|
+
ddLineEl.style.display = '';
|
|
53
|
+
}
|
|
54
|
+
if (mdLineEl) {
|
|
55
|
+
mdLineEl.style.display = '';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const handleClearFile = ($xeUpload, evnt) => {
|
|
59
|
+
const reactData = $xeUpload.reactData;
|
|
60
|
+
const { fileList } = reactData;
|
|
61
|
+
const urlProp = $xeUpload.computeUrlProp;
|
|
62
|
+
const rest = [];
|
|
63
|
+
XEUtils.lastEach(fileList, (item, index) => {
|
|
64
|
+
rest.push($xeUpload.removeFileEvent(evnt, item, index).then(status => {
|
|
65
|
+
return { url: item[urlProp], status };
|
|
66
|
+
}));
|
|
67
|
+
});
|
|
68
|
+
return Promise.all(rest);
|
|
69
|
+
};
|
|
70
|
+
function handleRemoveFile($xeUpload, evnt, urlOrItem) {
|
|
71
|
+
const reactData = $xeUpload.reactData;
|
|
72
|
+
const { fileList } = reactData;
|
|
73
|
+
const urlProp = $xeUpload.computeUrlProp;
|
|
74
|
+
const urls = (XEUtils.isArray(urlOrItem) ? urlOrItem : [urlOrItem]);
|
|
75
|
+
const rest = [];
|
|
76
|
+
urls.forEach((obj) => {
|
|
77
|
+
if (obj) {
|
|
78
|
+
const url = XEUtils.isString(obj) ? obj : obj[urlProp];
|
|
79
|
+
const index = XEUtils.findIndexOf(fileList, fileItem => fileItem[urlProp] === url);
|
|
80
|
+
if (index > -1) {
|
|
81
|
+
rest.push($xeUpload.removeFileEvent(evnt, fileList[index], index).then(status => {
|
|
82
|
+
return { url: url, status };
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
return Promise.all(rest);
|
|
88
|
+
}
|
|
89
|
+
function createReactData() {
|
|
90
|
+
return {
|
|
91
|
+
isDragUploadStatus: false,
|
|
92
|
+
showMorePopup: false,
|
|
93
|
+
isActivated: false,
|
|
94
|
+
fileList: [],
|
|
95
|
+
fileCacheMaps: {},
|
|
96
|
+
isDragMove: false,
|
|
97
|
+
dragIndex: -1,
|
|
98
|
+
dragTipText: ''
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function createInternalData() {
|
|
102
|
+
return {
|
|
103
|
+
moreId: XEUtils.uniqueId('upload'),
|
|
104
|
+
imagePreviewTypes: ['jpg', 'jpeg', 'png', 'gif'],
|
|
105
|
+
prevDragIndex: -1
|
|
106
|
+
// prevDragPos: ''
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export default {
|
|
110
|
+
name: 'VxeUpload',
|
|
111
|
+
model: {
|
|
112
|
+
prop: 'value',
|
|
113
|
+
event: 'modelValue'
|
|
114
|
+
},
|
|
115
|
+
mixins: [
|
|
116
|
+
globalMixins.sizeMixin
|
|
117
|
+
],
|
|
118
|
+
props: {
|
|
119
|
+
value: [Array, String, Object],
|
|
120
|
+
showList: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: () => getConfig().upload.showList
|
|
123
|
+
},
|
|
124
|
+
moreConfig: Object,
|
|
125
|
+
readonly: {
|
|
126
|
+
type: Boolean,
|
|
127
|
+
default: null
|
|
128
|
+
},
|
|
129
|
+
disabled: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: null
|
|
132
|
+
},
|
|
133
|
+
autoSubmit: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: () => getConfig().upload.autoSubmit
|
|
136
|
+
},
|
|
137
|
+
mode: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: () => getConfig().upload.mode
|
|
140
|
+
},
|
|
141
|
+
imageTypes: {
|
|
142
|
+
type: Array,
|
|
143
|
+
default: () => XEUtils.clone(getConfig().upload.imageTypes, true)
|
|
144
|
+
},
|
|
145
|
+
imageConfig: {
|
|
146
|
+
type: Object,
|
|
147
|
+
default: () => XEUtils.clone(getConfig().upload.imageConfig, true)
|
|
148
|
+
},
|
|
149
|
+
/**
|
|
150
|
+
* 已废弃,被 image-config 替换
|
|
151
|
+
* @deprecated
|
|
152
|
+
*/
|
|
153
|
+
imageStyle: {
|
|
154
|
+
type: Object,
|
|
155
|
+
default: () => XEUtils.clone(getConfig().upload.imageStyle, true)
|
|
156
|
+
},
|
|
157
|
+
fileTypes: {
|
|
158
|
+
type: Array,
|
|
159
|
+
default: () => XEUtils.clone(getConfig().upload.fileTypes, true)
|
|
160
|
+
},
|
|
161
|
+
dragSort: Boolean,
|
|
162
|
+
dragToUpload: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: () => XEUtils.clone(getConfig().upload.dragToUpload, true)
|
|
165
|
+
},
|
|
166
|
+
dragPlaceholder: {
|
|
167
|
+
type: String,
|
|
168
|
+
default: () => getConfig().upload.dragPlaceholder
|
|
169
|
+
},
|
|
170
|
+
pasteToUpload: {
|
|
171
|
+
type: Boolean,
|
|
172
|
+
default: () => XEUtils.clone(getConfig().upload.pasteToUpload, true)
|
|
173
|
+
},
|
|
174
|
+
keyField: String,
|
|
175
|
+
singleMode: Boolean,
|
|
176
|
+
urlMode: Boolean,
|
|
177
|
+
urlArgs: {
|
|
178
|
+
type: Boolean,
|
|
179
|
+
default: () => getConfig().upload.urlArgs
|
|
180
|
+
},
|
|
181
|
+
multiple: Boolean,
|
|
182
|
+
limitSize: {
|
|
183
|
+
type: [String, Number],
|
|
184
|
+
default: () => getConfig().upload.limitSize
|
|
185
|
+
},
|
|
186
|
+
showLimitSize: {
|
|
187
|
+
type: Boolean,
|
|
188
|
+
default: () => getConfig().upload.showLimitSize
|
|
189
|
+
},
|
|
190
|
+
limitSizeText: {
|
|
191
|
+
type: [String, Number, Function],
|
|
192
|
+
default: () => getConfig().upload.limitSizeText
|
|
193
|
+
},
|
|
194
|
+
limitCount: {
|
|
195
|
+
type: [String, Number],
|
|
196
|
+
default: () => getConfig().upload.limitCount
|
|
197
|
+
},
|
|
198
|
+
showLimitCount: {
|
|
199
|
+
type: Boolean,
|
|
200
|
+
default: () => getConfig().upload.showLimitCount
|
|
201
|
+
},
|
|
202
|
+
limitCountText: {
|
|
203
|
+
type: [String, Number, Function],
|
|
204
|
+
default: () => getConfig().upload.limitCountText
|
|
205
|
+
},
|
|
206
|
+
nameField: {
|
|
207
|
+
type: String,
|
|
208
|
+
default: () => getConfig().upload.nameField
|
|
209
|
+
},
|
|
210
|
+
typeField: {
|
|
211
|
+
type: String,
|
|
212
|
+
default: () => getConfig().upload.typeField
|
|
213
|
+
},
|
|
214
|
+
urlField: {
|
|
215
|
+
type: String,
|
|
216
|
+
default: () => getConfig().upload.urlField
|
|
217
|
+
},
|
|
218
|
+
sizeField: {
|
|
219
|
+
type: String,
|
|
220
|
+
default: () => getConfig().upload.sizeField
|
|
221
|
+
},
|
|
222
|
+
showErrorStatus: {
|
|
223
|
+
type: Boolean,
|
|
224
|
+
default: () => getConfig().upload.showErrorStatus
|
|
225
|
+
},
|
|
226
|
+
showProgress: {
|
|
227
|
+
type: Boolean,
|
|
228
|
+
default: () => getConfig().upload.showProgress
|
|
229
|
+
},
|
|
230
|
+
progressText: {
|
|
231
|
+
type: [String, Number, Function],
|
|
232
|
+
default: () => getConfig().upload.progressText
|
|
233
|
+
},
|
|
234
|
+
previewImageConfig: Object,
|
|
235
|
+
showSubmitButton: Boolean,
|
|
236
|
+
autoHiddenButton: {
|
|
237
|
+
type: Boolean,
|
|
238
|
+
default: () => getConfig().upload.autoHiddenButton
|
|
239
|
+
},
|
|
240
|
+
showUploadButton: {
|
|
241
|
+
type: Boolean,
|
|
242
|
+
default: () => getConfig().upload.showUploadButton
|
|
243
|
+
},
|
|
244
|
+
buttonText: {
|
|
245
|
+
type: [String, Number, Function],
|
|
246
|
+
default: () => getConfig().upload.buttonText
|
|
247
|
+
},
|
|
248
|
+
buttonIcon: {
|
|
249
|
+
type: String,
|
|
250
|
+
default: () => getConfig().upload.buttonIcon
|
|
251
|
+
},
|
|
252
|
+
showButtonText: {
|
|
253
|
+
type: Boolean,
|
|
254
|
+
default: () => getConfig().upload.showButtonText
|
|
255
|
+
},
|
|
256
|
+
showButtonIcon: {
|
|
257
|
+
type: Boolean,
|
|
258
|
+
default: () => getConfig().upload.showButtonIcon
|
|
259
|
+
},
|
|
260
|
+
showRemoveButton: {
|
|
261
|
+
type: Boolean,
|
|
262
|
+
default: () => getConfig().upload.showRemoveButton
|
|
263
|
+
},
|
|
264
|
+
showDownloadButton: {
|
|
265
|
+
type: Boolean,
|
|
266
|
+
default: () => getConfig().upload.showDownloadButton
|
|
267
|
+
},
|
|
268
|
+
showPreview: {
|
|
269
|
+
type: Boolean,
|
|
270
|
+
default: () => getConfig().upload.showPreview
|
|
271
|
+
},
|
|
272
|
+
showTip: {
|
|
273
|
+
type: Boolean,
|
|
274
|
+
default: () => getConfig().upload.showTip
|
|
275
|
+
},
|
|
276
|
+
maxSimultaneousUploads: {
|
|
277
|
+
type: Number,
|
|
278
|
+
default: () => getConfig().upload.maxSimultaneousUploads
|
|
279
|
+
},
|
|
280
|
+
tipText: [String, Number, Function],
|
|
281
|
+
hintText: String,
|
|
282
|
+
previewMethod: Function,
|
|
283
|
+
beforeSelectMethod: Function,
|
|
284
|
+
uploadMethod: Function,
|
|
285
|
+
beforeRemoveMethod: Function,
|
|
286
|
+
removeMethod: Function,
|
|
287
|
+
beforeDownloadMethod: Function,
|
|
288
|
+
downloadMethod: Function,
|
|
289
|
+
getUrlMethod: Function,
|
|
290
|
+
getThumbnailUrlMethod: Function,
|
|
291
|
+
size: {
|
|
292
|
+
type: String,
|
|
293
|
+
default: () => getConfig().upload.size || getConfig().size
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
inject: {
|
|
297
|
+
$xeForm: {
|
|
298
|
+
default: null
|
|
299
|
+
},
|
|
300
|
+
formItemInfo: {
|
|
301
|
+
from: 'xeFormItemInfo',
|
|
302
|
+
default: null
|
|
303
|
+
},
|
|
304
|
+
$xeTable: {
|
|
305
|
+
default: null
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
data() {
|
|
309
|
+
const xID = XEUtils.uniqueId();
|
|
310
|
+
const reactData = createReactData();
|
|
311
|
+
return Object.assign(Object.assign({}, {}), { xID,
|
|
312
|
+
reactData });
|
|
313
|
+
},
|
|
314
|
+
computed: Object.assign(Object.assign({}, {}), { computeFormReadonly() {
|
|
315
|
+
const $xeUpload = this;
|
|
316
|
+
const props = $xeUpload;
|
|
317
|
+
const $xeForm = $xeUpload.$xeForm;
|
|
318
|
+
const { readonly } = props;
|
|
319
|
+
if (readonly === null) {
|
|
320
|
+
if ($xeForm) {
|
|
321
|
+
return $xeForm.readonly;
|
|
322
|
+
}
|
|
323
|
+
return false;
|
|
324
|
+
}
|
|
325
|
+
return readonly;
|
|
326
|
+
},
|
|
327
|
+
computeIsDisabled() {
|
|
328
|
+
const $xeUpload = this;
|
|
329
|
+
const props = $xeUpload;
|
|
330
|
+
const $xeForm = $xeUpload.$xeForm;
|
|
331
|
+
const { disabled } = props;
|
|
332
|
+
if (disabled === null) {
|
|
333
|
+
if ($xeForm) {
|
|
334
|
+
return $xeForm.disabled;
|
|
335
|
+
}
|
|
336
|
+
return false;
|
|
337
|
+
}
|
|
338
|
+
return disabled;
|
|
339
|
+
},
|
|
340
|
+
computeKeyField() {
|
|
341
|
+
const $xeUpload = this;
|
|
342
|
+
const props = $xeUpload;
|
|
343
|
+
return props.keyField || '_X_KEY';
|
|
344
|
+
},
|
|
345
|
+
computeIsImage() {
|
|
346
|
+
const $xeUpload = this;
|
|
347
|
+
const props = $xeUpload;
|
|
348
|
+
return props.mode === 'image';
|
|
349
|
+
},
|
|
350
|
+
computeNameProp() {
|
|
351
|
+
const $xeUpload = this;
|
|
352
|
+
const props = $xeUpload;
|
|
353
|
+
return props.nameField || 'name';
|
|
354
|
+
},
|
|
355
|
+
computeTypeProp() {
|
|
356
|
+
const $xeUpload = this;
|
|
357
|
+
const props = $xeUpload;
|
|
358
|
+
return props.typeField || 'type';
|
|
359
|
+
},
|
|
360
|
+
computeUrlProp() {
|
|
361
|
+
const $xeUpload = this;
|
|
362
|
+
const props = $xeUpload;
|
|
363
|
+
return props.urlField || 'url';
|
|
364
|
+
},
|
|
365
|
+
computeSizeProp() {
|
|
366
|
+
const $xeUpload = this;
|
|
367
|
+
const props = $xeUpload;
|
|
368
|
+
return props.sizeField || 'size';
|
|
369
|
+
},
|
|
370
|
+
computeLimitMaxSize() {
|
|
371
|
+
const $xeUpload = this;
|
|
372
|
+
const props = $xeUpload;
|
|
373
|
+
return XEUtils.toNumber(props.limitSize) * 1024 * 1024;
|
|
374
|
+
},
|
|
375
|
+
computeLimitMaxCount() {
|
|
376
|
+
const $xeUpload = this;
|
|
377
|
+
const props = $xeUpload;
|
|
378
|
+
return props.multiple ? XEUtils.toNumber(props.limitCount) : 1;
|
|
379
|
+
},
|
|
380
|
+
computePreviewImageOpts() {
|
|
381
|
+
const $xeUpload = this;
|
|
382
|
+
const props = $xeUpload;
|
|
383
|
+
const { showDownloadButton } = props;
|
|
384
|
+
return Object.assign({
|
|
385
|
+
showDownloadButton
|
|
386
|
+
}, getConfig().upload.previewImageConfig, props.previewImageConfig);
|
|
387
|
+
},
|
|
388
|
+
computeOverCount() {
|
|
389
|
+
const $xeUpload = this;
|
|
390
|
+
const props = $xeUpload;
|
|
391
|
+
const reactData = $xeUpload.reactData;
|
|
392
|
+
const { multiple } = props;
|
|
393
|
+
const { fileList } = reactData;
|
|
394
|
+
const limitMaxCount = $xeUpload.computeLimitMaxCount;
|
|
395
|
+
if (multiple) {
|
|
396
|
+
if (limitMaxCount) {
|
|
397
|
+
return fileList.length >= limitMaxCount;
|
|
398
|
+
}
|
|
399
|
+
return true;
|
|
400
|
+
}
|
|
401
|
+
return fileList.length >= 1;
|
|
402
|
+
},
|
|
403
|
+
computeLimitSizeUnit() {
|
|
404
|
+
const $xeUpload = this;
|
|
405
|
+
const props = $xeUpload;
|
|
406
|
+
const limitSize = XEUtils.toNumber(props.limitSize);
|
|
407
|
+
if (limitSize) {
|
|
408
|
+
if (limitSize > 1048576) {
|
|
409
|
+
return `${limitSize / 1048576}T`;
|
|
410
|
+
}
|
|
411
|
+
if (limitSize > 1024) {
|
|
412
|
+
return `${limitSize / 1024}G`;
|
|
413
|
+
}
|
|
414
|
+
return `${limitSize}M`;
|
|
415
|
+
}
|
|
416
|
+
return '';
|
|
417
|
+
},
|
|
418
|
+
computedShowTipText() {
|
|
419
|
+
const $xeUpload = this;
|
|
420
|
+
const props = $xeUpload;
|
|
421
|
+
const { showTip, tipText } = props;
|
|
422
|
+
if (XEUtils.isBoolean(showTip)) {
|
|
423
|
+
return showTip;
|
|
424
|
+
}
|
|
425
|
+
const defShowTip = getConfig().upload.showTip;
|
|
426
|
+
if (XEUtils.isBoolean(defShowTip)) {
|
|
427
|
+
return defShowTip;
|
|
428
|
+
}
|
|
429
|
+
if (tipText) {
|
|
430
|
+
return true;
|
|
431
|
+
}
|
|
432
|
+
return false;
|
|
433
|
+
},
|
|
434
|
+
computedDefTipText() {
|
|
435
|
+
const $xeUpload = this;
|
|
436
|
+
const props = $xeUpload;
|
|
437
|
+
const { limitSize, fileTypes, multiple, limitCount } = props;
|
|
438
|
+
const tipText = props.tipText || props.hintText;
|
|
439
|
+
const isImage = $xeUpload.computeIsImage;
|
|
440
|
+
const limitSizeUnit = $xeUpload.computeLimitSizeUnit;
|
|
441
|
+
if (XEUtils.isString(tipText)) {
|
|
442
|
+
return tipText;
|
|
443
|
+
}
|
|
444
|
+
if (XEUtils.isFunction(tipText)) {
|
|
445
|
+
return `${tipText({})}`;
|
|
446
|
+
}
|
|
447
|
+
const defTips = [];
|
|
448
|
+
if (isImage) {
|
|
449
|
+
if (multiple && limitCount) {
|
|
450
|
+
defTips.push(getI18n('vxe.upload.imgCountHint', [limitCount]));
|
|
451
|
+
}
|
|
452
|
+
if (limitSize && limitSizeUnit) {
|
|
453
|
+
defTips.push(getI18n('vxe.upload.imgSizeHint', [limitSizeUnit]));
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
if (fileTypes && fileTypes.length) {
|
|
458
|
+
defTips.push(getI18n('vxe.upload.fileTypeHint', [fileTypes.join('/')]));
|
|
459
|
+
}
|
|
460
|
+
if (limitSize && limitSizeUnit) {
|
|
461
|
+
defTips.push(getI18n('vxe.upload.fileSizeHint', [limitSizeUnit]));
|
|
462
|
+
}
|
|
463
|
+
if (multiple && limitCount) {
|
|
464
|
+
defTips.push(getI18n('vxe.upload.fileCountHint', [limitCount]));
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
return defTips.join(getI18n('vxe.base.comma'));
|
|
468
|
+
},
|
|
469
|
+
computeImageOpts() {
|
|
470
|
+
const $xeUpload = this;
|
|
471
|
+
const props = $xeUpload;
|
|
472
|
+
return Object.assign({}, props.imageConfig || props.imageStyle);
|
|
473
|
+
},
|
|
474
|
+
computeImgStyle() {
|
|
475
|
+
const $xeUpload = this;
|
|
476
|
+
const imageOpts = $xeUpload.computeImageOpts;
|
|
477
|
+
const { width, height } = imageOpts;
|
|
478
|
+
const stys = {};
|
|
479
|
+
if (width) {
|
|
480
|
+
stys.width = toCssUnit(width);
|
|
481
|
+
}
|
|
482
|
+
if (height) {
|
|
483
|
+
stys.height = toCssUnit(height);
|
|
484
|
+
}
|
|
485
|
+
return stys;
|
|
486
|
+
},
|
|
487
|
+
computeMoreOpts() {
|
|
488
|
+
const $xeUpload = this;
|
|
489
|
+
const props = $xeUpload;
|
|
490
|
+
return Object.assign({ showMoreButton: true }, props.moreConfig);
|
|
491
|
+
} }),
|
|
492
|
+
watch: {
|
|
493
|
+
value() {
|
|
494
|
+
const $xeUpload = this;
|
|
495
|
+
$xeUpload.updateFileList();
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
methods: {
|
|
499
|
+
//
|
|
500
|
+
// Method
|
|
501
|
+
//
|
|
502
|
+
dispatchEvent(type, params, evnt) {
|
|
503
|
+
const $xeUpload = this;
|
|
504
|
+
$xeUpload.$emit(type, createEvent(evnt, { $upload: $xeUpload }, params));
|
|
505
|
+
},
|
|
506
|
+
emitModel(value) {
|
|
507
|
+
const $xeUpload = this;
|
|
508
|
+
const { _events } = $xeUpload;
|
|
509
|
+
if (_events && _events.modelValue) {
|
|
510
|
+
$xeUpload.$emit('modelValue', value);
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
$xeUpload.$emit('model-value', value);
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
choose() {
|
|
517
|
+
const $xeUpload = this;
|
|
518
|
+
return $xeUpload.handleChoose(null);
|
|
519
|
+
},
|
|
520
|
+
clear() {
|
|
521
|
+
const $xeUpload = this;
|
|
522
|
+
return handleClearFile($xeUpload, null);
|
|
523
|
+
},
|
|
524
|
+
clearByEvent(evnt) {
|
|
525
|
+
const $xeUpload = this;
|
|
526
|
+
return handleClearFile($xeUpload, evnt);
|
|
527
|
+
},
|
|
528
|
+
getPendingFiles() {
|
|
529
|
+
const $xeUpload = this;
|
|
530
|
+
const reactData = $xeUpload.reactData;
|
|
531
|
+
const { fileList, fileCacheMaps } = reactData;
|
|
532
|
+
const pendingFiles = [];
|
|
533
|
+
fileList.forEach(item => {
|
|
534
|
+
const fileKey = $xeUpload.getFieldKey(item);
|
|
535
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
536
|
+
if (cacheItem && cacheItem.status === 'pending') {
|
|
537
|
+
pendingFiles.push(cacheItem.file);
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
return pendingFiles;
|
|
541
|
+
},
|
|
542
|
+
submit(isFull) {
|
|
543
|
+
const $xeUpload = this;
|
|
544
|
+
const props = $xeUpload;
|
|
545
|
+
const reactData = $xeUpload.reactData;
|
|
546
|
+
const { maxSimultaneousUploads } = props;
|
|
547
|
+
const msNum = XEUtils.toNumber(maxSimultaneousUploads || 1) || 1;
|
|
548
|
+
const { fileList, fileCacheMaps } = reactData;
|
|
549
|
+
const allPendingList = fileList.filter(item => {
|
|
550
|
+
const fileKey = $xeUpload.getFieldKey(item);
|
|
551
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
552
|
+
return cacheItem && (cacheItem.status === 'pending' || (isFull && cacheItem.status === 'error'));
|
|
553
|
+
});
|
|
554
|
+
const handleSubmit = (item) => {
|
|
555
|
+
const fileKey = $xeUpload.getFieldKey(item);
|
|
556
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
557
|
+
if (cacheItem) {
|
|
558
|
+
const file = cacheItem.file;
|
|
559
|
+
if (file && (cacheItem.status === 'pending' || (isFull && cacheItem.status === 'error'))) {
|
|
560
|
+
cacheItem.loading = true;
|
|
561
|
+
cacheItem.percent = 0;
|
|
562
|
+
return $xeUpload.handleUploadResult(item, file).then(handleNextSubmit);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
return handleNextSubmit();
|
|
566
|
+
};
|
|
567
|
+
const handleNextSubmit = () => {
|
|
568
|
+
if (allPendingList.length) {
|
|
569
|
+
const item = allPendingList[0];
|
|
570
|
+
allPendingList.splice(0, 1);
|
|
571
|
+
return handleSubmit(item).then(handleNextSubmit);
|
|
572
|
+
}
|
|
573
|
+
return Promise.resolve();
|
|
574
|
+
};
|
|
575
|
+
return Promise.all(allPendingList.splice(0, msNum).map(handleSubmit)).then(() => {
|
|
576
|
+
// 完成
|
|
577
|
+
});
|
|
578
|
+
},
|
|
579
|
+
getMoreVisible() {
|
|
580
|
+
const $xeUpload = this;
|
|
581
|
+
const reactData = $xeUpload.reactData;
|
|
582
|
+
return reactData.showMorePopup;
|
|
583
|
+
},
|
|
584
|
+
openMore() {
|
|
585
|
+
const $xeUpload = this;
|
|
586
|
+
$xeUpload.handleMoreEvent({ $event: new Event('click') });
|
|
587
|
+
return $xeUpload.$nextTick();
|
|
588
|
+
},
|
|
589
|
+
openMoreByEvent(evnt) {
|
|
590
|
+
const $xeUpload = this;
|
|
591
|
+
$xeUpload.handleMoreEvent({ $event: evnt });
|
|
592
|
+
return $xeUpload.$nextTick();
|
|
593
|
+
},
|
|
594
|
+
closeMore() {
|
|
595
|
+
const $xeUpload = this;
|
|
596
|
+
const internalData = $xeUpload.internalData;
|
|
597
|
+
if (VxeUI.modal) {
|
|
598
|
+
VxeUI.modal.close(internalData.moreId);
|
|
599
|
+
}
|
|
600
|
+
return $xeUpload.$nextTick();
|
|
601
|
+
},
|
|
602
|
+
remove(urlOrItem) {
|
|
603
|
+
const $xeUpload = this;
|
|
604
|
+
return handleRemoveFile($xeUpload, null, urlOrItem);
|
|
605
|
+
},
|
|
606
|
+
removeByEvent(evnt, urlOrItem) {
|
|
607
|
+
const $xeUpload = this;
|
|
608
|
+
return handleRemoveFile($xeUpload, evnt, urlOrItem);
|
|
609
|
+
},
|
|
610
|
+
getFieldKey(item) {
|
|
611
|
+
const $xeUpload = this;
|
|
612
|
+
const keyField = $xeUpload.computeKeyField;
|
|
613
|
+
return item[keyField];
|
|
614
|
+
},
|
|
615
|
+
updateFileList() {
|
|
616
|
+
const $xeUpload = this;
|
|
617
|
+
const props = $xeUpload;
|
|
618
|
+
const reactData = $xeUpload.reactData;
|
|
619
|
+
const { value, multiple } = props;
|
|
620
|
+
const formReadonly = $xeUpload.computeFormReadonly;
|
|
621
|
+
const keyField = $xeUpload.computeKeyField;
|
|
622
|
+
const nameProp = $xeUpload.computeNameProp;
|
|
623
|
+
const typeProp = $xeUpload.computeTypeProp;
|
|
624
|
+
const urlProp = $xeUpload.computeUrlProp;
|
|
625
|
+
const sizeProp = $xeUpload.computeSizeProp;
|
|
626
|
+
const fileList = value
|
|
627
|
+
? (value ? (XEUtils.isArray(value) ? value : [value]) : []).map(item => {
|
|
628
|
+
if (!item || XEUtils.isString(item)) {
|
|
629
|
+
const url = `${item || ''}`;
|
|
630
|
+
const urlObj = XEUtils.parseUrl(item);
|
|
631
|
+
const name = (urlObj ? urlObj.searchQuery[nameProp] : '') || $xeUpload.parseFileName(url);
|
|
632
|
+
return {
|
|
633
|
+
[nameProp]: name,
|
|
634
|
+
[typeProp]: (urlObj ? urlObj.searchQuery[typeProp] : '') || $xeUpload.parseFileType(name),
|
|
635
|
+
[urlProp]: url,
|
|
636
|
+
[sizeProp]: XEUtils.toNumber(urlObj ? urlObj.searchQuery[sizeProp] : 0) || 0,
|
|
637
|
+
[keyField]: getUniqueKey()
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
const name = item[nameProp] || '';
|
|
641
|
+
item[nameProp] = name;
|
|
642
|
+
item[typeProp] = item[typeProp] || $xeUpload.parseFileType(name);
|
|
643
|
+
item[urlProp] = item[urlProp] || '';
|
|
644
|
+
item[sizeProp] = item[sizeProp] || 0;
|
|
645
|
+
item[keyField] = item[keyField] || getUniqueKey();
|
|
646
|
+
return item;
|
|
647
|
+
})
|
|
648
|
+
: [];
|
|
649
|
+
reactData.fileList = (formReadonly || multiple) ? fileList : (fileList.slice(0, 1));
|
|
650
|
+
},
|
|
651
|
+
parseFileName(url) {
|
|
652
|
+
return decodeURIComponent(`${url || ''}`).split('/').pop() || '';
|
|
653
|
+
},
|
|
654
|
+
parseFileType(name) {
|
|
655
|
+
const index = name.lastIndexOf('.');
|
|
656
|
+
if (index > 0) {
|
|
657
|
+
return name.substring(index + 1).toLowerCase();
|
|
658
|
+
}
|
|
659
|
+
return '';
|
|
660
|
+
},
|
|
661
|
+
handleChangeEvent(evnt, vals) {
|
|
662
|
+
const $xeUpload = this;
|
|
663
|
+
const props = $xeUpload;
|
|
664
|
+
const { singleMode, urlMode, urlArgs } = props;
|
|
665
|
+
const urlProp = $xeUpload.computeUrlProp;
|
|
666
|
+
const nameProp = $xeUpload.computeNameProp;
|
|
667
|
+
let restList = vals ? vals.slice(0) : [];
|
|
668
|
+
if (urlMode) {
|
|
669
|
+
restList = restList.map(item => {
|
|
670
|
+
const url = item[urlProp];
|
|
671
|
+
if (url && urlArgs) {
|
|
672
|
+
const urlObj = XEUtils.parseUrl(url);
|
|
673
|
+
if (!urlObj.searchQuery[nameProp]) {
|
|
674
|
+
if (url.indexOf('blob:') === -1) {
|
|
675
|
+
return `${url}${url.indexOf('?') === -1 ? '?' : '&'}${encodeURIComponent(item[nameProp] || '')}`;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
return url;
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
const value = singleMode ? (restList[0] || null) : restList;
|
|
683
|
+
$xeUpload.emitModel(value);
|
|
684
|
+
$xeUpload.dispatchEvent('change', { value }, evnt);
|
|
685
|
+
return value;
|
|
686
|
+
},
|
|
687
|
+
getThumbnailFileUrl(item) {
|
|
688
|
+
const $xeUpload = this;
|
|
689
|
+
const props = $xeUpload;
|
|
690
|
+
const getThumbnailUrlFn = props.getThumbnailUrlMethod || getConfig().upload.getThumbnailUrlMethod;
|
|
691
|
+
if (getThumbnailUrlFn) {
|
|
692
|
+
return getThumbnailUrlFn({
|
|
693
|
+
$upload: $xeUpload,
|
|
694
|
+
option: item
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
return $xeUpload.getFileUrl(item);
|
|
698
|
+
},
|
|
699
|
+
getFileUrl(item) {
|
|
700
|
+
const $xeUpload = this;
|
|
701
|
+
const props = $xeUpload;
|
|
702
|
+
const getUrlFn = props.getUrlMethod || getConfig().upload.getUrlMethod;
|
|
703
|
+
const urlProp = $xeUpload.computeUrlProp;
|
|
704
|
+
return getUrlFn
|
|
705
|
+
? getUrlFn({
|
|
706
|
+
$upload: $xeUpload,
|
|
707
|
+
option: item
|
|
708
|
+
})
|
|
709
|
+
: item[urlProp];
|
|
710
|
+
},
|
|
711
|
+
handleDefaultFilePreview(item) {
|
|
712
|
+
const $xeUpload = this;
|
|
713
|
+
const props = $xeUpload;
|
|
714
|
+
const internalData = $xeUpload.internalData;
|
|
715
|
+
const { imageTypes } = props;
|
|
716
|
+
const typeProp = $xeUpload.computeTypeProp;
|
|
717
|
+
const previewImageOpts = $xeUpload.computePreviewImageOpts;
|
|
718
|
+
const beforeDownloadFn = props.beforeDownloadMethod || getConfig().upload.beforeDownloadMethod;
|
|
719
|
+
const { imagePreviewTypes } = internalData;
|
|
720
|
+
// 如果是预览图片
|
|
721
|
+
if (imagePreviewTypes.concat(imageTypes || []).some(type => `${type}`.toLowerCase() === `${item[typeProp]}`.toLowerCase())) {
|
|
722
|
+
if (VxeUI.previewImage) {
|
|
723
|
+
VxeUI.previewImage(Object.assign(Object.assign({}, previewImageOpts), { urlList: [$xeUpload.getFileUrl(item)], beforeDownloadMethod: beforeDownloadFn
|
|
724
|
+
? () => {
|
|
725
|
+
return beforeDownloadFn({
|
|
726
|
+
$upload: $xeUpload,
|
|
727
|
+
option: item
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
: undefined }));
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
handlePreviewFileEvent(evnt, item) {
|
|
735
|
+
const $xeUpload = this;
|
|
736
|
+
const props = $xeUpload;
|
|
737
|
+
const previewFn = props.previewMethod || getConfig().upload.previewMethod;
|
|
738
|
+
if (props.showPreview) {
|
|
739
|
+
if (previewFn) {
|
|
740
|
+
previewFn({
|
|
741
|
+
$upload: $xeUpload,
|
|
742
|
+
option: item
|
|
743
|
+
});
|
|
744
|
+
}
|
|
745
|
+
else {
|
|
746
|
+
$xeUpload.handleDefaultFilePreview(item);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
handlePreviewImageEvent(evnt, item, index) {
|
|
751
|
+
const $xeUpload = this;
|
|
752
|
+
const props = $xeUpload;
|
|
753
|
+
const reactData = $xeUpload.reactData;
|
|
754
|
+
const { fileList } = reactData;
|
|
755
|
+
const previewImageOpts = $xeUpload.computePreviewImageOpts;
|
|
756
|
+
const previewFn = props.previewMethod || getConfig().upload.previewMethod;
|
|
757
|
+
const beforeDownloadFn = props.beforeDownloadMethod || getConfig().upload.beforeDownloadMethod;
|
|
758
|
+
if (props.showPreview) {
|
|
759
|
+
if (previewFn) {
|
|
760
|
+
previewFn({
|
|
761
|
+
$upload: $xeUpload,
|
|
762
|
+
option: item
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
else if (VxeUI.previewImage) {
|
|
766
|
+
VxeUI.previewImage(Object.assign(Object.assign({}, previewImageOpts), { urlList: fileList.map(item => $xeUpload.getFileUrl(item)), activeIndex: index, beforeDownloadMethod: beforeDownloadFn
|
|
767
|
+
? ({ index }) => {
|
|
768
|
+
return beforeDownloadFn({
|
|
769
|
+
$upload: $xeUpload,
|
|
770
|
+
option: fileList[index]
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
: undefined }));
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
handleUploadResult(item, file) {
|
|
778
|
+
const $xeUpload = this;
|
|
779
|
+
const props = $xeUpload;
|
|
780
|
+
const reactData = $xeUpload.reactData;
|
|
781
|
+
const { showErrorStatus } = props;
|
|
782
|
+
const fileKey = $xeUpload.getFieldKey(item);
|
|
783
|
+
const uploadFn = props.uploadMethod || getConfig().upload.uploadMethod;
|
|
784
|
+
if (uploadFn) {
|
|
785
|
+
$xeUpload.dispatchEvent('upload-start', { option: item }, null);
|
|
786
|
+
return Promise.resolve(uploadFn({
|
|
787
|
+
$upload: $xeUpload,
|
|
788
|
+
file,
|
|
789
|
+
option: item,
|
|
790
|
+
updateProgress(percentNum) {
|
|
791
|
+
const { fileCacheMaps } = reactData;
|
|
792
|
+
const cacheItem = fileCacheMaps[$xeUpload.getFieldKey(item)];
|
|
793
|
+
if (cacheItem) {
|
|
794
|
+
cacheItem.percent = Math.max(0, Math.min(99, XEUtils.toNumber(percentNum)));
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
})).then(res => {
|
|
798
|
+
const { fileCacheMaps } = reactData;
|
|
799
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
800
|
+
if (cacheItem) {
|
|
801
|
+
cacheItem.percent = 100;
|
|
802
|
+
cacheItem.status = 'success';
|
|
803
|
+
cacheItem.response = res;
|
|
804
|
+
}
|
|
805
|
+
// 处理动态字段双向绑定问题
|
|
806
|
+
// Object.assign(item, res)
|
|
807
|
+
XEUtils.each(res, (val, key) => {
|
|
808
|
+
$xeUpload.$set(item, key, val);
|
|
809
|
+
});
|
|
810
|
+
$xeUpload.dispatchEvent('upload-success', { option: item, data: res }, null);
|
|
811
|
+
}).catch((res) => {
|
|
812
|
+
const { fileCacheMaps } = reactData;
|
|
813
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
814
|
+
if (cacheItem) {
|
|
815
|
+
cacheItem.status = 'error';
|
|
816
|
+
cacheItem.response = res;
|
|
817
|
+
}
|
|
818
|
+
if (showErrorStatus) {
|
|
819
|
+
// 处理动态字段双向绑定问题
|
|
820
|
+
// Object.assign(item, res)
|
|
821
|
+
XEUtils.each(res, (val, key) => {
|
|
822
|
+
$xeUpload.$set(item, key, val);
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
else {
|
|
826
|
+
reactData.fileList = reactData.fileList.filter(obj => $xeUpload.getFieldKey(obj) !== fileKey);
|
|
827
|
+
delete fileCacheMaps[fileKey];
|
|
828
|
+
}
|
|
829
|
+
$xeUpload.dispatchEvent('upload-error', { option: item, data: res }, null);
|
|
830
|
+
}).finally(() => {
|
|
831
|
+
const { fileCacheMaps } = reactData;
|
|
832
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
833
|
+
if (cacheItem) {
|
|
834
|
+
cacheItem.loading = false;
|
|
835
|
+
}
|
|
836
|
+
const result = {
|
|
837
|
+
option: item,
|
|
838
|
+
status: cacheItem ? cacheItem.status : null,
|
|
839
|
+
response: cacheItem ? cacheItem.response : null
|
|
840
|
+
};
|
|
841
|
+
$xeUpload.dispatchEvent('upload-end', { option: item, result }, null);
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
else {
|
|
845
|
+
const { fileCacheMaps } = reactData;
|
|
846
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
847
|
+
if (cacheItem) {
|
|
848
|
+
cacheItem.loading = false;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return Promise.resolve();
|
|
852
|
+
},
|
|
853
|
+
handleReUploadEvent(evnt, item) {
|
|
854
|
+
const $xeUpload = this;
|
|
855
|
+
const props = $xeUpload;
|
|
856
|
+
const reactData = $xeUpload.reactData;
|
|
857
|
+
const { uploadMethod, urlMode } = props;
|
|
858
|
+
const { fileCacheMaps } = reactData;
|
|
859
|
+
const fileKey = $xeUpload.getFieldKey(item);
|
|
860
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
861
|
+
const uploadFn = uploadMethod || getConfig().upload.uploadMethod;
|
|
862
|
+
if (uploadFn && cacheItem) {
|
|
863
|
+
const file = cacheItem.file;
|
|
864
|
+
cacheItem.loading = true;
|
|
865
|
+
cacheItem.status = 'pending';
|
|
866
|
+
cacheItem.percent = 0;
|
|
867
|
+
$xeUpload.handleUploadResult(item, file).then(() => {
|
|
868
|
+
if (urlMode) {
|
|
869
|
+
$xeUpload.handleChangeEvent(evnt, reactData.fileList);
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
handleUploadFile(files, evnt) {
|
|
875
|
+
const $xeUpload = this;
|
|
876
|
+
const props = $xeUpload;
|
|
877
|
+
const reactData = $xeUpload.reactData;
|
|
878
|
+
const $xeForm = $xeUpload.$xeForm;
|
|
879
|
+
const formItemInfo = $xeUpload.formItemInfo;
|
|
880
|
+
const { multiple, showLimitSize, limitSizeText, showLimitCount, limitCountText, autoSubmit } = props;
|
|
881
|
+
const { fileList } = reactData;
|
|
882
|
+
const beforeSelectFn = props.beforeSelectMethod || getConfig().upload.beforeSelectMethod;
|
|
883
|
+
const uploadFn = props.uploadMethod || getConfig().upload.uploadMethod;
|
|
884
|
+
const keyField = $xeUpload.computeKeyField;
|
|
885
|
+
const nameProp = $xeUpload.computeNameProp;
|
|
886
|
+
const typeProp = $xeUpload.computeTypeProp;
|
|
887
|
+
const urlProp = $xeUpload.computeUrlProp;
|
|
888
|
+
const sizeProp = $xeUpload.computeSizeProp;
|
|
889
|
+
const limitMaxSize = $xeUpload.computeLimitMaxSize;
|
|
890
|
+
const limitMaxCount = $xeUpload.computeLimitMaxCount;
|
|
891
|
+
const limitSizeUnit = $xeUpload.computeLimitSizeUnit;
|
|
892
|
+
let selectFiles = files;
|
|
893
|
+
if (multiple && limitMaxCount) {
|
|
894
|
+
// 校验文件数量
|
|
895
|
+
if (showLimitCount && fileList.length >= limitMaxCount) {
|
|
896
|
+
if (VxeUI.modal) {
|
|
897
|
+
VxeUI.modal.notification({
|
|
898
|
+
title: getI18n('vxe.modal.errTitle'),
|
|
899
|
+
status: 'error',
|
|
900
|
+
content: limitCountText ? `${XEUtils.isFunction(limitCountText) ? limitCountText({ maxCount: limitMaxCount }) : limitCountText}` : getI18n('vxe.upload.overCountErr', [limitMaxCount])
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
return;
|
|
904
|
+
}
|
|
905
|
+
const overNum = selectFiles.length - (limitMaxCount - fileList.length);
|
|
906
|
+
if (showLimitCount && overNum > 0) {
|
|
907
|
+
const overExtraList = selectFiles.slice(limitMaxCount - fileList.length);
|
|
908
|
+
if (limitCountText) {
|
|
909
|
+
VxeUI.modal.notification({
|
|
910
|
+
title: getI18n('vxe.modal.errTitle'),
|
|
911
|
+
status: 'error',
|
|
912
|
+
content: `${XEUtils.isFunction(limitCountText) ? limitCountText({ maxCount: limitMaxCount }) : limitCountText}`
|
|
913
|
+
});
|
|
914
|
+
}
|
|
915
|
+
else if (VxeUI.modal) {
|
|
916
|
+
VxeUI.modal.notification({
|
|
917
|
+
title: getI18n('vxe.modal.errTitle'),
|
|
918
|
+
status: 'error',
|
|
919
|
+
slots: {
|
|
920
|
+
default(params, h) {
|
|
921
|
+
return h('div', {
|
|
922
|
+
class: 'vxe-upload--file-message-over-error'
|
|
923
|
+
}, [
|
|
924
|
+
h('div', {}, getI18n('vxe.upload.overCountExtraErr', [limitMaxCount, overNum])),
|
|
925
|
+
h('div', {
|
|
926
|
+
class: 'vxe-upload--file-message-over-extra'
|
|
927
|
+
}, overExtraList.map((file, index) => {
|
|
928
|
+
return h('div', {
|
|
929
|
+
key: index,
|
|
930
|
+
class: 'vxe-upload--file-message-over-extra-item'
|
|
931
|
+
}, file.name);
|
|
932
|
+
}))
|
|
933
|
+
]);
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
selectFiles = selectFiles.slice(0, limitMaxCount - fileList.length);
|
|
940
|
+
}
|
|
941
|
+
// 校验文件大小
|
|
942
|
+
if (showLimitSize && limitMaxSize) {
|
|
943
|
+
for (let i = 0; i < files.length; i++) {
|
|
944
|
+
const file = files[0];
|
|
945
|
+
if (file.size > limitMaxSize) {
|
|
946
|
+
if (VxeUI.modal) {
|
|
947
|
+
VxeUI.modal.notification({
|
|
948
|
+
title: getI18n('vxe.modal.errTitle'),
|
|
949
|
+
status: 'error',
|
|
950
|
+
content: limitSizeText ? `${XEUtils.isFunction(limitSizeText) ? limitSizeText({ maxSize: limitMaxSize }) : limitSizeText}` : getI18n('vxe.upload.overSizeErr', [limitSizeUnit])
|
|
951
|
+
});
|
|
952
|
+
}
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
$xeUpload.dispatchEvent('upload-queue-start', { files: selectFiles }, evnt);
|
|
958
|
+
const cacheMaps = Object.assign({}, reactData.fileCacheMaps);
|
|
959
|
+
const uploadFileList = multiple ? fileList : [];
|
|
960
|
+
const newFileList = [];
|
|
961
|
+
const uploadPromiseRests = [];
|
|
962
|
+
selectFiles.forEach(file => {
|
|
963
|
+
const { name } = file;
|
|
964
|
+
const fileKey = getUniqueKey();
|
|
965
|
+
const fileObj = {
|
|
966
|
+
[nameProp]: name,
|
|
967
|
+
[typeProp]: $xeUpload.parseFileType(name),
|
|
968
|
+
[sizeProp]: file.size,
|
|
969
|
+
[urlProp]: URL.createObjectURL(file),
|
|
970
|
+
[keyField]: fileKey
|
|
971
|
+
};
|
|
972
|
+
if (uploadFn) {
|
|
973
|
+
cacheMaps[fileKey] = {
|
|
974
|
+
file: file,
|
|
975
|
+
loading: !!autoSubmit,
|
|
976
|
+
status: 'pending',
|
|
977
|
+
percent: 0,
|
|
978
|
+
response: null
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
const item = fileObj;
|
|
982
|
+
if (!beforeSelectFn || beforeSelectFn({ $upload: $xeUpload, file })) {
|
|
983
|
+
if (uploadFn && autoSubmit) {
|
|
984
|
+
uploadPromiseRests.push($xeUpload.handleUploadResult(item, file));
|
|
985
|
+
}
|
|
986
|
+
newFileList.push(item);
|
|
987
|
+
uploadFileList.push(item);
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
reactData.fileList = uploadFileList;
|
|
991
|
+
reactData.fileCacheMaps = cacheMaps;
|
|
992
|
+
uploadFileList.forEach(item => {
|
|
993
|
+
$xeUpload.dispatchEvent('add', { option: item }, evnt);
|
|
994
|
+
});
|
|
995
|
+
Promise.all(uploadPromiseRests).then(() => {
|
|
996
|
+
const { fileCacheMaps } = reactData;
|
|
997
|
+
const restFileList = reactData.fileList;
|
|
998
|
+
const uploadResults = newFileList.map(option => {
|
|
999
|
+
const fileKey = $xeUpload.getFieldKey(option);
|
|
1000
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
1001
|
+
return {
|
|
1002
|
+
option,
|
|
1003
|
+
status: cacheItem ? cacheItem.status : null,
|
|
1004
|
+
response: cacheItem ? cacheItem.response : null
|
|
1005
|
+
};
|
|
1006
|
+
});
|
|
1007
|
+
const value = $xeUpload.handleChangeEvent(evnt, restFileList);
|
|
1008
|
+
$xeUpload.dispatchEvent('upload-queue-end', { value, options: restFileList, results: uploadResults, files: selectFiles }, evnt);
|
|
1009
|
+
// 自动更新校验状态
|
|
1010
|
+
if ($xeForm && formItemInfo) {
|
|
1011
|
+
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
1012
|
+
}
|
|
1013
|
+
});
|
|
1014
|
+
},
|
|
1015
|
+
handleChoose(evnt) {
|
|
1016
|
+
const $xeUpload = this;
|
|
1017
|
+
const props = $xeUpload;
|
|
1018
|
+
const { multiple, imageTypes, fileTypes } = props;
|
|
1019
|
+
const isDisabled = $xeUpload.computeIsDisabled;
|
|
1020
|
+
const isImage = $xeUpload.computeIsImage;
|
|
1021
|
+
if (isDisabled) {
|
|
1022
|
+
return Promise.resolve({
|
|
1023
|
+
status: false,
|
|
1024
|
+
files: [],
|
|
1025
|
+
file: null
|
|
1026
|
+
});
|
|
1027
|
+
}
|
|
1028
|
+
return readLocalFile({
|
|
1029
|
+
multiple,
|
|
1030
|
+
types: isImage ? imageTypes : fileTypes
|
|
1031
|
+
}).then((params) => {
|
|
1032
|
+
$xeUpload.handleUploadFile(params.files, evnt);
|
|
1033
|
+
return params;
|
|
1034
|
+
});
|
|
1035
|
+
},
|
|
1036
|
+
clickEvent(evnt) {
|
|
1037
|
+
const $xeUpload = this;
|
|
1038
|
+
$xeUpload.handleChoose(evnt).catch(() => {
|
|
1039
|
+
// 错误文件类型
|
|
1040
|
+
});
|
|
1041
|
+
},
|
|
1042
|
+
handleRemoveEvent(evnt, item, index) {
|
|
1043
|
+
const $xeUpload = this;
|
|
1044
|
+
const reactData = $xeUpload.reactData;
|
|
1045
|
+
const $xeForm = $xeUpload.$xeForm;
|
|
1046
|
+
const formItemInfo = $xeUpload.formItemInfo;
|
|
1047
|
+
const { fileList } = reactData;
|
|
1048
|
+
fileList.splice(index, 1);
|
|
1049
|
+
$xeUpload.handleChangeEvent(evnt, fileList);
|
|
1050
|
+
// 自动更新校验状态
|
|
1051
|
+
if ($xeForm && formItemInfo) {
|
|
1052
|
+
$xeForm.triggerItemEvent(evnt || { type: 'remove' }, formItemInfo.itemConfig.field, fileList);
|
|
1053
|
+
}
|
|
1054
|
+
if (evnt) {
|
|
1055
|
+
$xeUpload.dispatchEvent('remove', { option: item }, evnt);
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
removeFileEvent(evnt, item, index) {
|
|
1059
|
+
const $xeUpload = this;
|
|
1060
|
+
const props = $xeUpload;
|
|
1061
|
+
const beforeRemoveFn = props.beforeRemoveMethod || getConfig().upload.beforeRemoveMethod;
|
|
1062
|
+
const removeFn = props.removeMethod || getConfig().upload.removeMethod;
|
|
1063
|
+
return Promise.resolve(beforeRemoveFn
|
|
1064
|
+
? beforeRemoveFn({
|
|
1065
|
+
$upload: $xeUpload,
|
|
1066
|
+
option: item
|
|
1067
|
+
})
|
|
1068
|
+
: true).then(status => {
|
|
1069
|
+
if (status) {
|
|
1070
|
+
if (removeFn) {
|
|
1071
|
+
Promise.resolve(removeFn({
|
|
1072
|
+
$upload: $xeUpload,
|
|
1073
|
+
option: item
|
|
1074
|
+
})).then(() => {
|
|
1075
|
+
$xeUpload.handleRemoveEvent(evnt, item, index);
|
|
1076
|
+
}).catch(e => e);
|
|
1077
|
+
}
|
|
1078
|
+
else {
|
|
1079
|
+
$xeUpload.handleRemoveEvent(evnt, item, index);
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
else {
|
|
1083
|
+
$xeUpload.dispatchEvent('remove-fail', { option: item }, evnt);
|
|
1084
|
+
}
|
|
1085
|
+
return status;
|
|
1086
|
+
});
|
|
1087
|
+
},
|
|
1088
|
+
handleDownloadEvent(evnt, item) {
|
|
1089
|
+
const $xeUpload = this;
|
|
1090
|
+
$xeUpload.dispatchEvent('download', { option: item }, evnt);
|
|
1091
|
+
},
|
|
1092
|
+
downloadFileEvent(evnt, item) {
|
|
1093
|
+
const $xeUpload = this;
|
|
1094
|
+
const props = $xeUpload;
|
|
1095
|
+
const beforeDownloadFn = props.beforeDownloadMethod || getConfig().upload.beforeDownloadMethod;
|
|
1096
|
+
const downloadFn = props.downloadMethod || getConfig().upload.downloadMethod;
|
|
1097
|
+
Promise.resolve(beforeDownloadFn
|
|
1098
|
+
? beforeDownloadFn({
|
|
1099
|
+
$upload: $xeUpload,
|
|
1100
|
+
option: item
|
|
1101
|
+
})
|
|
1102
|
+
: true).then(status => {
|
|
1103
|
+
if (status) {
|
|
1104
|
+
if (downloadFn) {
|
|
1105
|
+
Promise.resolve(downloadFn({
|
|
1106
|
+
$upload: $xeUpload,
|
|
1107
|
+
option: item
|
|
1108
|
+
})).then(() => {
|
|
1109
|
+
$xeUpload.handleDownloadEvent(evnt, item);
|
|
1110
|
+
}).catch(e => e);
|
|
1111
|
+
}
|
|
1112
|
+
else {
|
|
1113
|
+
$xeUpload.handleDownloadEvent(evnt, item);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
else {
|
|
1117
|
+
$xeUpload.dispatchEvent('download-fail', { option: item }, evnt);
|
|
1118
|
+
}
|
|
1119
|
+
});
|
|
1120
|
+
},
|
|
1121
|
+
handleUploadDragleaveEvent(evnt) {
|
|
1122
|
+
const $xeUpload = this;
|
|
1123
|
+
const reactData = $xeUpload.reactData;
|
|
1124
|
+
const targetElem = evnt.currentTarget;
|
|
1125
|
+
const { clientX, clientY } = evnt;
|
|
1126
|
+
if (targetElem) {
|
|
1127
|
+
const { x: targetX, y: targetY, height: targetHeight, width: targetWidth } = targetElem.getBoundingClientRect();
|
|
1128
|
+
if (clientX < targetX || clientX > targetX + targetWidth || clientY < targetY || clientY > targetY + targetHeight) {
|
|
1129
|
+
reactData.isDragUploadStatus = false;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
handleUploadDragoverEvent(evnt) {
|
|
1134
|
+
const $xeUpload = this;
|
|
1135
|
+
const reactData = $xeUpload.reactData;
|
|
1136
|
+
const dataTransfer = evnt.dataTransfer;
|
|
1137
|
+
if (dataTransfer) {
|
|
1138
|
+
const { items } = dataTransfer;
|
|
1139
|
+
if (items && items.length) {
|
|
1140
|
+
evnt.preventDefault();
|
|
1141
|
+
reactData.isDragUploadStatus = true;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
uploadTransferFileEvent(evnt, files) {
|
|
1146
|
+
const $xeUpload = this;
|
|
1147
|
+
const props = $xeUpload;
|
|
1148
|
+
const internalData = $xeUpload.internalData;
|
|
1149
|
+
const { imageTypes, fileTypes } = props;
|
|
1150
|
+
const { imagePreviewTypes } = internalData;
|
|
1151
|
+
const isImage = $xeUpload.computeIsImage;
|
|
1152
|
+
if (isImage) {
|
|
1153
|
+
const pasteImgTypes = imagePreviewTypes.concat(imageTypes && imageTypes.length ? imageTypes : []);
|
|
1154
|
+
files = files.filter(file => {
|
|
1155
|
+
const fileType = `${file.type.split('/')[1] || ''}`.toLowerCase();
|
|
1156
|
+
if (pasteImgTypes.some(type => `${type}`.toLowerCase() === fileType)) {
|
|
1157
|
+
return true;
|
|
1158
|
+
}
|
|
1159
|
+
return false;
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
else {
|
|
1163
|
+
if (fileTypes && fileTypes.length) {
|
|
1164
|
+
const errTypes = [];
|
|
1165
|
+
files.forEach(file => {
|
|
1166
|
+
const fileType = $xeUpload.parseFileType(file.name);
|
|
1167
|
+
if (!fileTypes.some(type => `${type}`.toLowerCase() === fileType)) {
|
|
1168
|
+
errTypes.push(fileType);
|
|
1169
|
+
}
|
|
1170
|
+
});
|
|
1171
|
+
if (errTypes.length) {
|
|
1172
|
+
if (VxeUI.modal) {
|
|
1173
|
+
VxeUI.modal.message({
|
|
1174
|
+
content: getI18n('vxe.error.notType', [errTypes.join(', ')]),
|
|
1175
|
+
status: 'error'
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
return;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
// 如果全部不满足条件
|
|
1183
|
+
if (!files.length) {
|
|
1184
|
+
if (VxeUI.modal) {
|
|
1185
|
+
VxeUI.modal.notification({
|
|
1186
|
+
title: getI18n('vxe.modal.errTitle'),
|
|
1187
|
+
status: 'error',
|
|
1188
|
+
content: getI18n('vxe.upload.uploadTypeErr')
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
return;
|
|
1192
|
+
}
|
|
1193
|
+
$xeUpload.handleUploadFile(files, evnt);
|
|
1194
|
+
},
|
|
1195
|
+
handleUploadDropEvent(evnt) {
|
|
1196
|
+
const $xeUpload = this;
|
|
1197
|
+
const reactData = $xeUpload.reactData;
|
|
1198
|
+
const dataTransfer = evnt.dataTransfer;
|
|
1199
|
+
if (dataTransfer) {
|
|
1200
|
+
const { items } = dataTransfer;
|
|
1201
|
+
if (items && items.length) {
|
|
1202
|
+
evnt.preventDefault();
|
|
1203
|
+
const files = handleTransferFiles(items);
|
|
1204
|
+
if (files.length) {
|
|
1205
|
+
$xeUpload.uploadTransferFileEvent(evnt, files);
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
reactData.isDragUploadStatus = false;
|
|
1210
|
+
},
|
|
1211
|
+
handleMoreEvent(evntParams) {
|
|
1212
|
+
const $xeUpload = this;
|
|
1213
|
+
const props = $xeUpload;
|
|
1214
|
+
const slots = $xeUpload.$scopedSlots;
|
|
1215
|
+
const reactData = $xeUpload.reactData;
|
|
1216
|
+
const internalData = $xeUpload.internalData;
|
|
1217
|
+
const { xID } = $xeUpload;
|
|
1218
|
+
const formReadonly = $xeUpload.computeFormReadonly;
|
|
1219
|
+
const isImage = $xeUpload.computeIsImage;
|
|
1220
|
+
const evnt = evntParams.$event;
|
|
1221
|
+
if (VxeUI.modal) {
|
|
1222
|
+
VxeUI.modal.open({
|
|
1223
|
+
id: internalData.moreId,
|
|
1224
|
+
title: formReadonly ? getI18n('vxe.upload.morePopup.readTitle') : getI18n(`vxe.upload.morePopup.${isImage ? 'imageTitle' : 'fileTitle'}`),
|
|
1225
|
+
width: 660,
|
|
1226
|
+
height: 500,
|
|
1227
|
+
escClosable: true,
|
|
1228
|
+
showMaximize: true,
|
|
1229
|
+
resize: true,
|
|
1230
|
+
maskClosable: true,
|
|
1231
|
+
slots: {
|
|
1232
|
+
default(params, h) {
|
|
1233
|
+
const { showErrorStatus, dragToUpload, dragSort, dragPlaceholder } = props;
|
|
1234
|
+
const { isActivated, isDragMove, isDragUploadStatus, dragIndex } = reactData;
|
|
1235
|
+
const { fileList } = reactData;
|
|
1236
|
+
const isDisabled = $xeUpload.computeIsDisabled;
|
|
1237
|
+
const moreContSlot = slots.moreContent || slots['more-content'];
|
|
1238
|
+
const ons = {};
|
|
1239
|
+
if (dragToUpload && dragIndex === -1) {
|
|
1240
|
+
ons.dragover = $xeUpload.handleUploadDragoverEvent;
|
|
1241
|
+
ons.dragleave = $xeUpload.handleUploadDragleaveEvent;
|
|
1242
|
+
ons.drop = $xeUpload.handleUploadDropEvent;
|
|
1243
|
+
}
|
|
1244
|
+
return h('div', {
|
|
1245
|
+
attrs: {
|
|
1246
|
+
id: `refPopupElem${xID}`
|
|
1247
|
+
},
|
|
1248
|
+
class: ['vxe-upload--more-popup', {
|
|
1249
|
+
'is--readonly': formReadonly,
|
|
1250
|
+
'is--disabled': isDisabled,
|
|
1251
|
+
'is--active': isActivated,
|
|
1252
|
+
'show--error': showErrorStatus,
|
|
1253
|
+
'is--drag': isDragUploadStatus
|
|
1254
|
+
}],
|
|
1255
|
+
on: ons
|
|
1256
|
+
}, moreContSlot
|
|
1257
|
+
? getSlotVNs(moreContSlot({ options: fileList }))
|
|
1258
|
+
: [
|
|
1259
|
+
isImage
|
|
1260
|
+
? (dragSort
|
|
1261
|
+
? h('transition-group', {
|
|
1262
|
+
props: {
|
|
1263
|
+
name: `vxe-upload--drag-list${isDragMove ? '' : '-disabled'}`,
|
|
1264
|
+
tag: 'div'
|
|
1265
|
+
},
|
|
1266
|
+
class: 'vxe-upload--image-more-list'
|
|
1267
|
+
}, $xeUpload.renderImageItemList(h, fileList, true).concat($xeUpload.renderImageAction(h, true)))
|
|
1268
|
+
: h('div', {
|
|
1269
|
+
class: 'vxe-upload--image-more-list'
|
|
1270
|
+
}, $xeUpload.renderImageItemList(h, fileList, true).concat($xeUpload.renderImageAction(h, true))))
|
|
1271
|
+
: h('div', {
|
|
1272
|
+
class: 'vxe-upload--file-more-list'
|
|
1273
|
+
}, [
|
|
1274
|
+
$xeUpload.renderFileAction(h, true),
|
|
1275
|
+
(dragSort
|
|
1276
|
+
? h('transition-group', {
|
|
1277
|
+
props: {
|
|
1278
|
+
name: `vxe-upload--drag-list${isDragMove ? '' : '-disabled'}`,
|
|
1279
|
+
tag: 'div'
|
|
1280
|
+
},
|
|
1281
|
+
class: 'vxe-upload--file-list'
|
|
1282
|
+
}, $xeUpload.renderFileItemList(h, fileList, true))
|
|
1283
|
+
: h('div', {
|
|
1284
|
+
class: 'vxe-upload--file-list'
|
|
1285
|
+
}, $xeUpload.renderFileItemList(h, fileList, true)))
|
|
1286
|
+
]),
|
|
1287
|
+
dragSort
|
|
1288
|
+
? h('div', {
|
|
1289
|
+
attrs: {
|
|
1290
|
+
id: `refModalDragLineElem${xID}`
|
|
1291
|
+
},
|
|
1292
|
+
class: 'vxe-upload--drag-line'
|
|
1293
|
+
})
|
|
1294
|
+
: renderEmptyElement($xeUpload),
|
|
1295
|
+
isDragUploadStatus
|
|
1296
|
+
? h('div', {
|
|
1297
|
+
class: 'vxe-upload--drag-placeholder'
|
|
1298
|
+
}, dragPlaceholder || getI18n('vxe.upload.dragPlaceholder'))
|
|
1299
|
+
: renderEmptyElement($xeUpload)
|
|
1300
|
+
]);
|
|
1301
|
+
}
|
|
1302
|
+
},
|
|
1303
|
+
events: {
|
|
1304
|
+
show() {
|
|
1305
|
+
reactData.showMorePopup = true;
|
|
1306
|
+
},
|
|
1307
|
+
hide({ $event }) {
|
|
1308
|
+
reactData.showMorePopup = false;
|
|
1309
|
+
if ($event) {
|
|
1310
|
+
$xeUpload.dispatchEvent('more-visible', { visible: false }, $event);
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
});
|
|
1315
|
+
if (evnt) {
|
|
1316
|
+
$xeUpload.dispatchEvent('more-visible', { visible: true }, evnt);
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
// 拖拽
|
|
1321
|
+
handleDragSortDragstartEvent(evnt) {
|
|
1322
|
+
const $xeUpload = this;
|
|
1323
|
+
const reactData = $xeUpload.reactData;
|
|
1324
|
+
evnt.stopPropagation();
|
|
1325
|
+
if (evnt.dataTransfer) {
|
|
1326
|
+
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0);
|
|
1327
|
+
}
|
|
1328
|
+
const dragEl = evnt.currentTarget;
|
|
1329
|
+
const parentEl = dragEl.parentElement;
|
|
1330
|
+
const dragIndex = XEUtils.findIndexOf(Array.from(parentEl.children), item => dragEl === item);
|
|
1331
|
+
reactData.isDragMove = true;
|
|
1332
|
+
reactData.dragIndex = dragIndex;
|
|
1333
|
+
setTimeout(() => {
|
|
1334
|
+
reactData.isDragMove = false;
|
|
1335
|
+
}, 500);
|
|
1336
|
+
},
|
|
1337
|
+
handleDragSortDragoverEvent(evnt) {
|
|
1338
|
+
const $xeUpload = this;
|
|
1339
|
+
const reactData = $xeUpload.reactData;
|
|
1340
|
+
const internalData = $xeUpload.internalData;
|
|
1341
|
+
evnt.stopPropagation();
|
|
1342
|
+
evnt.preventDefault();
|
|
1343
|
+
const { dragIndex } = reactData;
|
|
1344
|
+
if (dragIndex === -1) {
|
|
1345
|
+
return;
|
|
1346
|
+
}
|
|
1347
|
+
const isImage = $xeUpload.computeIsImage;
|
|
1348
|
+
const dragEl = evnt.currentTarget;
|
|
1349
|
+
const parentEl = dragEl.parentElement;
|
|
1350
|
+
const currIndex = XEUtils.findIndexOf(Array.from(parentEl.children), item => dragEl === item);
|
|
1351
|
+
let dragPos = '';
|
|
1352
|
+
if (isImage) {
|
|
1353
|
+
const offsetX = evnt.clientX - dragEl.getBoundingClientRect().x;
|
|
1354
|
+
dragPos = offsetX < dragEl.clientWidth / 2 ? 'left' : 'right';
|
|
1355
|
+
}
|
|
1356
|
+
else {
|
|
1357
|
+
const offsetY = evnt.clientY - dragEl.getBoundingClientRect().y;
|
|
1358
|
+
dragPos = offsetY < dragEl.clientHeight / 2 ? 'top' : 'bottom';
|
|
1359
|
+
}
|
|
1360
|
+
if (dragIndex === currIndex) {
|
|
1361
|
+
showDropTip($xeUpload, evnt, dragEl, dragPos);
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
showDropTip($xeUpload, evnt, dragEl, dragPos);
|
|
1365
|
+
internalData.prevDragIndex = currIndex;
|
|
1366
|
+
internalData.prevDragPos = dragPos;
|
|
1367
|
+
},
|
|
1368
|
+
handleDragSortDragendEvent(evnt) {
|
|
1369
|
+
const $xeUpload = this;
|
|
1370
|
+
const reactData = $xeUpload.reactData;
|
|
1371
|
+
const internalData = $xeUpload.internalData;
|
|
1372
|
+
const { fileList, dragIndex } = reactData;
|
|
1373
|
+
const { prevDragIndex, prevDragPos } = internalData;
|
|
1374
|
+
const oldIndex = dragIndex;
|
|
1375
|
+
const targetIndex = prevDragIndex;
|
|
1376
|
+
const dragOffsetIndex = prevDragPos === 'bottom' || prevDragPos === 'right' ? 1 : 0;
|
|
1377
|
+
const oldItem = fileList[oldIndex];
|
|
1378
|
+
const newItem = fileList[targetIndex];
|
|
1379
|
+
if (oldItem && newItem) {
|
|
1380
|
+
fileList.splice(oldIndex, 1);
|
|
1381
|
+
const ptfIndex = XEUtils.findIndexOf(fileList, item => newItem === item);
|
|
1382
|
+
const nIndex = ptfIndex + dragOffsetIndex;
|
|
1383
|
+
fileList.splice(nIndex, 0, oldItem);
|
|
1384
|
+
$xeUpload.dispatchEvent('sort-dragend', {
|
|
1385
|
+
oldItem: oldItem,
|
|
1386
|
+
newItem: newItem,
|
|
1387
|
+
dragPos: prevDragPos,
|
|
1388
|
+
offsetIndex: dragOffsetIndex,
|
|
1389
|
+
_index: {
|
|
1390
|
+
newIndex: nIndex,
|
|
1391
|
+
oldIndex: oldIndex
|
|
1392
|
+
}
|
|
1393
|
+
}, evnt);
|
|
1394
|
+
}
|
|
1395
|
+
hideDropTip($xeUpload);
|
|
1396
|
+
reactData.dragIndex = -1;
|
|
1397
|
+
},
|
|
1398
|
+
handleItemMousedownEvent(evnt) {
|
|
1399
|
+
const $xeUpload = this;
|
|
1400
|
+
const $xeTable = $xeUpload.$xeTable;
|
|
1401
|
+
const reactData = $xeUpload.reactData;
|
|
1402
|
+
if ($xeTable) {
|
|
1403
|
+
evnt.stopPropagation();
|
|
1404
|
+
}
|
|
1405
|
+
reactData.isActivated = true;
|
|
1406
|
+
},
|
|
1407
|
+
handleGlobalPasteEvent(evnt) {
|
|
1408
|
+
const $xeUpload = this;
|
|
1409
|
+
const props = $xeUpload;
|
|
1410
|
+
const reactData = $xeUpload.reactData;
|
|
1411
|
+
const { pasteToUpload } = props;
|
|
1412
|
+
const { isActivated } = reactData;
|
|
1413
|
+
if (!isActivated || !pasteToUpload) {
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
const clipboardData = evnt.clipboardData || evnt.originalEvent.clipboardData;
|
|
1417
|
+
if (!clipboardData) {
|
|
1418
|
+
return;
|
|
1419
|
+
}
|
|
1420
|
+
const { items } = clipboardData;
|
|
1421
|
+
if (!items) {
|
|
1422
|
+
return;
|
|
1423
|
+
}
|
|
1424
|
+
const files = handleTransferFiles(items);
|
|
1425
|
+
if (files.length) {
|
|
1426
|
+
evnt.preventDefault();
|
|
1427
|
+
$xeUpload.uploadTransferFileEvent(evnt, files);
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
handleGlobalClickEvent(evnt) {
|
|
1431
|
+
const $xeUpload = this;
|
|
1432
|
+
const reactData = $xeUpload.reactData;
|
|
1433
|
+
const el = $xeUpload.$refs.refElem;
|
|
1434
|
+
const popupEl = $xeUpload.$refs.refPopupElem;
|
|
1435
|
+
let isActivated = getEventTargetNode(evnt, el).flag;
|
|
1436
|
+
if (!isActivated && popupEl) {
|
|
1437
|
+
const parentEl = popupEl.parentElement || popupEl;
|
|
1438
|
+
const modalEl = parentEl ? parentEl.parentElement : parentEl;
|
|
1439
|
+
isActivated = getEventTargetNode(evnt, modalEl).flag;
|
|
1440
|
+
}
|
|
1441
|
+
reactData.isActivated = isActivated;
|
|
1442
|
+
},
|
|
1443
|
+
handleGlobalBlurEvent() {
|
|
1444
|
+
const $xeUpload = this;
|
|
1445
|
+
const reactData = $xeUpload.reactData;
|
|
1446
|
+
reactData.isActivated = false;
|
|
1447
|
+
},
|
|
1448
|
+
//
|
|
1449
|
+
// Render
|
|
1450
|
+
//
|
|
1451
|
+
renderFileItemList(h, currList, isMoreView) {
|
|
1452
|
+
const $xeUpload = this;
|
|
1453
|
+
const props = $xeUpload;
|
|
1454
|
+
const slots = $xeUpload.$scopedSlots;
|
|
1455
|
+
const reactData = $xeUpload.reactData;
|
|
1456
|
+
const { showRemoveButton, showDownloadButton, showProgress, progressText, showPreview, showErrorStatus, dragSort, autoSubmit, showSubmitButton } = props;
|
|
1457
|
+
const { fileList, fileCacheMaps } = reactData;
|
|
1458
|
+
const isDisabled = $xeUpload.computeIsDisabled;
|
|
1459
|
+
const formReadonly = $xeUpload.computeFormReadonly;
|
|
1460
|
+
const nameProp = $xeUpload.computeNameProp;
|
|
1461
|
+
const typeProp = $xeUpload.computeTypeProp;
|
|
1462
|
+
const optionSlot = slots.option;
|
|
1463
|
+
const actionSlot = slots.action;
|
|
1464
|
+
const cornerSlot = slots.corner;
|
|
1465
|
+
const nameSlot = slots.name;
|
|
1466
|
+
const ons = {};
|
|
1467
|
+
if (dragSort && currList.length > 1) {
|
|
1468
|
+
ons.dragstart = $xeUpload.handleDragSortDragstartEvent;
|
|
1469
|
+
ons.dragover = $xeUpload.handleDragSortDragoverEvent;
|
|
1470
|
+
ons.dragend = $xeUpload.handleDragSortDragendEvent;
|
|
1471
|
+
}
|
|
1472
|
+
return currList.map((item, index) => {
|
|
1473
|
+
const fileKey = $xeUpload.getFieldKey(item);
|
|
1474
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
1475
|
+
let isLoading = false;
|
|
1476
|
+
let isError = false;
|
|
1477
|
+
let isPending = false;
|
|
1478
|
+
const fileName = `${item[nameProp] || ''}`;
|
|
1479
|
+
if (cacheItem) {
|
|
1480
|
+
isLoading = cacheItem.loading;
|
|
1481
|
+
isError = cacheItem.status === 'error';
|
|
1482
|
+
isPending = cacheItem.status === 'pending';
|
|
1483
|
+
}
|
|
1484
|
+
return h('div', {
|
|
1485
|
+
key: dragSort ? fileKey : index,
|
|
1486
|
+
class: ['vxe-upload--file-item', {
|
|
1487
|
+
'is--preview': showPreview,
|
|
1488
|
+
'is--loading': isLoading,
|
|
1489
|
+
'is--pending': isPending,
|
|
1490
|
+
'is--error': isError
|
|
1491
|
+
}],
|
|
1492
|
+
attrs: {
|
|
1493
|
+
fileid: fileKey,
|
|
1494
|
+
draggable: dragSort ? true : null
|
|
1495
|
+
},
|
|
1496
|
+
on: ons
|
|
1497
|
+
}, optionSlot
|
|
1498
|
+
? getSlotVNs(optionSlot({ option: item, isMoreView, options: fileList }))
|
|
1499
|
+
: [
|
|
1500
|
+
h('div', {
|
|
1501
|
+
class: 'vxe-upload--file-item-icon'
|
|
1502
|
+
}, [
|
|
1503
|
+
h('i', {
|
|
1504
|
+
class: getIcon()[`UPLOAD_FILE_TYPE_${`${item[typeProp]}`.toLocaleUpperCase()}`] || getIcon().UPLOAD_FILE_TYPE_DEFAULT
|
|
1505
|
+
})
|
|
1506
|
+
]),
|
|
1507
|
+
h('div', {
|
|
1508
|
+
class: 'vxe-upload--file-item-name',
|
|
1509
|
+
attrs: {
|
|
1510
|
+
title: fileName
|
|
1511
|
+
},
|
|
1512
|
+
on: {
|
|
1513
|
+
click(evnt) {
|
|
1514
|
+
if (!isLoading && !isError) {
|
|
1515
|
+
$xeUpload.handlePreviewFileEvent(evnt, item);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
}, nameSlot ? getSlotVNs(nameSlot({ option: item, isMoreView, options: fileList })) : fileName),
|
|
1520
|
+
isLoading
|
|
1521
|
+
? h('div', {
|
|
1522
|
+
class: 'vxe-upload--file-item-loading-icon'
|
|
1523
|
+
}, [
|
|
1524
|
+
h('i', {
|
|
1525
|
+
class: getIcon().UPLOAD_LOADING
|
|
1526
|
+
})
|
|
1527
|
+
])
|
|
1528
|
+
: renderEmptyElement($xeUpload),
|
|
1529
|
+
showProgress && isLoading && cacheItem
|
|
1530
|
+
? h('div', {
|
|
1531
|
+
class: 'vxe-upload--file-item-loading-text'
|
|
1532
|
+
}, progressText ? XEUtils.toFormatString(`${XEUtils.isFunction(progressText) ? progressText({}) : progressText}`, { percent: cacheItem.percent }) : getI18n('vxe.upload.uploadProgress', [cacheItem.percent]))
|
|
1533
|
+
: renderEmptyElement($xeUpload),
|
|
1534
|
+
!isLoading && ((isError && showErrorStatus) || (isPending && showSubmitButton && !autoSubmit))
|
|
1535
|
+
? h('div', {
|
|
1536
|
+
class: 'vxe-upload--file-item-rebtn'
|
|
1537
|
+
}, [
|
|
1538
|
+
h(VxeButtonComponent, {
|
|
1539
|
+
props: {
|
|
1540
|
+
icon: isError ? getIcon().UPLOAD_IMAGE_RE_UPLOAD : getIcon().UPLOAD_IMAGE_UPLOAD,
|
|
1541
|
+
mode: 'text',
|
|
1542
|
+
status: 'primary',
|
|
1543
|
+
content: isError ? getI18n('vxe.upload.reUpload') : getI18n('vxe.upload.manualUpload')
|
|
1544
|
+
},
|
|
1545
|
+
on: {
|
|
1546
|
+
click(evnt) {
|
|
1547
|
+
$xeUpload.handleReUploadEvent(evnt, item);
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
})
|
|
1551
|
+
])
|
|
1552
|
+
: renderEmptyElement($xeUpload),
|
|
1553
|
+
h('div', {
|
|
1554
|
+
class: 'vxe-upload--file-item-btn-wrapper'
|
|
1555
|
+
}, actionSlot
|
|
1556
|
+
? getSlotVNs(actionSlot({ option: item, isMoreView, options: fileList, readonly: formReadonly }))
|
|
1557
|
+
: [
|
|
1558
|
+
cornerSlot
|
|
1559
|
+
? h('div', {
|
|
1560
|
+
class: 'vxe-upload--file-item-action'
|
|
1561
|
+
}, getSlotVNs(cornerSlot({ option: item, isMoreView, options: fileList, readonly: formReadonly })))
|
|
1562
|
+
: renderEmptyElement($xeUpload),
|
|
1563
|
+
showDownloadButton && !isLoading
|
|
1564
|
+
? h('div', {
|
|
1565
|
+
class: 'vxe-upload--file-item-download-btn',
|
|
1566
|
+
on: {
|
|
1567
|
+
click(evnt) {
|
|
1568
|
+
$xeUpload.downloadFileEvent(evnt, item);
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
}, [
|
|
1572
|
+
h('i', {
|
|
1573
|
+
class: getIcon().UPLOAD_FILE_DOWNLOAD
|
|
1574
|
+
})
|
|
1575
|
+
])
|
|
1576
|
+
: renderEmptyElement($xeUpload),
|
|
1577
|
+
showRemoveButton && !formReadonly && !isDisabled && !isLoading
|
|
1578
|
+
? h('div', {
|
|
1579
|
+
class: 'vxe-upload--file-item-remove-btn',
|
|
1580
|
+
on: {
|
|
1581
|
+
click(evnt) {
|
|
1582
|
+
$xeUpload.removeFileEvent(evnt, item, index);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}, [
|
|
1586
|
+
h('i', {
|
|
1587
|
+
class: getIcon().UPLOAD_FILE_REMOVE
|
|
1588
|
+
})
|
|
1589
|
+
])
|
|
1590
|
+
: renderEmptyElement($xeUpload)
|
|
1591
|
+
])
|
|
1592
|
+
]);
|
|
1593
|
+
});
|
|
1594
|
+
},
|
|
1595
|
+
renderFileAction(h, isMoreView) {
|
|
1596
|
+
const $xeUpload = this;
|
|
1597
|
+
const props = $xeUpload;
|
|
1598
|
+
const slots = $xeUpload.$scopedSlots;
|
|
1599
|
+
const reactData = $xeUpload.reactData;
|
|
1600
|
+
const { showUploadButton, buttonText, buttonIcon, showButtonText, showButtonIcon, autoHiddenButton } = props;
|
|
1601
|
+
const { fileList } = reactData;
|
|
1602
|
+
const isDisabled = $xeUpload.computeIsDisabled;
|
|
1603
|
+
const formReadonly = $xeUpload.computeFormReadonly;
|
|
1604
|
+
const showTipText = $xeUpload.computedShowTipText;
|
|
1605
|
+
const defTipText = $xeUpload.computedDefTipText;
|
|
1606
|
+
const overCount = $xeUpload.computeOverCount;
|
|
1607
|
+
const defaultSlot = slots.default;
|
|
1608
|
+
const tipSlot = slots.tip || slots.hint;
|
|
1609
|
+
if (formReadonly || !showUploadButton) {
|
|
1610
|
+
return renderEmptyElement($xeUpload);
|
|
1611
|
+
}
|
|
1612
|
+
return h('div', {
|
|
1613
|
+
class: 'vxe-upload--file-action'
|
|
1614
|
+
}, [
|
|
1615
|
+
autoHiddenButton && overCount
|
|
1616
|
+
? renderEmptyElement($xeUpload)
|
|
1617
|
+
: h('div', {
|
|
1618
|
+
class: 'vxe-upload--file-action-btn',
|
|
1619
|
+
on: {
|
|
1620
|
+
click: $xeUpload.clickEvent
|
|
1621
|
+
}
|
|
1622
|
+
}, defaultSlot
|
|
1623
|
+
? getSlotVNs(defaultSlot({ isMoreView, options: fileList, $upload: $xeUpload }))
|
|
1624
|
+
: [
|
|
1625
|
+
h(VxeButtonComponent, {
|
|
1626
|
+
class: 'vxe-upload--file-action-button',
|
|
1627
|
+
props: {
|
|
1628
|
+
content: (isMoreView || showButtonText) ? (buttonText ? `${XEUtils.isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n('vxe.upload.fileBtnText')) : '',
|
|
1629
|
+
icon: showButtonIcon ? (buttonIcon || getIcon().UPLOAD_FILE_ADD) : '',
|
|
1630
|
+
disabled: isDisabled
|
|
1631
|
+
}
|
|
1632
|
+
})
|
|
1633
|
+
]),
|
|
1634
|
+
showTipText && (defTipText || tipSlot)
|
|
1635
|
+
? h('div', {
|
|
1636
|
+
class: 'vxe-upload--file-action-tip'
|
|
1637
|
+
}, tipSlot ? getSlotVNs(tipSlot({ isMoreView, options: fileList, $upload: $xeUpload })) : `${defTipText}`)
|
|
1638
|
+
: renderEmptyElement($xeUpload)
|
|
1639
|
+
]);
|
|
1640
|
+
},
|
|
1641
|
+
rendeFileMode(h) {
|
|
1642
|
+
const $xeUpload = this;
|
|
1643
|
+
const props = $xeUpload;
|
|
1644
|
+
const slots = $xeUpload.$scopedSlots;
|
|
1645
|
+
const reactData = $xeUpload.reactData;
|
|
1646
|
+
const { showList, moreConfig, dragSort } = props;
|
|
1647
|
+
const { fileList, isDragMove } = reactData;
|
|
1648
|
+
const moreOpts = $xeUpload.computeMoreOpts;
|
|
1649
|
+
const { maxCount, showMoreButton, layout, moreButtonText } = moreOpts;
|
|
1650
|
+
const isHorizontal = layout === 'horizontal';
|
|
1651
|
+
const moreBtnSlot = slots.moreButton || slots['more-button'];
|
|
1652
|
+
let currList = fileList;
|
|
1653
|
+
let overMaxNum = 0;
|
|
1654
|
+
let isMoreMax = false;
|
|
1655
|
+
let isMiniMore = false;
|
|
1656
|
+
if (XEUtils.isNumber(maxCount) && fileList.length > maxCount) {
|
|
1657
|
+
isMoreMax = true;
|
|
1658
|
+
isMiniMore = maxCount === 0;
|
|
1659
|
+
overMaxNum = fileList.length - maxCount;
|
|
1660
|
+
currList = fileList.slice(0, maxCount);
|
|
1661
|
+
}
|
|
1662
|
+
return h('div', {
|
|
1663
|
+
key: 'all',
|
|
1664
|
+
class: 'vxe-upload--file-wrapper'
|
|
1665
|
+
}, showList
|
|
1666
|
+
? [
|
|
1667
|
+
showMoreButton && moreConfig && isHorizontal
|
|
1668
|
+
? renderEmptyElement($xeUpload)
|
|
1669
|
+
: $xeUpload.renderFileAction(h, true),
|
|
1670
|
+
h('div', {
|
|
1671
|
+
class: ['vxe-upload--file-list-wrapper', {
|
|
1672
|
+
'is--horizontal': isHorizontal
|
|
1673
|
+
}]
|
|
1674
|
+
}, [
|
|
1675
|
+
currList.length
|
|
1676
|
+
? (dragSort
|
|
1677
|
+
? h('transition-group', {
|
|
1678
|
+
attrs: {
|
|
1679
|
+
name: `vxe-upload--drag-list${isDragMove ? '' : '-disabled'}`,
|
|
1680
|
+
tag: 'div'
|
|
1681
|
+
},
|
|
1682
|
+
class: 'vxe-upload--file-list'
|
|
1683
|
+
}, $xeUpload.renderFileItemList(h, currList, false))
|
|
1684
|
+
: h('div', {
|
|
1685
|
+
class: 'vxe-upload--file-list'
|
|
1686
|
+
}, $xeUpload.renderFileItemList(h, currList, false)))
|
|
1687
|
+
: renderEmptyElement($xeUpload),
|
|
1688
|
+
showMoreButton && overMaxNum
|
|
1689
|
+
? h('div', {
|
|
1690
|
+
class: 'vxe-upload--file-over-more'
|
|
1691
|
+
}, moreBtnSlot
|
|
1692
|
+
? getSlotVNs(moreBtnSlot({ options: fileList }))
|
|
1693
|
+
: [
|
|
1694
|
+
h(VxeButtonComponent, {
|
|
1695
|
+
props: {
|
|
1696
|
+
mode: 'text',
|
|
1697
|
+
content: moreButtonText ? (XEUtils.isFunction(moreButtonText) ? moreButtonText({ $upload: $xeUpload, options: fileList }) : XEUtils.toFormatString(moreButtonText, [fileList.length])) : getI18n(isMoreMax && isMiniMore ? 'vxe.upload.moreFileBtnText' : 'vxe.upload.moreBtnText', [fileList.length]),
|
|
1698
|
+
status: 'primary'
|
|
1699
|
+
},
|
|
1700
|
+
on: {
|
|
1701
|
+
click: $xeUpload.handleMoreEvent
|
|
1702
|
+
}
|
|
1703
|
+
})
|
|
1704
|
+
])
|
|
1705
|
+
: renderEmptyElement($xeUpload),
|
|
1706
|
+
showMoreButton && moreConfig && isHorizontal
|
|
1707
|
+
? $xeUpload.renderFileAction(h, false)
|
|
1708
|
+
: renderEmptyElement($xeUpload)
|
|
1709
|
+
])
|
|
1710
|
+
]
|
|
1711
|
+
: [
|
|
1712
|
+
$xeUpload.renderFileAction(h, false)
|
|
1713
|
+
]);
|
|
1714
|
+
},
|
|
1715
|
+
renderImageItemList(h, currList, isMoreView) {
|
|
1716
|
+
const $xeUpload = this;
|
|
1717
|
+
const props = $xeUpload;
|
|
1718
|
+
const slots = $xeUpload.$scopedSlots;
|
|
1719
|
+
const reactData = $xeUpload.reactData;
|
|
1720
|
+
const { showRemoveButton, showProgress, progressText, showPreview, showErrorStatus, dragSort, autoSubmit, showSubmitButton } = props;
|
|
1721
|
+
const { fileList, fileCacheMaps } = reactData;
|
|
1722
|
+
const isDisabled = $xeUpload.computeIsDisabled;
|
|
1723
|
+
const formReadonly = $xeUpload.computeFormReadonly;
|
|
1724
|
+
const imageOpts = $xeUpload.computeImageOpts;
|
|
1725
|
+
const imgStyle = $xeUpload.computeImgStyle;
|
|
1726
|
+
const optionSlot = slots.option;
|
|
1727
|
+
const actionSlot = slots.action;
|
|
1728
|
+
const cornerSlot = slots.corner;
|
|
1729
|
+
const ons = {};
|
|
1730
|
+
if (dragSort && currList.length > 1) {
|
|
1731
|
+
ons.dragstart = $xeUpload.handleDragSortDragstartEvent;
|
|
1732
|
+
ons.dragover = $xeUpload.handleDragSortDragoverEvent;
|
|
1733
|
+
ons.dragend = $xeUpload.handleDragSortDragendEvent;
|
|
1734
|
+
}
|
|
1735
|
+
return currList.map((item, index) => {
|
|
1736
|
+
const fileKey = $xeUpload.getFieldKey(item);
|
|
1737
|
+
const cacheItem = fileCacheMaps[fileKey];
|
|
1738
|
+
let isLoading = false;
|
|
1739
|
+
let isError = false;
|
|
1740
|
+
let isPending = false;
|
|
1741
|
+
if (cacheItem) {
|
|
1742
|
+
isLoading = cacheItem.loading;
|
|
1743
|
+
isError = cacheItem.status === 'error';
|
|
1744
|
+
isPending = cacheItem.status === 'pending';
|
|
1745
|
+
}
|
|
1746
|
+
return h('div', {
|
|
1747
|
+
key: dragSort ? fileKey : index,
|
|
1748
|
+
class: ['vxe-upload--image-item', {
|
|
1749
|
+
'is--preview': showPreview,
|
|
1750
|
+
'is--circle': imageOpts.circle,
|
|
1751
|
+
'is--loading': isLoading,
|
|
1752
|
+
'is--pending': isPending,
|
|
1753
|
+
'is--error': isError
|
|
1754
|
+
}],
|
|
1755
|
+
attrs: {
|
|
1756
|
+
fileid: fileKey,
|
|
1757
|
+
draggable: dragSort ? true : null
|
|
1758
|
+
},
|
|
1759
|
+
on: ons
|
|
1760
|
+
}, optionSlot
|
|
1761
|
+
? getSlotVNs(optionSlot({ option: item, isMoreView, options: fileList }))
|
|
1762
|
+
: [
|
|
1763
|
+
h('div', {
|
|
1764
|
+
class: 'vxe-upload--image-item-box',
|
|
1765
|
+
style: isMoreView ? {} : imgStyle,
|
|
1766
|
+
on: {
|
|
1767
|
+
click(evnt) {
|
|
1768
|
+
if (!isLoading && !isError) {
|
|
1769
|
+
$xeUpload.handlePreviewImageEvent(evnt, item, index);
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
}, [
|
|
1774
|
+
isLoading && cacheItem
|
|
1775
|
+
? h('div', {
|
|
1776
|
+
class: 'vxe-upload--image-item-loading'
|
|
1777
|
+
}, [
|
|
1778
|
+
h('div', {
|
|
1779
|
+
class: 'vxe-upload--image-item-loading-icon'
|
|
1780
|
+
}, [
|
|
1781
|
+
h('i', {
|
|
1782
|
+
class: getIcon().UPLOAD_LOADING
|
|
1783
|
+
})
|
|
1784
|
+
]),
|
|
1785
|
+
showProgress
|
|
1786
|
+
? h('div', {
|
|
1787
|
+
class: 'vxe-upload--image-item-loading-text'
|
|
1788
|
+
}, progressText ? XEUtils.toFormatString(`${XEUtils.isFunction(progressText) ? progressText({}) : progressText}`, { percent: cacheItem.percent }) : getI18n('vxe.upload.uploadProgress', [cacheItem.percent]))
|
|
1789
|
+
: renderEmptyElement($xeUpload)
|
|
1790
|
+
])
|
|
1791
|
+
: renderEmptyElement($xeUpload),
|
|
1792
|
+
h('div', {
|
|
1793
|
+
class: 'vxe-upload--image-item-img-wrapper',
|
|
1794
|
+
attrs: {
|
|
1795
|
+
title: getI18n('vxe.upload.viewItemTitle')
|
|
1796
|
+
}
|
|
1797
|
+
}, [
|
|
1798
|
+
h('img', {
|
|
1799
|
+
class: 'vxe-upload--image-item-img',
|
|
1800
|
+
attrs: {
|
|
1801
|
+
src: $xeUpload.getThumbnailFileUrl(item)
|
|
1802
|
+
}
|
|
1803
|
+
})
|
|
1804
|
+
]),
|
|
1805
|
+
!isLoading && ((isError && showErrorStatus) || (isPending && showSubmitButton && !autoSubmit))
|
|
1806
|
+
? h('div', {
|
|
1807
|
+
class: 'vxe-upload--image-item-rebtn'
|
|
1808
|
+
}, [
|
|
1809
|
+
h(VxeButtonComponent, {
|
|
1810
|
+
props: {
|
|
1811
|
+
icon: isError ? getIcon().UPLOAD_IMAGE_RE_UPLOAD : getIcon().UPLOAD_IMAGE_UPLOAD,
|
|
1812
|
+
mode: 'text',
|
|
1813
|
+
status: 'primary',
|
|
1814
|
+
content: isError ? getI18n('vxe.upload.reUpload') : getI18n('vxe.upload.manualUpload')
|
|
1815
|
+
},
|
|
1816
|
+
on: {
|
|
1817
|
+
click(evnt) {
|
|
1818
|
+
$xeUpload.handleReUploadEvent(evnt, item);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
})
|
|
1822
|
+
])
|
|
1823
|
+
: renderEmptyElement($xeUpload),
|
|
1824
|
+
h('div', {
|
|
1825
|
+
class: 'vxe-upload--image-item-btn-wrapper',
|
|
1826
|
+
on: {
|
|
1827
|
+
click(evnt) {
|
|
1828
|
+
evnt.stopPropagation();
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
}, actionSlot
|
|
1832
|
+
? getSlotVNs(actionSlot({ option: item, isMoreView, options: fileList, readonly: formReadonly }))
|
|
1833
|
+
: [
|
|
1834
|
+
cornerSlot
|
|
1835
|
+
? h('div', {
|
|
1836
|
+
class: 'vxe-upload--file-item-action'
|
|
1837
|
+
}, getSlotVNs(cornerSlot({ option: item, isMoreView, options: fileList, readonly: formReadonly })))
|
|
1838
|
+
: renderEmptyElement($xeUpload),
|
|
1839
|
+
showRemoveButton && !formReadonly && !isDisabled && !isLoading
|
|
1840
|
+
? h('div', {
|
|
1841
|
+
class: 'vxe-upload--image-item-remove-btn',
|
|
1842
|
+
on: {
|
|
1843
|
+
click(evnt) {
|
|
1844
|
+
evnt.stopPropagation();
|
|
1845
|
+
$xeUpload.removeFileEvent(evnt, item, index);
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
}, [
|
|
1849
|
+
h('i', {
|
|
1850
|
+
class: getIcon().UPLOAD_IMAGE_REMOVE
|
|
1851
|
+
})
|
|
1852
|
+
])
|
|
1853
|
+
: renderEmptyElement($xeUpload)
|
|
1854
|
+
])
|
|
1855
|
+
])
|
|
1856
|
+
]);
|
|
1857
|
+
});
|
|
1858
|
+
},
|
|
1859
|
+
renderImageAction(h, isMoreView) {
|
|
1860
|
+
const $xeUpload = this;
|
|
1861
|
+
const props = $xeUpload;
|
|
1862
|
+
const slots = $xeUpload.$scopedSlots;
|
|
1863
|
+
const reactData = $xeUpload.reactData;
|
|
1864
|
+
const { showUploadButton, buttonText, buttonIcon, showButtonText, showButtonIcon, autoHiddenButton } = props;
|
|
1865
|
+
const { fileList } = reactData;
|
|
1866
|
+
const formReadonly = $xeUpload.computeFormReadonly;
|
|
1867
|
+
const showTipText = $xeUpload.computedShowTipText;
|
|
1868
|
+
const defTipText = $xeUpload.computedDefTipText;
|
|
1869
|
+
const overCount = $xeUpload.computeOverCount;
|
|
1870
|
+
const imgStyle = $xeUpload.computeImgStyle;
|
|
1871
|
+
const defaultSlot = slots.default;
|
|
1872
|
+
const tipSlot = slots.tip || slots.hint;
|
|
1873
|
+
if (formReadonly || !showUploadButton || (autoHiddenButton && overCount)) {
|
|
1874
|
+
return renderEmptyElement($xeUpload);
|
|
1875
|
+
}
|
|
1876
|
+
return h('div', {
|
|
1877
|
+
key: 'action',
|
|
1878
|
+
class: 'vxe-upload--image-action'
|
|
1879
|
+
}, [
|
|
1880
|
+
h('div', {
|
|
1881
|
+
class: 'vxe-upload--image-action-btn',
|
|
1882
|
+
on: {
|
|
1883
|
+
click: $xeUpload.clickEvent
|
|
1884
|
+
}
|
|
1885
|
+
}, defaultSlot
|
|
1886
|
+
? defaultSlot({ isMoreView, options: fileList, $upload: $xeUpload })
|
|
1887
|
+
: [
|
|
1888
|
+
h('div', {
|
|
1889
|
+
class: 'vxe-upload--image-action-box',
|
|
1890
|
+
style: isMoreView ? {} : imgStyle
|
|
1891
|
+
}, [
|
|
1892
|
+
showButtonIcon
|
|
1893
|
+
? h('div', {
|
|
1894
|
+
class: 'vxe-upload--image-action-icon'
|
|
1895
|
+
}, [
|
|
1896
|
+
h('i', {
|
|
1897
|
+
class: buttonIcon || getIcon().UPLOAD_IMAGE_ADD
|
|
1898
|
+
})
|
|
1899
|
+
])
|
|
1900
|
+
: renderEmptyElement($xeUpload),
|
|
1901
|
+
isMoreView || showButtonText
|
|
1902
|
+
? h('div', {
|
|
1903
|
+
class: 'vxe-upload--image-action-content'
|
|
1904
|
+
}, buttonText ? `${XEUtils.isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n('vxe.upload.imgBtnText'))
|
|
1905
|
+
: renderEmptyElement($xeUpload),
|
|
1906
|
+
showTipText && (defTipText || tipSlot)
|
|
1907
|
+
? h('div', {
|
|
1908
|
+
class: 'vxe-upload--image-action-hint'
|
|
1909
|
+
}, tipSlot ? getSlotVNs(tipSlot({ isMoreView, options: fileList, $upload: $xeUpload })) : `${defTipText}`)
|
|
1910
|
+
: renderEmptyElement($xeUpload)
|
|
1911
|
+
])
|
|
1912
|
+
])
|
|
1913
|
+
]);
|
|
1914
|
+
},
|
|
1915
|
+
renderImageMode(h) {
|
|
1916
|
+
const $xeUpload = this;
|
|
1917
|
+
const props = $xeUpload;
|
|
1918
|
+
const slots = $xeUpload.$scopedSlots;
|
|
1919
|
+
const reactData = $xeUpload.reactData;
|
|
1920
|
+
const { showList, dragSort } = props;
|
|
1921
|
+
const { fileList, isDragMove } = reactData;
|
|
1922
|
+
const moreOpts = $xeUpload.computeMoreOpts;
|
|
1923
|
+
const moreBtnSlot = slots.moreButton || slots['more-button'];
|
|
1924
|
+
const { maxCount, showMoreButton, moreButtonText } = moreOpts;
|
|
1925
|
+
let currList = fileList;
|
|
1926
|
+
let overMaxNum = 0;
|
|
1927
|
+
let isMoreMax = false;
|
|
1928
|
+
let isMiniMore = false;
|
|
1929
|
+
if (XEUtils.isNumber(maxCount) && fileList.length > maxCount) {
|
|
1930
|
+
isMoreMax = true;
|
|
1931
|
+
isMiniMore = maxCount === 0;
|
|
1932
|
+
overMaxNum = fileList.length - maxCount;
|
|
1933
|
+
currList = fileList.slice(0, maxCount);
|
|
1934
|
+
}
|
|
1935
|
+
return h('div', {
|
|
1936
|
+
key: 'image',
|
|
1937
|
+
class: 'vxe-upload--image-wrapper'
|
|
1938
|
+
}, showList
|
|
1939
|
+
? [
|
|
1940
|
+
dragSort
|
|
1941
|
+
? h('transition-group', {
|
|
1942
|
+
attrs: {
|
|
1943
|
+
name: `vxe-upload--drag-list${isDragMove ? '' : '-disabled'}`,
|
|
1944
|
+
tag: 'div'
|
|
1945
|
+
},
|
|
1946
|
+
class: 'vxe-upload--image-list'
|
|
1947
|
+
}, $xeUpload.renderImageItemList(h, currList, false).concat([
|
|
1948
|
+
showMoreButton && overMaxNum
|
|
1949
|
+
? h('div', {
|
|
1950
|
+
key: 'om',
|
|
1951
|
+
class: 'vxe-upload--image-over-more'
|
|
1952
|
+
}, moreBtnSlot
|
|
1953
|
+
? getSlotVNs(moreBtnSlot({ options: fileList }))
|
|
1954
|
+
: [
|
|
1955
|
+
h(VxeButtonComponent, {
|
|
1956
|
+
props: {
|
|
1957
|
+
mode: 'text',
|
|
1958
|
+
content: moreButtonText ? (XEUtils.isFunction(moreButtonText) ? moreButtonText({ $upload: $xeUpload, options: fileList }) : XEUtils.toFormatString(moreButtonText, [fileList.length])) : getI18n(isMoreMax && isMiniMore ? 'vxe.upload.moreImgBtnText' : 'vxe.upload.moreBtnText', [fileList.length]),
|
|
1959
|
+
status: 'primary'
|
|
1960
|
+
},
|
|
1961
|
+
on: {
|
|
1962
|
+
click: $xeUpload.handleMoreEvent
|
|
1963
|
+
}
|
|
1964
|
+
})
|
|
1965
|
+
])
|
|
1966
|
+
: renderEmptyElement($xeUpload),
|
|
1967
|
+
$xeUpload.renderImageAction(h, false)
|
|
1968
|
+
]))
|
|
1969
|
+
: h('div', {
|
|
1970
|
+
class: 'vxe-upload--image-list'
|
|
1971
|
+
}, $xeUpload.renderImageItemList(h, currList, false).concat([
|
|
1972
|
+
showMoreButton && overMaxNum
|
|
1973
|
+
? h('div', {
|
|
1974
|
+
class: 'vxe-upload--image-over-more'
|
|
1975
|
+
}, moreBtnSlot
|
|
1976
|
+
? getSlotVNs(moreBtnSlot({ options: fileList }))
|
|
1977
|
+
: [
|
|
1978
|
+
h(VxeButtonComponent, {
|
|
1979
|
+
props: {
|
|
1980
|
+
mode: 'text',
|
|
1981
|
+
content: moreButtonText ? (XEUtils.isFunction(moreButtonText) ? moreButtonText({ $upload: $xeUpload, options: fileList }) : XEUtils.toFormatString(moreButtonText, [fileList.length])) : getI18n(isMoreMax && isMiniMore ? 'vxe.upload.moreImgBtnText' : 'vxe.upload.moreBtnText', [fileList.length]),
|
|
1982
|
+
status: 'primary'
|
|
1983
|
+
},
|
|
1984
|
+
on: {
|
|
1985
|
+
click: $xeUpload.handleMoreEvent
|
|
1986
|
+
}
|
|
1987
|
+
})
|
|
1988
|
+
])
|
|
1989
|
+
: renderEmptyElement($xeUpload),
|
|
1990
|
+
$xeUpload.renderImageAction(h, false)
|
|
1991
|
+
]))
|
|
1992
|
+
]
|
|
1993
|
+
: [
|
|
1994
|
+
h('div', {
|
|
1995
|
+
class: 'vxe-upload--image-list'
|
|
1996
|
+
}, [
|
|
1997
|
+
$xeUpload.renderImageAction(h, false)
|
|
1998
|
+
])
|
|
1999
|
+
]);
|
|
2000
|
+
},
|
|
2001
|
+
renderVN(h) {
|
|
2002
|
+
const $xeUpload = this;
|
|
2003
|
+
const props = $xeUpload;
|
|
2004
|
+
const reactData = $xeUpload.reactData;
|
|
2005
|
+
const { showErrorStatus, dragToUpload, pasteToUpload, dragSort, dragPlaceholder } = props;
|
|
2006
|
+
const { isDragUploadStatus, showMorePopup, isActivated, dragIndex } = reactData;
|
|
2007
|
+
const vSize = $xeUpload.computeSize;
|
|
2008
|
+
const isDisabled = $xeUpload.computeIsDisabled;
|
|
2009
|
+
const formReadonly = $xeUpload.computeFormReadonly;
|
|
2010
|
+
const isImage = $xeUpload.computeIsImage;
|
|
2011
|
+
const ons = {};
|
|
2012
|
+
if (dragToUpload && dragIndex === -1) {
|
|
2013
|
+
ons.dragover = $xeUpload.handleUploadDragoverEvent;
|
|
2014
|
+
ons.dragleave = $xeUpload.handleUploadDragleaveEvent;
|
|
2015
|
+
ons.drop = $xeUpload.handleUploadDropEvent;
|
|
2016
|
+
}
|
|
2017
|
+
return h('div', {
|
|
2018
|
+
ref: 'refElem',
|
|
2019
|
+
class: ['vxe-upload', {
|
|
2020
|
+
[`size--${vSize}`]: vSize,
|
|
2021
|
+
'is--active': isActivated,
|
|
2022
|
+
'is--readonly': formReadonly,
|
|
2023
|
+
'is--disabled': isDisabled,
|
|
2024
|
+
'is--paste': pasteToUpload,
|
|
2025
|
+
'show--error': showErrorStatus,
|
|
2026
|
+
'is--drag': isDragUploadStatus
|
|
2027
|
+
}],
|
|
2028
|
+
on: ons
|
|
2029
|
+
}, [
|
|
2030
|
+
isImage ? $xeUpload.renderImageMode(h) : $xeUpload.rendeFileMode(h),
|
|
2031
|
+
dragSort
|
|
2032
|
+
? h('div', {
|
|
2033
|
+
ref: 'refDragLineElem',
|
|
2034
|
+
class: 'vxe-upload--drag-line'
|
|
2035
|
+
})
|
|
2036
|
+
: renderEmptyElement($xeUpload),
|
|
2037
|
+
isDragUploadStatus && !showMorePopup
|
|
2038
|
+
? h('div', {
|
|
2039
|
+
class: 'vxe-upload--drag-placeholder'
|
|
2040
|
+
}, dragPlaceholder || getI18n('vxe.upload.dragPlaceholder'))
|
|
2041
|
+
: renderEmptyElement($xeUpload)
|
|
2042
|
+
]);
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
created() {
|
|
2046
|
+
const $xeUpload = this;
|
|
2047
|
+
$xeUpload.internalData = createInternalData();
|
|
2048
|
+
$xeUpload.updateFileList();
|
|
2049
|
+
},
|
|
2050
|
+
mounted() {
|
|
2051
|
+
const $xeUpload = this;
|
|
2052
|
+
const props = $xeUpload;
|
|
2053
|
+
if (props.multiple && props.singleMode) {
|
|
2054
|
+
errLog('vxe.error.errConflicts', ['multiple', 'single-mode']);
|
|
2055
|
+
}
|
|
2056
|
+
if (props.imageStyle) {
|
|
2057
|
+
warnLog('vxe.error.delProp', ['image-style', 'image-config']);
|
|
2058
|
+
}
|
|
2059
|
+
if (props.dragSort) {
|
|
2060
|
+
initTpImg();
|
|
2061
|
+
}
|
|
2062
|
+
globalEvents.on($xeUpload, 'paste', $xeUpload.handleGlobalPasteEvent);
|
|
2063
|
+
globalEvents.on($xeUpload, 'click', $xeUpload.handleGlobalClickEvent);
|
|
2064
|
+
globalEvents.on($xeUpload, 'blur', $xeUpload.handleGlobalBlurEvent);
|
|
2065
|
+
},
|
|
2066
|
+
beforeDestroy() {
|
|
2067
|
+
const $xeUpload = this;
|
|
2068
|
+
const reactData = $xeUpload.reactData;
|
|
2069
|
+
const internalData = $xeUpload.internalData;
|
|
2070
|
+
reactData.isDragUploadStatus = false;
|
|
2071
|
+
globalEvents.off($xeUpload, 'paste');
|
|
2072
|
+
globalEvents.off($xeUpload, 'click');
|
|
2073
|
+
globalEvents.off($xeUpload, 'blur');
|
|
2074
|
+
XEUtils.assign(reactData, createReactData());
|
|
2075
|
+
XEUtils.assign(internalData, createInternalData());
|
|
2076
|
+
},
|
|
2077
|
+
render(h) {
|
|
2078
|
+
return this.renderVN(h);
|
|
2079
|
+
}
|
|
2080
|
+
};
|