@das-fed/ui 7.1.0-dev.9 → 7.1.0-qatar.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/esm-map.json +4 -1
- package/package.json +5 -5
- package/packages/business-components/ai-panel/i18n/index.d.ts +62 -0
- package/packages/business-components/ai-panel/{index-OwRrV6K8.js → index-C04Wttd4.js} +1 -1
- package/packages/business-components/ai-panel/index-C04Wttd4.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-8yffh0Id.js → index-CKFBXTtX.js} +687 -676
- package/packages/business-components/ai-panel/index-CKFBXTtX.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -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.d.ts +1 -0
- package/packages/business-components/app-container/index.js +122 -126
- package/packages/business-components/app-container/index.js.gz +0 -0
- package/packages/business-components/app-container/src/index.vue.d.ts +1 -0
- package/packages/business-components/app-container/src/type.d.ts +3 -0
- 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/i18n/index.d.ts +1 -0
- package/packages/business-components/area-phone-select/index.js +130 -119
- package/packages/business-components/area-phone-select/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/style.css +1 -1
- package/packages/business-components/area-phone-select/style.css.gz +0 -0
- package/packages/business-components/area-phone-select/theme/base.d.ts +10 -0
- package/packages/business-components/change-enterprises/i18n/index.d.ts +3 -0
- package/packages/business-components/change-enterprises/index.js +3 -3
- package/packages/business-components/change-enterprises/index.js.gz +0 -0
- package/packages/business-components/change-enterprises/style.css +1 -1
- package/packages/business-components/change-enterprises/style.css.gz +0 -0
- package/packages/business-components/change-pwd/i18n/index.d.ts +18 -0
- package/packages/business-components/change-pwd/index.js +53 -50
- package/packages/business-components/change-pwd/index.js.gz +0 -0
- package/packages/business-components/currency-page/i18n/index.d.ts +4 -0
- package/packages/business-components/currency-page/index.js +7 -5
- package/packages/business-components/currency-page/index.js.gz +0 -0
- package/packages/business-components/currency-page/style.css +1 -1
- package/packages/business-components/device-panel/i18n/index.d.ts +270 -0
- package/packages/business-components/device-panel/index.d.ts +1 -1
- package/packages/business-components/device-panel/index.js +15571 -14862
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/src/apis.d.ts +2 -0
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/alarmScreenshot/components/currentAlarmScreenshot.vue.d.ts +6 -0
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/alarmScreenshot/components/currentList.vue.d.ts +8 -0
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/alarmScreenshot/components/hisList.vue.d.ts +8 -0
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/alarmScreenshot/components/historyAlarmScreenshot.vue.d.ts +6 -0
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/alarmScreenshot/index.vue.d.ts +2 -0
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/hooks/use-alarm-screenshot.d.ts +6 -0
- package/packages/business-components/device-panel/src/components/devicePanelModal/alarmScreenshot/components/currentAlarmScreenshot.vue.d.ts +6 -0
- package/packages/business-components/device-panel/src/components/devicePanelModal/alarmScreenshot/components/currentList.vue.d.ts +8 -0
- package/packages/business-components/device-panel/src/components/devicePanelModal/alarmScreenshot/components/hisList.vue.d.ts +8 -0
- package/packages/business-components/device-panel/src/components/devicePanelModal/alarmScreenshot/components/historyAlarmScreenshot.vue.d.ts +6 -0
- package/packages/business-components/device-panel/src/components/devicePanelModal/alarmScreenshot/index.vue.d.ts +2 -0
- package/packages/business-components/device-panel/src/components/devicePanelModal/hooks/use-alarm-screenshot.d.ts +6 -0
- package/packages/business-components/device-panel/src/components/devicePanelModal/index.vue.d.ts +1 -1
- package/packages/business-components/device-panel/src/index.vue.d.ts +1 -1
- package/packages/business-components/device-panel/src/render-panel.d.ts +2 -1
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/export-button/i18n/index.d.ts +11 -0
- package/packages/business-components/export-button/index.js +131 -123
- package/packages/business-components/export-button/index.js.gz +0 -0
- package/packages/business-components/import-button/i18n/index.d.ts +30 -0
- package/packages/business-components/import-button/index.js +131 -127
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/import-button/style.css +1 -1
- package/packages/business-components/index.d.ts +1 -0
- package/packages/business-components/index.js +1 -0
- package/packages/business-components/layout-breadcrumb/index.js +72 -74
- package/packages/business-components/layout-breadcrumb/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/i18n/index.d.ts +6 -0
- package/packages/business-components/model-table-dialog/index.js +6 -6
- package/packages/business-components/model-table-dialog/index.js.gz +0 -0
- package/packages/business-components/payment/i18n/index.d.ts +13 -0
- package/packages/business-components/payment/index.js +284 -295
- package/packages/business-components/payment/index.js.gz +0 -0
- package/packages/business-components/payment/style.css +1 -1
- package/packages/business-components/payment/style.css.gz +0 -0
- package/packages/business-components/process-configuration/i18n/index.d.ts +30 -0
- package/packages/business-components/process-configuration/index.js +75 -73
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-configuration/style.css +1 -1
- package/packages/business-components/process-configuration/style.css.gz +0 -0
- package/packages/business-components/process-form/i18n/index.d.ts +84 -0
- package/packages/business-components/process-form/index.js +399 -387
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-log/i18n/index.d.ts +9 -0
- package/packages/business-components/process-log/index.js +99 -99
- package/packages/business-components/process-log/index.js.gz +0 -0
- package/packages/business-components/process-log/style.css +1 -1
- package/packages/business-components/process-log/style.css.gz +0 -0
- package/packages/business-components/process-search-form/i18n/index.d.ts +9 -0
- package/packages/business-components/process-search-form/index.js +9 -9
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/i18n/index.d.ts +8 -0
- package/packages/business-components/process-table/index.js +8 -8
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/process-table/style.css +1 -1
- package/packages/business-components/process-table/style.css.gz +0 -0
- package/packages/business-components/update-confirm-dialog/i18n/index.d.ts +28 -0
- package/packages/business-components/update-confirm-dialog/index.d.ts +61 -0
- package/packages/business-components/update-confirm-dialog/index.js +107 -0
- package/packages/business-components/update-confirm-dialog/index.js.gz +0 -0
- package/packages/business-components/update-confirm-dialog/src/App.vue.d.ts +11 -0
- package/packages/business-components/update-confirm-dialog/src/type.d.ts +4 -0
- package/packages/business-components/upload-file/i18n/index.d.ts +1 -0
- package/packages/business-components/upload-file/index.js +25 -24
- package/packages/business-components/upload-file/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/i18n/index.d.ts +104 -0
- package/packages/business-components/urgent-panel/index.js +104 -96
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/style.css +1 -1
- package/packages/business-components/urgent-panel/style.css.gz +0 -0
- package/packages/business-components/user-org-dialog/i18n/index.d.ts +18 -0
- package/packages/business-components/user-org-dialog/index.js +118 -117
- package/packages/business-components/user-org-dialog/index.js.gz +0 -0
- package/packages/business-components/user-org-dialog/style.css +1 -1
- package/packages/business-components/user-org-dialog/style.css.gz +0 -0
- package/packages/business-components/video-dialog/i18n/index.d.ts +20 -0
- package/packages/business-components/video-dialog/index.d.ts +10 -0
- package/packages/business-components/video-dialog/index.js +313 -309
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/src/index.vue.d.ts +2 -0
- package/packages/business-components/video-dialog/src/type.d.ts +4 -0
- package/packages/business-components/video-dialog/style.css +1 -1
- package/packages/business-components/video-dialog/style.css.gz +0 -0
- package/packages/components/audio-video/index.js +111 -108
- package/packages/components/audio-video/index.js.gz +0 -0
- package/packages/components/audio-video/style.css +1 -1
- package/packages/components/autocomplete/style.css +1 -1
- package/packages/components/autocomplete/style.css.gz +0 -0
- package/packages/components/breadcrumb/index.js +45 -44
- package/packages/components/breadcrumb/index.js.gz +0 -0
- package/packages/components/button/index.js +205 -206
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/button/style.css +1 -1
- package/packages/components/button/style.css.gz +0 -0
- package/packages/components/button/theme/index.d.ts +5 -7
- package/packages/components/calendar/i18n/index.d.ts +46 -0
- package/packages/components/calendar/index.js +183 -182
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/calendar/style.css +1 -1
- package/packages/components/calendar/style.css.gz +0 -0
- package/packages/components/cascader/i18n/index.d.ts +1 -0
- package/packages/components/cascader/index.js +131 -116
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/cascader/style.css +1 -1
- package/packages/components/cascader/style.css.gz +0 -0
- package/packages/components/cascader/theme/base.d.ts +7 -0
- package/packages/components/checkbox/index.js +155 -153
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/checkbox/style.css +1 -1
- package/packages/components/checkbox/style.css.gz +0 -0
- package/packages/components/checkbox/theme/index.d.ts +5 -4
- package/packages/components/collapse-panel/index.js +64 -39
- package/packages/components/collapse-panel/index.js.gz +0 -0
- package/packages/components/collapse-panel/style.css +1 -1
- package/packages/components/collapse-panel/style.css.gz +0 -0
- package/packages/components/color-picker/i18n/index.d.ts +1 -0
- package/packages/components/color-picker/index.js +90 -83
- package/packages/components/color-picker/index.js.gz +0 -0
- package/packages/components/color-picker/style.css +1 -1
- package/packages/components/color-picker/style.css.gz +0 -0
- package/packages/components/color-picker/theme/index.d.ts +7 -0
- package/packages/components/custom-search-item/i18n/index.d.ts +1 -0
- package/packages/components/custom-search-item/index.js +18 -25
- package/packages/components/custom-search-item/index.js.gz +0 -0
- package/packages/components/date-picker/i18n/index.d.ts +6 -0
- package/packages/components/date-picker/index.js +359 -350
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/date-picker/theme/base.d.ts +4 -0
- package/packages/components/dialog/i18n/index.d.ts +6 -0
- package/packages/components/dialog/index.d.ts +9 -3
- package/packages/components/dialog/index.js +90 -87
- package/packages/components/dialog/index.js.gz +0 -0
- package/packages/components/dialog/src/Index.vue.d.ts +4 -1
- package/packages/components/dialog/src/type.d.ts +4 -0
- package/packages/components/dialog/style.css +1 -1
- package/packages/components/dialog/style.css.gz +0 -0
- package/packages/components/dimple-layout/i18n/index.d.ts +10 -0
- package/packages/components/dimple-layout/index.js +10 -9
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dropdown/i18n/index.d.ts +1 -0
- package/packages/components/dropdown/index.js +9 -9
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/edit-table/index.js +1 -1
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/style.css +1 -1
- package/packages/components/edit-table/style.css.gz +0 -0
- package/packages/components/empty/i18n/index.d.ts +1 -0
- package/packages/components/empty/index.js +1 -1
- package/packages/components/empty/index.js.gz +0 -0
- package/packages/components/empty/style.css +1 -1
- package/packages/components/form-item/style.css +1 -1
- package/packages/components/form-item/style.css.gz +0 -0
- package/packages/components/hls-player/i18n/index.d.ts +2 -0
- package/packages/components/hls-player/index.js +2 -1
- package/packages/components/hls-player/index.js.gz +0 -0
- package/packages/components/hls-player/style.css +1 -1
- package/packages/components/hls-player/style.css.gz +0 -0
- package/packages/components/image-upload/i18n/index.d.ts +7 -0
- package/packages/components/image-upload/index.js +195 -187
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-upload/style.css +1 -1
- package/packages/components/image-upload/style.css.gz +0 -0
- package/packages/components/image-upload/theme/index.d.ts +9 -0
- package/packages/components/image-viewer/index.js +481 -477
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/image-viewer/style.css +1 -1
- package/packages/components/image-viewer/style.css.gz +0 -0
- package/packages/components/image-viewer/theme/index.d.ts +9 -0
- package/packages/components/input/i18n/index.d.ts +3 -0
- package/packages/components/input/index.js +145 -143
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/input/theme/base.d.ts +1 -0
- package/packages/components/input-dialog-select/i18n/index.d.ts +2 -0
- package/packages/components/input-dialog-select/index.js +86 -89
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/input-dialog-select/style.css +1 -1
- package/packages/components/input-dialog-select/style.css.gz +0 -0
- package/packages/components/input-dialog-select/theme/index.d.ts +0 -4
- package/packages/components/input-number/index.js +115 -113
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/input-number/style.css +1 -1
- package/packages/components/input-number/style.css.gz +0 -0
- package/packages/components/input-number/theme/index.d.ts +1 -0
- package/packages/components/live-player/i18n/index.d.ts +2 -0
- package/packages/components/live-player/index.js +2 -1
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/live-player/style.css +1 -1
- package/packages/components/loading/i18n/index.d.ts +1 -0
- package/packages/components/loading/index.js +1 -1
- package/packages/components/loading/index.js.gz +0 -0
- package/packages/components/loading/style.css +1 -1
- package/packages/components/loading/style.css.gz +0 -0
- package/packages/components/map/i18n/index.d.ts +6 -0
- package/packages/components/map/index.js +249 -243
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/map/style.css +1 -1
- package/packages/components/map/style.css.gz +0 -0
- package/packages/components/menu-aside/i18n/index.d.ts +1 -0
- package/packages/components/menu-aside/index.d.ts +3 -0
- package/packages/components/menu-aside/index.js +666 -658
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/menu-aside/src/Index.vue.d.ts +1 -0
- package/packages/components/menu-aside/src/sub-menu/sub-menu.vue.d.ts +1 -0
- package/packages/components/menu-aside/src/sub-menu/type.d.ts +2 -0
- package/packages/components/menu-aside/src/type.d.ts +2 -0
- 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 +3 -0
- package/packages/components/menu-header/index.js +29 -28
- package/packages/components/menu-header/index.js.gz +0 -0
- package/packages/components/menu-header/src/Index.vue.d.ts +1 -0
- package/packages/components/menu-header/src/type.d.ts +1 -0
- package/packages/components/menu-header/style.css +1 -1
- package/packages/components/menu-header/style.css.gz +0 -0
- package/packages/components/message/i18n/index.d.ts +1 -0
- package/packages/components/message/index.js +1 -1
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/notification/i18n/index.d.ts +1 -0
- package/packages/components/notification/index.js +27 -26
- package/packages/components/notification/index.js.gz +0 -0
- package/packages/components/notification/style.css +1 -1
- package/packages/components/notification/style.css.gz +0 -0
- package/packages/components/pagination/i18n/index.d.ts +4 -0
- package/packages/components/pagination/index.js +181 -158
- package/packages/components/pagination/index.js.gz +0 -0
- package/packages/components/pagination/style.css +1 -1
- package/packages/components/pagination/style.css.gz +0 -0
- package/packages/components/pagination/theme/index.d.ts +8 -0
- package/packages/components/popover/i18n/index.d.ts +2 -0
- package/packages/components/popover/index.js +2 -2
- package/packages/components/popover/index.js.gz +0 -0
- package/packages/components/popover/style.css +1 -1
- package/packages/components/popover/style.css.gz +0 -0
- package/packages/components/preview/i18n/index.d.ts +1 -0
- package/packages/components/preview/index.js +3 -1
- package/packages/components/preview/index.js.gz +0 -0
- package/packages/components/progress/style.css +1 -1
- package/packages/components/progress/style.css.gz +0 -0
- package/packages/components/radio/index.js +143 -144
- package/packages/components/radio/index.js.gz +0 -0
- package/packages/components/radio/style.css +1 -1
- package/packages/components/radio/style.css.gz +0 -0
- package/packages/components/radio/theme/index.d.ts +2 -4
- package/packages/components/radio-tabs/index.js +63 -60
- package/packages/components/radio-tabs/index.js.gz +0 -0
- package/packages/components/radio-tabs/style.css +1 -1
- package/packages/components/radio-tabs/style.css.gz +0 -0
- package/packages/components/rich-editor/i18n/index.d.ts +4 -0
- package/packages/components/rich-editor/index.d.ts +2 -1
- package/packages/components/rich-editor/index.js +5 -0
- package/packages/components/rich-editor/index.js.gz +0 -0
- package/packages/components/rich-editor/style.css +1 -1
- package/packages/components/rich-editor/style.css.gz +0 -0
- package/packages/components/search/index.js +73 -70
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/search/style.css +1 -1
- package/packages/components/search/style.css.gz +0 -0
- package/packages/components/search/theme/index.d.ts +2 -0
- package/packages/components/search-form/i18n/index.d.ts +7 -0
- package/packages/components/search-form/index.js +623 -620
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/src/Index.vue.d.ts +2 -0
- package/packages/components/search-form/src/type.d.ts +9 -5
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/search-form/theme/index.d.ts +1 -4
- package/packages/components/select/i18n/index.d.ts +4 -0
- package/packages/components/select/index.js +328 -314
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select/theme/base.d.ts +6 -0
- package/packages/components/select-input/style.css +1 -1
- package/packages/components/select-input/style.css.gz +0 -0
- package/packages/components/select-list/i18n/index.d.ts +4 -0
- package/packages/components/select-list/index.js +234 -233
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/select-list/style.css +1 -1
- package/packages/components/select-list/style.css.gz +0 -0
- package/packages/components/special-range-picker-month/i18n/index.d.ts +4 -0
- package/packages/components/special-range-picker-month/index.js +202 -193
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/src/hooks/use-error.d.ts +5 -6
- package/packages/components/special-range-picker-month/style.css +1 -1
- package/packages/components/special-range-picker-month/style.css.gz +0 -0
- package/packages/components/special-range-picker-month/theme/index.d.ts +21 -34
- package/packages/components/special-range-picker-year/i18n/index.d.ts +3 -0
- package/packages/components/special-range-picker-year/index.js +262 -253
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/src/hooks/use-error.d.ts +5 -6
- package/packages/components/special-range-picker-year/style.css +1 -1
- package/packages/components/special-range-picker-year/style.css.gz +0 -0
- package/packages/components/special-range-picker-year/theme/index.d.ts +21 -34
- package/packages/components/spin/i18n/index.d.ts +1 -0
- package/packages/components/spin/index.js +1 -1
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/split-panel/index.js +161 -163
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/steps/style.css +1 -1
- package/packages/components/steps/style.css.gz +0 -0
- package/packages/components/switch/index.js +41 -32
- package/packages/components/switch/index.js.gz +0 -0
- package/packages/components/switch/style.css +1 -1
- package/packages/components/switch/style.css.gz +0 -0
- package/packages/components/switch/theme/base.d.ts +2 -0
- package/packages/components/table/i18n/index.d.ts +20 -0
- package/packages/components/table/index.js +1478 -1467
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/style.css +1 -1
- package/packages/components/table/style.css.gz +0 -0
- package/packages/components/table/theme/index.d.ts +9 -0
- package/packages/components/tabs/i18n/index.d.ts +3 -0
- package/packages/components/tabs/index.js +183 -176
- package/packages/components/tabs/index.js.gz +0 -0
- package/packages/components/tabs/style.css +1 -1
- package/packages/components/tabs/style.css.gz +0 -0
- package/packages/components/tabs/theme/base.d.ts +6 -0
- package/packages/components/tooltip/i18n/index.d.ts +1 -0
- package/packages/components/tooltip/index.js +1 -1
- package/packages/components/tooltip/index.js.gz +0 -0
- package/packages/components/tree/i18n/index.d.ts +1 -40
- package/packages/components/tree/index.js +1350 -1353
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree/src/App.vue.d.ts +12 -4
- package/packages/components/tree/style.css +1 -1
- package/packages/components/tree/style.css.gz +0 -0
- package/packages/components/tree/theme/base.d.ts +10 -0
- package/packages/components/tree-select/index.js +258 -255
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +1 -0
- package/packages/components/tree-select/style.css +1 -1
- package/packages/components/tree-select/style.css.gz +0 -0
- package/packages/components/tree-select/theme/base.d.ts +1 -0
- package/packages/components/tree-table/index.js +191 -187
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-table/style.css +1 -1
- package/packages/components/tree-table/style.css.gz +0 -0
- package/packages/components/tree-table/theme/base.d.ts +3 -0
- package/packages/components/tree-v2/i18n/index.d.ts +21 -0
- package/packages/components/tree-v2/index.js +1754 -1740
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/components/tree-v2/style.css +1 -1
- package/packages/components/tree-v2/style.css.gz +0 -0
- package/packages/components/tree-v2/theme/base.d.ts +10 -0
- package/packages/components/upload/i18n/index.d.ts +6 -0
- package/packages/components/upload/index.js +136 -129
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/upload/style.css +1 -1
- package/packages/components/upload/style.css.gz +0 -0
- package/packages/components/upload/theme/index.d.ts +8 -9
- package/packages/components/virtual-tree/i18n/index.d.ts +37 -1
- package/packages/components/virtual-tree/index.js +114 -74
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/packages/components/virtual-tree/style.css +1 -1
- package/packages/components/virtual-tree/style.css.gz +0 -0
- package/packages/components/virtual-tree/theme/base.d.ts +26 -0
- package/packages/business-components/ai-panel/index-8yffh0Id.js.gz +0 -0
- package/packages/business-components/ai-panel/index-OwRrV6K8.js.gz +0 -0
- package/packages/components/custom-search-item/theme/index.d.ts +0 -7
|
@@ -1,97 +1,97 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/image-viewer/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { setThemeRule as
|
|
4
|
-
import { ref as
|
|
5
|
-
import { ElImageViewer as
|
|
6
|
-
import { Upload as
|
|
7
|
-
import { vDasTooltip as
|
|
8
|
-
import { DasImageUpload as
|
|
9
|
-
import { DasSpin as
|
|
10
|
-
import { DasAudioVideo as
|
|
11
|
-
import { DasIconDownload as
|
|
12
|
-
import { DasIconChange as
|
|
2
|
+
import { withInstall as ot } from "@das-fed/utils/with-install/index";
|
|
3
|
+
import { getVar as ae, setGlobalThemeRule as st, setThemeRule as lt } from "@das-fed/web/packages/theme/index";
|
|
4
|
+
import { ref as be, computed as z, watch as ut, createApp as ct, defineComponent as mt, createElementBlock as U, openBlock as y, Fragment as ge, createCommentVNode as p, createElementVNode as X, withDirectives as J, normalizeStyle as fe, createVNode as re, unref as r, normalizeClass as ve, withCtx as ne, createBlock as O, vShow as j, isRef as Pe, createTextVNode as Te, toDisplayString as Me, renderList as Le } from "vue";
|
|
5
|
+
import { ElImageViewer as dt, ElImage as Fe } from "element-plus";
|
|
6
|
+
import { Upload as Ne } from "ant-design-vue";
|
|
7
|
+
import { vDasTooltip as Ve } from "@das-fed/ui/packages/components/text-tooltip/index";
|
|
8
|
+
import { DasImageUpload as Je } from "@das-fed/ui/packages/components/image-upload/index";
|
|
9
|
+
import { DasSpin as je } from "@das-fed/ui/packages/components/spin/index";
|
|
10
|
+
import { DasAudioVideo as pe } from "@das-fed/ui/packages/components/audio-video/index";
|
|
11
|
+
import { DasIconDownload as xe } from "@das-fed/ui/packages/icons/download/index";
|
|
12
|
+
import { DasIconChange as he } from "@das-fed/ui/packages/icons/change/index";
|
|
13
13
|
import { DasIconDelete as ze } from "@das-fed/ui/packages/icons/delete/index";
|
|
14
|
-
import { useModelValue as
|
|
15
|
-
import { DasMessage as
|
|
16
|
-
import { extractFilename as
|
|
17
|
-
import { getConfig as
|
|
18
|
-
import { currentLang as
|
|
19
|
-
import { iotMinio as
|
|
20
|
-
import { useFile as
|
|
21
|
-
import { getUserInfo as
|
|
22
|
-
import { pureImageSrc as
|
|
14
|
+
import { useModelValue as Be } from "@das-fed/utils/vue";
|
|
15
|
+
import { DasMessage as Ke } from "@das-fed/ui/packages/components/message/index";
|
|
16
|
+
import { extractFilename as et, getFileExtension as gt } from "@das-fed/utils/common-tools";
|
|
17
|
+
import { getConfig as Re } from "@das-fed/utils/config";
|
|
18
|
+
import { currentLang as He, i18n as We } from "@das-fed/web/packages/i18n/index";
|
|
19
|
+
import { iotMinio as tt } from "@das-fed/utils/api-services/modules/iot";
|
|
20
|
+
import { useFile as ft } from "@das-fed/utils/api-services/modules/file";
|
|
21
|
+
import { getUserInfo as vt } from "@das-fed/utils/common-info";
|
|
22
|
+
import { pureImageSrc as Se } from "@das-fed/utils/pure-image-src";
|
|
23
23
|
import "ant-design-vue/es/upload/style/css";
|
|
24
24
|
import "element-plus/es/components/image/style/css";
|
|
25
25
|
import "element-plus/es/components/image-viewer/style/css";
|
|
26
26
|
import "@das-fed/ui/packages/global/theme";
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
let
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
let
|
|
27
|
+
const ke = "data:image/png;base64,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", pt = (t, e) => {
|
|
28
|
+
const a = new Image();
|
|
29
|
+
a.setAttribute("crossOrigin", "Anonymous"), a.onload = function() {
|
|
30
|
+
let i = document.createElement("canvas");
|
|
31
|
+
const n = i.getContext("2d");
|
|
32
|
+
i.width = a.width, i.height = a.height, n.drawImage(a, 0, 0, a.width, a.height), i.toBlob((o) => {
|
|
33
|
+
let f = URL.createObjectURL(o), s = document.createElement("a"), g = new MouseEvent("click");
|
|
34
34
|
const c = t.substring(t.lastIndexOf(".")).toLowerCase();
|
|
35
|
-
s.download = e || `default${c}`, s.href =
|
|
35
|
+
s.download = e || `default${c}`, s.href = f, s.dispatchEvent(g), URL.revokeObjectURL(f);
|
|
36
36
|
});
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
t && fetch(t).then((
|
|
40
|
-
const
|
|
41
|
-
document.body.appendChild(
|
|
42
|
-
const
|
|
43
|
-
|
|
37
|
+
}, a.src = t + "?v=" + Date.now();
|
|
38
|
+
}, ht = (t, e) => {
|
|
39
|
+
t && fetch(t).then((a) => a.blob()).then((a) => {
|
|
40
|
+
const i = document.createElement("a");
|
|
41
|
+
document.body.appendChild(i), i.style.display = "none";
|
|
42
|
+
const n = window.URL.createObjectURL(a);
|
|
43
|
+
i.href = n, i.download = e, i.click(), document.body.removeChild(i), window.URL.revokeObjectURL(n);
|
|
44
44
|
});
|
|
45
|
-
},
|
|
45
|
+
}, wt = (t) => {
|
|
46
46
|
const e = (t == null ? void 0 : t.minioTokenApi) ?? "token";
|
|
47
|
-
return
|
|
48
|
-
},
|
|
49
|
-
const t =
|
|
47
|
+
return tt.get(e, (a) => (a.headers || (a.headers = {}), t != null && t.baseUrl && (a.baseURL = t.baseUrl), a));
|
|
48
|
+
}, At = (t) => tt.post("put-object", (e) => (e.headers || (e.headers = {}), t && (e.baseURL = t), e.headers["Content-Type"] = "multipart/form-data", e)), yt = () => {
|
|
49
|
+
const t = vt();
|
|
50
50
|
return t ? t.tenantId : "";
|
|
51
|
-
},
|
|
52
|
-
const { baseUrl: e, serviceName:
|
|
53
|
-
const [v, d] = await
|
|
51
|
+
}, Ct = (t) => {
|
|
52
|
+
const { baseUrl: e, serviceName: a, pathPrefix: i, bucketName: n, minioTokenApi: o, autoContentType: f } = t, s = async () => {
|
|
53
|
+
const [v, d] = await wt({ baseUrl: e, minioTokenApi: o })().run();
|
|
54
54
|
return v ? { stauts: !1 } : { status: !0, data: d };
|
|
55
|
-
}, { generateUniqueName:
|
|
55
|
+
}, { generateUniqueName: g } = ft();
|
|
56
56
|
return { upload: async (v, d = {}) => {
|
|
57
57
|
const C = await s();
|
|
58
58
|
if (!C.status) return;
|
|
59
|
-
const h = v.name, m = C.data, E =
|
|
59
|
+
const h = v.name, m = C.data, E = i || yt(), k = h.substring(h.lastIndexOf(".")).toLowerCase(), S = t.randomName ? `${g("")}${k}` : h, K = a ? `${E}/${a}/${S}` : `${E}/${S}`, T = {
|
|
60
60
|
accessKeyId: m.accessKeyId,
|
|
61
61
|
secretAccessKey: m.secretAccessKey,
|
|
62
62
|
sessionToken: m.sessionToken,
|
|
63
63
|
file: v,
|
|
64
|
-
bucketName:
|
|
64
|
+
bucketName: n || "business",
|
|
65
65
|
filePath: K,
|
|
66
66
|
isThumbnail: !0,
|
|
67
|
-
autoContentType:
|
|
67
|
+
autoContentType: f === !0 ? !0 : void 0,
|
|
68
68
|
...d
|
|
69
|
-
}, [M, L] = await
|
|
69
|
+
}, [M, L] = await At(e)(T).run();
|
|
70
70
|
return M ? "error" : L.value;
|
|
71
71
|
} };
|
|
72
|
-
},
|
|
72
|
+
}, Et = () => ({ size2B: (e) => {
|
|
73
73
|
isNaN(Number(e)) ? e = e.toString() : e = e + "M";
|
|
74
|
-
const
|
|
75
|
-
M:
|
|
76
|
-
K:
|
|
74
|
+
const a = Number(e.slice(0, -1)), i = e[e.length - 1].toUpperCase(), n = 1024, o = {
|
|
75
|
+
M: n * n,
|
|
76
|
+
K: n,
|
|
77
77
|
B: 1
|
|
78
78
|
};
|
|
79
|
-
return { finalSize:
|
|
80
|
-
} }),
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
return
|
|
84
|
-
} }),
|
|
85
|
-
const
|
|
86
|
-
return await
|
|
87
|
-
},
|
|
88
|
-
const e =
|
|
89
|
-
let
|
|
90
|
-
for (const
|
|
91
|
-
const
|
|
92
|
-
|
|
79
|
+
return { finalSize: a * o[i], sizeText: e };
|
|
80
|
+
} }), bt = (t) => ({ handlerImageSrc: (a, i) => {
|
|
81
|
+
if (i.startsWith("http")) return i;
|
|
82
|
+
const n = t.useOriginUrl ? i : Se(i);
|
|
83
|
+
return a + n;
|
|
84
|
+
} }), Bt = async (t) => {
|
|
85
|
+
const a = Re().baseURL + Se(t);
|
|
86
|
+
return await et(a);
|
|
87
|
+
}, It = async (t) => {
|
|
88
|
+
const e = Re();
|
|
89
|
+
let a = [];
|
|
90
|
+
for (const i of t) {
|
|
91
|
+
const n = e.baseURL + Se(i), o = await et(n);
|
|
92
|
+
a.push(o);
|
|
93
93
|
}
|
|
94
|
-
return
|
|
94
|
+
return a;
|
|
95
95
|
};
|
|
96
96
|
/*!
|
|
97
97
|
* Compressor.js v1.2.1
|
|
@@ -102,120 +102,120 @@ const Ie = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAA
|
|
|
102
102
|
*
|
|
103
103
|
* Date: 2023-02-28T14:09:41.732Z
|
|
104
104
|
*/
|
|
105
|
-
function
|
|
106
|
-
var
|
|
105
|
+
function Ge(t, e) {
|
|
106
|
+
var a = Object.keys(t);
|
|
107
107
|
if (Object.getOwnPropertySymbols) {
|
|
108
|
-
var
|
|
109
|
-
e && (
|
|
110
|
-
return Object.getOwnPropertyDescriptor(t,
|
|
111
|
-
})),
|
|
108
|
+
var i = Object.getOwnPropertySymbols(t);
|
|
109
|
+
e && (i = i.filter(function(n) {
|
|
110
|
+
return Object.getOwnPropertyDescriptor(t, n).enumerable;
|
|
111
|
+
})), a.push.apply(a, i);
|
|
112
112
|
}
|
|
113
|
-
return
|
|
113
|
+
return a;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function we(t) {
|
|
116
116
|
for (var e = 1; e < arguments.length; e++) {
|
|
117
|
-
var
|
|
118
|
-
e % 2 ?
|
|
119
|
-
|
|
120
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(
|
|
121
|
-
Object.defineProperty(t,
|
|
117
|
+
var a = arguments[e] != null ? arguments[e] : {};
|
|
118
|
+
e % 2 ? Ge(Object(a), !0).forEach(function(i) {
|
|
119
|
+
Rt(t, i, a[i]);
|
|
120
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : Ge(Object(a)).forEach(function(i) {
|
|
121
|
+
Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(a, i));
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
return t;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function kt(t, e) {
|
|
127
127
|
if (!(t instanceof e))
|
|
128
128
|
throw new TypeError("Cannot call a class as a function");
|
|
129
129
|
}
|
|
130
130
|
function Ye(t, e) {
|
|
131
|
-
for (var
|
|
132
|
-
var
|
|
133
|
-
|
|
131
|
+
for (var a = 0; a < e.length; a++) {
|
|
132
|
+
var i = e[a];
|
|
133
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, it(i.key), i);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return e && Ye(t.prototype, e),
|
|
136
|
+
function Dt(t, e, a) {
|
|
137
|
+
return e && Ye(t.prototype, e), a && Ye(t, a), Object.defineProperty(t, "prototype", {
|
|
138
138
|
writable: !1
|
|
139
139
|
}), t;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return e =
|
|
143
|
-
value:
|
|
141
|
+
function Rt(t, e, a) {
|
|
142
|
+
return e = it(e), e in t ? Object.defineProperty(t, e, {
|
|
143
|
+
value: a,
|
|
144
144
|
enumerable: !0,
|
|
145
145
|
configurable: !0,
|
|
146
146
|
writable: !0
|
|
147
|
-
}) : t[e] =
|
|
147
|
+
}) : t[e] = a, t;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
return
|
|
149
|
+
function ye() {
|
|
150
|
+
return ye = Object.assign ? Object.assign.bind() : function(t) {
|
|
151
151
|
for (var e = 1; e < arguments.length; e++) {
|
|
152
|
-
var
|
|
153
|
-
for (var
|
|
154
|
-
Object.prototype.hasOwnProperty.call(
|
|
152
|
+
var a = arguments[e];
|
|
153
|
+
for (var i in a)
|
|
154
|
+
Object.prototype.hasOwnProperty.call(a, i) && (t[i] = a[i]);
|
|
155
155
|
}
|
|
156
156
|
return t;
|
|
157
|
-
},
|
|
157
|
+
}, ye.apply(this, arguments);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function St(t, e) {
|
|
160
160
|
if (typeof t != "object" || t === null) return t;
|
|
161
|
-
var
|
|
162
|
-
if (
|
|
163
|
-
var
|
|
164
|
-
if (typeof
|
|
161
|
+
var a = t[Symbol.toPrimitive];
|
|
162
|
+
if (a !== void 0) {
|
|
163
|
+
var i = a.call(t, e);
|
|
164
|
+
if (typeof i != "object") return i;
|
|
165
165
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
166
166
|
}
|
|
167
167
|
return String(t);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
var e =
|
|
169
|
+
function it(t) {
|
|
170
|
+
var e = St(t, "string");
|
|
171
171
|
return typeof e == "symbol" ? e : String(e);
|
|
172
172
|
}
|
|
173
173
|
var at = { exports: {} };
|
|
174
174
|
(function(t) {
|
|
175
175
|
typeof window > "u" || function(e) {
|
|
176
|
-
var
|
|
176
|
+
var a = e.HTMLCanvasElement && e.HTMLCanvasElement.prototype, i = e.Blob && function() {
|
|
177
177
|
try {
|
|
178
178
|
return !!new Blob();
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
182
|
-
}(),
|
|
182
|
+
}(), n = i && e.Uint8Array && function() {
|
|
183
183
|
try {
|
|
184
184
|
return new Blob([new Uint8Array(100)]).size === 100;
|
|
185
185
|
} catch {
|
|
186
186
|
return !1;
|
|
187
187
|
}
|
|
188
|
-
}(), o = e.BlobBuilder || e.WebKitBlobBuilder || e.MozBlobBuilder || e.MSBlobBuilder,
|
|
188
|
+
}(), o = e.BlobBuilder || e.WebKitBlobBuilder || e.MozBlobBuilder || e.MSBlobBuilder, f = /^data:((.*?)(;charset=.*?)?)(;base64)?,/, s = (i || o) && e.atob && e.ArrayBuffer && e.Uint8Array && function(g) {
|
|
189
189
|
var c, v, d, C, h, m, E, k, S;
|
|
190
|
-
if (c =
|
|
190
|
+
if (c = g.match(f), !c)
|
|
191
191
|
throw new Error("invalid data URI");
|
|
192
|
-
for (v = c[2] ? c[1] : "text/plain" + (c[3] || ";charset=US-ASCII"), d = !!c[4], C =
|
|
192
|
+
for (v = c[2] ? c[1] : "text/plain" + (c[3] || ";charset=US-ASCII"), d = !!c[4], C = g.slice(c[0].length), d ? h = atob(C) : h = decodeURIComponent(C), m = new ArrayBuffer(h.length), E = new Uint8Array(m), k = 0; k < h.length; k += 1)
|
|
193
193
|
E[k] = h.charCodeAt(k);
|
|
194
|
-
return
|
|
194
|
+
return i ? new Blob([n ? E : m], {
|
|
195
195
|
type: v
|
|
196
196
|
}) : (S = new o(), S.append(m), S.getBlob(v));
|
|
197
197
|
};
|
|
198
|
-
e.HTMLCanvasElement && !
|
|
198
|
+
e.HTMLCanvasElement && !a.toBlob && (a.mozGetAsFile ? a.toBlob = function(g, c, v) {
|
|
199
199
|
var d = this;
|
|
200
200
|
setTimeout(function() {
|
|
201
|
-
v &&
|
|
201
|
+
v && a.toDataURL && s ? g(s(d.toDataURL(c, v))) : g(d.mozGetAsFile("blob", c));
|
|
202
202
|
});
|
|
203
|
-
} :
|
|
203
|
+
} : a.toDataURL && s && (a.msToBlob ? a.toBlob = function(g, c, v) {
|
|
204
204
|
var d = this;
|
|
205
205
|
setTimeout(function() {
|
|
206
|
-
(c && c !== "image/png" || v) &&
|
|
206
|
+
(c && c !== "image/png" || v) && a.toDataURL && s ? g(s(d.toDataURL(c, v))) : g(d.msToBlob(c));
|
|
207
207
|
});
|
|
208
|
-
} :
|
|
208
|
+
} : a.toBlob = function(g, c, v) {
|
|
209
209
|
var d = this;
|
|
210
210
|
setTimeout(function() {
|
|
211
|
-
|
|
211
|
+
g(s(d.toDataURL(c, v)));
|
|
212
212
|
});
|
|
213
213
|
})), t.exports ? t.exports = s : e.dataURLtoBlob = s;
|
|
214
214
|
}(window);
|
|
215
215
|
})(at);
|
|
216
|
-
var
|
|
216
|
+
var Xe = at.exports, Ut = function(e) {
|
|
217
217
|
return typeof Blob > "u" ? !1 : e instanceof Blob || Object.prototype.toString.call(e) === "[object Blob]";
|
|
218
|
-
},
|
|
218
|
+
}, qe = {
|
|
219
219
|
/**
|
|
220
220
|
* Indicates if output the original image instead of the compressed one
|
|
221
221
|
* when the size of the compressed image is greater than the original one's
|
|
@@ -339,88 +339,88 @@ var Ge = at.exports, Rt = function(e) {
|
|
|
339
339
|
* }
|
|
340
340
|
*/
|
|
341
341
|
error: null
|
|
342
|
-
},
|
|
342
|
+
}, Ot = typeof window < "u" && typeof window.document < "u", q = Ot ? window : {}, Ce = function(e) {
|
|
343
343
|
return e > 0 && e < 1 / 0;
|
|
344
|
-
},
|
|
345
|
-
function
|
|
346
|
-
return Array.from ? Array.from(t) :
|
|
344
|
+
}, Qt = Array.prototype.slice;
|
|
345
|
+
function Ue(t) {
|
|
346
|
+
return Array.from ? Array.from(t) : Qt.call(t);
|
|
347
347
|
}
|
|
348
|
-
var
|
|
349
|
-
function
|
|
350
|
-
return
|
|
348
|
+
var Pt = /^image\/.+$/;
|
|
349
|
+
function De(t) {
|
|
350
|
+
return Pt.test(t);
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
var e =
|
|
352
|
+
function Tt(t) {
|
|
353
|
+
var e = De(t) ? t.substr(6) : "";
|
|
354
354
|
return e === "jpeg" && (e = "jpg"), ".".concat(e);
|
|
355
355
|
}
|
|
356
|
-
var
|
|
357
|
-
function
|
|
358
|
-
var
|
|
359
|
-
for (
|
|
360
|
-
|
|
361
|
-
return
|
|
356
|
+
var rt = String.fromCharCode;
|
|
357
|
+
function Mt(t, e, a) {
|
|
358
|
+
var i = "", n;
|
|
359
|
+
for (a += e, n = e; n < a; n += 1)
|
|
360
|
+
i += rt(t.getUint8(n));
|
|
361
|
+
return i;
|
|
362
362
|
}
|
|
363
|
-
var
|
|
364
|
-
function
|
|
365
|
-
for (var
|
|
366
|
-
|
|
367
|
-
return "data:".concat(e, ";base64,").concat(
|
|
363
|
+
var Lt = q.btoa;
|
|
364
|
+
function Ze(t, e) {
|
|
365
|
+
for (var a = [], i = 8192, n = new Uint8Array(t); n.length > 0; )
|
|
366
|
+
a.push(rt.apply(null, Ue(n.subarray(0, i)))), n = n.subarray(i);
|
|
367
|
+
return "data:".concat(e, ";base64,").concat(Lt(a.join("")));
|
|
368
368
|
}
|
|
369
|
-
function
|
|
370
|
-
var e = new DataView(t),
|
|
369
|
+
function Ft(t) {
|
|
370
|
+
var e = new DataView(t), a;
|
|
371
371
|
try {
|
|
372
|
-
var
|
|
372
|
+
var i, n, o;
|
|
373
373
|
if (e.getUint8(0) === 255 && e.getUint8(1) === 216)
|
|
374
|
-
for (var
|
|
374
|
+
for (var f = e.byteLength, s = 2; s + 1 < f; ) {
|
|
375
375
|
if (e.getUint8(s) === 255 && e.getUint8(s + 1) === 225) {
|
|
376
|
-
|
|
376
|
+
n = s;
|
|
377
377
|
break;
|
|
378
378
|
}
|
|
379
379
|
s += 1;
|
|
380
380
|
}
|
|
381
|
-
if (
|
|
382
|
-
var
|
|
383
|
-
if (
|
|
381
|
+
if (n) {
|
|
382
|
+
var g = n + 4, c = n + 10;
|
|
383
|
+
if (Mt(e, g, 4) === "Exif") {
|
|
384
384
|
var v = e.getUint16(c);
|
|
385
|
-
if (
|
|
386
|
-
var d = e.getUint32(c + 4,
|
|
385
|
+
if (i = v === 18761, (i || v === 19789) && e.getUint16(c + 2, i) === 42) {
|
|
386
|
+
var d = e.getUint32(c + 4, i);
|
|
387
387
|
d >= 8 && (o = c + d);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
if (o) {
|
|
392
|
-
var C = e.getUint16(o,
|
|
392
|
+
var C = e.getUint16(o, i), h, m;
|
|
393
393
|
for (m = 0; m < C; m += 1)
|
|
394
|
-
if (h = o + m * 12 + 2, e.getUint16(h,
|
|
395
|
-
h += 8,
|
|
394
|
+
if (h = o + m * 12 + 2, e.getUint16(h, i) === 274) {
|
|
395
|
+
h += 8, a = e.getUint16(h, i), e.setUint16(h, 1, i);
|
|
396
396
|
break;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
} catch {
|
|
400
|
-
|
|
400
|
+
a = 1;
|
|
401
401
|
}
|
|
402
|
-
return
|
|
402
|
+
return a;
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
var e = 0,
|
|
404
|
+
function Nt(t) {
|
|
405
|
+
var e = 0, a = 1, i = 1;
|
|
406
406
|
switch (t) {
|
|
407
407
|
case 2:
|
|
408
|
-
|
|
408
|
+
a = -1;
|
|
409
409
|
break;
|
|
410
410
|
case 3:
|
|
411
411
|
e = -180;
|
|
412
412
|
break;
|
|
413
413
|
case 4:
|
|
414
|
-
|
|
414
|
+
i = -1;
|
|
415
415
|
break;
|
|
416
416
|
case 5:
|
|
417
|
-
e = 90,
|
|
417
|
+
e = 90, i = -1;
|
|
418
418
|
break;
|
|
419
419
|
case 6:
|
|
420
420
|
e = 90;
|
|
421
421
|
break;
|
|
422
422
|
case 7:
|
|
423
|
-
e = 90,
|
|
423
|
+
e = 90, a = -1;
|
|
424
424
|
break;
|
|
425
425
|
case 8:
|
|
426
426
|
e = -90;
|
|
@@ -428,109 +428,109 @@ function Lt(t) {
|
|
|
428
428
|
}
|
|
429
429
|
return {
|
|
430
430
|
rotate: e,
|
|
431
|
-
scaleX:
|
|
432
|
-
scaleY:
|
|
431
|
+
scaleX: a,
|
|
432
|
+
scaleY: i
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
|
-
var
|
|
436
|
-
function
|
|
435
|
+
var Vt = /\.\d*(?:0|9){12}\d*$/;
|
|
436
|
+
function $e(t) {
|
|
437
437
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e11;
|
|
438
|
-
return
|
|
438
|
+
return Vt.test(t) ? Math.round(t * e) / e : t;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
var e = t.aspectRatio,
|
|
442
|
-
if (o &&
|
|
443
|
-
var s =
|
|
444
|
-
(
|
|
445
|
-
} else o ?
|
|
440
|
+
function le(t) {
|
|
441
|
+
var e = t.aspectRatio, a = t.height, i = t.width, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "none", o = Ce(i), f = Ce(a);
|
|
442
|
+
if (o && f) {
|
|
443
|
+
var s = a * e;
|
|
444
|
+
(n === "contain" || n === "none") && s > i || n === "cover" && s < i ? a = i / e : i = a * e;
|
|
445
|
+
} else o ? a = i / e : f && (i = a * e);
|
|
446
446
|
return {
|
|
447
|
-
width:
|
|
448
|
-
height:
|
|
447
|
+
width: i,
|
|
448
|
+
height: a
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
for (var e =
|
|
453
|
-
var o = e[
|
|
454
|
-
if (o === 255 &&
|
|
451
|
+
function Jt(t) {
|
|
452
|
+
for (var e = Ue(new Uint8Array(t)), a = e.length, i = [], n = 0; n + 3 < a; ) {
|
|
453
|
+
var o = e[n], f = e[n + 1];
|
|
454
|
+
if (o === 255 && f === 218)
|
|
455
455
|
break;
|
|
456
|
-
if (o === 255 &&
|
|
457
|
-
|
|
456
|
+
if (o === 255 && f === 216)
|
|
457
|
+
n += 2;
|
|
458
458
|
else {
|
|
459
|
-
var s = e[
|
|
460
|
-
|
|
459
|
+
var s = e[n + 2] * 256 + e[n + 3], g = n + s + 2, c = e.slice(n, g);
|
|
460
|
+
i.push(c), n = g;
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
return
|
|
463
|
+
return i.reduce(function(v, d) {
|
|
464
464
|
return d[0] === 255 && d[1] === 225 ? v.concat(d) : v;
|
|
465
465
|
}, []);
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
var
|
|
469
|
-
if (
|
|
467
|
+
function jt(t, e) {
|
|
468
|
+
var a = Ue(new Uint8Array(t));
|
|
469
|
+
if (a[2] !== 255 || a[3] !== 224)
|
|
470
470
|
return t;
|
|
471
|
-
var
|
|
472
|
-
return new Uint8Array(
|
|
471
|
+
var i = a[4] * 256 + a[5], n = [255, 216].concat(e, a.slice(4 + i));
|
|
472
|
+
return new Uint8Array(n);
|
|
473
473
|
}
|
|
474
|
-
var
|
|
475
|
-
function t(e,
|
|
476
|
-
|
|
474
|
+
var xt = q.ArrayBuffer, Ie = q.FileReader, te = q.URL || q.webkitURL, zt = /\.\w+$/, Kt = q.Compressor, Ht = /* @__PURE__ */ function() {
|
|
475
|
+
function t(e, a) {
|
|
476
|
+
kt(this, t), this.file = e, this.exif = [], this.image = new Image(), this.options = we(we({}, qe), a), this.aborted = !1, this.result = null, this.init();
|
|
477
477
|
}
|
|
478
|
-
return
|
|
478
|
+
return Dt(t, [{
|
|
479
479
|
key: "init",
|
|
480
480
|
value: function() {
|
|
481
|
-
var
|
|
482
|
-
if (!
|
|
481
|
+
var a = this, i = this.file, n = this.options;
|
|
482
|
+
if (!Ut(i)) {
|
|
483
483
|
this.fail(new Error("The first argument must be a File or Blob object."));
|
|
484
484
|
return;
|
|
485
485
|
}
|
|
486
|
-
var o =
|
|
487
|
-
if (!
|
|
486
|
+
var o = i.type;
|
|
487
|
+
if (!De(o)) {
|
|
488
488
|
this.fail(new Error("The first argument must be an image File or Blob object."));
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
491
|
-
if (!te || !
|
|
491
|
+
if (!te || !Ie) {
|
|
492
492
|
this.fail(new Error("The current browser does not support image compression."));
|
|
493
493
|
return;
|
|
494
494
|
}
|
|
495
|
-
|
|
496
|
-
var
|
|
497
|
-
if (te && !s && !
|
|
495
|
+
xt || (n.checkOrientation = !1, n.retainExif = !1);
|
|
496
|
+
var f = o === "image/jpeg", s = f && n.checkOrientation, g = f && n.retainExif;
|
|
497
|
+
if (te && !s && !g)
|
|
498
498
|
this.load({
|
|
499
|
-
url: te.createObjectURL(
|
|
499
|
+
url: te.createObjectURL(i)
|
|
500
500
|
});
|
|
501
501
|
else {
|
|
502
|
-
var c = new
|
|
502
|
+
var c = new Ie();
|
|
503
503
|
this.reader = c, c.onload = function(v) {
|
|
504
504
|
var d = v.target, C = d.result, h = {}, m = 1;
|
|
505
|
-
s && (m =
|
|
505
|
+
s && (m = Ft(C), m > 1 && ye(h, Nt(m))), g && (a.exif = Jt(C)), s || g ? !te || m > 1 ? h.url = Ze(C, o) : h.url = te.createObjectURL(i) : h.url = C, a.load(h);
|
|
506
506
|
}, c.onabort = function() {
|
|
507
|
-
|
|
507
|
+
a.fail(new Error("Aborted to read the image with FileReader."));
|
|
508
508
|
}, c.onerror = function() {
|
|
509
|
-
|
|
509
|
+
a.fail(new Error("Failed to read the image with FileReader."));
|
|
510
510
|
}, c.onloadend = function() {
|
|
511
|
-
|
|
512
|
-
}, s ||
|
|
511
|
+
a.reader = null;
|
|
512
|
+
}, s || g ? c.readAsArrayBuffer(i) : c.readAsDataURL(i);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
}, {
|
|
516
516
|
key: "load",
|
|
517
|
-
value: function(
|
|
518
|
-
var
|
|
517
|
+
value: function(a) {
|
|
518
|
+
var i = this, n = this.file, o = this.image;
|
|
519
519
|
o.onload = function() {
|
|
520
|
-
|
|
520
|
+
i.draw(we(we({}, a), {}, {
|
|
521
521
|
naturalWidth: o.naturalWidth,
|
|
522
522
|
naturalHeight: o.naturalHeight
|
|
523
523
|
}));
|
|
524
524
|
}, o.onabort = function() {
|
|
525
|
-
|
|
525
|
+
i.fail(new Error("Aborted to load the image."));
|
|
526
526
|
}, o.onerror = function() {
|
|
527
|
-
|
|
528
|
-
}, q.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(q.navigator.userAgent) && (o.crossOrigin = "anonymous"), o.alt =
|
|
527
|
+
i.fail(new Error("Failed to load the image."));
|
|
528
|
+
}, q.navigator && /(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(q.navigator.userAgent) && (o.crossOrigin = "anonymous"), o.alt = n.name, o.src = a.url;
|
|
529
529
|
}
|
|
530
530
|
}, {
|
|
531
531
|
key: "draw",
|
|
532
|
-
value: function(
|
|
533
|
-
var
|
|
532
|
+
value: function(a) {
|
|
533
|
+
var i = this, n = a.naturalWidth, o = a.naturalHeight, f = a.rotate, s = f === void 0 ? 0 : f, g = a.scaleX, c = g === void 0 ? 1 : g, v = a.scaleY, d = v === void 0 ? 1 : v, C = this.file, h = this.image, m = this.options, E = document.createElement("canvas"), k = E.getContext("2d"), S = Math.abs(s) % 180 === 90, K = (m.resize === "contain" || m.resize === "cover") && Ce(m.width) && Ce(m.height), T = Math.max(m.maxWidth, 0) || 1 / 0, M = Math.max(m.maxHeight, 0) || 1 / 0, L = Math.max(m.minWidth, 0) || 0, H = Math.max(m.minHeight, 0) || 0, x = n / o, b = m.width, B = m.height;
|
|
534
534
|
if (S) {
|
|
535
535
|
var Z = [M, T];
|
|
536
536
|
T = Z[0], M = Z[1];
|
|
@@ -539,117 +539,117 @@ var Jt = q.ArrayBuffer, Be = q.FileReader, te = q.URL || q.webkitURL, jt = /\.\w
|
|
|
539
539
|
var u = [B, b];
|
|
540
540
|
b = u[0], B = u[1];
|
|
541
541
|
}
|
|
542
|
-
K && (
|
|
543
|
-
var w =
|
|
544
|
-
aspectRatio:
|
|
542
|
+
K && (x = b / B);
|
|
543
|
+
var w = le({
|
|
544
|
+
aspectRatio: x,
|
|
545
545
|
width: T,
|
|
546
546
|
height: M
|
|
547
547
|
}, "contain");
|
|
548
548
|
T = w.width, M = w.height;
|
|
549
|
-
var I =
|
|
550
|
-
aspectRatio:
|
|
549
|
+
var I = le({
|
|
550
|
+
aspectRatio: x,
|
|
551
551
|
width: L,
|
|
552
552
|
height: H
|
|
553
553
|
}, "cover");
|
|
554
554
|
if (L = I.width, H = I.height, K) {
|
|
555
|
-
var A =
|
|
556
|
-
aspectRatio:
|
|
555
|
+
var A = le({
|
|
556
|
+
aspectRatio: x,
|
|
557
557
|
width: b,
|
|
558
558
|
height: B
|
|
559
559
|
}, m.resize);
|
|
560
560
|
b = A.width, B = A.height;
|
|
561
561
|
} else {
|
|
562
|
-
var _ =
|
|
563
|
-
aspectRatio:
|
|
562
|
+
var _ = le({
|
|
563
|
+
aspectRatio: x,
|
|
564
564
|
width: b,
|
|
565
565
|
height: B
|
|
566
566
|
}), W = _.width;
|
|
567
|
-
b = W === void 0 ?
|
|
567
|
+
b = W === void 0 ? n : W;
|
|
568
568
|
var l = _.height;
|
|
569
569
|
B = l === void 0 ? o : l;
|
|
570
570
|
}
|
|
571
|
-
b = Math.floor(
|
|
571
|
+
b = Math.floor($e(Math.min(Math.max(b, L), T))), B = Math.floor($e(Math.min(Math.max(B, H), M)));
|
|
572
572
|
var D = -b / 2, F = -B / 2, ee = b, N = B, R = [];
|
|
573
573
|
if (K) {
|
|
574
|
-
var Q = 0, P = 0,
|
|
575
|
-
aspectRatio:
|
|
576
|
-
width:
|
|
574
|
+
var Q = 0, P = 0, Y = n, G = o, ue = le({
|
|
575
|
+
aspectRatio: x,
|
|
576
|
+
width: n,
|
|
577
577
|
height: o
|
|
578
578
|
}, {
|
|
579
579
|
contain: "cover",
|
|
580
580
|
cover: "contain"
|
|
581
581
|
}[m.resize]);
|
|
582
|
-
|
|
582
|
+
Y = ue.width, G = ue.height, Q = (n - Y) / 2, P = (o - G) / 2, R.push(Q, P, Y, G);
|
|
583
583
|
}
|
|
584
584
|
if (R.push(D, F, ee, N), S) {
|
|
585
|
-
var
|
|
586
|
-
b =
|
|
585
|
+
var ce = [B, b];
|
|
586
|
+
b = ce[0], B = ce[1];
|
|
587
587
|
}
|
|
588
|
-
E.width = b, E.height = B,
|
|
588
|
+
E.width = b, E.height = B, De(m.mimeType) || (m.mimeType = C.type);
|
|
589
589
|
var V = "transparent";
|
|
590
590
|
C.size > m.convertSize && m.convertTypes.indexOf(m.mimeType) >= 0 && (m.mimeType = "image/jpeg");
|
|
591
|
-
var
|
|
592
|
-
if (
|
|
593
|
-
var
|
|
594
|
-
if (!
|
|
595
|
-
var
|
|
596
|
-
return
|
|
597
|
-
naturalWidth:
|
|
591
|
+
var me = m.mimeType === "image/jpeg";
|
|
592
|
+
if (me && (V = "#fff"), k.fillStyle = V, k.fillRect(0, 0, b, B), m.beforeDraw && m.beforeDraw.call(this, k, E), !this.aborted && (k.save(), k.translate(b / 2, B / 2), k.rotate(s * Math.PI / 180), k.scale(c, d), k.drawImage.apply(k, [h].concat(R)), k.restore(), m.drew && m.drew.call(this, k, E), !this.aborted)) {
|
|
593
|
+
var de = function(oe) {
|
|
594
|
+
if (!i.aborted) {
|
|
595
|
+
var Oe = function(se) {
|
|
596
|
+
return i.done({
|
|
597
|
+
naturalWidth: n,
|
|
598
598
|
naturalHeight: o,
|
|
599
|
-
result:
|
|
599
|
+
result: se
|
|
600
600
|
});
|
|
601
601
|
};
|
|
602
|
-
if (
|
|
603
|
-
var
|
|
604
|
-
return
|
|
602
|
+
if (oe && me && m.retainExif && i.exif && i.exif.length > 0) {
|
|
603
|
+
var Qe = function(se) {
|
|
604
|
+
return Oe(Xe(Ze(jt(se, i.exif), m.mimeType)));
|
|
605
605
|
};
|
|
606
|
-
if (
|
|
607
|
-
|
|
608
|
-
|
|
606
|
+
if (oe.arrayBuffer)
|
|
607
|
+
oe.arrayBuffer().then(Qe).catch(function() {
|
|
608
|
+
i.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."));
|
|
609
609
|
});
|
|
610
610
|
else {
|
|
611
|
-
var
|
|
612
|
-
|
|
613
|
-
var
|
|
614
|
-
|
|
615
|
-
},
|
|
616
|
-
|
|
617
|
-
},
|
|
618
|
-
|
|
619
|
-
},
|
|
620
|
-
|
|
621
|
-
},
|
|
611
|
+
var ie = new Ie();
|
|
612
|
+
i.reader = ie, ie.onload = function(Ee) {
|
|
613
|
+
var se = Ee.target;
|
|
614
|
+
Qe(se.result);
|
|
615
|
+
}, ie.onabort = function() {
|
|
616
|
+
i.fail(new Error("Aborted to read the compressed image with FileReader."));
|
|
617
|
+
}, ie.onerror = function() {
|
|
618
|
+
i.fail(new Error("Failed to read the compressed image with FileReader."));
|
|
619
|
+
}, ie.onloadend = function() {
|
|
620
|
+
i.reader = null;
|
|
621
|
+
}, ie.readAsArrayBuffer(oe);
|
|
622
622
|
}
|
|
623
623
|
} else
|
|
624
|
-
|
|
624
|
+
Oe(oe);
|
|
625
625
|
}
|
|
626
626
|
};
|
|
627
|
-
E.toBlob ? E.toBlob(
|
|
627
|
+
E.toBlob ? E.toBlob(de, m.mimeType, m.quality) : de(Xe(E.toDataURL(m.mimeType, m.quality)));
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
}, {
|
|
631
631
|
key: "done",
|
|
632
|
-
value: function(
|
|
633
|
-
var
|
|
632
|
+
value: function(a) {
|
|
633
|
+
var i = a.naturalWidth, n = a.naturalHeight, o = a.result, f = this.file, s = this.image, g = this.options;
|
|
634
634
|
if (te && s.src.indexOf("blob:") === 0 && te.revokeObjectURL(s.src), o)
|
|
635
|
-
if (
|
|
636
|
-
o =
|
|
635
|
+
if (g.strict && !g.retainExif && o.size > f.size && g.mimeType === f.type && !(g.width > i || g.height > n || g.minWidth > i || g.minHeight > n || g.maxWidth < i || g.maxHeight < n))
|
|
636
|
+
o = f;
|
|
637
637
|
else {
|
|
638
638
|
var c = /* @__PURE__ */ new Date();
|
|
639
|
-
o.lastModified = c.getTime(), o.lastModifiedDate = c, o.name =
|
|
639
|
+
o.lastModified = c.getTime(), o.lastModifiedDate = c, o.name = f.name, o.name && o.type !== f.type && (o.name = o.name.replace(zt, Tt(o.type)));
|
|
640
640
|
}
|
|
641
641
|
else
|
|
642
|
-
o =
|
|
643
|
-
this.result = o,
|
|
642
|
+
o = f;
|
|
643
|
+
this.result = o, g.success && g.success.call(this, o);
|
|
644
644
|
}
|
|
645
645
|
}, {
|
|
646
646
|
key: "fail",
|
|
647
|
-
value: function(
|
|
648
|
-
var
|
|
649
|
-
if (
|
|
650
|
-
|
|
647
|
+
value: function(a) {
|
|
648
|
+
var i = this.options;
|
|
649
|
+
if (i.error)
|
|
650
|
+
i.error.call(this, a);
|
|
651
651
|
else
|
|
652
|
-
throw
|
|
652
|
+
throw a;
|
|
653
653
|
}
|
|
654
654
|
}, {
|
|
655
655
|
key: "abort",
|
|
@@ -663,7 +663,7 @@ var Jt = q.ArrayBuffer, Be = q.FileReader, te = q.URL || q.webkitURL, jt = /\.\w
|
|
|
663
663
|
}], [{
|
|
664
664
|
key: "noConflict",
|
|
665
665
|
value: function() {
|
|
666
|
-
return window.Compressor =
|
|
666
|
+
return window.Compressor = Kt, t;
|
|
667
667
|
}
|
|
668
668
|
/**
|
|
669
669
|
* Change the default options.
|
|
@@ -671,47 +671,47 @@ var Jt = q.ArrayBuffer, Be = q.FileReader, te = q.URL || q.webkitURL, jt = /\.\w
|
|
|
671
671
|
*/
|
|
672
672
|
}, {
|
|
673
673
|
key: "setDefaults",
|
|
674
|
-
value: function(
|
|
675
|
-
|
|
674
|
+
value: function(a) {
|
|
675
|
+
ye(qe, a);
|
|
676
676
|
}
|
|
677
677
|
}]), t;
|
|
678
678
|
}();
|
|
679
|
-
const
|
|
679
|
+
const Wt = (t, e) => new Promise((a, i) => {
|
|
680
680
|
if (t.size <= e)
|
|
681
681
|
return t;
|
|
682
|
-
const
|
|
683
|
-
|
|
684
|
-
s.size <= e ?
|
|
682
|
+
const n = e / t.size, o = Math.max(0.5, Math.min(0.9, 0.8 * n)), f = Math.max(800, Math.min(1920, 1920 * Math.sqrt(n)));
|
|
683
|
+
_e(t, o, f, f, (s) => {
|
|
684
|
+
s.size <= e ? a(s) : _e(
|
|
685
685
|
s,
|
|
686
686
|
Math.max(0.4, o - 0.2),
|
|
687
687
|
// 降低质量
|
|
688
|
-
Math.max(640,
|
|
688
|
+
Math.max(640, f * 0.8),
|
|
689
689
|
// 缩小尺寸
|
|
690
|
-
Math.max(640,
|
|
691
|
-
i,
|
|
690
|
+
Math.max(640, f * 0.8),
|
|
692
691
|
a,
|
|
692
|
+
i,
|
|
693
693
|
t
|
|
694
694
|
// 传递原始文件用于错误处理
|
|
695
695
|
);
|
|
696
|
-
},
|
|
697
|
-
}),
|
|
698
|
-
new
|
|
696
|
+
}, i, t);
|
|
697
|
+
}), _e = (t, e, a, i, n, o, f) => {
|
|
698
|
+
new Ht(t, {
|
|
699
699
|
quality: e,
|
|
700
|
-
maxWidth:
|
|
701
|
-
maxHeight:
|
|
700
|
+
maxWidth: a,
|
|
701
|
+
maxHeight: i,
|
|
702
702
|
convertSize: 1 / 0,
|
|
703
703
|
success(s) {
|
|
704
704
|
try {
|
|
705
|
-
const
|
|
705
|
+
const g = new File([s], t.name, {
|
|
706
706
|
type: s.type || t.type,
|
|
707
707
|
lastModified: Date.now()
|
|
708
708
|
});
|
|
709
|
-
|
|
710
|
-
} catch (
|
|
709
|
+
n(g);
|
|
710
|
+
} catch (g) {
|
|
711
711
|
o({
|
|
712
712
|
message: "文件转换失败",
|
|
713
|
-
error:
|
|
714
|
-
original:
|
|
713
|
+
error: g,
|
|
714
|
+
original: f || t
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
717
|
},
|
|
@@ -719,23 +719,23 @@ const Kt = (t, e) => new Promise((i, a) => {
|
|
|
719
719
|
o({
|
|
720
720
|
message: "图片压缩失败",
|
|
721
721
|
error: s,
|
|
722
|
-
original:
|
|
722
|
+
original: f || t
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
725
|
});
|
|
726
|
-
},
|
|
727
|
-
const
|
|
726
|
+
}, Gt = (t, e) => {
|
|
727
|
+
const a = Re(), i = Be(t, "modelValue"), n = Be(t, "status"), { upload: o } = Ct(t), { size2B: f } = Et(), { handlerImageSrc: s } = bt(t), g = Be(t, "isOverMaxLimitCompressImg"), c = be(""), v = be([]), d = [".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".mpeg", ".webm"], C = [".mp3", ".wav", ".aac", ".flac", ".ogg", ".alff", ".wma", ".m4a"], h = z(() => t.baseUrl ? t.baseUrl : process.env.NODE_ENV === "production" ? "" : a.baseURL || ""), m = (l) => {
|
|
728
728
|
if (l) {
|
|
729
729
|
const D = l.substring(l.lastIndexOf(".")).toLowerCase();
|
|
730
730
|
if (d.includes(D)) return "isVideo";
|
|
731
731
|
if (C.includes(D)) return "isAudio";
|
|
732
732
|
}
|
|
733
733
|
return "isImg";
|
|
734
|
-
}, E =
|
|
734
|
+
}, E = z(() => {
|
|
735
735
|
var D;
|
|
736
736
|
let l = t.accept ? (D = t.accept) == null ? void 0 : D.split(",") : [];
|
|
737
737
|
return l.includes("image/jpg") && !l.includes("image/jpeg") && l.push("image/jpeg"), l.includes(".jpg") && !l.includes(".jpeg") && l.push(".jpeg"), t.acceptVideo && (l = [...l, ...d]), t.acceptAudio && (l = [...l, ...C]), l.join(",");
|
|
738
|
-
}), k =
|
|
738
|
+
}), k = z(() => n.value === "uploading"), S = be(0), K = (l) => k.value ? S.value === l : !1, T = z(() => i.value ? [s(h.value, i.value)] : []), M = z(() => i.value ? i.value.map((l) => [s(h.value, l)]) : []), L = z(() => t.status !== "info" && (t.needDeleteBtn || t.needChangeBtn) || t.needDownloadBtn), H = z(() => t.status !== "info" && t.needDeleteBtn || t.needDownloadBtn), x = z(() => {
|
|
739
739
|
const l = [], D = t.previewBtnConfig;
|
|
740
740
|
if (typeof D == "boolean")
|
|
741
741
|
return D ? ["zoom_in", "zoom_out", "turn_left", "turn_right", "full_screen"] : [];
|
|
@@ -745,17 +745,17 @@ const Kt = (t, e) => new Promise((i, a) => {
|
|
|
745
745
|
}), b = () => {
|
|
746
746
|
setTimeout(() => {
|
|
747
747
|
const l = document.querySelector(".el-image-viewer__wrapper");
|
|
748
|
-
l == null || l.classList.add("das-image-viewer-preview-btn-groups"), l == null || l.classList.add(...
|
|
748
|
+
l == null || l.classList.add("das-image-viewer-preview-btn-groups"), l == null || l.classList.add(...x.value);
|
|
749
749
|
}, 0);
|
|
750
750
|
}, B = (l) => {
|
|
751
751
|
e("clickChangeIcon", l);
|
|
752
752
|
}, Z = (l, D) => {
|
|
753
|
-
t.limitNum === 1 ? (
|
|
753
|
+
t.limitNum === 1 ? (i.value = "", e("update:modelValue", ""), e("deleteImage", l)) : (i.value.splice(D, 1), e("update:modelValue", i.value), e("deleteImage", l));
|
|
754
754
|
}, $ = (l, D = 0) => {
|
|
755
755
|
var ee;
|
|
756
756
|
e("downloadImage", l);
|
|
757
757
|
let F = "";
|
|
758
|
-
t.limitNum === 1 ? F = t.imageName || c.value : F = ((ee = t.imageName) == null ? void 0 : ee[D]) || v.value[D], m(l) === "isImg" ?
|
|
758
|
+
t.limitNum === 1 ? F = t.imageName || c.value : F = ((ee = t.imageName) == null ? void 0 : ee[D]) || v.value[D], m(l) === "isImg" ? pt(s(h.value, l), F) : ht(s(h.value, l), F);
|
|
759
759
|
}, u = [
|
|
760
760
|
"image/jpeg",
|
|
761
761
|
"image/png",
|
|
@@ -767,30 +767,30 @@ const Kt = (t, e) => new Promise((i, a) => {
|
|
|
767
767
|
], w = async (l, D) => {
|
|
768
768
|
var ee;
|
|
769
769
|
if (t.maxSize) {
|
|
770
|
-
const { finalSize: N, sizeText: R } =
|
|
771
|
-
if (l.size > N && !
|
|
772
|
-
const Q =
|
|
770
|
+
const { finalSize: N, sizeText: R } = f(t.maxSize);
|
|
771
|
+
if (l.size > N && !g.value) {
|
|
772
|
+
const Q = He.value === "zh-CN" ? "、" : ", ", P = We(
|
|
773
773
|
"das-ui-import-upload-key3",
|
|
774
774
|
R,
|
|
775
775
|
((ee = E.value) == null ? void 0 : ee.toUpperCase().replaceAll(".", "").replaceAll(",", Q)) ?? ""
|
|
776
|
-
).value,
|
|
777
|
-
return
|
|
776
|
+
).value, Y = t.errorMessage || P;
|
|
777
|
+
return Ke.warning(Y), !1;
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
780
|
const F = async (N) => {
|
|
781
781
|
let R = l;
|
|
782
782
|
if (t.maxSize) {
|
|
783
|
-
const { finalSize: P, sizeText:
|
|
784
|
-
if (l.size > P &&
|
|
783
|
+
const { finalSize: P, sizeText: Y } = f(t.maxSize);
|
|
784
|
+
if (l.size > P && g.value && u.includes(l.type))
|
|
785
785
|
try {
|
|
786
|
-
R = await
|
|
787
|
-
} catch (
|
|
788
|
-
R = (
|
|
786
|
+
R = await Wt(l, P);
|
|
787
|
+
} catch (G) {
|
|
788
|
+
R = (G == null ? void 0 : G.original) || l;
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
S.value = N, e("update:status", "uploading"), e("image-upload", R);
|
|
792
792
|
const Q = await o(R);
|
|
793
|
-
return Q === "error" ? (e("update:status", "error"), !1) : (e("upload-success", R, Q), t.limitNum === 1 ?
|
|
793
|
+
return Q === "error" ? (e("update:status", "error"), !1) : (e("upload-success", R, Q), t.limitNum === 1 ? i.value = Q : i.value[N] = Q, e("update:modelValue", i.value), e("update:status", "normal"), !1);
|
|
794
794
|
};
|
|
795
795
|
if (t.customCheck) {
|
|
796
796
|
const N = t.customCheck(l);
|
|
@@ -806,16 +806,16 @@ const Kt = (t, e) => new Promise((i, a) => {
|
|
|
806
806
|
});
|
|
807
807
|
if (!N) return !1;
|
|
808
808
|
} else if (E.value) {
|
|
809
|
-
const N = E.value.split(",").filter((V) => V.trim().startsWith(".")).map((V) => V.trim()), R = E.value.split(",").filter((V) => !V.trim().startsWith(".")).map((V) => V.trim()), Q =
|
|
810
|
-
let
|
|
811
|
-
if (!P && !
|
|
812
|
-
const V = t.acceptAudio || t.acceptVideo ? "das-ui-import-upload-key2" : "das-ui-import-upload-key1",
|
|
813
|
-
return
|
|
809
|
+
const N = E.value.split(",").filter((V) => V.trim().startsWith(".")).map((V) => V.trim()), R = E.value.split(",").filter((V) => !V.trim().startsWith(".")).map((V) => V.trim()), Q = gt(l.name), P = N.includes(Q);
|
|
810
|
+
let Y = R.includes("image/*") && l.type.split("/")[0].trim() === "image", G = R.includes("video/*") && l.type.split("/")[0].trim() === "video", ue = R.includes("audio/*") && l.type.split("/")[0].trim() === "audio", ce = R.includes(l.type) || Y || G || ue;
|
|
811
|
+
if (!P && !ce) {
|
|
812
|
+
const V = t.acceptAudio || t.acceptVideo ? "das-ui-import-upload-key2" : "das-ui-import-upload-key1", me = He.value === "zh-CN" ? "、" : ", ", de = t.errorMessage || We(V, E.value.toUpperCase().replaceAll(".", "").replaceAll(",", me)).value;
|
|
813
|
+
return Ke.warning(de), !1;
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
return F(D);
|
|
817
817
|
}, I = async (l) => {
|
|
818
|
-
t.limitNum !== 1 && (S.value =
|
|
818
|
+
t.limitNum !== 1 && (S.value = i.length), e("update:status", "uploading"), e("image-upload", l);
|
|
819
819
|
const D = await o(l);
|
|
820
820
|
e("upload-success", l, D), t.limitNum === 1 ? A(D) : _(D);
|
|
821
821
|
}, A = (l) => {
|
|
@@ -823,28 +823,28 @@ const Kt = (t, e) => new Promise((i, a) => {
|
|
|
823
823
|
e("update:status", "error");
|
|
824
824
|
return;
|
|
825
825
|
}
|
|
826
|
-
|
|
826
|
+
i.value = l, e("update:modelValue", i.value), e("update:status", "normal");
|
|
827
827
|
}, _ = (l) => {
|
|
828
828
|
if (l === "error") {
|
|
829
829
|
e("update:status", "error");
|
|
830
830
|
return;
|
|
831
831
|
}
|
|
832
|
-
|
|
832
|
+
i.value.push(l), e("update:modelValue", i.value), e("update:status", "normal");
|
|
833
833
|
};
|
|
834
|
-
return
|
|
834
|
+
return ut(i, async () => {
|
|
835
835
|
const l = t.limitNum ?? 1;
|
|
836
|
-
l === 1 &&
|
|
836
|
+
l === 1 && i.value ? c.value = await Bt(i.value) : l > 1 && i.value.length > 0 && (v.value = await It(i.value));
|
|
837
837
|
}, {
|
|
838
838
|
deep: !0,
|
|
839
839
|
immediate: !0
|
|
840
840
|
}), {
|
|
841
|
-
url:
|
|
841
|
+
url: i,
|
|
842
842
|
singlePreviewList: T,
|
|
843
843
|
multiPreviewList: M,
|
|
844
844
|
isAccept: E,
|
|
845
845
|
loading: k,
|
|
846
|
-
uploadStatus:
|
|
847
|
-
previewBtns:
|
|
846
|
+
uploadStatus: n,
|
|
847
|
+
previewBtns: x,
|
|
848
848
|
operateShow: L,
|
|
849
849
|
operateShow_Multi: H,
|
|
850
850
|
singlePreviewName: c,
|
|
@@ -858,64 +858,64 @@ const Kt = (t, e) => new Promise((i, a) => {
|
|
|
858
858
|
handleImageClick: b,
|
|
859
859
|
isLoadingMulti: K
|
|
860
860
|
};
|
|
861
|
-
},
|
|
861
|
+
}, Yt = (t, e) => {
|
|
862
862
|
var o;
|
|
863
|
-
const { __IN_DAS_MICRO_APP:
|
|
864
|
-
if (!
|
|
865
|
-
const { origin:
|
|
866
|
-
(o = window.top) == null || o.postMessage({ type: t, data: e },
|
|
867
|
-
}, nt = "proxy-image-viewer",
|
|
868
|
-
sendMessageToMainApp:
|
|
863
|
+
const { __IN_DAS_MICRO_APP: a, __DAS_MAIN_APP_HREF: i } = window;
|
|
864
|
+
if (!a || !i) return;
|
|
865
|
+
const { origin: n } = new URL(i);
|
|
866
|
+
(o = window.top) == null || o.postMessage({ type: t, data: e }, n);
|
|
867
|
+
}, nt = "proxy-image-viewer", Ae = {
|
|
868
|
+
sendMessageToMainApp: Yt,
|
|
869
869
|
// @ts-ignore
|
|
870
870
|
isMicroApp: () => window.__IN_DAS_MICRO_APP && window.top !== window.self,
|
|
871
871
|
addEventFromMicroApp: () => {
|
|
872
872
|
window.addEventListener("message", (t) => {
|
|
873
|
-
const { type: e, data:
|
|
873
|
+
const { type: e, data: a } = t.data;
|
|
874
874
|
if (e !== nt) return;
|
|
875
|
-
const
|
|
876
|
-
|
|
877
|
-
const { previewList:
|
|
878
|
-
urlList:
|
|
875
|
+
const i = document.createElement("div");
|
|
876
|
+
i.classList.add("das-image-viewer-preview-btn-groups");
|
|
877
|
+
const { previewList: n, previewBtns: o } = a, f = ct(dt, {
|
|
878
|
+
urlList: n,
|
|
879
879
|
onClose: () => {
|
|
880
|
-
|
|
880
|
+
f.unmount(), document.body.removeChild(i);
|
|
881
881
|
}
|
|
882
882
|
});
|
|
883
|
-
document.body.appendChild(
|
|
883
|
+
document.body.appendChild(i), f.mount(i), setTimeout(() => {
|
|
884
884
|
const s = document.querySelector(".el-image-viewer__wrapper");
|
|
885
885
|
s == null || s.classList.add("das-image-viewer-preview-btn-groups"), s == null || s.classList.add(...o);
|
|
886
886
|
}, 0);
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
889
|
};
|
|
890
|
-
|
|
891
|
-
const
|
|
892
|
-
const { handleImageClickProxy: e, previewBtns:
|
|
893
|
-
return { needPreviewImage:
|
|
890
|
+
Ae.addEventFromMicroApp();
|
|
891
|
+
const Xt = (t) => {
|
|
892
|
+
const { handleImageClickProxy: e, previewBtns: a } = t;
|
|
893
|
+
return { needPreviewImage: z(() => !t.needPreview || Ae.isMicroApp() ? !1 : t.needPreview), handleImageClick: (o) => {
|
|
894
894
|
if (!t.needPreview) return;
|
|
895
|
-
if (!
|
|
895
|
+
if (!Ae.isMicroApp()) {
|
|
896
896
|
e();
|
|
897
897
|
return;
|
|
898
898
|
}
|
|
899
|
-
let
|
|
900
|
-
Array.isArray(o) &&
|
|
901
|
-
previewList:
|
|
902
|
-
previewBtns:
|
|
899
|
+
let f = [];
|
|
900
|
+
Array.isArray(o) && f.push(...o), typeof o == "string" && f.push(o), Ae.sendMessageToMainApp(nt, {
|
|
901
|
+
previewList: f,
|
|
902
|
+
previewBtns: a.value
|
|
903
903
|
});
|
|
904
904
|
} };
|
|
905
|
-
},
|
|
905
|
+
}, qt = {
|
|
906
906
|
key: 0,
|
|
907
907
|
class: "das-ui-image-viewer-container"
|
|
908
|
-
},
|
|
908
|
+
}, Zt = {
|
|
909
909
|
class: "no-data-img",
|
|
910
|
-
src:
|
|
910
|
+
src: ke,
|
|
911
911
|
alt: ""
|
|
912
|
-
},
|
|
912
|
+
}, $t = { class: "image-name" }, _t = { class: "das-ui-image-viewer-groups" }, ei = { class: "image-name" }, ti = { class: "das-ui-image-viewer-container" }, ii = {
|
|
913
913
|
key: 1,
|
|
914
914
|
class: "das-ui-image-viewer-container"
|
|
915
|
-
},
|
|
915
|
+
}, ai = { class: "das-ui-image-viewer" }, ri = {
|
|
916
916
|
key: 2,
|
|
917
917
|
class: "das-ui-image-viewer"
|
|
918
|
-
},
|
|
918
|
+
}, ni = /* @__PURE__ */ mt({
|
|
919
919
|
__name: "Index",
|
|
920
920
|
props: {
|
|
921
921
|
style: { default: "" },
|
|
@@ -953,21 +953,21 @@ const Yt = (t) => {
|
|
|
953
953
|
},
|
|
954
954
|
emits: ["update:modelValue", "update:status", "downloadImage", "image-upload", "upload-success", "clickChangeIcon", "deleteImage"],
|
|
955
955
|
setup(t, { emit: e }) {
|
|
956
|
-
const
|
|
956
|
+
const a = t, i = e, n = z(() => {
|
|
957
957
|
const w = [
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
d.value !== "info" &&
|
|
958
|
+
a.needDownloadBtn,
|
|
959
|
+
a.limitNum === 1 && d.value !== "info" && a.needChangeBtn,
|
|
960
|
+
d.value !== "info" && a.needDeleteBtn
|
|
961
961
|
].filter((A) => A).length;
|
|
962
962
|
let I = "center";
|
|
963
963
|
return w === 2 && (I = "space-around"), w === 3 && (I = "space-between"), {
|
|
964
964
|
"justify-content": I
|
|
965
965
|
};
|
|
966
|
-
}), o =
|
|
966
|
+
}), o = z(() => a.mode === "view" ? !1 : s.value ? d.value === "error" : d.value !== "info"), f = (u) => {
|
|
967
967
|
u.stopPropagation();
|
|
968
968
|
}, {
|
|
969
969
|
url: s,
|
|
970
|
-
isAccept:
|
|
970
|
+
isAccept: g,
|
|
971
971
|
singlePreviewList: c,
|
|
972
972
|
multiPreviewList: v,
|
|
973
973
|
uploadStatus: d,
|
|
@@ -982,20 +982,20 @@ const Yt = (t) => {
|
|
|
982
982
|
beforeupload: M,
|
|
983
983
|
uploadImg: L,
|
|
984
984
|
onDownload: H,
|
|
985
|
-
handleImageClick:
|
|
985
|
+
handleImageClick: x,
|
|
986
986
|
getFileType: b,
|
|
987
987
|
isLoadingMulti: B
|
|
988
|
-
} =
|
|
989
|
-
needPreview:
|
|
990
|
-
handleImageClickProxy:
|
|
988
|
+
} = Gt(a, i), { needPreviewImage: Z, handleImageClick: $ } = Xt({
|
|
989
|
+
needPreview: a.needPreview,
|
|
990
|
+
handleImageClickProxy: x,
|
|
991
991
|
previewBtns: h
|
|
992
992
|
});
|
|
993
993
|
return (u, w) => (y(), U(
|
|
994
|
-
|
|
994
|
+
ge,
|
|
995
995
|
null,
|
|
996
996
|
[
|
|
997
997
|
p(" 单文件 "),
|
|
998
|
-
u.limitNum === 1 ? (y(), U("div",
|
|
998
|
+
u.limitNum === 1 ? (y(), U("div", qt, [
|
|
999
999
|
X(
|
|
1000
1000
|
"div",
|
|
1001
1001
|
{
|
|
@@ -1004,102 +1004,102 @@ const Yt = (t) => {
|
|
|
1004
1004
|
},
|
|
1005
1005
|
[
|
|
1006
1006
|
p(" 状态不为 error 时显示 "),
|
|
1007
|
-
J(
|
|
1008
|
-
class:
|
|
1007
|
+
J(re(r(je), {
|
|
1008
|
+
class: ve([{ "loading-border": r(C) }]),
|
|
1009
1009
|
type: "component",
|
|
1010
|
-
spinning:
|
|
1010
|
+
spinning: r(C)
|
|
1011
1011
|
}, {
|
|
1012
1012
|
default: ne(() => [
|
|
1013
1013
|
p(" 图片 "),
|
|
1014
|
-
|
|
1014
|
+
r(b)(r(c)[0]) === "isImg" ? J((y(), O(r(Fe), {
|
|
1015
1015
|
key: 0,
|
|
1016
|
-
class:
|
|
1016
|
+
class: ve(["image-context", [r(h)]]),
|
|
1017
1017
|
"preview-teleported": !0,
|
|
1018
|
-
src:
|
|
1019
|
-
"preview-src-list":
|
|
1018
|
+
src: r(c)[0],
|
|
1019
|
+
"preview-src-list": r(Z) ? r(c) : void 0,
|
|
1020
1020
|
"initial-index": 0,
|
|
1021
1021
|
fit: u.imageFit,
|
|
1022
|
-
onClick: w[0] || (w[0] = (I) =>
|
|
1022
|
+
onClick: w[0] || (w[0] = (I) => r($)(r(c)))
|
|
1023
1023
|
}, null, 8, ["class", "src", "preview-src-list", "fit"])), [
|
|
1024
|
-
[j, !
|
|
1024
|
+
[j, !r(C)]
|
|
1025
1025
|
]) : p("v-if", !0),
|
|
1026
1026
|
p(" 视频 "),
|
|
1027
|
-
|
|
1027
|
+
r(b)(r(c)[0]) === "isVideo" ? J((y(), O(r(pe), {
|
|
1028
1028
|
key: 1,
|
|
1029
|
-
mode:
|
|
1030
|
-
src:
|
|
1029
|
+
mode: r(d) === "info" || u.mode === "view" ? "view" : "normal",
|
|
1030
|
+
src: r(c)[0],
|
|
1031
1031
|
needPreview: u.needPreview,
|
|
1032
1032
|
width: "100%",
|
|
1033
1033
|
height: "100%",
|
|
1034
1034
|
"player-props": { videoWidth: u.videoWidth, videoHeight: u.videoHeight },
|
|
1035
1035
|
fullPath: ""
|
|
1036
1036
|
}, null, 8, ["mode", "src", "needPreview", "player-props"])), [
|
|
1037
|
-
[j, !
|
|
1037
|
+
[j, !r(C)]
|
|
1038
1038
|
]) : p("v-if", !0),
|
|
1039
1039
|
p(" 音频 "),
|
|
1040
|
-
|
|
1040
|
+
r(b)(r(c)[0]) === "isAudio" ? J((y(), O(r(pe), {
|
|
1041
1041
|
key: 2,
|
|
1042
|
-
mode:
|
|
1043
|
-
src:
|
|
1042
|
+
mode: r(d) === "info" || u.mode === "view" ? "view" : "normal",
|
|
1043
|
+
src: r(c)[0],
|
|
1044
1044
|
needPreview: u.needPreview,
|
|
1045
1045
|
width: "100%",
|
|
1046
1046
|
height: "100%",
|
|
1047
1047
|
type: "audio",
|
|
1048
1048
|
fullPath: ""
|
|
1049
1049
|
}, null, 8, ["mode", "src", "needPreview"])), [
|
|
1050
|
-
[j, !
|
|
1050
|
+
[j, !r(C)]
|
|
1051
1051
|
]) : p("v-if", !0),
|
|
1052
|
-
!
|
|
1052
|
+
!r(C) && r(m) ? (y(), U(
|
|
1053
1053
|
"div",
|
|
1054
1054
|
{
|
|
1055
1055
|
key: 3,
|
|
1056
1056
|
class: "operate-container",
|
|
1057
|
-
style: fe(
|
|
1058
|
-
onClick:
|
|
1057
|
+
style: fe(n.value),
|
|
1058
|
+
onClick: f
|
|
1059
1059
|
},
|
|
1060
1060
|
[
|
|
1061
|
-
u.needDownloadBtn ? (y(), O(
|
|
1061
|
+
u.needDownloadBtn ? (y(), O(r(xe), {
|
|
1062
1062
|
key: 0,
|
|
1063
1063
|
class: "operate-btn",
|
|
1064
1064
|
size: "medium",
|
|
1065
|
-
"icon-color": "
|
|
1066
|
-
onClick: w[1] || (w[1] = (I) =>
|
|
1065
|
+
"icon-color": "var(--das-ui-image-viewer-icon-color)",
|
|
1066
|
+
onClick: w[1] || (w[1] = (I) => r(H)(r(s)))
|
|
1067
1067
|
})) : p("v-if", !0),
|
|
1068
|
-
|
|
1068
|
+
r(d) !== "info" && u.needChangeBtn ? (y(), U("div", {
|
|
1069
1069
|
key: 1,
|
|
1070
1070
|
class: "change-icon-box",
|
|
1071
|
-
onClick: w[2] || (w[2] = (I) =>
|
|
1071
|
+
onClick: w[2] || (w[2] = (I) => r(K)(r(s)))
|
|
1072
1072
|
}, [
|
|
1073
|
-
u.openFileDialogOnClick ? (y(), O(
|
|
1073
|
+
u.openFileDialogOnClick ? (y(), O(r(Ne), {
|
|
1074
1074
|
key: 0,
|
|
1075
|
-
"before-upload": (I) =>
|
|
1076
|
-
accept:
|
|
1075
|
+
"before-upload": (I) => r(M)(I, 0),
|
|
1076
|
+
accept: r(g),
|
|
1077
1077
|
openFileDialogOnClick: u.openFileDialogOnClick
|
|
1078
1078
|
}, {
|
|
1079
1079
|
itemRender: ne(({ file: I, actions: A }) => w[7] || (w[7] = [])),
|
|
1080
1080
|
default: ne(() => [
|
|
1081
|
-
|
|
1081
|
+
re(r(he), {
|
|
1082
1082
|
class: "operate-btn m-t-6",
|
|
1083
|
-
"icon-color": "
|
|
1083
|
+
"icon-color": "var(--das-ui-image-viewer-icon-color)",
|
|
1084
1084
|
size: "medium"
|
|
1085
1085
|
})
|
|
1086
1086
|
]),
|
|
1087
1087
|
_: 1
|
|
1088
1088
|
/* STABLE */
|
|
1089
1089
|
}, 8, ["before-upload", "accept", "openFileDialogOnClick"])) : p("v-if", !0),
|
|
1090
|
-
u.openFileDialogOnClick ? p("v-if", !0) : (y(), O(
|
|
1090
|
+
u.openFileDialogOnClick ? p("v-if", !0) : (y(), O(r(he), {
|
|
1091
1091
|
key: 1,
|
|
1092
1092
|
class: "operate-btn m-t-6",
|
|
1093
|
-
"icon-color": "
|
|
1093
|
+
"icon-color": "var(--das-ui-image-viewer-icon-color)",
|
|
1094
1094
|
size: "medium"
|
|
1095
1095
|
}))
|
|
1096
1096
|
])) : p("v-if", !0),
|
|
1097
|
-
|
|
1097
|
+
r(d) !== "info" && u.needDeleteBtn ? (y(), O(r(ze), {
|
|
1098
1098
|
key: 2,
|
|
1099
1099
|
class: "operate-btn",
|
|
1100
|
-
"icon-color": "
|
|
1100
|
+
"icon-color": "var(--das-ui-image-viewer-icon-color)",
|
|
1101
1101
|
size: "medium",
|
|
1102
|
-
onClick: w[3] || (w[3] = (I) =>
|
|
1102
|
+
onClick: w[3] || (w[3] = (I) => r(T)(r(s)))
|
|
1103
1103
|
})) : p("v-if", !0)
|
|
1104
1104
|
],
|
|
1105
1105
|
4
|
|
@@ -1109,12 +1109,12 @@ const Yt = (t) => {
|
|
|
1109
1109
|
_: 1
|
|
1110
1110
|
/* STABLE */
|
|
1111
1111
|
}, 8, ["class", "spinning"]), [
|
|
1112
|
-
[j,
|
|
1112
|
+
[j, r(s) && u.status !== "error"]
|
|
1113
1113
|
]),
|
|
1114
1114
|
p(" 上传模式,当 url 为空或者 uploading 和 error 时显示 "),
|
|
1115
|
-
J(
|
|
1116
|
-
status:
|
|
1117
|
-
"onUpdate:status": w[4] || (w[4] = (I) =>
|
|
1115
|
+
J(re(r(Je), {
|
|
1116
|
+
status: r(d),
|
|
1117
|
+
"onUpdate:status": w[4] || (w[4] = (I) => Pe(d) ? d.value = I : null),
|
|
1118
1118
|
"max-size": u.maxSize,
|
|
1119
1119
|
accept: u.accept,
|
|
1120
1120
|
acceptVideo: u.acceptVideo,
|
|
@@ -1124,7 +1124,7 @@ const Yt = (t) => {
|
|
|
1124
1124
|
"custom-check": u.customCheck,
|
|
1125
1125
|
"error-message": u.errorMessage,
|
|
1126
1126
|
openFileDialogOnClick: u.openFileDialogOnClick,
|
|
1127
|
-
onImageUpload:
|
|
1127
|
+
onImageUpload: r(L),
|
|
1128
1128
|
isOverMaxLimitCompressImg: u.isOverMaxLimitCompressImg
|
|
1129
1129
|
}, null, 8, ["status", "max-size", "accept", "acceptVideo", "message", "acceptAudio", "autoContentType", "custom-check", "error-message", "openFileDialogOnClick", "onImageUpload", "isOverMaxLimitCompressImg"]), [
|
|
1130
1130
|
[j, o.value]
|
|
@@ -1132,38 +1132,38 @@ const Yt = (t) => {
|
|
|
1132
1132
|
p(" 查看模式 "),
|
|
1133
1133
|
J(X(
|
|
1134
1134
|
"img",
|
|
1135
|
-
|
|
1135
|
+
Zt,
|
|
1136
1136
|
null,
|
|
1137
1137
|
512
|
|
1138
1138
|
/* NEED_PATCH */
|
|
1139
1139
|
), [
|
|
1140
|
-
[j, !
|
|
1140
|
+
[j, !r(s) && (r(d) === "info" || u.mode === "view")]
|
|
1141
1141
|
])
|
|
1142
1142
|
],
|
|
1143
1143
|
4
|
|
1144
1144
|
/* STYLE */
|
|
1145
1145
|
),
|
|
1146
|
-
J((y(), U("div",
|
|
1147
|
-
|
|
1148
|
-
|
|
1146
|
+
J((y(), U("div", $t, [
|
|
1147
|
+
Te(
|
|
1148
|
+
Me(a.imageName || r(k)),
|
|
1149
1149
|
1
|
|
1150
1150
|
/* TEXT */
|
|
1151
1151
|
)
|
|
1152
1152
|
])), [
|
|
1153
|
-
[j,
|
|
1154
|
-
[
|
|
1153
|
+
[j, r(s) && u.showImageName && (r(d) === "normal" || r(d) === "info")],
|
|
1154
|
+
[r(Ve)]
|
|
1155
1155
|
])
|
|
1156
1156
|
])) : (y(), U(
|
|
1157
|
-
|
|
1157
|
+
ge,
|
|
1158
1158
|
{ key: 1 },
|
|
1159
1159
|
[
|
|
1160
1160
|
p(" 多文件 "),
|
|
1161
|
-
X("div",
|
|
1161
|
+
X("div", _t, [
|
|
1162
1162
|
p(" 已上传的图片集合 "),
|
|
1163
1163
|
(y(!0), U(
|
|
1164
|
-
|
|
1164
|
+
ge,
|
|
1165
1165
|
null,
|
|
1166
|
-
|
|
1166
|
+
Le(r(s), (I, A) => {
|
|
1167
1167
|
var _;
|
|
1168
1168
|
return y(), U("div", {
|
|
1169
1169
|
key: A,
|
|
@@ -1176,100 +1176,100 @@ const Yt = (t) => {
|
|
|
1176
1176
|
style: fe(u.style)
|
|
1177
1177
|
},
|
|
1178
1178
|
[
|
|
1179
|
-
J(
|
|
1180
|
-
class:
|
|
1179
|
+
J(re(r(je), {
|
|
1180
|
+
class: ve([{ "loading-border": r(B)(A) }]),
|
|
1181
1181
|
type: "component",
|
|
1182
|
-
spinning:
|
|
1182
|
+
spinning: r(B)(A)
|
|
1183
1183
|
}, {
|
|
1184
1184
|
default: ne(() => [
|
|
1185
|
-
|
|
1185
|
+
r(b)(r(v)[A][0]) === "isImg" ? J((y(), O(r(Fe), {
|
|
1186
1186
|
key: 0,
|
|
1187
|
-
class:
|
|
1188
|
-
src:
|
|
1187
|
+
class: ve(["image-context", [r(h)]]),
|
|
1188
|
+
src: r(v)[A][0],
|
|
1189
1189
|
"preview-teleported": !0,
|
|
1190
|
-
"preview-src-list":
|
|
1190
|
+
"preview-src-list": r(Z) ? r(v)[A] : void 0,
|
|
1191
1191
|
"initial-index": A,
|
|
1192
|
-
onClick: (W) =>
|
|
1192
|
+
onClick: (W) => r($)(r(v)[A]),
|
|
1193
1193
|
fit: "cover"
|
|
1194
1194
|
}, null, 8, ["class", "src", "preview-src-list", "initial-index", "onClick"])), [
|
|
1195
|
-
[j, !
|
|
1195
|
+
[j, !r(B)(A)]
|
|
1196
1196
|
]) : p("v-if", !0),
|
|
1197
1197
|
p(" 视频 "),
|
|
1198
|
-
|
|
1198
|
+
r(b)(r(v)[A][0]) === "isVideo" ? J((y(), O(r(pe), {
|
|
1199
1199
|
key: 1,
|
|
1200
|
-
mode:
|
|
1201
|
-
src:
|
|
1200
|
+
mode: r(d) === "info" || u.mode === "view" ? "view" : "normal",
|
|
1201
|
+
src: r(v)[A][0],
|
|
1202
1202
|
needPreview: u.needPreview,
|
|
1203
1203
|
width: "100%",
|
|
1204
1204
|
height: "100%",
|
|
1205
1205
|
fullPath: "",
|
|
1206
1206
|
"player-props": { videoWidth: u.videoWidth, videoHeight: u.videoHeight }
|
|
1207
1207
|
}, null, 8, ["mode", "src", "needPreview", "player-props"])), [
|
|
1208
|
-
[j, !
|
|
1208
|
+
[j, !r(B)(A)]
|
|
1209
1209
|
]) : p("v-if", !0),
|
|
1210
1210
|
p(" 音频 "),
|
|
1211
|
-
|
|
1211
|
+
r(b)(r(v)[A][0]) === "isAudio" ? J((y(), O(r(pe), {
|
|
1212
1212
|
key: 2,
|
|
1213
|
-
mode:
|
|
1214
|
-
src:
|
|
1213
|
+
mode: r(d) === "info" || u.mode === "view" ? "view" : "normal",
|
|
1214
|
+
src: r(v)[A][0],
|
|
1215
1215
|
needPreview: u.needPreview,
|
|
1216
1216
|
width: "100%",
|
|
1217
1217
|
height: "100%",
|
|
1218
1218
|
type: "audio",
|
|
1219
1219
|
fullPath: ""
|
|
1220
1220
|
}, null, 8, ["mode", "src", "needPreview"])), [
|
|
1221
|
-
[j, !
|
|
1221
|
+
[j, !r(B)(A)]
|
|
1222
1222
|
]) : p("v-if", !0),
|
|
1223
|
-
!
|
|
1223
|
+
!r(C) && r(E) ? (y(), U(
|
|
1224
1224
|
"div",
|
|
1225
1225
|
{
|
|
1226
1226
|
key: 3,
|
|
1227
1227
|
class: "operate-container",
|
|
1228
|
-
style: fe(
|
|
1228
|
+
style: fe(n.value)
|
|
1229
1229
|
},
|
|
1230
1230
|
[
|
|
1231
|
-
u.needDownloadBtn ? (y(), O(
|
|
1231
|
+
u.needDownloadBtn ? (y(), O(r(xe), {
|
|
1232
1232
|
key: 0,
|
|
1233
1233
|
class: "operate-btn",
|
|
1234
1234
|
size: "medium",
|
|
1235
|
-
"icon-color": "
|
|
1236
|
-
onClick: (W) =>
|
|
1235
|
+
"icon-color": "var(--das-ui-image-viewer-icon-color)",
|
|
1236
|
+
onClick: (W) => r(H)(I, A)
|
|
1237
1237
|
}, null, 8, ["onClick"])) : p("v-if", !0),
|
|
1238
|
-
|
|
1238
|
+
r(d) !== "info" && u.needChangeBtn ? (y(), U("div", {
|
|
1239
1239
|
key: 1,
|
|
1240
1240
|
class: "change-icon-box",
|
|
1241
|
-
onClick: w[5] || (w[5] = (W) =>
|
|
1241
|
+
onClick: w[5] || (w[5] = (W) => r(K)(r(s)))
|
|
1242
1242
|
}, [
|
|
1243
|
-
u.openFileDialogOnClick ? (y(), O(
|
|
1243
|
+
u.openFileDialogOnClick ? (y(), O(r(Ne), {
|
|
1244
1244
|
key: 0,
|
|
1245
|
-
"before-upload": (W) =>
|
|
1246
|
-
accept:
|
|
1245
|
+
"before-upload": (W) => r(M)(W, A),
|
|
1246
|
+
accept: r(g),
|
|
1247
1247
|
openFileDialogOnClick: u.openFileDialogOnClick
|
|
1248
1248
|
}, {
|
|
1249
1249
|
itemRender: ne(({ file: W, actions: l }) => w[8] || (w[8] = [])),
|
|
1250
1250
|
default: ne(() => [
|
|
1251
|
-
|
|
1251
|
+
re(r(he), {
|
|
1252
1252
|
class: "operate-btn m-t-6",
|
|
1253
|
-
"icon-color": "
|
|
1253
|
+
"icon-color": "var(--das-ui-image-viewer-icon-color)",
|
|
1254
1254
|
size: "medium"
|
|
1255
1255
|
})
|
|
1256
1256
|
]),
|
|
1257
1257
|
_: 2
|
|
1258
1258
|
/* DYNAMIC */
|
|
1259
1259
|
}, 1032, ["before-upload", "accept", "openFileDialogOnClick"])) : p("v-if", !0),
|
|
1260
|
-
u.openFileDialogOnClick ? p("v-if", !0) : (y(), O(
|
|
1260
|
+
u.openFileDialogOnClick ? p("v-if", !0) : (y(), O(r(he), {
|
|
1261
1261
|
key: 1,
|
|
1262
1262
|
class: "operate-btn m-t-6",
|
|
1263
|
-
"icon-color": "
|
|
1263
|
+
"icon-color": "var(--das-ui-image-viewer-icon-color)",
|
|
1264
1264
|
size: "medium"
|
|
1265
1265
|
}))
|
|
1266
1266
|
])) : p("v-if", !0),
|
|
1267
|
-
|
|
1267
|
+
r(d) !== "info" && u.needDeleteBtn ? (y(), O(r(ze), {
|
|
1268
1268
|
key: 2,
|
|
1269
1269
|
class: "operate-btn",
|
|
1270
|
-
"icon-color": "
|
|
1270
|
+
"icon-color": "var(--das-ui-image-viewer-icon-color)",
|
|
1271
1271
|
size: "medium",
|
|
1272
|
-
onClick: (W) =>
|
|
1272
|
+
onClick: (W) => r(T)(I, A)
|
|
1273
1273
|
}, null, 8, ["onClick"])) : p("v-if", !0)
|
|
1274
1274
|
],
|
|
1275
1275
|
4
|
|
@@ -1285,15 +1285,15 @@ const Yt = (t) => {
|
|
|
1285
1285
|
4
|
|
1286
1286
|
/* STYLE */
|
|
1287
1287
|
),
|
|
1288
|
-
J((y(), U("div",
|
|
1289
|
-
|
|
1290
|
-
|
|
1288
|
+
J((y(), U("div", ei, [
|
|
1289
|
+
Te(
|
|
1290
|
+
Me(((_ = a.imageName) == null ? void 0 : _[A]) || r(S)[A]),
|
|
1291
1291
|
1
|
|
1292
1292
|
/* TEXT */
|
|
1293
1293
|
)
|
|
1294
1294
|
])), [
|
|
1295
|
-
[j, I && u.showImageName && !
|
|
1296
|
-
[
|
|
1295
|
+
[j, I && u.showImageName && !r(B)(A)],
|
|
1296
|
+
[r(Ve)]
|
|
1297
1297
|
])
|
|
1298
1298
|
]);
|
|
1299
1299
|
}),
|
|
@@ -1302,16 +1302,16 @@ const Yt = (t) => {
|
|
|
1302
1302
|
)),
|
|
1303
1303
|
p(" 查看模式下,默认占位符 "),
|
|
1304
1304
|
u.mode === "view" ? (y(!0), U(
|
|
1305
|
-
|
|
1305
|
+
ge,
|
|
1306
1306
|
{ key: 0 },
|
|
1307
|
-
|
|
1307
|
+
Le(u.limitNum - r(s).length, (I) => (y(), U("div", ti, w[9] || (w[9] = [
|
|
1308
1308
|
X(
|
|
1309
1309
|
"div",
|
|
1310
1310
|
{ class: "das-ui-image-viewer" },
|
|
1311
1311
|
[
|
|
1312
1312
|
X("img", {
|
|
1313
1313
|
class: "no-data-img",
|
|
1314
|
-
src:
|
|
1314
|
+
src: ke,
|
|
1315
1315
|
alt: ""
|
|
1316
1316
|
})
|
|
1317
1317
|
],
|
|
@@ -1323,11 +1323,11 @@ const Yt = (t) => {
|
|
|
1323
1323
|
/* UNKEYED_FRAGMENT */
|
|
1324
1324
|
)) : p("v-if", !0),
|
|
1325
1325
|
p(" 图片数量未到达最大数量限制时,显示上传组件 "),
|
|
1326
|
-
u.mode === "upload" &&
|
|
1327
|
-
X("div",
|
|
1328
|
-
|
|
1329
|
-
status:
|
|
1330
|
-
"onUpdate:status": w[6] || (w[6] = (I) =>
|
|
1326
|
+
u.mode === "upload" && r(d) !== "info" && r(s).length < u.limitNum ? (y(), U("div", ii, [
|
|
1327
|
+
X("div", ai, [
|
|
1328
|
+
re(r(Je), {
|
|
1329
|
+
status: r(d),
|
|
1330
|
+
"onUpdate:status": w[6] || (w[6] = (I) => Pe(d) ? d.value = I : null),
|
|
1331
1331
|
"max-size": u.maxSize,
|
|
1332
1332
|
accept: u.accept,
|
|
1333
1333
|
acceptVideo: u.acceptVideo,
|
|
@@ -1336,18 +1336,18 @@ const Yt = (t) => {
|
|
|
1336
1336
|
"custom-check": u.customCheck,
|
|
1337
1337
|
"error-message": u.errorMessage,
|
|
1338
1338
|
openFileDialogOnClick: u.openFileDialogOnClick,
|
|
1339
|
-
onImageUpload:
|
|
1339
|
+
onImageUpload: r(L),
|
|
1340
1340
|
isOverMaxLimitCompressImg: u.isOverMaxLimitCompressImg
|
|
1341
1341
|
}, null, 8, ["status", "max-size", "accept", "acceptVideo", "acceptAudio", "message", "custom-check", "error-message", "openFileDialogOnClick", "onImageUpload", "isOverMaxLimitCompressImg"])
|
|
1342
1342
|
])
|
|
1343
1343
|
])) : p("v-if", !0),
|
|
1344
1344
|
p(" 当图片状态为查看态且无数据时,显示无数据图片 "),
|
|
1345
|
-
|
|
1345
|
+
r(d) === "info" && r(s).length === 0 ? (y(), U("div", ri, w[10] || (w[10] = [
|
|
1346
1346
|
X(
|
|
1347
1347
|
"img",
|
|
1348
1348
|
{
|
|
1349
1349
|
class: "no-data-img",
|
|
1350
|
-
src:
|
|
1350
|
+
src: ke,
|
|
1351
1351
|
alt: ""
|
|
1352
1352
|
},
|
|
1353
1353
|
null,
|
|
@@ -1365,20 +1365,24 @@ const Yt = (t) => {
|
|
|
1365
1365
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
1366
1366
|
));
|
|
1367
1367
|
}
|
|
1368
|
-
}),
|
|
1369
|
-
const
|
|
1370
|
-
for (const [
|
|
1371
|
-
i
|
|
1372
|
-
return
|
|
1373
|
-
},
|
|
1374
|
-
"--das-ui-image-viewer-bg-color": { light: "
|
|
1375
|
-
"--das-ui-image-viewer-
|
|
1376
|
-
"--das-ui-image-viewer-
|
|
1377
|
-
|
|
1378
|
-
|
|
1368
|
+
}), oi = (t, e) => {
|
|
1369
|
+
const a = t.__vccOpts || t;
|
|
1370
|
+
for (const [i, n] of e)
|
|
1371
|
+
a[i] = n;
|
|
1372
|
+
return a;
|
|
1373
|
+
}, si = /* @__PURE__ */ oi(ni, [["__scopeId", "data-v-294396f2"]]), li = {
|
|
1374
|
+
"--das-ui-image-viewer-bg-color": { light: ae("--das-color-mask-dark-opacity") },
|
|
1375
|
+
"--das-ui-image-viewer-bg-empty": { light: ae("--das-color-bg-disabled") },
|
|
1376
|
+
"--das-ui-image-viewer-icon-color": { light: ae("--das-color-bg-container") },
|
|
1377
|
+
"--das-ui-image-viewer-btn-hover": { light: ae("--das-color-brand-primary-hover") },
|
|
1378
|
+
"--das-ui-image-viewer-btn-active": { light: ae("--das-color-brand-primary-active") },
|
|
1379
|
+
"--das-ui-image-viewer-text-color": { light: ae("--das-color-text-title") }
|
|
1380
|
+
}, Mi = ot(si);
|
|
1381
|
+
st();
|
|
1382
|
+
lt(li);
|
|
1379
1383
|
export {
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
+
Mi as DasImageViewer,
|
|
1385
|
+
Mi as default,
|
|
1386
|
+
Ct as minioUpload,
|
|
1387
|
+
Et as useCalculateSize
|
|
1384
1388
|
};
|