@cmstops/pro-compo 0.3.55 → 0.3.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +107 -107
- package/dist/gif.worker.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.min.js.map +1 -1
- package/es/appCenter/component.d.ts +0 -0
- package/es/appCenter/index.d.ts +2 -0
- package/es/appCenter/script/api.d.ts +11 -0
- package/es/appCenter/script/apps.d.ts +14 -0
- package/es/appCenter/script/permissionMap.d.ts +6 -0
- package/es/appCenter/script/routeMap.d.ts +4 -0
- package/es/appCenter/style/index.d.ts +1 -0
- package/es/appCenter/style/index.less +118 -118
- package/es/baseFilter/component.d.ts +0 -0
- package/es/baseFilter/components/FilterGroup.d.ts +0 -0
- package/es/baseFilter/components/filterItem.d.ts +0 -0
- package/es/baseFilter/index.d.ts +2 -0
- package/es/baseFilter/style/index.d.ts +1 -0
- package/es/baseFilter/style/index.less +45 -45
- package/es/baseFilter/useCalcWidth.d.ts +16 -0
- package/es/colorPalette/component.d.ts +0 -0
- package/es/colorPalette/components/colorPicker.d.ts +0 -0
- package/es/colorPalette/index.d.ts +2 -0
- package/es/colorPalette/style/index.d.ts +1 -0
- package/es/colorPalette/style/index.less +44 -44
- package/es/components.d.ts +5 -0
- package/es/config.d.ts +4 -0
- package/es/contentDetailList/__demo__/matrix/platform.d.ts +36 -0
- package/es/contentDetailList/component.d.ts +0 -0
- package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocMpItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/GroupPieceItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/courseItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/funhdItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/index.d.ts +0 -0
- package/es/contentDetailList/components/CustomWrp/CustomItem.d.ts +0 -0
- package/es/contentDetailList/components/CustomWrp/index.d.ts +0 -0
- package/es/contentDetailList/components/Doc/index.d.ts +0 -0
- package/es/contentDetailList/components/Records/MatrixItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Records/index.d.ts +0 -0
- package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.d.ts +0 -0
- package/es/contentDetailList/components/ShowQRCode/index.d.ts +0 -0
- package/es/contentDetailList/index.d.ts +2 -0
- package/es/contentDetailList/script/api.d.ts +6 -0
- package/es/contentDetailList/style/ComoItem.less +99 -99
- package/es/contentDetailList/style/Content.less +49 -49
- package/es/contentDetailList/style/ContentListItem.less +132 -132
- package/es/contentDetailList/style/Doc.less +3 -3
- package/es/contentDetailList/style/DocMpItem.less +135 -135
- package/es/contentDetailList/style/GroupPieceItem.less +108 -108
- package/es/contentDetailList/style/KongoNavItem.less +104 -104
- package/es/contentDetailList/style/LiveItem.less +108 -108
- package/es/contentDetailList/style/MaccountItem.less +111 -111
- package/es/contentDetailList/style/MatrixItem.less +214 -214
- package/es/contentDetailList/style/courseItem.less +108 -108
- package/es/contentDetailList/style/funhdItem.less +108 -108
- package/es/contentDetailList/style/index.d.ts +1 -0
- package/es/contentModal/component.d.ts +0 -0
- package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
- package/es/contentModal/components/CompoList/index.d.ts +0 -0
- package/es/contentModal/components/ContentList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/ContentList/index.d.ts +0 -0
- package/es/contentModal/components/EqxiuList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/EqxiuList/index.d.ts +0 -0
- package/es/contentModal/components/LiveList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/LiveList/index.d.ts +0 -0
- package/es/contentModal/components/MpAccountList/MpAccountFilter/index.d.ts +0 -0
- package/es/contentModal/components/MpAccountList/index.d.ts +0 -0
- package/es/contentModal/components/MpContentList/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/MpContentList/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
- package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
- package/es/contentModal/components/storeBox/index.d.ts +0 -0
- package/es/contentModal/index.d.ts +2 -0
- package/es/contentModal/script/api.d.ts +14 -0
- package/es/contentModal/style/ViewAllColumn.less +68 -68
- package/es/contentModal/style/columnTree.less +32 -32
- package/es/contentModal/style/index.d.ts +1 -0
- package/es/contentModal/style/index.less +23 -23
- package/es/contentModal/style/storeBox.less +55 -55
- package/es/dataTags/component.d.ts +0 -0
- package/es/dataTags/index.d.ts +2 -0
- package/es/dataTags/style/index.d.ts +1 -0
- package/es/dataTags/style/index.less +73 -73
- package/es/docHistory/component.d.ts +0 -0
- package/es/docHistory/component.js +3 -2
- package/es/docHistory/components/DocDiffPanel/index.d.ts +0 -0
- package/es/docHistory/components/DocHistoryList/index.d.ts +0 -0
- package/es/docHistory/index.d.ts +2 -0
- package/es/docHistory/scripts/diff.d.ts +1 -0
- package/es/docHistory/scripts/useDocHistory.d.ts +10 -0
- package/es/docHistory/style/docDiffPanel.less +9 -9
- package/es/docHistory/style/docHistoryList.less +58 -58
- package/es/docHistory/style/index.d.ts +1 -0
- package/es/docHistory/style/index.less +32 -32
- package/es/docPreview/component.d.ts +0 -0
- package/es/docPreview/components/PreviewIframe.d.ts +0 -0
- package/es/docPreview/index.d.ts +2 -0
- package/es/docPreview/scripts/api.d.ts +1 -0
- package/es/docPreview/scripts/hook.d.ts +20 -0
- package/es/docPreview/style/index.d.ts +1 -0
- package/es/docPreview/style/index.less +129 -129
- package/es/docPreview/style/previewIframe.less +36 -36
- package/es/editMetaInfo/component.d.ts +0 -0
- package/es/editMetaInfo/components/metaInfoForm.d.ts +0 -0
- package/es/editMetaInfo/components/metaInfoForm.js +1 -3
- package/es/editMetaInfo/index.d.ts +2 -0
- package/es/editMetaInfo/script/api.d.ts +6 -0
- package/es/editMetaInfo/script/restaurants.d.ts +4 -0
- package/es/editMetaInfo/style/index.d.ts +1 -0
- package/es/editMetaInfo/style/index.less +60 -60
- package/es/emptyData/component.d.ts +0 -0
- package/es/emptyData/index.d.ts +2 -0
- package/es/emptyData/style/index.d.ts +1 -0
- package/es/emptyData/style/index.less +34 -34
- package/es/emptyData/svg/add.d.ts +0 -0
- package/es/gif.worker.js +3 -3
- package/es/hooks/assets.d.ts +1 -0
- package/es/hooks/batch.d.ts +8 -0
- package/es/hooks/dialogVisible.d.ts +8 -0
- package/es/hooks/source.d.ts +9 -0
- package/es/hooks/toggle.d.ts +6 -0
- package/es/hooks/useAttachement.d.ts +26 -0
- package/es/hooks/useLocalStorage.d.ts +9 -0
- package/es/hooks/useLocalStorage.js +2 -1
- package/es/hooks/useMediaContext.d.ts +12 -0
- package/es/hooks/usePopper.d.ts +8 -0
- package/es/hooks/useSelection.d.ts +23 -0
- package/es/hooks/useUpload.d.ts +29 -0
- package/es/hooks/useUpload.js +84 -3
- package/es/hooks/user.d.ts +9 -0
- package/es/imageCrop/component.d.ts +0 -0
- package/es/imageCrop/index.d.ts +2 -0
- package/es/imageCrop/script/api.d.ts +1 -0
- package/es/imageCrop/style/cropper.less +291 -291
- package/es/imageCrop/style/imageCropper.less +133 -133
- package/es/imageCrop/style/index.d.ts +1 -0
- package/es/imageCrop/style/index.less +2 -2
- package/es/index.d.ts +29 -0
- package/es/index.less +29 -29
- package/es/mediaFilter/component.d.ts +0 -0
- package/es/mediaFilter/components/DocFilter.d.ts +0 -0
- package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
- package/es/mediaFilter/components/FilterGroup.js +1 -1
- package/es/mediaFilter/components/FilterItem.d.ts +0 -0
- package/es/mediaFilter/components/MpAccountFilter.d.ts +0 -0
- package/es/mediaFilter/components/MpContentFilter.d.ts +0 -0
- package/es/mediaFilter/index.d.ts +3 -0
- package/es/mediaFilter/script/optionsGetter.d.ts +26 -0
- package/es/mediaFilter/script/types.d.ts +16 -0
- package/es/mediaFilter/style/index.d.ts +1 -0
- package/es/mediaFilter/style/index.less +115 -115
- package/es/mediaView/component.d.ts +0 -0
- package/es/mediaView/index.d.ts +2 -0
- package/es/mediaView/style/index.d.ts +1 -0
- package/es/mediaView/style/index.less +71 -71
- package/es/messageBox/component.d.ts +0 -0
- package/es/messageBox/index.d.ts +2 -0
- package/es/messageBox/list.d.ts +0 -0
- package/es/messageBox/list.js +1 -1
- package/es/messageBox/script/api.d.ts +6 -0
- package/es/messageBox/style/index.d.ts +1 -0
- package/es/messageBox/style/index.less +71 -71
- package/es/previousVersion/component.d.ts +0 -0
- package/es/previousVersion/index.d.ts +2 -0
- package/es/previousVersion/script/api.d.ts +15 -0
- package/es/previousVersion/script/tool.d.ts +6 -0
- package/es/previousVersion/style/index.d.ts +1 -0
- package/es/previousVersion/style/index.less +209 -209
- package/es/resourceGridList/component.d.ts +0 -0
- package/es/resourceGridList/components/FileTypeThumb/index.d.ts +0 -0
- package/es/resourceGridList/components/FileTypeThumb/index.js +3 -6
- package/es/resourceGridList/index.d.ts +2 -0
- package/es/resourceGridList/style/FileTypeThumb.less +96 -96
- package/es/resourceGridList/style/index.d.ts +1 -0
- package/es/resourceGridList/style/index.less +233 -233
- package/es/resourceModal/component.d.ts +0 -0
- package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +3 -6
- package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceFilter.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.js +3 -3
- package/es/resourceModal/components/MediaSelection/SystemResourceSelected/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
- package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
- package/es/resourceModal/index.d.ts +2 -0
- package/es/resourceModal/script/api.d.ts +25 -0
- package/es/resourceModal/script/mediaSelection.d.ts +14 -0
- package/es/resourceModal/style/DocAiMediaSelected.less +55 -55
- package/es/resourceModal/style/FileTypeThumb.less +205 -205
- package/es/resourceModal/style/MainContent.less +222 -222
- package/es/resourceModal/style/MediaPreviewer.less +71 -71
- package/es/resourceModal/style/MediaSelection.less +69 -69
- package/es/resourceModal/style/SystemResourceSelected.less +154 -154
- package/es/resourceModal/style/ToolbarSearch.less +53 -53
- package/es/resourceModal/style/index.d.ts +1 -0
- package/es/resourceModal/style/index.less +18 -18
- package/es/selectAvatarList/component.d.ts +0 -0
- package/es/selectAvatarList/index.d.ts +2 -0
- package/es/selectAvatarList/style/index.d.ts +1 -0
- package/es/selectAvatarList/style/index.less +4 -4
- package/es/selectGategory/component.d.ts +0 -0
- package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
- package/es/selectGategory/index.d.ts +2 -0
- package/es/selectGategory/script/api.d.ts +6 -0
- package/es/selectGategory/style/ColumnSelection.less +190 -190
- package/es/selectGategory/style/index.d.ts +1 -0
- package/es/selectGategory/style/index.less +40 -40
- package/es/selectResourceModal/component.d.ts +0 -0
- package/es/selectResourceModal/components/ListCardWrapper/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListCardWrapper/index.js +9 -11
- package/es/selectResourceModal/components/ListContent/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListContentLocal/components/Upload.d.ts +0 -0
- package/es/selectResourceModal/components/ListContentLocal/components/Upload.js +18 -3
- package/es/selectResourceModal/components/ListContentLocal/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListFilter/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListFilter/scripts/api.d.ts +1 -0
- package/es/selectResourceModal/components/ListSelected/index.d.ts +0 -0
- package/es/selectResourceModal/components/ListTabs/index.d.ts +0 -0
- package/es/selectResourceModal/index.d.ts +2 -0
- package/es/selectResourceModal/scripts/useResourceSelect.d.ts +7 -0
- package/es/selectResourceModal/style/index.d.ts +1 -0
- package/es/selectResourceModal/style/index.less +70 -70
- package/es/selectResourceModal/style/listCardWrapper.less +97 -97
- package/es/selectResourceModal/style/listContent.less +5 -5
- package/es/selectResourceModal/style/listContentLocal.less +26 -26
- package/es/selectResourceModal/style/listFilter.less +41 -41
- package/es/selectResourceModal/style/listSelected.less +90 -90
- package/es/selectThumb/component.d.ts +0 -0
- package/es/selectThumb/components/card.d.ts +0 -0
- package/es/selectThumb/components/card.js +6 -10
- package/es/selectThumb/components/colorPalette.d.ts +0 -0
- package/es/selectThumb/components/colorPicker.d.ts +0 -0
- package/es/selectThumb/index.d.ts +2 -0
- package/es/selectThumb/style/card.less +95 -95
- package/es/selectThumb/style/colorPalette.less +30 -30
- package/es/selectThumb/style/index.d.ts +1 -0
- package/es/style/index.less +1 -1
- package/es/thumbCard/component.d.ts +0 -0
- package/es/thumbCard/components/ThumbUploading/index.d.ts +0 -0
- package/es/thumbCard/index.d.ts +2 -0
- package/es/thumbCard/style/index.d.ts +1 -0
- package/es/thumbCard/style/index.less +90 -90
- package/es/thumbCard/style/thumbUploading.less +26 -26
- package/es/typeIcons/component.d.ts +0 -0
- package/es/typeIcons/index.d.ts +2 -0
- package/es/typeIcons/style/index.d.ts +1 -0
- package/es/typeIcons/style/index.less +6 -6
- package/es/uploadBefore/component.d.ts +0 -0
- package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
- package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
- package/es/uploadBefore/index.d.ts +2 -0
- package/es/uploadBefore/script/api.d.ts +16 -0
- package/es/uploadBefore/script/fileTypeAdapter.d.ts +39 -0
- package/es/uploadBefore/script/fileUpload.d.ts +7 -0
- package/es/uploadBefore/script/uploadHooks.d.ts +55 -0
- package/es/uploadBefore/style/index.d.ts +1 -0
- package/es/uploadBefore/style/index.less +144 -144
- package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
- package/es/uploadStep/component.d.ts +0 -0
- package/es/uploadStep/index.d.ts +2 -0
- package/es/uploadStep/script/fileTypeAdapter.d.ts +20 -0
- package/es/uploadStep/style/index.d.ts +1 -0
- package/es/uploadStep/style/index.less +152 -152
- package/es/userAvater/component.d.ts +0 -0
- package/es/userAvater/index.d.ts +2 -0
- package/es/userAvater/script/api.d.ts +8 -0
- package/es/userAvater/style/index.d.ts +1 -0
- package/es/userAvater/style/index.less +54 -54
- package/es/userDirector/component.d.ts +0 -0
- package/es/userDirector/components/userTree.d.ts +0 -0
- package/es/userDirector/index.d.ts +2 -0
- package/es/userDirector/script/api.d.ts +10 -0
- package/es/userDirector/style/index.d.ts +1 -0
- package/es/utils/auth.d.ts +5 -0
- package/es/utils/date.d.ts +3 -0
- package/es/utils/doc.d.ts +76 -0
- package/es/utils/filter.d.ts +9 -0
- package/es/utils/index.d.ts +17 -0
- package/es/utils/request.d.ts +9 -0
- package/es/utils/resource.d.ts +4 -0
- package/es/utils/transcodeMedia.d.ts +13 -0
- package/es/utils/tusUpload.d.ts +16 -0
- package/es/utils/typeMap.d.ts +185 -0
- package/es/utils/uploadCatalog.d.ts +1 -0
- package/es/videoThumb/component.d.ts +0 -0
- package/es/videoThumb/index.d.ts +2 -0
- package/es/videoThumb/scripts/api.d.ts +9 -0
- package/es/videoThumb/scripts/useVideoThumbs.d.ts +7 -0
- package/es/videoThumb/style/index.d.ts +1 -0
- package/es/videoThumb/style/index.less +61 -61
- package/lib/appCenter/style/index.less +118 -118
- package/lib/baseFilter/style/index.less +45 -45
- package/lib/colorPalette/style/index.less +44 -44
- package/lib/contentDetailList/style/ComoItem.less +99 -99
- package/lib/contentDetailList/style/Content.less +49 -49
- package/lib/contentDetailList/style/ContentListItem.less +132 -132
- package/lib/contentDetailList/style/Doc.less +3 -3
- package/lib/contentDetailList/style/DocMpItem.less +135 -135
- package/lib/contentDetailList/style/GroupPieceItem.less +108 -108
- package/lib/contentDetailList/style/KongoNavItem.less +104 -104
- package/lib/contentDetailList/style/LiveItem.less +108 -108
- package/lib/contentDetailList/style/MaccountItem.less +111 -111
- package/lib/contentDetailList/style/MatrixItem.less +214 -214
- package/lib/contentDetailList/style/courseItem.less +108 -108
- package/lib/contentDetailList/style/funhdItem.less +108 -108
- package/lib/contentModal/style/ViewAllColumn.less +68 -68
- package/lib/contentModal/style/columnTree.less +32 -32
- package/lib/contentModal/style/index.less +23 -23
- package/lib/contentModal/style/storeBox.less +55 -55
- package/lib/dataTags/style/index.less +73 -73
- package/lib/docHistory/component.js +3 -2
- package/lib/docHistory/style/docDiffPanel.less +9 -9
- package/lib/docHistory/style/docHistoryList.less +58 -58
- package/lib/docHistory/style/index.less +32 -32
- package/lib/docPreview/style/index.less +129 -129
- package/lib/docPreview/style/previewIframe.less +36 -36
- package/lib/editMetaInfo/components/metaInfoForm.js +1 -3
- package/lib/editMetaInfo/style/index.less +60 -60
- package/lib/emptyData/style/index.less +34 -34
- package/lib/hooks/useLocalStorage.js +2 -1
- package/lib/hooks/useUpload.js +85 -2
- package/lib/imageCrop/style/cropper.less +291 -291
- package/lib/imageCrop/style/imageCropper.less +133 -133
- package/lib/imageCrop/style/index.less +2 -2
- package/lib/index.less +29 -29
- package/lib/mediaFilter/components/FilterGroup.js +1 -1
- package/lib/mediaFilter/style/index.less +115 -115
- package/lib/mediaView/style/index.less +71 -71
- package/lib/messageBox/list.js +1 -1
- package/lib/messageBox/style/index.less +71 -71
- package/lib/previousVersion/style/index.less +209 -209
- package/lib/resourceGridList/components/FileTypeThumb/index.js +3 -6
- package/lib/resourceGridList/style/FileTypeThumb.less +96 -96
- package/lib/resourceGridList/style/index.less +233 -233
- package/lib/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +3 -6
- package/lib/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.js +2 -2
- package/lib/resourceModal/style/DocAiMediaSelected.less +55 -55
- package/lib/resourceModal/style/FileTypeThumb.less +205 -205
- package/lib/resourceModal/style/MainContent.less +222 -222
- package/lib/resourceModal/style/MediaPreviewer.less +71 -71
- package/lib/resourceModal/style/MediaSelection.less +69 -69
- package/lib/resourceModal/style/SystemResourceSelected.less +154 -154
- package/lib/resourceModal/style/ToolbarSearch.less +53 -53
- package/lib/resourceModal/style/index.less +18 -18
- package/lib/selectAvatarList/style/index.less +4 -4
- package/lib/selectGategory/style/ColumnSelection.less +190 -190
- package/lib/selectGategory/style/index.less +40 -40
- package/lib/selectResourceModal/components/ListCardWrapper/index.js +9 -11
- package/lib/selectResourceModal/components/ListContentLocal/components/Upload.js +16 -1
- package/lib/selectResourceModal/style/index.less +70 -70
- package/lib/selectResourceModal/style/listCardWrapper.less +97 -97
- package/lib/selectResourceModal/style/listContent.less +5 -5
- package/lib/selectResourceModal/style/listContentLocal.less +26 -26
- package/lib/selectResourceModal/style/listFilter.less +41 -41
- package/lib/selectResourceModal/style/listSelected.less +90 -90
- package/lib/selectThumb/components/card.js +6 -10
- package/lib/selectThumb/style/card.less +95 -95
- package/lib/selectThumb/style/colorPalette.less +30 -30
- package/lib/style/index.less +1 -1
- package/lib/thumbCard/style/index.less +90 -90
- package/lib/thumbCard/style/thumbUploading.less +26 -26
- package/lib/typeIcons/style/index.less +6 -6
- package/lib/uploadBefore/style/index.less +144 -144
- package/lib/uploadStep/style/index.less +152 -152
- package/lib/userAvater/style/index.less +54 -54
- package/lib/videoThumb/style/index.less +61 -61
- package/package.json +137 -137
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
@import './previewIframe.less';
|
|
2
|
-
|
|
3
|
-
// 变量
|
|
4
|
-
@qrCodeWidth: 300px;
|
|
5
|
-
|
|
6
|
-
.doc-preview-container {
|
|
7
|
-
position: fixed;
|
|
8
|
-
// 遮罩层
|
|
9
|
-
top: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
z-index: 10;
|
|
12
|
-
display: flex;
|
|
13
|
-
gap: 40px;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
19
|
-
user-select: none;
|
|
20
|
-
|
|
21
|
-
.loading-wrapper {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: center;
|
|
25
|
-
width: 100%;
|
|
26
|
-
height: 100%;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.doc-preview-share {
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
align-items: center;
|
|
33
|
-
width: @qrCodeWidth;
|
|
34
|
-
overflow: hidden;
|
|
35
|
-
background-color: #fff;
|
|
36
|
-
border-radius: 12px;
|
|
37
|
-
|
|
38
|
-
&-img {
|
|
39
|
-
width: @qrCodeWidth;
|
|
40
|
-
height: @qrCodeWidth;
|
|
41
|
-
|
|
42
|
-
img {
|
|
43
|
-
width: 100%;
|
|
44
|
-
height: 100%;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&-hint {
|
|
48
|
-
display: flex;
|
|
49
|
-
align-items: center;
|
|
50
|
-
justify-content: center;
|
|
51
|
-
width: calc(100% - 40px);
|
|
52
|
-
height: calc(100% - 40px);
|
|
53
|
-
margin-top: 20px;
|
|
54
|
-
margin-left: 20px;
|
|
55
|
-
color: #4886ff;
|
|
56
|
-
background-color: #edf3ff;
|
|
57
|
-
border-radius: 6px;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&-tips,
|
|
62
|
-
&-header,
|
|
63
|
-
&-link,
|
|
64
|
-
&-action {
|
|
65
|
-
box-sizing: border-box;
|
|
66
|
-
width: 100%;
|
|
67
|
-
padding: 0 20px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// 备注
|
|
71
|
-
&-tips {
|
|
72
|
-
color: #333;
|
|
73
|
-
font-size: 14px;
|
|
74
|
-
text-align: center;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// header 控件
|
|
78
|
-
&-header {
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
justify-content: space-between;
|
|
82
|
-
margin: 10px 0 5px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// 链接展示
|
|
86
|
-
&-link {
|
|
87
|
-
display: flex;
|
|
88
|
-
flex-direction: column;
|
|
89
|
-
width: 100%;
|
|
90
|
-
|
|
91
|
-
&-value {
|
|
92
|
-
display: -webkit-box;
|
|
93
|
-
box-sizing: border-box;
|
|
94
|
-
padding: 6px 10px;
|
|
95
|
-
overflow: hidden;
|
|
96
|
-
color: #86909c;
|
|
97
|
-
line-height: 25px;
|
|
98
|
-
word-break: break-all;
|
|
99
|
-
background: #f2f2f2;
|
|
100
|
-
-webkit-line-clamp: 2;
|
|
101
|
-
-webkit-box-orient: vertical;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&-hint {
|
|
105
|
-
margin-top: 10px;
|
|
106
|
-
color: #86909c;
|
|
107
|
-
font-size: 12px;
|
|
108
|
-
text-align: center;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&-action {
|
|
113
|
-
display: flex;
|
|
114
|
-
gap: 10px;
|
|
115
|
-
align-items: center;
|
|
116
|
-
justify-content: center;
|
|
117
|
-
margin: 20px 0;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.preview-close {
|
|
122
|
-
position: absolute;
|
|
123
|
-
top: 20px;
|
|
124
|
-
right: 20px;
|
|
125
|
-
color: #fff;
|
|
126
|
-
font-size: 20px;
|
|
127
|
-
cursor: pointer;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
1
|
+
@import './previewIframe.less';
|
|
2
|
+
|
|
3
|
+
// 变量
|
|
4
|
+
@qrCodeWidth: 300px;
|
|
5
|
+
|
|
6
|
+
.doc-preview-container {
|
|
7
|
+
position: fixed;
|
|
8
|
+
// 遮罩层
|
|
9
|
+
top: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
z-index: 10;
|
|
12
|
+
display: flex;
|
|
13
|
+
gap: 40px;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
19
|
+
user-select: none;
|
|
20
|
+
|
|
21
|
+
.loading-wrapper {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.doc-preview-share {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
align-items: center;
|
|
33
|
+
width: @qrCodeWidth;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
background-color: #fff;
|
|
36
|
+
border-radius: 12px;
|
|
37
|
+
|
|
38
|
+
&-img {
|
|
39
|
+
width: @qrCodeWidth;
|
|
40
|
+
height: @qrCodeWidth;
|
|
41
|
+
|
|
42
|
+
img {
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&-hint {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
width: calc(100% - 40px);
|
|
52
|
+
height: calc(100% - 40px);
|
|
53
|
+
margin-top: 20px;
|
|
54
|
+
margin-left: 20px;
|
|
55
|
+
color: #4886ff;
|
|
56
|
+
background-color: #edf3ff;
|
|
57
|
+
border-radius: 6px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&-tips,
|
|
62
|
+
&-header,
|
|
63
|
+
&-link,
|
|
64
|
+
&-action {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
width: 100%;
|
|
67
|
+
padding: 0 20px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 备注
|
|
71
|
+
&-tips {
|
|
72
|
+
color: #333;
|
|
73
|
+
font-size: 14px;
|
|
74
|
+
text-align: center;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// header 控件
|
|
78
|
+
&-header {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
margin: 10px 0 5px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// 链接展示
|
|
86
|
+
&-link {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
width: 100%;
|
|
90
|
+
|
|
91
|
+
&-value {
|
|
92
|
+
display: -webkit-box;
|
|
93
|
+
box-sizing: border-box;
|
|
94
|
+
padding: 6px 10px;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
color: #86909c;
|
|
97
|
+
line-height: 25px;
|
|
98
|
+
word-break: break-all;
|
|
99
|
+
background: #f2f2f2;
|
|
100
|
+
-webkit-line-clamp: 2;
|
|
101
|
+
-webkit-box-orient: vertical;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&-hint {
|
|
105
|
+
margin-top: 10px;
|
|
106
|
+
color: #86909c;
|
|
107
|
+
font-size: 12px;
|
|
108
|
+
text-align: center;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-action {
|
|
113
|
+
display: flex;
|
|
114
|
+
gap: 10px;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
margin: 20px 0;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.preview-close {
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: 20px;
|
|
124
|
+
right: 20px;
|
|
125
|
+
color: #fff;
|
|
126
|
+
font-size: 20px;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
.iframe-container {
|
|
2
|
-
position: relative;
|
|
3
|
-
height: 95vh;
|
|
4
|
-
max-height: 750px;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
aspect-ratio: 390 / 750;
|
|
7
|
-
|
|
8
|
-
&::-webkit-scrollbar {
|
|
9
|
-
display: none;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
img {
|
|
13
|
-
position: absolute;
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 100%;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.iframe-content {
|
|
19
|
-
position: absolute;
|
|
20
|
-
top: calc(100% / 8);
|
|
21
|
-
left: 19px;
|
|
22
|
-
z-index: 1000;
|
|
23
|
-
width: calc(100% - 38px);
|
|
24
|
-
height: calc(100% - 100% / 8 - 16px);
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
border-bottom-right-radius: 40px;
|
|
27
|
-
border-bottom-left-radius: 40px;
|
|
28
|
-
|
|
29
|
-
iframe {
|
|
30
|
-
width: calc(100% + 20px);
|
|
31
|
-
height: 100%;
|
|
32
|
-
border: none;
|
|
33
|
-
outline: none;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
1
|
+
.iframe-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
height: 95vh;
|
|
4
|
+
max-height: 750px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
aspect-ratio: 390 / 750;
|
|
7
|
+
|
|
8
|
+
&::-webkit-scrollbar {
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
img {
|
|
13
|
+
position: absolute;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.iframe-content {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: calc(100% / 8);
|
|
21
|
+
left: 19px;
|
|
22
|
+
z-index: 1000;
|
|
23
|
+
width: calc(100% - 38px);
|
|
24
|
+
height: calc(100% - 100% / 8 - 16px);
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
border-bottom-right-radius: 40px;
|
|
27
|
+
border-bottom-left-radius: 40px;
|
|
28
|
+
|
|
29
|
+
iframe {
|
|
30
|
+
width: calc(100% + 20px);
|
|
31
|
+
height: 100%;
|
|
32
|
+
border: none;
|
|
33
|
+
outline: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -186,7 +186,6 @@ const _sfc_main = vue.defineComponent({
|
|
|
186
186
|
data.online_time = data.online_time && Math.floor(data.online_time / 1e3);
|
|
187
187
|
data.offline_time = data.offline_time && Math.floor(data.offline_time / 1e3);
|
|
188
188
|
data.keywords = data.keywords && data.keywords.join(",");
|
|
189
|
-
data.author = data.author && data.author.join(",");
|
|
190
189
|
data.duty_editor = data.duty_editor && data.duty_editor.join(",");
|
|
191
190
|
data.extra_attrs = data.extra_attrs && data.extra_attrs.join(",");
|
|
192
191
|
data.relation_news = data.relation_news && JSON.stringify(data.relation_news);
|
|
@@ -216,7 +215,6 @@ const _sfc_main = vue.defineComponent({
|
|
|
216
215
|
data.online_time = data.online_time && parseInt(data.online_time, 10) * 1e3 || "";
|
|
217
216
|
data.offline_time = data.offline_time && parseInt(data.offline_time, 10) * 1e3 || "";
|
|
218
217
|
data.keywords = data.keywords && data.keywords.split(",");
|
|
219
|
-
data.author = data.author && data.author.split(",");
|
|
220
218
|
data.duty_editor = data.duty_editor && data.duty_editor.split(",") || "";
|
|
221
219
|
data.extra_attrs = data.extra_attrs && data.extra_attrs.split(",") || "";
|
|
222
220
|
data.relation_news = data.relation_news && JSON.parse(data.relation_news) || [];
|
|
@@ -227,7 +225,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
227
225
|
data.comment_available = data.comment_available !== "false";
|
|
228
226
|
data.statement = data.statement !== "false";
|
|
229
227
|
data.is_recommend = data.is_recommend !== "false";
|
|
230
|
-
data.album_status =
|
|
228
|
+
data.album_status = data.album_status !== "0";
|
|
231
229
|
Object.assign(form.value, data);
|
|
232
230
|
};
|
|
233
231
|
vue.watch(silenceOptions, (newVal, oldVal) => {
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
.edit-meta-info-dialog-body {
|
|
2
|
-
padding: 0;
|
|
3
|
-
|
|
4
|
-
.style-form-item {
|
|
5
|
-
position: relative;
|
|
6
|
-
top: -10px;
|
|
7
|
-
|
|
8
|
-
.title {
|
|
9
|
-
max-width: 100%;
|
|
10
|
-
color: var(--color-text-2);
|
|
11
|
-
font-weight: 400;
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
white-space: normal;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.select-thumb-wrap {
|
|
18
|
-
margin-left: 20.8%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.horizontal {
|
|
22
|
-
// display: flex;
|
|
23
|
-
// align-items: center;
|
|
24
|
-
// flex-direction: row !important;
|
|
25
|
-
// .arco-form-item-label-col {
|
|
26
|
-
// margin-bottom: 0;
|
|
27
|
-
// padding-right: 16px;
|
|
28
|
-
// text-align: right;
|
|
29
|
-
// }
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.input-w {
|
|
33
|
-
width: 450px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.silence {
|
|
37
|
-
.arco-form-item-wrapper-col {
|
|
38
|
-
.arco-form-item-content {
|
|
39
|
-
display: block;
|
|
40
|
-
|
|
41
|
-
.arco-switch {
|
|
42
|
-
margin: 4px 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.silence-options {
|
|
46
|
-
margin-top: 20px;
|
|
47
|
-
margin-left: -75px;
|
|
48
|
-
|
|
49
|
-
.info {
|
|
50
|
-
margin-top: 12px;
|
|
51
|
-
padding-left: 5px;
|
|
52
|
-
color: #878e96;
|
|
53
|
-
font-size: 14px;
|
|
54
|
-
line-height: 1.5;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
.edit-meta-info-dialog-body {
|
|
2
|
+
padding: 0;
|
|
3
|
+
|
|
4
|
+
.style-form-item {
|
|
5
|
+
position: relative;
|
|
6
|
+
top: -10px;
|
|
7
|
+
|
|
8
|
+
.title {
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
color: var(--color-text-2);
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
white-space: normal;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.select-thumb-wrap {
|
|
18
|
+
margin-left: 20.8%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.horizontal {
|
|
22
|
+
// display: flex;
|
|
23
|
+
// align-items: center;
|
|
24
|
+
// flex-direction: row !important;
|
|
25
|
+
// .arco-form-item-label-col {
|
|
26
|
+
// margin-bottom: 0;
|
|
27
|
+
// padding-right: 16px;
|
|
28
|
+
// text-align: right;
|
|
29
|
+
// }
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.input-w {
|
|
33
|
+
width: 450px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.silence {
|
|
37
|
+
.arco-form-item-wrapper-col {
|
|
38
|
+
.arco-form-item-content {
|
|
39
|
+
display: block;
|
|
40
|
+
|
|
41
|
+
.arco-switch {
|
|
42
|
+
margin: 4px 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.silence-options {
|
|
46
|
+
margin-top: 20px;
|
|
47
|
+
margin-left: -75px;
|
|
48
|
+
|
|
49
|
+
.info {
|
|
50
|
+
margin-top: 12px;
|
|
51
|
+
padding-left: 5px;
|
|
52
|
+
color: #878e96;
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
line-height: 1.5;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
.empty-data-container {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 50%;
|
|
4
|
-
left: 50%;
|
|
5
|
-
display: block;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
align-items: center;
|
|
9
|
-
justify-content: center;
|
|
10
|
-
width: 220px;
|
|
11
|
-
transform: translate(-50%, -50%);
|
|
12
|
-
|
|
13
|
-
&.small {
|
|
14
|
-
width: 160px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
img {
|
|
18
|
-
width: 100%;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.custom-icon {
|
|
22
|
-
width: 100%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.tip {
|
|
26
|
-
margin-top: 16px;
|
|
27
|
-
color: #999eaa;
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.slot-view {
|
|
32
|
-
margin-top: 16px;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
.empty-data-container {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 50%;
|
|
4
|
+
left: 50%;
|
|
5
|
+
display: block;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
width: 220px;
|
|
11
|
+
transform: translate(-50%, -50%);
|
|
12
|
+
|
|
13
|
+
&.small {
|
|
14
|
+
width: 160px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
img {
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.custom-icon {
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.tip {
|
|
26
|
+
margin-top: 16px;
|
|
27
|
+
color: #999eaa;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.slot-view {
|
|
32
|
+
margin-top: 16px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const LOCALSTORAGE_KEYS = {
|
|
4
|
-
LOCAL_RESOURCES: "cmstop-local-resources"
|
|
4
|
+
LOCAL_RESOURCES: "cmstop-local-resources",
|
|
5
|
+
LOCAL_UPLOAD_CONFIG: "cmstop-local-upload-config"
|
|
5
6
|
};
|
|
6
7
|
function useLocalstorage(key) {
|
|
7
8
|
function get() {
|
package/lib/hooks/useUpload.js
CHANGED
|
@@ -6,6 +6,17 @@ var tusUpload = require("../utils/tusUpload.js");
|
|
|
6
6
|
var request = require("../utils/request.js");
|
|
7
7
|
var transcodeMedia = require("../utils/transcodeMedia.js");
|
|
8
8
|
var useLocalStorage = require("./useLocalStorage.js");
|
|
9
|
+
function getSize(value) {
|
|
10
|
+
if (!value)
|
|
11
|
+
return "";
|
|
12
|
+
let i = -1;
|
|
13
|
+
const byteUnits = [" KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"];
|
|
14
|
+
do {
|
|
15
|
+
value /= 1024;
|
|
16
|
+
i++;
|
|
17
|
+
} while (value > 1024);
|
|
18
|
+
return value.toFixed(2) + byteUnits[i];
|
|
19
|
+
}
|
|
9
20
|
function addMedia(BASE_API, params) {
|
|
10
21
|
return request(BASE_API, {
|
|
11
22
|
url: "/poplar/v2/media/add",
|
|
@@ -20,7 +31,7 @@ function reTranscodeMedia(BASE_API, media_id) {
|
|
|
20
31
|
data: { media_id }
|
|
21
32
|
});
|
|
22
33
|
}
|
|
23
|
-
function useUpload() {
|
|
34
|
+
function useUpload(options) {
|
|
24
35
|
const { get, set, remove } = useLocalStorage["default"]("LOCAL_RESOURCES");
|
|
25
36
|
const list = vue.ref(get() || []);
|
|
26
37
|
function uploadSuccess(file) {
|
|
@@ -78,6 +89,11 @@ function useUpload() {
|
|
|
78
89
|
};
|
|
79
90
|
const uploading = upload.start(progress);
|
|
80
91
|
uploading.then(async (url) => {
|
|
92
|
+
if (options == null ? void 0 : options.noAddMedia) {
|
|
93
|
+
recordTaskStatusChange({ ...newFile, status: 0, url }, 1);
|
|
94
|
+
callback && callback({ ...newFile, url }, "success");
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
81
97
|
const { code, message } = await addMedia(BASE_API, {
|
|
82
98
|
url,
|
|
83
99
|
size: newFile.size,
|
|
@@ -152,7 +168,7 @@ function useUpload() {
|
|
|
152
168
|
}
|
|
153
169
|
};
|
|
154
170
|
vue.watch(() => list.value, set, { deep: true });
|
|
155
|
-
window.
|
|
171
|
+
window.addEventListener("beforeunload", remove, false);
|
|
156
172
|
return {
|
|
157
173
|
list,
|
|
158
174
|
uploadFile,
|
|
@@ -162,6 +178,73 @@ function useUpload() {
|
|
|
162
178
|
removeRecord
|
|
163
179
|
};
|
|
164
180
|
}
|
|
181
|
+
function getConfiguration(BASE_API, params) {
|
|
182
|
+
return request(BASE_API, {
|
|
183
|
+
url: `poplar/v2/settings`,
|
|
184
|
+
method: "get",
|
|
185
|
+
params
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function useUploadConfig() {
|
|
189
|
+
const { get, set, remove } = useLocalStorage["default"]("LOCAL_UPLOAD_CONFIG");
|
|
190
|
+
const config = vue.ref(get() || {});
|
|
191
|
+
async function initUploadConfig(BASE_API, domainId) {
|
|
192
|
+
if (config.value.size_config_enabled != null)
|
|
193
|
+
return;
|
|
194
|
+
try {
|
|
195
|
+
const { code, message } = await getConfiguration(BASE_API, {
|
|
196
|
+
domain_id: domainId,
|
|
197
|
+
module: "platform",
|
|
198
|
+
key: "size",
|
|
199
|
+
cloud: true
|
|
200
|
+
});
|
|
201
|
+
if (code !== 0)
|
|
202
|
+
return;
|
|
203
|
+
const [{ value }] = message;
|
|
204
|
+
config.value = JSON.parse(value);
|
|
205
|
+
set(value);
|
|
206
|
+
} catch (e) {
|
|
207
|
+
console.log("\u4E0A\u4F20\u914D\u7F6E\u83B7\u53D6\u5931\u8D25", e);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
function checkFileSizeOutLimit(file, callback) {
|
|
211
|
+
if (!file)
|
|
212
|
+
return true;
|
|
213
|
+
const { type, size, name } = file;
|
|
214
|
+
const { file_size, image_size, video_size, audio_size, enable } = config.value;
|
|
215
|
+
let typeCN = "";
|
|
216
|
+
let limitSize = file_size;
|
|
217
|
+
if (!enable)
|
|
218
|
+
return true;
|
|
219
|
+
if (type.startsWith("image")) {
|
|
220
|
+
typeCN = "\u56FE\u7247";
|
|
221
|
+
limitSize = image_size;
|
|
222
|
+
} else if (type.startsWith("video")) {
|
|
223
|
+
typeCN = "\u89C6\u9891";
|
|
224
|
+
limitSize = video_size;
|
|
225
|
+
} else if (type.startsWith("audio")) {
|
|
226
|
+
typeCN = "\u97F3\u9891";
|
|
227
|
+
limitSize = audio_size;
|
|
228
|
+
} else {
|
|
229
|
+
limitSize = file_size;
|
|
230
|
+
}
|
|
231
|
+
if (size <= limitSize) {
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
234
|
+
callback(
|
|
235
|
+
`"${name}" \u592A\u5927\uFF0C\u8BF7\u4E0A\u4F20\u4E0D\u5927\u4E8E ${getSize(limitSize)} \u7684 ${typeCN} \u6587\u4EF6\u3002`
|
|
236
|
+
);
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
window.addEventListener("beforeunload", remove, false);
|
|
240
|
+
return {
|
|
241
|
+
config,
|
|
242
|
+
checkFileSizeOutLimit,
|
|
243
|
+
initUploadConfig
|
|
244
|
+
};
|
|
245
|
+
}
|
|
165
246
|
exports.addMedia = addMedia;
|
|
166
247
|
exports["default"] = useUpload;
|
|
248
|
+
exports.getSize = getSize;
|
|
167
249
|
exports.reTranscodeMedia = reTranscodeMedia;
|
|
250
|
+
exports.useUploadConfig = useUploadConfig;
|