@das-fed/ui 7.0.7-hot.9 → 7.0.8
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/esm-map.json +1 -3
- package/package.json +5 -6
- package/packages/business-components/ai-panel/i18n/index.d.ts +0 -8
- package/packages/business-components/ai-panel/{index-8yffh0Id.js → index-CD2YNg3j.js} +1341 -1390
- package/packages/business-components/ai-panel/index-CD2YNg3j.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-IzGl26KU.js → index-CJeKTaAS.js} +6 -6
- package/packages/business-components/ai-panel/index-CJeKTaAS.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-OwRrV6K8.js → index-DWHxqEh3.js} +1 -1
- package/packages/business-components/ai-panel/index-DWHxqEh3.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -1
- package/packages/business-components/ai-panel/src/dasAI/apis.d.ts +0 -1
- package/packages/business-components/ai-panel/src/dasAI/store/index.d.ts +0 -1
- package/packages/business-components/ai-panel/style.css +1 -1
- package/packages/business-components/ai-panel/style.css.gz +0 -0
- package/packages/business-components/app-container/index.js +33 -35
- package/packages/business-components/app-container/index.js.gz +0 -0
- package/packages/business-components/app-container/src/style-theme.d.ts +0 -2
- package/packages/business-components/app-container/style.css +1 -1
- package/packages/business-components/app-container/style.css.gz +0 -0
- package/packages/business-components/area-phone-select/index.d.ts +40 -54
- package/packages/business-components/area-phone-select/src/area-popover/index.vue.d.ts +6 -8
- package/packages/business-components/change-pwd/src/hooks/use-changePwd.d.ts +8 -8
- package/packages/business-components/currency-page/index.d.ts +1 -3
- package/packages/business-components/currency-page/index.js +35 -40
- package/packages/business-components/currency-page/index.js.gz +0 -0
- package/packages/business-components/currency-page/src/index.vue.d.ts +1 -3
- package/packages/business-components/currency-page/src/type.d.ts +0 -6
- package/packages/business-components/currency-page/style.css +1 -1
- package/packages/business-components/device-panel/index.js +5333 -5333
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/src/apis.d.ts +30 -30
- package/packages/business-components/device-panel/src/components/drag-resize/index.vue.d.ts +2 -2
- package/packages/business-components/device-panel/src/components/panelHeaders/index.vue.d.ts +1 -1
- package/packages/business-components/device-panel/src/components/videoDialog/component/GridLayout/GridItem.vue.d.ts +17 -2
- package/packages/business-components/device-panel/src/components/videoDialog/component/GridLayout/GridLayout.vue.d.ts +15 -2
- package/packages/business-components/echarts/index.d.ts +10 -10
- package/packages/business-components/echarts/index.js +4712 -4712
- package/packages/business-components/echarts/index.js.gz +0 -0
- package/packages/business-components/echarts/src/Index.vue.d.ts +2 -2
- package/packages/business-components/export-button/index.d.ts +1 -1
- package/packages/business-components/export-button/src/App.vue.d.ts +34 -2
- package/packages/business-components/import-button/index.d.ts +7 -8
- package/packages/business-components/import-button/index.js +74 -76
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/import-button/src/App.vue.d.ts +56 -4
- package/packages/business-components/import-button/src/type.d.ts +0 -4
- package/packages/business-components/import-button/style.css +1 -1
- package/packages/business-components/model-table-dialog/index.d.ts +130 -163
- package/packages/business-components/model-table-dialog/src/Index.vue.d.ts +264 -19
- package/packages/business-components/model-table-dialog/src/ModelTable.vue.d.ts +6429 -4
- package/packages/business-components/payment/index.js +2 -2
- package/packages/business-components/payment/index.js.gz +0 -0
- package/packages/business-components/process-configuration/index.js +4 -4
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-form/src/hooks/useForm.d.ts +8 -8
- package/packages/business-components/process-table/index.d.ts +22 -25
- package/packages/business-components/process-table/src/App.vue.d.ts +69 -4
- package/packages/business-components/urgent-panel/index.js +8 -8
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/src/components/drag-resize/index.vue.d.ts +2 -2
- package/packages/business-components/urgent-panel/src/components/panelHeaders/index.vue.d.ts +1 -1
- package/packages/business-components/video-dialog/index.js +1 -1
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/src/component/GridLayout/GridItem.vue.d.ts +17 -2
- package/packages/business-components/video-dialog/src/component/GridLayout/GridLayout.vue.d.ts +15 -2
- package/packages/components/alert/index.d.ts +18 -33
- package/packages/components/alert/src/index.vue.d.ts +6 -11
- package/packages/components/audio-video/index.d.ts +17 -17
- package/packages/components/audio-video/index.js +1 -1
- package/packages/components/audio-video/index.js.gz +0 -0
- package/packages/components/audio-video/src/Index.vue.d.ts +1 -1
- package/packages/components/audio-video/src/player/index.vue.d.ts +4 -4
- package/packages/components/autocomplete/index.d.ts +16 -16
- package/packages/components/autocomplete/src/index.vue.d.ts +83 -4
- package/packages/components/breadcrumb/index.d.ts +3 -5
- package/packages/components/breadcrumb/src/BreadCrumb.vue.d.ts +21 -2
- package/packages/components/breadcrumb/src/BreadCrumbItem.vue.d.ts +13 -2
- package/packages/components/button/index.d.ts +6 -11
- package/packages/components/button/index.js +4 -4
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/button/src/Index.vue.d.ts +4 -9
- package/packages/components/calendar/index.d.ts +16 -25
- package/packages/components/calendar/src/Index.vue.d.ts +16 -25
- package/packages/components/calendar/src/calendar-table.vue.d.ts +4 -5
- package/packages/components/calendar/src/old-Index.vue.d.ts +3 -5
- package/packages/components/cascader/index.d.ts +25 -28
- package/packages/components/cascader/src/Index.vue.d.ts +5 -6
- package/packages/components/checkbox/index.d.ts +61 -73
- package/packages/components/checkbox/src/Index.vue.d.ts +69 -9
- package/packages/components/collapse-panel/index.d.ts +9 -15
- package/packages/components/collapse-panel/src/Index.vue.d.ts +13 -2
- package/packages/components/collapse-transition/index.d.ts +1 -1
- package/packages/components/collapse-transition/src/Index.vue.d.ts +15 -2
- package/packages/components/collaspe/index.d.ts +3 -3
- package/packages/components/collaspe/src/Index.vue.d.ts +16 -2
- package/packages/components/color-picker/index.d.ts +15 -15
- package/packages/components/color-picker/src/Index.vue.d.ts +3 -3
- package/packages/components/custom-search-item/index.d.ts +3 -3
- package/packages/components/custom-search-item/src/Index.vue.d.ts +27 -2
- package/packages/components/date-picker/index.d.ts +71 -86
- package/packages/components/date-picker/index.js +3 -7
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/src/DatePicker.vue.d.ts +11 -17
- package/packages/components/date-picker/src/DateRangePicker.vue.d.ts +4 -4
- package/packages/components/date-picker/src/RangePicker.vue.d.ts +11 -17
- package/packages/components/date-picker/src/TimePicker.vue.d.ts +5 -6
- package/packages/components/date-picker/src/TimeRangePicker.vue.d.ts +6 -8
- package/packages/components/dialog/index.d.ts +16 -22
- package/packages/components/dialog/src/Index.vue.d.ts +11 -17
- package/packages/components/dimple-layout/index.js +1 -1
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/drawer/index.d.ts +3 -5
- package/packages/components/drawer/src/Index.vue.d.ts +9 -2
- package/packages/components/dropdown/index.d.ts +4 -5
- package/packages/components/dropdown/src/dropdownItem.vue.d.ts +9 -2
- package/packages/components/dropdown/src/dropdownMenu.vue.d.ts +7 -2
- package/packages/components/dropdown/src/index.vue.d.ts +18 -2
- package/packages/components/edit-table/index.d.ts +83 -128
- package/packages/components/edit-table/index.js +658 -656
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/src/index.vue.d.ts +4095 -4
- package/packages/components/empty/index.d.ts +6 -8
- package/packages/components/empty/index.js +1 -1
- package/packages/components/empty/index.js.gz +0 -0
- package/packages/components/empty/src/Index.vue.d.ts +20 -3
- package/packages/components/error-overlay-model/index.d.ts +1 -1
- package/packages/components/error-overlay-model/src/index.vue.d.ts +1 -1
- package/packages/components/form/index.d.ts +12 -12
- package/packages/components/form/src/Index.vue.d.ts +21 -3
- package/packages/components/hls-player/index.d.ts +158 -45
- package/packages/components/hls-player/index.js +4098 -4182
- package/packages/components/hls-player/index.js.gz +0 -0
- package/packages/components/hls-player/src/das-hls-player.vue.d.ts +37 -3
- package/packages/components/hls-player/src/type.d.ts +0 -3
- package/packages/components/hls-player/style.css +1 -1
- package/packages/components/hls-player/style.css.gz +0 -0
- package/packages/components/icon/index.js +25 -25
- package/packages/components/icon/index.js.gz +0 -0
- package/packages/components/icon/src/base-icon.vue.d.ts +14 -2
- package/packages/components/image-upload/index.d.ts +0 -1
- package/packages/components/image-upload/index.js +114 -767
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-upload/src/Index.vue.d.ts +0 -1
- package/packages/components/image-upload/src/type.d.ts +0 -3
- package/packages/components/image-upload/style.css +1 -1
- package/packages/components/image-upload/style.css.gz +0 -0
- package/packages/components/image-viewer/index.d.ts +0 -1
- package/packages/components/image-viewer/index.js +436 -1088
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/image-viewer/src/Index.vue.d.ts +0 -1
- package/packages/components/image-viewer/src/type.d.ts +0 -3
- package/packages/components/image-viewer/style.css +1 -1
- package/packages/components/image-viewer/style.css.gz +0 -0
- package/packages/components/input/index.d.ts +37 -40
- package/packages/components/input/src/index.vue.d.ts +15 -18
- package/packages/components/input-dialog-select/index.d.ts +5 -5
- package/packages/components/input-dialog-select/src/Index.vue.d.ts +5 -5
- package/packages/components/input-number/index.d.ts +22 -22
- package/packages/components/input-number/src/App.vue.d.ts +6 -6
- package/packages/components/live-player/index.d.ts +3 -3
- package/packages/components/live-player/src/das-live-player.vue.d.ts +25 -2
- package/packages/components/loading/index.js +2 -2
- package/packages/components/loading/index.js.gz +0 -0
- package/packages/components/map/index.js +1 -1
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/menu-aside/index.d.ts +6 -9
- package/packages/components/menu-aside/index.js +214 -238
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/menu-aside/src/Index.vue.d.ts +4 -7
- package/packages/components/menu-aside/src/style-theme.d.ts +0 -25
- package/packages/components/menu-aside/src/sub-menu/sub-menu.vue.d.ts +2 -3
- package/packages/components/menu-aside/src/type.d.ts +1 -1
- package/packages/components/menu-aside/style.css +1 -1
- package/packages/components/menu-aside/style.css.gz +0 -0
- package/packages/components/menu-header/index.d.ts +2 -9
- package/packages/components/menu-header/index.js +50 -54
- package/packages/components/menu-header/index.js.gz +0 -0
- package/packages/components/menu-header/src/Index.vue.d.ts +2 -5
- package/packages/components/menu-header/src/style-theme.d.ts +0 -9
- package/packages/components/menu-header/src/type.d.ts +1 -6
- package/packages/components/menu-header/style.css +1 -1
- package/packages/components/menu-header/style.css.gz +0 -0
- package/packages/components/pagination/index.d.ts +3 -3
- package/packages/components/pagination/src/Pagination.vue.d.ts +79 -2
- package/packages/components/popover/index.d.ts +6 -9
- package/packages/components/popover/src/Index.vue.d.ts +34 -3
- package/packages/components/popup-mask/index.d.ts +29 -32
- package/packages/components/popup-mask/src/Index.vue.d.ts +37 -6
- package/packages/components/preview/index.d.ts +1 -1
- package/packages/components/preview/src/Index.vue.d.ts +14 -2
- package/packages/components/progress/index.d.ts +2 -2
- package/packages/components/progress/index.js +1 -1
- package/packages/components/progress/index.js.gz +0 -0
- package/packages/components/progress/src/Index.vue.d.ts +48 -2
- package/packages/components/radio/index.d.ts +39 -57
- package/packages/components/radio/src/Index.vue.d.ts +55 -5
- package/packages/components/rich-editor/index.js +294 -294
- package/packages/components/rich-editor/index.js.gz +0 -0
- package/packages/components/scrollbar/index.d.ts +1 -1
- package/packages/components/scrollbar/src/scrollbar.vue.d.ts +18 -2
- package/packages/components/search/index.d.ts +3 -3
- package/packages/components/search/src/Index.vue.d.ts +3 -3
- package/packages/components/search-form/index.js +30 -21
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/src/Index.vue.d.ts +90 -2
- package/packages/components/select/index.d.ts +33 -43
- package/packages/components/select/src/Select.vue.d.ts +19 -29
- package/packages/components/select-input/index.d.ts +3 -3
- package/packages/components/select-input/src/Index.vue.d.ts +3 -3
- package/packages/components/select-list/index.d.ts +24 -29
- package/packages/components/select-list/src/Index.vue.d.ts +71 -9
- package/packages/components/special-range-picker-month/index.d.ts +2 -2
- package/packages/components/special-range-picker-month/index.js +1 -1
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/src/Index.vue.d.ts +2 -2
- package/packages/components/special-range-picker-year/index.d.ts +2 -2
- package/packages/components/special-range-picker-year/index.js +1 -1
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/src/Index.vue.d.ts +2 -2
- package/packages/components/spin/index.d.ts +1 -1
- package/packages/components/spin/index.js +1 -1
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/spin/src/index.vue.d.ts +15 -2
- package/packages/components/split-panel/index.d.ts +12 -21
- package/packages/components/split-panel/index.js +1 -1
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/split-panel/src/Index.vue.d.ts +4 -7
- package/packages/components/step/src/stepItem.vue.d.ts +16 -2
- package/packages/components/steps/index.d.ts +1 -1
- package/packages/components/steps/src/steps.vue.d.ts +7 -2
- package/packages/components/table/index.d.ts +78 -132
- package/packages/components/table/index.js +239 -239
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/src/Table.vue.d.ts +1170 -3
- package/packages/components/table/src/hooks/use-operation.d.ts +4 -4
- package/packages/components/table/src/table-column/index.vue.d.ts +377 -3
- package/packages/components/tabs/index.d.ts +12 -21
- package/packages/components/tabs/index.js +31 -31
- package/packages/components/tabs/index.js.gz +0 -0
- package/packages/components/tabs/src/Tabs.vue.d.ts +63 -5
- package/packages/components/tag/index.d.ts +1 -1
- package/packages/components/tag/src/Index.vue.d.ts +1 -1
- package/packages/components/time-line/index.js +3 -3
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/time-line/src/Index.vue.d.ts +12 -2
- package/packages/components/time-line/src/TimelineItem.vue.d.ts +15 -2
- package/packages/components/tooltip/index.d.ts +6 -9
- package/packages/components/tooltip/src/index.vue.d.ts +41 -2
- package/packages/components/tree/index.js +1 -1
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree/src/App.vue.d.ts +33 -61
- package/packages/components/tree/src/empty.vue.d.ts +4 -2
- package/packages/components/tree-select/src/App.vue.d.ts +98 -194
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +88 -180
- package/packages/components/tree-table/index.d.ts +58 -100
- package/packages/components/tree-table/index.js +266 -302
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-table/src/App.vue.d.ts +18 -32
- package/packages/components/tree-table/src/type.d.ts +1 -1
- package/packages/components/tree-table/style.css +1 -1
- package/packages/components/tree-table/style.css.gz +0 -0
- package/packages/components/tree-v2/index.d.ts +51 -159
- package/packages/components/tree-v2/index.js +1 -1
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/components/tree-v2/src/App.vue.d.ts +17 -53
- package/packages/components/tree-v2/src/empty.vue.d.ts +4 -2
- package/packages/components/upload/index.d.ts +7 -10
- package/packages/components/upload/index.js +1 -1
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/upload/src/Index.vue.d.ts +43 -3
- package/packages/components/virtual-tree/index.js +3 -3
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/packages/components/virtual-tree/src/App.vue.d.ts +3 -4
- package/packages/components/watermark/index.d.ts +1 -1
- package/packages/components/watermark/src/index.vue.d.ts +7 -2
- package/packages/icons/1-grids/index.vue.d.ts +9 -2
- package/packages/icons/4-grids/index.vue.d.ts +9 -2
- package/packages/icons/9-grids/index.vue.d.ts +9 -2
- package/packages/icons/add/index.vue.d.ts +9 -2
- package/packages/icons/add-2/index.vue.d.ts +9 -2
- package/packages/icons/add-item/index.vue.d.ts +9 -2
- package/packages/icons/addto/index.vue.d.ts +9 -2
- package/packages/icons/alarm/index.vue.d.ts +9 -2
- package/packages/icons/arrow-first/index.vue.d.ts +9 -2
- package/packages/icons/arrow-last/index.vue.d.ts +9 -2
- package/packages/icons/audioing/index.vue.d.ts +9 -2
- package/packages/icons/back/index.vue.d.ts +9 -2
- package/packages/icons/bianjigongzuotai/index.vue.d.ts +9 -2
- package/packages/icons/biaochi/index.vue.d.ts +9 -2
- package/packages/icons/bim/index.vue.d.ts +9 -2
- package/packages/icons/bobaoguanbi/index.vue.d.ts +9 -2
- package/packages/icons/bobaokaiqi/index.vue.d.ts +9 -2
- package/packages/icons/bold/index.vue.d.ts +9 -2
- package/packages/icons/camera/index.vue.d.ts +9 -2
- package/packages/icons/camera-2/index.vue.d.ts +9 -2
- package/packages/icons/camera-3/index.vue.d.ts +9 -2
- package/packages/icons/cancel-full-screen/index.vue.d.ts +9 -2
- package/packages/icons/cankaoneirong/index.vue.d.ts +9 -2
- package/packages/icons/card/index.vue.d.ts +9 -2
- package/packages/icons/card-view/index.vue.d.ts +9 -2
- package/packages/icons/caret-bottom/index.vue.d.ts +9 -2
- package/packages/icons/caret-right/index.vue.d.ts +9 -2
- package/packages/icons/chakancelve/index.vue.d.ts +9 -2
- package/packages/icons/change/index.vue.d.ts +9 -2
- package/packages/icons/change-2/index.vue.d.ts +9 -2
- package/packages/icons/change-3/index.vue.d.ts +9 -2
- package/packages/icons/changetenant/index.vue.d.ts +9 -2
- package/packages/icons/chart/index.vue.d.ts +9 -2
- package/packages/icons/chaxunxiangqing/index.vue.d.ts +9 -2
- package/packages/icons/check/index.vue.d.ts +9 -2
- package/packages/icons/chuanglianjiang/index.vue.d.ts +9 -2
- package/packages/icons/chuangliansheng/index.vue.d.ts +9 -2
- package/packages/icons/chuanglianting/index.vue.d.ts +9 -2
- package/packages/icons/chuizhiduiqi/index.vue.d.ts +9 -2
- package/packages/icons/chuizhijunfen/index.vue.d.ts +9 -2
- package/packages/icons/close/index.vue.d.ts +9 -2
- package/packages/icons/close-2/index.vue.d.ts +9 -2
- package/packages/icons/closeaudio/index.vue.d.ts +9 -2
- package/packages/icons/color/index.vue.d.ts +9 -2
- package/packages/icons/copy/index.vue.d.ts +9 -2
- package/packages/icons/custom/index.vue.d.ts +9 -2
- package/packages/icons/daochu/index.vue.d.ts +9 -2
- package/packages/icons/date/index.vue.d.ts +9 -2
- package/packages/icons/decline/index.vue.d.ts +9 -2
- package/packages/icons/default-btn/index.vue.d.ts +9 -2
- package/packages/icons/default-point/index.vue.d.ts +9 -2
- package/packages/icons/delete/index.vue.d.ts +9 -2
- package/packages/icons/delete-2/index.vue.d.ts +9 -2
- package/packages/icons/dengbijiesuo/index.vue.d.ts +9 -2
- package/packages/icons/dengbisuoding/index.vue.d.ts +9 -2
- package/packages/icons/dengdai/index.vue.d.ts +9 -2
- package/packages/icons/dianzan/index.vue.d.ts +9 -2
- package/packages/icons/dianzan-2/index.vue.d.ts +9 -2
- package/packages/icons/direction-control/index.vue.d.ts +9 -2
- package/packages/icons/ditu/index.vue.d.ts +9 -2
- package/packages/icons/dizhixuanze/index.vue.d.ts +9 -2
- package/packages/icons/double-arrow-left/index.vue.d.ts +9 -2
- package/packages/icons/double-arrow-right/index.vue.d.ts +9 -2
- package/packages/icons/down/index.vue.d.ts +9 -2
- package/packages/icons/down-2/index.vue.d.ts +9 -2
- package/packages/icons/down-3/index.vue.d.ts +9 -2
- package/packages/icons/download/index.vue.d.ts +9 -2
- package/packages/icons/drag/index.vue.d.ts +9 -2
- package/packages/icons/drawing/index.vue.d.ts +9 -2
- package/packages/icons/edit/index.vue.d.ts +9 -2
- package/packages/icons/edit-1/index.vue.d.ts +9 -2
- package/packages/icons/edit-3/index.vue.d.ts +9 -2
- package/packages/icons/empty/index.vue.d.ts +9 -2
- package/packages/icons/enlarge/index.vue.d.ts +9 -2
- package/packages/icons/entry/index.vue.d.ts +9 -2
- package/packages/icons/exit/index.vue.d.ts +9 -2
- package/packages/icons/fabu/index.vue.d.ts +9 -2
- package/packages/icons/fanhui/index.vue.d.ts +9 -2
- package/packages/icons/fasong/index.vue.d.ts +9 -2
- package/packages/icons/filter-3/index.vue.d.ts +9 -2
- package/packages/icons/finish/index.vue.d.ts +9 -2
- package/packages/icons/fold/index.vue.d.ts +9 -2
- package/packages/icons/folder-quest/index.vue.d.ts +9 -2
- package/packages/icons/form-tips/index.vue.d.ts +9 -2
- package/packages/icons/fresh/index.vue.d.ts +9 -2
- package/packages/icons/full/index.vue.d.ts +9 -2
- package/packages/icons/full-screen/index.vue.d.ts +9 -2
- package/packages/icons/fullscreen-2/index.vue.d.ts +9 -2
- package/packages/icons/fuzhi/index.vue.d.ts +9 -2
- package/packages/icons/fuzhineirong/index.vue.d.ts +9 -2
- package/packages/icons/gaojin/index.vue.d.ts +9 -2
- package/packages/icons/gengduocaozuo/index.vue.d.ts +9 -2
- package/packages/icons/global/index.vue.d.ts +9 -2
- package/packages/icons/gongzuotaiguanli/index.vue.d.ts +9 -2
- package/packages/icons/header-seach/index.vue.d.ts +9 -2
- package/packages/icons/header-setting/index.vue.d.ts +9 -2
- package/packages/icons/headersettings/index.vue.d.ts +9 -2
- package/packages/icons/hide/index.vue.d.ts +9 -2
- package/packages/icons/huabufuwei/index.vue.d.ts +9 -2
- package/packages/icons/huaxian/index.vue.d.ts +9 -2
- package/packages/icons/huida/index.vue.d.ts +9 -2
- package/packages/icons/huidaodibu/index.vue.d.ts +9 -2
- package/packages/icons/huifuchuchangshezhi/index.vue.d.ts +9 -2
- package/packages/icons/hyperlinks/index.vue.d.ts +9 -2
- package/packages/icons/img/index.vue.d.ts +9 -2
- package/packages/icons/index.d.ts +0 -2
- package/packages/icons/index.js +0 -2
- package/packages/icons/input-close/index.vue.d.ts +9 -2
- package/packages/icons/input-select/index.vue.d.ts +9 -2
- package/packages/icons/intnet/index.vue.d.ts +9 -2
- package/packages/icons/italic/index.vue.d.ts +9 -2
- package/packages/icons/jia-1/index.vue.d.ts +9 -2
- package/packages/icons/jian-1/index.vue.d.ts +9 -2
- package/packages/icons/jianshao-1/index.vue.d.ts +9 -2
- package/packages/icons/jinggao/index.vue.d.ts +9 -2
- package/packages/icons/jushangduiqi/index.vue.d.ts +9 -2
- package/packages/icons/juxiaduiqi/index.vue.d.ts +9 -2
- package/packages/icons/juxinghuizhi/index.vue.d.ts +9 -2
- package/packages/icons/juyouduiqi/index.vue.d.ts +9 -2
- package/packages/icons/juzuoduiqi/index.vue.d.ts +9 -2
- package/packages/icons/kaiguan/index.vue.d.ts +9 -2
- package/packages/icons/kaimen/index.vue.d.ts +9 -2
- package/packages/icons/know/index.vue.d.ts +9 -2
- package/packages/icons/knowed/index.vue.d.ts +9 -2
- package/packages/icons/knowopen/index.vue.d.ts +9 -2
- package/packages/icons/layout-refresh/index.vue.d.ts +9 -2
- package/packages/icons/left/index.vue.d.ts +9 -2
- package/packages/icons/lianjie/index.vue.d.ts +9 -2
- package/packages/icons/link/index.vue.d.ts +9 -2
- package/packages/icons/lishihuihua/index.vue.d.ts +9 -2
- package/packages/icons/list/index.vue.d.ts +9 -2
- package/packages/icons/list-view/index.vue.d.ts +9 -2
- package/packages/icons/load/index.vue.d.ts +9 -2
- package/packages/icons/lock/index.vue.d.ts +9 -2
- package/packages/icons/marsh/index.vue.d.ts +9 -2
- package/packages/icons/me/index.vue.d.ts +9 -2
- package/packages/icons/more/index.vue.d.ts +9 -2
- package/packages/icons/more-2/index.vue.d.ts +9 -2
- package/packages/icons/more-btn/index.vue.d.ts +9 -2
- package/packages/icons/muted/index.vue.d.ts +9 -2
- package/packages/icons/notification-face/index.vue.d.ts +9 -2
- package/packages/icons/paiban/index.vue.d.ts +9 -2
- package/packages/icons/password-lock/index.vue.d.ts +9 -2
- package/packages/icons/password-lock2/index.vue.d.ts +9 -2
- package/packages/icons/pause/index.vue.d.ts +9 -2
- package/packages/icons/phone/index.vue.d.ts +9 -2
- package/packages/icons/pinglun/index.vue.d.ts +9 -2
- package/packages/icons/plan/index.vue.d.ts +9 -2
- package/packages/icons/play/index.vue.d.ts +9 -2
- package/packages/icons/preview/index.vue.d.ts +9 -2
- package/packages/icons/preview-eye/index.vue.d.ts +9 -2
- package/packages/icons/project-list/index.vue.d.ts +9 -2
- package/packages/icons/project-tree/index.vue.d.ts +9 -2
- package/packages/icons/promptinformation-l/index.vue.d.ts +9 -2
- package/packages/icons/qiehuangongzuotai/index.vue.d.ts +9 -2
- package/packages/icons/qingkong/index.vue.d.ts +9 -2
- package/packages/icons/quanping/index.vue.d.ts +9 -2
- package/packages/icons/rate-all/index.vue.d.ts +9 -2
- package/packages/icons/rate-half/index.vue.d.ts +9 -2
- package/packages/icons/rate-none/index.vue.d.ts +9 -2
- package/packages/icons/recover/index.vue.d.ts +9 -2
- package/packages/icons/refresh/index.vue.d.ts +9 -2
- package/packages/icons/reload/index.vue.d.ts +9 -2
- package/packages/icons/reset/index.vue.d.ts +9 -2
- package/packages/icons/right/index.vue.d.ts +9 -2
- package/packages/icons/right-3/index.vue.d.ts +9 -2
- package/packages/icons/riqixuanze/index.vue.d.ts +9 -2
- package/packages/icons/rise/index.vue.d.ts +9 -2
- package/packages/icons/save/index.vue.d.ts +9 -2
- package/packages/icons/screenshot/index.vue.d.ts +9 -2
- package/packages/icons/search/index.vue.d.ts +9 -2
- package/packages/icons/select/index.vue.d.ts +9 -2
- package/packages/icons/select-confirm/index.vue.d.ts +9 -2
- package/packages/icons/select2/index.vue.d.ts +9 -2
- package/packages/icons/set-up/index.vue.d.ts +9 -2
- package/packages/icons/setting/index.vue.d.ts +9 -2
- package/packages/icons/shangchuan/index.vue.d.ts +9 -2
- package/packages/icons/shebei/index.vue.d.ts +9 -2
- package/packages/icons/shebeiqunzu/index.vue.d.ts +9 -2
- package/packages/icons/shendusikao/index.vue.d.ts +9 -2
- package/packages/icons/sheweimoren/index.vue.d.ts +9 -2
- package/packages/icons/shisuan/index.vue.d.ts +9 -2
- package/packages/icons/shitu-kapian/index.vue.d.ts +9 -2
- package/packages/icons/shitu-liebiao/index.vue.d.ts +9 -2
- package/packages/icons/shitu-map/index.vue.d.ts +9 -2
- package/packages/icons/shortcut-keys/index.vue.d.ts +9 -2
- package/packages/icons/shoudongzhihang/index.vue.d.ts +9 -2
- package/packages/icons/shouqiliangcemianban/index.vue.d.ts +9 -2
- package/packages/icons/shouqiyoucemianban/index.vue.d.ts +9 -2
- package/packages/icons/shouqiyoucemianban-1/index.vue.d.ts +9 -2
- package/packages/icons/shouqizuocemianban/index.vue.d.ts +9 -2
- package/packages/icons/shouqizuocemianban-1/index.vue.d.ts +9 -2
- package/packages/icons/shouquan/index.vue.d.ts +9 -2
- package/packages/icons/show/index.vue.d.ts +9 -2
- package/packages/icons/shrink/index.vue.d.ts +9 -2
- package/packages/icons/shuaxin/index.vue.d.ts +9 -2
- package/packages/icons/shuipingduiqi/index.vue.d.ts +9 -2
- package/packages/icons/shuipingjunfen/index.vue.d.ts +9 -2
- package/packages/icons/shuyoufanye/index.vue.d.ts +9 -2
- package/packages/icons/shuzuofanye/index.vue.d.ts +9 -2
- package/packages/icons/solid-filter/index.vue.d.ts +9 -2
- package/packages/icons/start/index.vue.d.ts +9 -2
- package/packages/icons/stop/index.vue.d.ts +9 -2
- package/packages/icons/structural-diagram/index.vue.d.ts +9 -2
- package/packages/icons/success/index.vue.d.ts +9 -2
- package/packages/icons/system/index.vue.d.ts +9 -2
- package/packages/icons/table-header-search/index.vue.d.ts +9 -2
- package/packages/icons/text/index.vue.d.ts +9 -2
- package/packages/icons/tianjiaxinhuati/index.vue.d.ts +9 -2
- package/packages/icons/tick/index.vue.d.ts +9 -2
- package/packages/icons/tishixinxi/index.vue.d.ts +9 -2
- package/packages/icons/tongguo/index.vue.d.ts +9 -2
- package/packages/icons/tongzhi/index.vue.d.ts +9 -2
- package/packages/icons/tubiaoku/index.vue.d.ts +9 -2
- package/packages/icons/tuichuquanping/index.vue.d.ts +9 -2
- package/packages/icons/tuozhuai/index.vue.d.ts +9 -2
- package/packages/icons/underline/index.vue.d.ts +9 -2
- package/packages/icons/unflod/index.vue.d.ts +9 -2
- package/packages/icons/unlock/index.vue.d.ts +9 -2
- package/packages/icons/up/index.vue.d.ts +9 -2
- package/packages/icons/up-2/index.vue.d.ts +9 -2
- package/packages/icons/vauth/index.vue.d.ts +9 -2
- package/packages/icons/view/index.vue.d.ts +9 -2
- package/packages/icons/view-2/index.vue.d.ts +9 -2
- package/packages/icons/volume/index.vue.d.ts +9 -2
- package/packages/icons/wangge/index.vue.d.ts +9 -2
- package/packages/icons/wangge-1/index.vue.d.ts +9 -2
- package/packages/icons/warning/index.vue.d.ts +9 -2
- package/packages/icons/warning-face/index.vue.d.ts +9 -2
- package/packages/icons/wendujiang/index.vue.d.ts +9 -2
- package/packages/icons/wendusheng/index.vue.d.ts +9 -2
- package/packages/icons/withdraw/index.vue.d.ts +9 -2
- package/packages/icons/xiala/index.vue.d.ts +9 -2
- package/packages/icons/xiazai/index.vue.d.ts +9 -2
- package/packages/icons/xinzengtongji/index.vue.d.ts +9 -2
- package/packages/icons/xuanzhuanjiaodu/index.vue.d.ts +9 -2
- package/packages/icons/yidongduan/index.vue.d.ts +9 -2
- package/packages/icons/yincang/index.vue.d.ts +9 -2
- package/packages/icons/yingpian/index.vue.d.ts +9 -2
- package/packages/icons/yingyong/index.vue.d.ts +9 -2
- package/packages/icons/yitushoutu/index.vue.d.ts +9 -2
- package/packages/icons/yuanxinghuizhi/index.vue.d.ts +9 -2
- package/packages/icons/yulan-2/index.vue.d.ts +9 -2
- package/packages/icons/yuyin/index.vue.d.ts +9 -2
- package/packages/icons/zhangaiwu/index.vue.d.ts +9 -2
- package/packages/icons/zhizhen/index.vue.d.ts +9 -2
- package/packages/icons/zhongxinshengcheng/index.vue.d.ts +9 -2
- package/packages/icons/zhuomianduan/index.vue.d.ts +9 -2
- package/packages/icons/zidingyihuizhi/index.vue.d.ts +9 -2
- package/packages/icons/zuobiao/index.vue.d.ts +9 -2
- package/packages/business-components/ai-panel/index-8yffh0Id.js.gz +0 -0
- package/packages/business-components/ai-panel/index-IzGl26KU.js.gz +0 -0
- package/packages/business-components/ai-panel/index-OwRrV6K8.js.gz +0 -0
- package/packages/components/hls-player/src/das-hls-player-origin.vue.d.ts +0 -13
- package/packages/components/image-upload/src/hooks/use-compress-image.d.ts +0 -1
- package/packages/components/image-viewer/src/hooks/use-compress-image.d.ts +0 -1
- package/packages/components/tree-table/src/hooks/use-five.d.ts +0 -4
- package/packages/components/tree-table/src/hooks/use-four.d.ts +0 -4
- package/packages/icons/tucao/index.d.ts +0 -1
- package/packages/icons/tucao/index.js +0 -17
- package/packages/icons/tucao/index.js.gz +0 -0
- package/packages/icons/tucao/index.vue.d.ts +0 -12
- package/packages/icons/tucao-2/index.d.ts +0 -1
- package/packages/icons/tucao-2/index.js +0 -17
- package/packages/icons/tucao-2/index.js.gz +0 -0
- package/packages/icons/tucao-2/index.vue.d.ts +0 -12
|
@@ -1,723 +1,71 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/image-upload/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { currentLang as
|
|
4
|
-
import { getVar as
|
|
5
|
-
import { computed as
|
|
6
|
-
import { UploadDragger as
|
|
2
|
+
import { withInstall as O } from "@das-fed/utils/with-install/index";
|
|
3
|
+
import { currentLang as T, i18n as V, t as w, setI18nRule as R } from "@das-fed/web/packages/i18n/index";
|
|
4
|
+
import { getVar as x, setThemeRule as K } from "@das-fed/web/packages/theme/index";
|
|
5
|
+
import { computed as z, defineComponent as W, createElementBlock as P, openBlock as H, createCommentVNode as B, withDirectives as N, createVNode as g, unref as o, normalizeClass as L, withCtx as f, createElementVNode as v, toDisplayString as D, vShow as S, createTextVNode as q } from "vue";
|
|
6
|
+
import { UploadDragger as G, Upload as J } from "ant-design-vue";
|
|
7
7
|
import "ant-design-vue/es/upload/style/css";
|
|
8
|
-
import { DasSpin as
|
|
9
|
-
import { DasButton as
|
|
10
|
-
import { DasIconAddto as
|
|
11
|
-
import { DasIconWarning as
|
|
12
|
-
import { DasMessage as
|
|
13
|
-
import { getFileExtension as
|
|
14
|
-
import { useModelValue as
|
|
8
|
+
import { DasSpin as Q } from "@das-fed/ui/packages/components/spin/index";
|
|
9
|
+
import { DasButton as X } from "@das-fed/ui/packages/components/button/index";
|
|
10
|
+
import { DasIconAddto as Y } from "@das-fed/ui/packages/icons/addto/index";
|
|
11
|
+
import { DasIconWarning as Z } from "@das-fed/ui/packages/icons/warning/index";
|
|
12
|
+
import { DasMessage as U } from "@das-fed/ui/packages/components/message/index";
|
|
13
|
+
import { getFileExtension as ee } from "@das-fed/utils/common-tools";
|
|
14
|
+
import { useModelValue as ae } from "@das-fed/utils/vue";
|
|
15
15
|
import "@das-fed/ui/packages/global/theme";
|
|
16
|
-
const
|
|
17
|
-
isNaN(Number(
|
|
18
|
-
const
|
|
19
|
-
M:
|
|
20
|
-
K:
|
|
16
|
+
const oe = () => ({ size2B: (t) => {
|
|
17
|
+
isNaN(Number(t)) ? t = t.toString() : t = t + "M";
|
|
18
|
+
const i = Number(t.slice(0, -1)), n = t[t.length - 1].toUpperCase(), l = 1024, C = {
|
|
19
|
+
M: l * l,
|
|
20
|
+
K: l,
|
|
21
21
|
B: 1
|
|
22
22
|
};
|
|
23
|
-
return { finalSize:
|
|
24
|
-
} })
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
return a;
|
|
43
|
-
}
|
|
44
|
-
function j(t) {
|
|
45
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
46
|
-
var a = arguments[e] != null ? arguments[e] : {};
|
|
47
|
-
e % 2 ? xe(Object(a), !0).forEach(function(r) {
|
|
48
|
-
Ze(t, r, a[r]);
|
|
49
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : xe(Object(a)).forEach(function(r) {
|
|
50
|
-
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(a, r));
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return t;
|
|
54
|
-
}
|
|
55
|
-
function Je(t, e) {
|
|
56
|
-
if (!(t instanceof e))
|
|
57
|
-
throw new TypeError("Cannot call a class as a function");
|
|
58
|
-
}
|
|
59
|
-
function Ce(t, e) {
|
|
60
|
-
for (var a = 0; a < e.length; a++) {
|
|
61
|
-
var r = e[a];
|
|
62
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, De(r.key), r);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function Qe(t, e, a) {
|
|
66
|
-
return e && Ce(t.prototype, e), a && Ce(t, a), Object.defineProperty(t, "prototype", {
|
|
67
|
-
writable: !1
|
|
68
|
-
}), t;
|
|
69
|
-
}
|
|
70
|
-
function Ze(t, e, a) {
|
|
71
|
-
return e = De(e), e in t ? Object.defineProperty(t, e, {
|
|
72
|
-
value: a,
|
|
73
|
-
enumerable: !0,
|
|
74
|
-
configurable: !0,
|
|
75
|
-
writable: !0
|
|
76
|
-
}) : t[e] = a, t;
|
|
77
|
-
}
|
|
78
|
-
function _() {
|
|
79
|
-
return _ = Object.assign ? Object.assign.bind() : function(t) {
|
|
80
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
81
|
-
var a = arguments[e];
|
|
82
|
-
for (var r in a)
|
|
83
|
-
Object.prototype.hasOwnProperty.call(a, r) && (t[r] = a[r]);
|
|
84
|
-
}
|
|
85
|
-
return t;
|
|
86
|
-
}, _.apply(this, arguments);
|
|
87
|
-
}
|
|
88
|
-
function et(t, e) {
|
|
89
|
-
if (typeof t != "object" || t === null) return t;
|
|
90
|
-
var a = t[Symbol.toPrimitive];
|
|
91
|
-
if (a !== void 0) {
|
|
92
|
-
var r = a.call(t, e);
|
|
93
|
-
if (typeof r != "object") return r;
|
|
94
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
95
|
-
}
|
|
96
|
-
return String(t);
|
|
97
|
-
}
|
|
98
|
-
function De(t) {
|
|
99
|
-
var e = et(t, "string");
|
|
100
|
-
return typeof e == "symbol" ? e : String(e);
|
|
101
|
-
}
|
|
102
|
-
var Te = { exports: {} };
|
|
103
|
-
(function(t) {
|
|
104
|
-
typeof window > "u" || function(e) {
|
|
105
|
-
var a = e.HTMLCanvasElement && e.HTMLCanvasElement.prototype, r = e.Blob && function() {
|
|
106
|
-
try {
|
|
107
|
-
return !!new Blob();
|
|
108
|
-
} catch {
|
|
109
|
-
return !1;
|
|
110
|
-
}
|
|
111
|
-
}(), i = r && e.Uint8Array && function() {
|
|
112
|
-
try {
|
|
113
|
-
return new Blob([new Uint8Array(100)]).size === 100;
|
|
114
|
-
} catch {
|
|
115
|
-
return !1;
|
|
116
|
-
}
|
|
117
|
-
}(), o = e.BlobBuilder || e.WebKitBlobBuilder || e.MozBlobBuilder || e.MSBlobBuilder, m = /^data:((.*?)(;charset=.*?)?)(;base64)?,/, n = (r || o) && e.atob && e.ArrayBuffer && e.Uint8Array && function(c) {
|
|
118
|
-
var u, f, s, h, p, l, w, g, y;
|
|
119
|
-
if (u = c.match(m), !u)
|
|
120
|
-
throw new Error("invalid data URI");
|
|
121
|
-
for (f = u[2] ? u[1] : "text/plain" + (u[3] || ";charset=US-ASCII"), s = !!u[4], h = c.slice(u[0].length), s ? p = atob(h) : p = decodeURIComponent(h), l = new ArrayBuffer(p.length), w = new Uint8Array(l), g = 0; g < p.length; g += 1)
|
|
122
|
-
w[g] = p.charCodeAt(g);
|
|
123
|
-
return r ? new Blob([i ? w : l], {
|
|
124
|
-
type: f
|
|
125
|
-
}) : (y = new o(), y.append(l), y.getBlob(f));
|
|
126
|
-
};
|
|
127
|
-
e.HTMLCanvasElement && !a.toBlob && (a.mozGetAsFile ? a.toBlob = function(c, u, f) {
|
|
128
|
-
var s = this;
|
|
129
|
-
setTimeout(function() {
|
|
130
|
-
f && a.toDataURL && n ? c(n(s.toDataURL(u, f))) : c(s.mozGetAsFile("blob", u));
|
|
131
|
-
});
|
|
132
|
-
} : a.toDataURL && n && (a.msToBlob ? a.toBlob = function(c, u, f) {
|
|
133
|
-
var s = this;
|
|
134
|
-
setTimeout(function() {
|
|
135
|
-
(u && u !== "image/png" || f) && a.toDataURL && n ? c(n(s.toDataURL(u, f))) : c(s.msToBlob(u));
|
|
136
|
-
});
|
|
137
|
-
} : a.toBlob = function(c, u, f) {
|
|
138
|
-
var s = this;
|
|
139
|
-
setTimeout(function() {
|
|
140
|
-
c(n(s.toDataURL(u, f)));
|
|
141
|
-
});
|
|
142
|
-
})), t.exports ? t.exports = n : e.dataURLtoBlob = n;
|
|
143
|
-
}(window);
|
|
144
|
-
})(Te);
|
|
145
|
-
var Be = Te.exports, tt = function(e) {
|
|
146
|
-
return typeof Blob > "u" ? !1 : e instanceof Blob || Object.prototype.toString.call(e) === "[object Blob]";
|
|
147
|
-
}, Ae = {
|
|
148
|
-
/**
|
|
149
|
-
* Indicates if output the original image instead of the compressed one
|
|
150
|
-
* when the size of the compressed image is greater than the original one's
|
|
151
|
-
* @type {boolean}
|
|
152
|
-
*/
|
|
153
|
-
strict: !0,
|
|
154
|
-
/**
|
|
155
|
-
* Indicates if read the image's Exif Orientation information,
|
|
156
|
-
* and then rotate or flip the image automatically.
|
|
157
|
-
* @type {boolean}
|
|
158
|
-
*/
|
|
159
|
-
checkOrientation: !0,
|
|
160
|
-
/**
|
|
161
|
-
* Indicates if retain the image's Exif information after compressed.
|
|
162
|
-
* @type {boolean}
|
|
163
|
-
*/
|
|
164
|
-
retainExif: !1,
|
|
165
|
-
/**
|
|
166
|
-
* The max width of the output image.
|
|
167
|
-
* @type {number}
|
|
168
|
-
*/
|
|
169
|
-
maxWidth: 1 / 0,
|
|
170
|
-
/**
|
|
171
|
-
* The max height of the output image.
|
|
172
|
-
* @type {number}
|
|
173
|
-
*/
|
|
174
|
-
maxHeight: 1 / 0,
|
|
175
|
-
/**
|
|
176
|
-
* The min width of the output image.
|
|
177
|
-
* @type {number}
|
|
178
|
-
*/
|
|
179
|
-
minWidth: 0,
|
|
180
|
-
/**
|
|
181
|
-
* The min height of the output image.
|
|
182
|
-
* @type {number}
|
|
183
|
-
*/
|
|
184
|
-
minHeight: 0,
|
|
185
|
-
/**
|
|
186
|
-
* The width of the output image.
|
|
187
|
-
* If not specified, the natural width of the source image will be used.
|
|
188
|
-
* @type {number}
|
|
189
|
-
*/
|
|
190
|
-
width: void 0,
|
|
191
|
-
/**
|
|
192
|
-
* The height of the output image.
|
|
193
|
-
* If not specified, the natural height of the source image will be used.
|
|
194
|
-
* @type {number}
|
|
195
|
-
*/
|
|
196
|
-
height: void 0,
|
|
197
|
-
/**
|
|
198
|
-
* Sets how the size of the image should be resized to the container
|
|
199
|
-
* specified by the `width` and `height` options.
|
|
200
|
-
* @type {string}
|
|
201
|
-
*/
|
|
202
|
-
resize: "none",
|
|
203
|
-
/**
|
|
204
|
-
* The quality of the output image.
|
|
205
|
-
* It must be a number between `0` and `1`,
|
|
206
|
-
* and only available for `image/jpeg` and `image/webp` images.
|
|
207
|
-
* Check out {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob canvas.toBlob}.
|
|
208
|
-
* @type {number}
|
|
209
|
-
*/
|
|
210
|
-
quality: 0.8,
|
|
211
|
-
/**
|
|
212
|
-
* The mime type of the output image.
|
|
213
|
-
* By default, the original mime type of the source image file will be used.
|
|
214
|
-
* @type {string}
|
|
215
|
-
*/
|
|
216
|
-
mimeType: "auto",
|
|
217
|
-
/**
|
|
218
|
-
* Files whose file type is included in this list,
|
|
219
|
-
* and whose file size exceeds the `convertSize` value will be converted to JPEGs.
|
|
220
|
-
* @type {string|Array}
|
|
221
|
-
*/
|
|
222
|
-
convertTypes: ["image/png"],
|
|
223
|
-
/**
|
|
224
|
-
* PNG files over this size (5 MB by default) will be converted to JPEGs.
|
|
225
|
-
* To disable this, just set the value to `Infinity`.
|
|
226
|
-
* @type {number}
|
|
227
|
-
*/
|
|
228
|
-
convertSize: 5e6,
|
|
229
|
-
/**
|
|
230
|
-
* The hook function to execute before draw the image into the canvas for compression.
|
|
231
|
-
* @type {Function}
|
|
232
|
-
* @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.
|
|
233
|
-
* @param {HTMLCanvasElement} canvas - The canvas for compression.
|
|
234
|
-
* @example
|
|
235
|
-
* function (context, canvas) {
|
|
236
|
-
* context.fillStyle = '#fff';
|
|
237
|
-
* }
|
|
238
|
-
*/
|
|
239
|
-
beforeDraw: null,
|
|
240
|
-
/**
|
|
241
|
-
* The hook function to execute after drew the image into the canvas for compression.
|
|
242
|
-
* @type {Function}
|
|
243
|
-
* @param {CanvasRenderingContext2D} context - The 2d rendering context of the canvas.
|
|
244
|
-
* @param {HTMLCanvasElement} canvas - The canvas for compression.
|
|
245
|
-
* @example
|
|
246
|
-
* function (context, canvas) {
|
|
247
|
-
* context.filter = 'grayscale(100%)';
|
|
248
|
-
* }
|
|
249
|
-
*/
|
|
250
|
-
drew: null,
|
|
251
|
-
/**
|
|
252
|
-
* The hook function to execute when success to compress the image.
|
|
253
|
-
* @type {Function}
|
|
254
|
-
* @param {File} file - The compressed image File object.
|
|
255
|
-
* @example
|
|
256
|
-
* function (file) {
|
|
257
|
-
* console.log(file);
|
|
258
|
-
* }
|
|
259
|
-
*/
|
|
260
|
-
success: null,
|
|
261
|
-
/**
|
|
262
|
-
* The hook function to execute when fail to compress the image.
|
|
263
|
-
* @type {Function}
|
|
264
|
-
* @param {Error} err - An Error object.
|
|
265
|
-
* @example
|
|
266
|
-
* function (err) {
|
|
267
|
-
* console.log(err.message);
|
|
268
|
-
* }
|
|
269
|
-
*/
|
|
270
|
-
error: null
|
|
271
|
-
}, at = typeof window < "u" && typeof window.document < "u", U = at ? window : {}, N = function(e) {
|
|
272
|
-
return e > 0 && e < 1 / 0;
|
|
273
|
-
}, rt = Array.prototype.slice;
|
|
274
|
-
function Z(t) {
|
|
275
|
-
return Array.from ? Array.from(t) : rt.call(t);
|
|
276
|
-
}
|
|
277
|
-
var it = /^image\/.+$/;
|
|
278
|
-
function Q(t) {
|
|
279
|
-
return it.test(t);
|
|
280
|
-
}
|
|
281
|
-
function ot(t) {
|
|
282
|
-
var e = Q(t) ? t.substr(6) : "";
|
|
283
|
-
return e === "jpeg" && (e = "jpg"), ".".concat(e);
|
|
284
|
-
}
|
|
285
|
-
var Oe = String.fromCharCode;
|
|
286
|
-
function nt(t, e, a) {
|
|
287
|
-
var r = "", i;
|
|
288
|
-
for (a += e, i = e; i < a; i += 1)
|
|
289
|
-
r += Oe(t.getUint8(i));
|
|
290
|
-
return r;
|
|
291
|
-
}
|
|
292
|
-
var st = U.btoa;
|
|
293
|
-
function ke(t, e) {
|
|
294
|
-
for (var a = [], r = 8192, i = new Uint8Array(t); i.length > 0; )
|
|
295
|
-
a.push(Oe.apply(null, Z(i.subarray(0, r)))), i = i.subarray(r);
|
|
296
|
-
return "data:".concat(e, ";base64,").concat(st(a.join("")));
|
|
297
|
-
}
|
|
298
|
-
function lt(t) {
|
|
299
|
-
var e = new DataView(t), a;
|
|
300
|
-
try {
|
|
301
|
-
var r, i, o;
|
|
302
|
-
if (e.getUint8(0) === 255 && e.getUint8(1) === 216)
|
|
303
|
-
for (var m = e.byteLength, n = 2; n + 1 < m; ) {
|
|
304
|
-
if (e.getUint8(n) === 255 && e.getUint8(n + 1) === 225) {
|
|
305
|
-
i = n;
|
|
306
|
-
break;
|
|
307
|
-
}
|
|
308
|
-
n += 1;
|
|
309
|
-
}
|
|
310
|
-
if (i) {
|
|
311
|
-
var c = i + 4, u = i + 10;
|
|
312
|
-
if (nt(e, c, 4) === "Exif") {
|
|
313
|
-
var f = e.getUint16(u);
|
|
314
|
-
if (r = f === 18761, (r || f === 19789) && e.getUint16(u + 2, r) === 42) {
|
|
315
|
-
var s = e.getUint32(u + 4, r);
|
|
316
|
-
s >= 8 && (o = u + s);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
if (o) {
|
|
321
|
-
var h = e.getUint16(o, r), p, l;
|
|
322
|
-
for (l = 0; l < h; l += 1)
|
|
323
|
-
if (p = o + l * 12 + 2, e.getUint16(p, r) === 274) {
|
|
324
|
-
p += 8, a = e.getUint16(p, r), e.setUint16(p, 1, r);
|
|
325
|
-
break;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
} catch {
|
|
329
|
-
a = 1;
|
|
330
|
-
}
|
|
331
|
-
return a;
|
|
332
|
-
}
|
|
333
|
-
function ct(t) {
|
|
334
|
-
var e = 0, a = 1, r = 1;
|
|
335
|
-
switch (t) {
|
|
336
|
-
case 2:
|
|
337
|
-
a = -1;
|
|
338
|
-
break;
|
|
339
|
-
case 3:
|
|
340
|
-
e = -180;
|
|
341
|
-
break;
|
|
342
|
-
case 4:
|
|
343
|
-
r = -1;
|
|
344
|
-
break;
|
|
345
|
-
case 5:
|
|
346
|
-
e = 90, r = -1;
|
|
347
|
-
break;
|
|
348
|
-
case 6:
|
|
349
|
-
e = 90;
|
|
350
|
-
break;
|
|
351
|
-
case 7:
|
|
352
|
-
e = 90, a = -1;
|
|
353
|
-
break;
|
|
354
|
-
case 8:
|
|
355
|
-
e = -90;
|
|
356
|
-
break;
|
|
357
|
-
}
|
|
358
|
-
return {
|
|
359
|
-
rotate: e,
|
|
360
|
-
scaleX: a,
|
|
361
|
-
scaleY: r
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
var ut = /\.\d*(?:0|9){12}\d*$/;
|
|
365
|
-
function Ee(t) {
|
|
366
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e11;
|
|
367
|
-
return ut.test(t) ? Math.round(t * e) / e : t;
|
|
368
|
-
}
|
|
369
|
-
function I(t) {
|
|
370
|
-
var e = t.aspectRatio, a = t.height, r = t.width, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "none", o = N(r), m = N(a);
|
|
371
|
-
if (o && m) {
|
|
372
|
-
var n = a * e;
|
|
373
|
-
(i === "contain" || i === "none") && n > r || i === "cover" && n < r ? a = r / e : r = a * e;
|
|
374
|
-
} else o ? a = r / e : m && (r = a * e);
|
|
375
|
-
return {
|
|
376
|
-
width: r,
|
|
377
|
-
height: a
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
function mt(t) {
|
|
381
|
-
for (var e = Z(new Uint8Array(t)), a = e.length, r = [], i = 0; i + 3 < a; ) {
|
|
382
|
-
var o = e[i], m = e[i + 1];
|
|
383
|
-
if (o === 255 && m === 218)
|
|
384
|
-
break;
|
|
385
|
-
if (o === 255 && m === 216)
|
|
386
|
-
i += 2;
|
|
387
|
-
else {
|
|
388
|
-
var n = e[i + 2] * 256 + e[i + 3], c = i + n + 2, u = e.slice(i, c);
|
|
389
|
-
r.push(u), i = c;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
return r.reduce(function(f, s) {
|
|
393
|
-
return s[0] === 255 && s[1] === 225 ? f.concat(s) : f;
|
|
394
|
-
}, []);
|
|
395
|
-
}
|
|
396
|
-
function ft(t, e) {
|
|
397
|
-
var a = Z(new Uint8Array(t));
|
|
398
|
-
if (a[2] !== 255 || a[3] !== 224)
|
|
399
|
-
return t;
|
|
400
|
-
var r = a[4] * 256 + a[5], i = [255, 216].concat(e, a.slice(4 + r));
|
|
401
|
-
return new Uint8Array(i);
|
|
402
|
-
}
|
|
403
|
-
var dt = U.ArrayBuffer, J = U.FileReader, D = U.URL || U.webkitURL, pt = /\.\w+$/, ht = U.Compressor, gt = /* @__PURE__ */ function() {
|
|
404
|
-
function t(e, a) {
|
|
405
|
-
Je(this, t), this.file = e, this.exif = [], this.image = new Image(), this.options = j(j({}, Ae), a), this.aborted = !1, this.result = null, this.init();
|
|
406
|
-
}
|
|
407
|
-
return Qe(t, [{
|
|
408
|
-
key: "init",
|
|
409
|
-
value: function() {
|
|
410
|
-
var a = this, r = this.file, i = this.options;
|
|
411
|
-
if (!tt(r)) {
|
|
412
|
-
this.fail(new Error("The first argument must be a File or Blob object."));
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
var o = r.type;
|
|
416
|
-
if (!Q(o)) {
|
|
417
|
-
this.fail(new Error("The first argument must be an image File or Blob object."));
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
if (!D || !J) {
|
|
421
|
-
this.fail(new Error("The current browser does not support image compression."));
|
|
422
|
-
return;
|
|
423
|
-
}
|
|
424
|
-
dt || (i.checkOrientation = !1, i.retainExif = !1);
|
|
425
|
-
var m = o === "image/jpeg", n = m && i.checkOrientation, c = m && i.retainExif;
|
|
426
|
-
if (D && !n && !c)
|
|
427
|
-
this.load({
|
|
428
|
-
url: D.createObjectURL(r)
|
|
429
|
-
});
|
|
430
|
-
else {
|
|
431
|
-
var u = new J();
|
|
432
|
-
this.reader = u, u.onload = function(f) {
|
|
433
|
-
var s = f.target, h = s.result, p = {}, l = 1;
|
|
434
|
-
n && (l = lt(h), l > 1 && _(p, ct(l))), c && (a.exif = mt(h)), n || c ? !D || l > 1 ? p.url = ke(h, o) : p.url = D.createObjectURL(r) : p.url = h, a.load(p);
|
|
435
|
-
}, u.onabort = function() {
|
|
436
|
-
a.fail(new Error("Aborted to read the image with FileReader."));
|
|
437
|
-
}, u.onerror = function() {
|
|
438
|
-
a.fail(new Error("Failed to read the image with FileReader."));
|
|
439
|
-
}, u.onloadend = function() {
|
|
440
|
-
a.reader = null;
|
|
441
|
-
}, n || c ? u.readAsArrayBuffer(r) : u.readAsDataURL(r);
|
|
23
|
+
return { finalSize: i * C[n], sizeText: t };
|
|
24
|
+
} }), te = (a, t) => {
|
|
25
|
+
const i = ae(a, "status"), { size2B: n } = oe(), l = [".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".mpeg", ".webm"], C = [".mp3", ".wav", ".aac", ".flac", ".ogg", ".alff", ".wma", ".m4a"], s = z(() => {
|
|
26
|
+
var c;
|
|
27
|
+
let e = a.accept ? (c = a.accept) == null ? void 0 : c.split(",") : [];
|
|
28
|
+
return e.includes("image/jpg") && !e.includes("image/jpeg") && e.push("image/jpeg"), e.includes(".jpg") && !e.includes(".jpeg") && e.push(".jpeg"), a.acceptVideo && (e = [...e, ...l]), a.acceptAudio && (e = [...e, ...C]), e.join(",");
|
|
29
|
+
}), y = z(() => i.value === "uploading"), k = z(() => i.value === "error");
|
|
30
|
+
return { isAccept: s, uploadStatus: i, loading: y, errored: k, beforeupload: (e) => {
|
|
31
|
+
var _, F, I;
|
|
32
|
+
if (a.maxSize) {
|
|
33
|
+
const { finalSize: d, sizeText: u } = n(a.maxSize);
|
|
34
|
+
if (e.size > d) {
|
|
35
|
+
const h = a.acceptAudio || a.acceptVideo ? "das-ui-import-upload-key4" : "das-ui-import-upload-key3", p = T.value === "zh-CN" ? "、" : ", ", b = V(
|
|
36
|
+
h,
|
|
37
|
+
u,
|
|
38
|
+
((I = (F = (_ = s.value) == null ? void 0 : _.toUpperCase()) == null ? void 0 : F.replaceAll(".", "")) == null ? void 0 : I.replaceAll(",", p)) ?? ""
|
|
39
|
+
).value, A = a.errorMessage || b;
|
|
40
|
+
return U.warning(A), t("update:status", "normal"), i.value = "normal", !1;
|
|
442
41
|
}
|
|
443
42
|
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
naturalWidth: o.naturalWidth,
|
|
451
|
-
naturalHeight: o.naturalHeight
|
|
452
|
-
}));
|
|
453
|
-
}, o.onabort = function() {
|
|
454
|
-
r.fail(new Error("Aborted to load the image."));
|
|
455
|
-
}, o.onerror = function() {
|
|
456
|
-
r.fail(new Error("Failed to load the image."));
|
|
457
|
-
}, U.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(U.navigator.userAgent) && (o.crossOrigin = "anonymous"), o.alt = i.name, o.src = a.url;
|
|
458
|
-
}
|
|
459
|
-
}, {
|
|
460
|
-
key: "draw",
|
|
461
|
-
value: function(a) {
|
|
462
|
-
var r = this, i = a.naturalWidth, o = a.naturalHeight, m = a.rotate, n = m === void 0 ? 0 : m, c = a.scaleX, u = c === void 0 ? 1 : c, f = a.scaleY, s = f === void 0 ? 1 : f, h = this.file, p = this.image, l = this.options, w = document.createElement("canvas"), g = w.getContext("2d"), y = Math.abs(n) % 180 === 90, C = (l.resize === "contain" || l.resize === "cover") && N(l.width) && N(l.height), x = Math.max(l.maxWidth, 0) || 1 / 0, B = Math.max(l.maxHeight, 0) || 1 / 0, A = Math.max(l.minWidth, 0) || 0, k = Math.max(l.minHeight, 0) || 0, E = i / o, b = l.width, d = l.height;
|
|
463
|
-
if (y) {
|
|
464
|
-
var P = [B, x];
|
|
465
|
-
x = P[0], B = P[1];
|
|
466
|
-
var S = [k, A];
|
|
467
|
-
A = S[0], k = S[1];
|
|
468
|
-
var ee = [d, b];
|
|
469
|
-
b = ee[0], d = ee[1];
|
|
470
|
-
}
|
|
471
|
-
C && (E = b / d);
|
|
472
|
-
var te = I({
|
|
473
|
-
aspectRatio: E,
|
|
474
|
-
width: x,
|
|
475
|
-
height: B
|
|
476
|
-
}, "contain");
|
|
477
|
-
x = te.width, B = te.height;
|
|
478
|
-
var ae = I({
|
|
479
|
-
aspectRatio: E,
|
|
480
|
-
width: A,
|
|
481
|
-
height: k
|
|
482
|
-
}, "cover");
|
|
483
|
-
if (A = ae.width, k = ae.height, C) {
|
|
484
|
-
var re = I({
|
|
485
|
-
aspectRatio: E,
|
|
486
|
-
width: b,
|
|
487
|
-
height: d
|
|
488
|
-
}, l.resize);
|
|
489
|
-
b = re.width, d = re.height;
|
|
490
|
-
} else {
|
|
491
|
-
var ie = I({
|
|
492
|
-
aspectRatio: E,
|
|
493
|
-
width: b,
|
|
494
|
-
height: d
|
|
495
|
-
}), oe = ie.width;
|
|
496
|
-
b = oe === void 0 ? i : oe;
|
|
497
|
-
var ne = ie.height;
|
|
498
|
-
d = ne === void 0 ? o : ne;
|
|
499
|
-
}
|
|
500
|
-
b = Math.floor(Ee(Math.min(Math.max(b, A), x))), d = Math.floor(Ee(Math.min(Math.max(d, k), B)));
|
|
501
|
-
var Re = -b / 2, Me = -d / 2, Fe = b, ze = d, W = [];
|
|
502
|
-
if (C) {
|
|
503
|
-
var se = 0, le = 0, H = i, V = o, ce = I({
|
|
504
|
-
aspectRatio: E,
|
|
505
|
-
width: i,
|
|
506
|
-
height: o
|
|
507
|
-
}, {
|
|
508
|
-
contain: "cover",
|
|
509
|
-
cover: "contain"
|
|
510
|
-
}[l.resize]);
|
|
511
|
-
H = ce.width, V = ce.height, se = (i - H) / 2, le = (o - V) / 2, W.push(se, le, H, V);
|
|
512
|
-
}
|
|
513
|
-
if (W.push(Re, Me, Fe, ze), y) {
|
|
514
|
-
var ue = [d, b];
|
|
515
|
-
b = ue[0], d = ue[1];
|
|
516
|
-
}
|
|
517
|
-
w.width = b, w.height = d, Q(l.mimeType) || (l.mimeType = h.type);
|
|
518
|
-
var me = "transparent";
|
|
519
|
-
h.size > l.convertSize && l.convertTypes.indexOf(l.mimeType) >= 0 && (l.mimeType = "image/jpeg");
|
|
520
|
-
var fe = l.mimeType === "image/jpeg";
|
|
521
|
-
if (fe && (me = "#fff"), g.fillStyle = me, g.fillRect(0, 0, b, d), l.beforeDraw && l.beforeDraw.call(this, g, w), !this.aborted && (g.save(), g.translate(b / 2, d / 2), g.rotate(n * Math.PI / 180), g.scale(u, s), g.drawImage.apply(g, [p].concat(W)), g.restore(), l.drew && l.drew.call(this, g, w), !this.aborted)) {
|
|
522
|
-
var de = function(M) {
|
|
523
|
-
if (!r.aborted) {
|
|
524
|
-
var pe = function(F) {
|
|
525
|
-
return r.done({
|
|
526
|
-
naturalWidth: i,
|
|
527
|
-
naturalHeight: o,
|
|
528
|
-
result: F
|
|
529
|
-
});
|
|
530
|
-
};
|
|
531
|
-
if (M && fe && l.retainExif && r.exif && r.exif.length > 0) {
|
|
532
|
-
var he = function(F) {
|
|
533
|
-
return pe(Be(ke(ft(F, r.exif), l.mimeType)));
|
|
534
|
-
};
|
|
535
|
-
if (M.arrayBuffer)
|
|
536
|
-
M.arrayBuffer().then(he).catch(function() {
|
|
537
|
-
r.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."));
|
|
538
|
-
});
|
|
539
|
-
else {
|
|
540
|
-
var T = new J();
|
|
541
|
-
r.reader = T, T.onload = function($) {
|
|
542
|
-
var F = $.target;
|
|
543
|
-
he(F.result);
|
|
544
|
-
}, T.onabort = function() {
|
|
545
|
-
r.fail(new Error("Aborted to read the compressed image with FileReader."));
|
|
546
|
-
}, T.onerror = function() {
|
|
547
|
-
r.fail(new Error("Failed to read the compressed image with FileReader."));
|
|
548
|
-
}, T.onloadend = function() {
|
|
549
|
-
r.reader = null;
|
|
550
|
-
}, T.readAsArrayBuffer(M);
|
|
551
|
-
}
|
|
552
|
-
} else
|
|
553
|
-
pe(M);
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
w.toBlob ? w.toBlob(de, l.mimeType, l.quality) : de(Be(w.toDataURL(l.mimeType, l.quality)));
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}, {
|
|
560
|
-
key: "done",
|
|
561
|
-
value: function(a) {
|
|
562
|
-
var r = a.naturalWidth, i = a.naturalHeight, o = a.result, m = this.file, n = this.image, c = this.options;
|
|
563
|
-
if (D && n.src.indexOf("blob:") === 0 && D.revokeObjectURL(n.src), o)
|
|
564
|
-
if (c.strict && !c.retainExif && o.size > m.size && c.mimeType === m.type && !(c.width > r || c.height > i || c.minWidth > r || c.minHeight > i || c.maxWidth < r || c.maxHeight < i))
|
|
565
|
-
o = m;
|
|
566
|
-
else {
|
|
567
|
-
var u = /* @__PURE__ */ new Date();
|
|
568
|
-
o.lastModified = u.getTime(), o.lastModifiedDate = u, o.name = m.name, o.name && o.type !== m.type && (o.name = o.name.replace(pt, ot(o.type)));
|
|
569
|
-
}
|
|
570
|
-
else
|
|
571
|
-
o = m;
|
|
572
|
-
this.result = o, c.success && c.success.call(this, o);
|
|
573
|
-
}
|
|
574
|
-
}, {
|
|
575
|
-
key: "fail",
|
|
576
|
-
value: function(a) {
|
|
577
|
-
var r = this.options;
|
|
578
|
-
if (r.error)
|
|
579
|
-
r.error.call(this, a);
|
|
580
|
-
else
|
|
581
|
-
throw a;
|
|
582
|
-
}
|
|
583
|
-
}, {
|
|
584
|
-
key: "abort",
|
|
585
|
-
value: function() {
|
|
586
|
-
this.aborted || (this.aborted = !0, this.reader ? this.reader.abort() : this.image.complete ? this.fail(new Error("The compression process has been aborted.")) : (this.image.onload = null, this.image.onabort()));
|
|
587
|
-
}
|
|
588
|
-
/**
|
|
589
|
-
* Get the no conflict compressor class.
|
|
590
|
-
* @returns {Compressor} The compressor class.
|
|
591
|
-
*/
|
|
592
|
-
}], [{
|
|
593
|
-
key: "noConflict",
|
|
594
|
-
value: function() {
|
|
595
|
-
return window.Compressor = ht, t;
|
|
596
|
-
}
|
|
597
|
-
/**
|
|
598
|
-
* Change the default options.
|
|
599
|
-
* @param {Object} options - The new default options.
|
|
600
|
-
*/
|
|
601
|
-
}, {
|
|
602
|
-
key: "setDefaults",
|
|
603
|
-
value: function(a) {
|
|
604
|
-
_(Ae, a);
|
|
605
|
-
}
|
|
606
|
-
}]), t;
|
|
607
|
-
}();
|
|
608
|
-
const vt = (t, e) => new Promise((a, r) => {
|
|
609
|
-
if (t.size <= e)
|
|
610
|
-
return t;
|
|
611
|
-
const i = e / t.size, o = Math.max(0.5, Math.min(0.9, 0.8 * i)), m = Math.max(800, Math.min(1920, 1920 * Math.sqrt(i)));
|
|
612
|
-
Ue(t, o, m, m, (n) => {
|
|
613
|
-
n.size <= e ? a(n) : Ue(
|
|
614
|
-
n,
|
|
615
|
-
Math.max(0.4, o - 0.2),
|
|
616
|
-
// 降低质量
|
|
617
|
-
Math.max(640, m * 0.8),
|
|
618
|
-
// 缩小尺寸
|
|
619
|
-
Math.max(640, m * 0.8),
|
|
620
|
-
a,
|
|
621
|
-
r,
|
|
622
|
-
t
|
|
623
|
-
// 传递原始文件用于错误处理
|
|
624
|
-
);
|
|
625
|
-
}, r, t);
|
|
626
|
-
}), Ue = (t, e, a, r, i, o, m) => {
|
|
627
|
-
new gt(t, {
|
|
628
|
-
quality: e,
|
|
629
|
-
maxWidth: a,
|
|
630
|
-
maxHeight: r,
|
|
631
|
-
convertSize: 1 / 0,
|
|
632
|
-
success(n) {
|
|
633
|
-
try {
|
|
634
|
-
const c = new File([n], t.name, {
|
|
635
|
-
type: n.type || t.type,
|
|
636
|
-
lastModified: Date.now()
|
|
637
|
-
});
|
|
638
|
-
i(c);
|
|
639
|
-
} catch (c) {
|
|
640
|
-
o({
|
|
641
|
-
message: "文件转换失败",
|
|
642
|
-
error: c,
|
|
643
|
-
original: m || t
|
|
644
|
-
});
|
|
645
|
-
}
|
|
646
|
-
},
|
|
647
|
-
error(n) {
|
|
648
|
-
o({
|
|
649
|
-
message: "图片压缩失败",
|
|
650
|
-
error: n,
|
|
651
|
-
original: m || t
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
});
|
|
655
|
-
}, yt = (t, e) => {
|
|
656
|
-
const a = we(t, "status"), { size2B: r } = qe(), i = we(t, "isOverMaxLimitCompressImg"), o = [".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".mpeg", ".webm"], m = [".mp3", ".wav", ".aac", ".flac", ".ogg", ".alff", ".wma", ".m4a"], n = X(() => {
|
|
657
|
-
var h;
|
|
658
|
-
let s = t.accept ? (h = t.accept) == null ? void 0 : h.split(",") : [];
|
|
659
|
-
return s.includes("image/jpg") && !s.includes("image/jpeg") && s.push("image/jpeg"), s.includes(".jpg") && !s.includes(".jpeg") && s.push(".jpeg"), t.acceptVideo && (s = [...s, ...o]), t.acceptAudio && (s = [...s, ...m]), s.join(",");
|
|
660
|
-
}), c = X(() => a.value === "uploading"), u = X(() => a.value === "error");
|
|
661
|
-
return { isAccept: n, uploadStatus: a, loading: c, errored: u, beforeupload: (s) => {
|
|
662
|
-
var l, w, g;
|
|
663
|
-
if (t.maxSize) {
|
|
664
|
-
const { finalSize: y, sizeText: C } = r(t.maxSize);
|
|
665
|
-
if (s.size > y && !i.value) {
|
|
666
|
-
const x = t.acceptAudio || t.acceptVideo ? "das-ui-import-upload-key4" : "das-ui-import-upload-key3", B = ge.value === "zh-CN" ? "、" : ", ", A = ve(
|
|
667
|
-
x,
|
|
668
|
-
C,
|
|
669
|
-
((g = (w = (l = n.value) == null ? void 0 : l.toUpperCase()) == null ? void 0 : w.replaceAll(".", "")) == null ? void 0 : g.replaceAll(",", B)) ?? ""
|
|
670
|
-
).value, k = t.errorMessage || A;
|
|
671
|
-
return be.warning(k), e("update:status", "normal"), a.value = "normal", !1;
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
const h = [
|
|
675
|
-
"image/jpeg",
|
|
676
|
-
"image/png",
|
|
677
|
-
"image/webp",
|
|
678
|
-
"image/gif",
|
|
679
|
-
"image/bmp",
|
|
680
|
-
"image/tiff",
|
|
681
|
-
"image/svg+xml"
|
|
682
|
-
], p = async () => {
|
|
683
|
-
a.value = "uploading";
|
|
684
|
-
let y = s;
|
|
685
|
-
if (t.maxSize) {
|
|
686
|
-
const { finalSize: C } = r(t.maxSize);
|
|
687
|
-
if (s.size > C && i.value && h.includes(s.type))
|
|
688
|
-
try {
|
|
689
|
-
y = await vt(s, C);
|
|
690
|
-
} catch (x) {
|
|
691
|
-
y = (x == null ? void 0 : x.original) || s;
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
return e("update:status", "uploading"), e("image-upload", y), !1;
|
|
695
|
-
};
|
|
696
|
-
if (t.customCheck) {
|
|
697
|
-
const y = t.customCheck(s);
|
|
698
|
-
if (y instanceof Promise)
|
|
699
|
-
return new Promise(async (C, x) => {
|
|
700
|
-
let B;
|
|
43
|
+
const c = () => (i.value = "uploading", t("update:status", "uploading"), t("image-upload", e), !1);
|
|
44
|
+
if (a.customCheck) {
|
|
45
|
+
const d = a.customCheck(e);
|
|
46
|
+
if (d instanceof Promise)
|
|
47
|
+
return new Promise(async (u, h) => {
|
|
48
|
+
let p;
|
|
701
49
|
try {
|
|
702
|
-
|
|
50
|
+
p = await d.then();
|
|
703
51
|
} catch {
|
|
704
|
-
|
|
52
|
+
p = !1;
|
|
705
53
|
}
|
|
706
|
-
|
|
54
|
+
p ? c() : h(!1);
|
|
707
55
|
});
|
|
708
|
-
if (!
|
|
709
|
-
return
|
|
710
|
-
} else if (
|
|
711
|
-
const
|
|
712
|
-
let
|
|
713
|
-
if (!
|
|
714
|
-
const
|
|
715
|
-
return
|
|
56
|
+
if (!d)
|
|
57
|
+
return t("update:status", "normal"), i.value = "normal", !1;
|
|
58
|
+
} else if (s.value) {
|
|
59
|
+
const d = s.value.split(",").filter((r) => r.trim().startsWith(".")).map((r) => r.trim()), u = s.value.split(",").filter((r) => !r.trim().startsWith(".")).map((r) => r.trim()), h = ee(e.name), p = d.includes(h);
|
|
60
|
+
let b = u.includes("image/*") && e.type.split("/")[0].trim() === "image", A = u.includes("video/*") && e.type.split("/")[0].trim() === "video", $ = u.includes("audio/*") && e.type.split("/")[0].trim() === "audio", M = u.includes(e.type) || b || A || $;
|
|
61
|
+
if (!p && !M) {
|
|
62
|
+
const r = a.acceptAudio || a.acceptVideo ? "das-ui-import-upload-key2" : "das-ui-import-upload-key1", j = T.value === "zh-CN" ? "、" : ", ", E = a.errorMessage || V(r, s.value.toUpperCase().replaceAll(".", "").replaceAll(",", j)).value;
|
|
63
|
+
return U.warning(E), !1;
|
|
716
64
|
}
|
|
717
65
|
}
|
|
718
|
-
return
|
|
66
|
+
return c();
|
|
719
67
|
} };
|
|
720
|
-
},
|
|
68
|
+
}, ie = { class: "das-ui-image-upload" }, le = { class: "das-ui-image-upload-dragger-context" }, se = { class: "text" }, re = { class: "das-ui-image-upload-error-container" }, ne = { class: "tips-container" }, ce = { class: "text" }, de = /* @__PURE__ */ W({
|
|
721
69
|
__name: "Index",
|
|
722
70
|
props: {
|
|
723
71
|
maxCount: { default: 1 },
|
|
@@ -730,40 +78,39 @@ const vt = (t, e) => new Promise((a, r) => {
|
|
|
730
78
|
maxSize: {},
|
|
731
79
|
customCheck: {},
|
|
732
80
|
autoContentType: { type: Boolean },
|
|
733
|
-
openFileDialogOnClick: { type: Boolean, default: !0 }
|
|
734
|
-
isOverMaxLimitCompressImg: { type: Boolean, default: !1 }
|
|
81
|
+
openFileDialogOnClick: { type: Boolean, default: !0 }
|
|
735
82
|
},
|
|
736
83
|
emits: ["update:status", "image-upload"],
|
|
737
|
-
setup(
|
|
738
|
-
const
|
|
739
|
-
return (
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
class:
|
|
84
|
+
setup(a, { emit: t }) {
|
|
85
|
+
const i = a, n = t, { isAccept: l, uploadStatus: C, loading: s, errored: y, beforeupload: k } = te(i, n);
|
|
86
|
+
return (m, e) => (H(), P("div", ie, [
|
|
87
|
+
B(" 图片上传组件 "),
|
|
88
|
+
N(g(o(Q), {
|
|
89
|
+
class: L([{ "loading-border": o(s) }]),
|
|
743
90
|
type: "component",
|
|
744
|
-
spinning:
|
|
91
|
+
spinning: o(s)
|
|
745
92
|
}, {
|
|
746
|
-
default:
|
|
747
|
-
|
|
93
|
+
default: f(() => [
|
|
94
|
+
g(o(G), {
|
|
748
95
|
class: "das-ui-image-upload-dragger",
|
|
749
|
-
accept:
|
|
750
|
-
"max-count":
|
|
751
|
-
"before-upload":
|
|
752
|
-
openFileDialogOnClick:
|
|
96
|
+
accept: o(l),
|
|
97
|
+
"max-count": m.maxCount,
|
|
98
|
+
"before-upload": o(k),
|
|
99
|
+
openFileDialogOnClick: m.openFileDialogOnClick
|
|
753
100
|
}, {
|
|
754
|
-
itemRender:
|
|
755
|
-
default:
|
|
756
|
-
|
|
101
|
+
itemRender: f(({ file: c, actions: _ }) => e[0] || (e[0] = [])),
|
|
102
|
+
default: f(() => [
|
|
103
|
+
N(v(
|
|
757
104
|
"div",
|
|
758
|
-
|
|
105
|
+
le,
|
|
759
106
|
[
|
|
760
|
-
|
|
761
|
-
iconColor:
|
|
107
|
+
g(o(Y), {
|
|
108
|
+
iconColor: o(x)("--das-ui-color-secondary")
|
|
762
109
|
}, null, 8, ["iconColor"]),
|
|
763
|
-
|
|
110
|
+
v(
|
|
764
111
|
"div",
|
|
765
|
-
|
|
766
|
-
|
|
112
|
+
se,
|
|
113
|
+
D(m.message || o(w)("das-image-upload-text")),
|
|
767
114
|
1
|
|
768
115
|
/* TEXT */
|
|
769
116
|
)
|
|
@@ -771,7 +118,7 @@ const vt = (t, e) => new Promise((a, r) => {
|
|
|
771
118
|
512
|
|
772
119
|
/* NEED_PATCH */
|
|
773
120
|
), [
|
|
774
|
-
[
|
|
121
|
+
[S, o(C) === "normal"]
|
|
775
122
|
])
|
|
776
123
|
]),
|
|
777
124
|
_: 1
|
|
@@ -781,41 +128,41 @@ const vt = (t, e) => new Promise((a, r) => {
|
|
|
781
128
|
_: 1
|
|
782
129
|
/* STABLE */
|
|
783
130
|
}, 8, ["class", "spinning"]), [
|
|
784
|
-
[
|
|
131
|
+
[S, !o(y)]
|
|
785
132
|
]),
|
|
786
|
-
|
|
787
|
-
|
|
133
|
+
B(" 错误状态 "),
|
|
134
|
+
N(v(
|
|
788
135
|
"div",
|
|
789
|
-
|
|
136
|
+
re,
|
|
790
137
|
[
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
iconColor:
|
|
138
|
+
v("div", ne, [
|
|
139
|
+
g(o(Z), {
|
|
140
|
+
iconColor: o(x)("--das-ui-color-danger"),
|
|
794
141
|
size: "small"
|
|
795
142
|
}, null, 8, ["iconColor"]),
|
|
796
|
-
|
|
143
|
+
v(
|
|
797
144
|
"div",
|
|
798
|
-
|
|
799
|
-
|
|
145
|
+
ce,
|
|
146
|
+
D(o(w)("das-image-upload-fail")),
|
|
800
147
|
1
|
|
801
148
|
/* TEXT */
|
|
802
149
|
)
|
|
803
150
|
]),
|
|
804
|
-
|
|
805
|
-
accept:
|
|
806
|
-
"before-upload":
|
|
807
|
-
"max-count":
|
|
808
|
-
openFileDialogOnClick:
|
|
151
|
+
g(o(J), {
|
|
152
|
+
accept: o(l),
|
|
153
|
+
"before-upload": o(k),
|
|
154
|
+
"max-count": m.maxCount,
|
|
155
|
+
openFileDialogOnClick: m.openFileDialogOnClick
|
|
809
156
|
}, {
|
|
810
|
-
itemRender:
|
|
811
|
-
default:
|
|
812
|
-
|
|
157
|
+
itemRender: f(({ file: c, actions: _ }) => e[1] || (e[1] = [])),
|
|
158
|
+
default: f(() => [
|
|
159
|
+
g(o(X), {
|
|
813
160
|
"btn-type": "primary-text",
|
|
814
161
|
block: ""
|
|
815
162
|
}, {
|
|
816
|
-
default:
|
|
817
|
-
|
|
818
|
-
|
|
163
|
+
default: f(() => [
|
|
164
|
+
q(
|
|
165
|
+
D(o(w)("das-image-upload-reupload")),
|
|
819
166
|
1
|
|
820
167
|
/* TEXT */
|
|
821
168
|
)
|
|
@@ -831,16 +178,16 @@ const vt = (t, e) => new Promise((a, r) => {
|
|
|
831
178
|
512
|
|
832
179
|
/* NEED_PATCH */
|
|
833
180
|
), [
|
|
834
|
-
[
|
|
181
|
+
[S, o(y)]
|
|
835
182
|
])
|
|
836
183
|
]));
|
|
837
184
|
}
|
|
838
|
-
}),
|
|
839
|
-
const
|
|
840
|
-
for (const [
|
|
841
|
-
|
|
842
|
-
return
|
|
843
|
-
},
|
|
185
|
+
}), ue = (a, t) => {
|
|
186
|
+
const i = a.__vccOpts || a;
|
|
187
|
+
for (const [n, l] of t)
|
|
188
|
+
i[n] = l;
|
|
189
|
+
return i;
|
|
190
|
+
}, pe = /* @__PURE__ */ ue(de, [["__scopeId", "data-v-1159eda2"]]), me = {
|
|
844
191
|
"das-ui-import-upload-key1": {
|
|
845
192
|
"zh-CN": "上传的图片格式只能是$0",
|
|
846
193
|
en: "The uploaded picture format can only be $0",
|
|
@@ -864,16 +211,16 @@ const vt = (t, e) => new Promise((a, r) => {
|
|
|
864
211
|
"das-image-upload-text": { "zh-CN": "上传图片", en: "Upload Image", _appCode: "framework" },
|
|
865
212
|
"das-image-upload-reupload": { "zh-CN": "重新上传", en: "Re-upload", _appCode: "framework" },
|
|
866
213
|
"das-image-upload-fail": { "zh-CN": "上传失败", en: "Uploaded Failed", _appCode: "framework" }
|
|
867
|
-
},
|
|
214
|
+
}, ge = {
|
|
868
215
|
"--das-ui-image-upload-bgcolor": { light: "#FAFAFA" },
|
|
869
216
|
"--das-ui-image-upload-border-color": { light: "#E5E5E5" },
|
|
870
|
-
"--das-ui-image-upload-bgcolor-hover": { light:
|
|
217
|
+
"--das-ui-image-upload-bgcolor-hover": { light: x("--das-ui-color-primary-level1") },
|
|
871
218
|
"--das-ui-image-upload-border-color-hover": { light: "#5582F3" },
|
|
872
|
-
"--das-ui-image-upload-border-color-error": { light:
|
|
873
|
-
},
|
|
874
|
-
|
|
875
|
-
|
|
219
|
+
"--das-ui-image-upload-border-color-error": { light: x("--das-ui-color-danger-level2") }
|
|
220
|
+
}, Se = O(pe);
|
|
221
|
+
R(me);
|
|
222
|
+
K(ge);
|
|
876
223
|
export {
|
|
877
|
-
|
|
878
|
-
|
|
224
|
+
Se as DasImageUpload,
|
|
225
|
+
Se as default
|
|
879
226
|
};
|