giime 0.7.6 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +101 -101
- package/es/api/resource/controller/ZiYuanGuanLi/index.d.ts +0 -2
- package/es/api/resource/controller/ZiYuanGuanLi/index.mjs +0 -2
- package/es/api/resource/controller/ZiYuanGuanLi/index.mjs.map +1 -1
- package/es/api/resource/controller/ZiYuanGuanLi/postResourceV1ResourcesUrl.d.ts +5 -1
- package/es/api/resource/controller/ZiYuanGuanLi/postResourceV1ResourcesUrl.mjs.map +1 -1
- package/es/api/resource/controller/ZiYuanGuanLi/usePostResourceV1ResourcesUrl.d.ts +81 -1
- package/es/api/resource/controller/ZiYuanGuanLi/usePostResourceV1ResourcesUrl.mjs.map +1 -1
- package/es/api/resource/controller/index.mjs +0 -2
- package/es/api/resource/controller/index.mjs.map +1 -1
- package/es/api/resource/interface/apiTypes/GenerateUploadUrlRequest.d.ts +1 -1
- package/es/api/resource/interface/apiTypes/RMapStringObject.d.ts +13 -0
- package/es/api/resource/interface/apiTypes/RMapStringObject.mjs +2 -0
- package/es/api/resource/interface/apiTypes/RMapStringObject.mjs.map +1 -0
- package/es/api/resource/interface/apiTypes/ResourceUrlResponse.d.ts +8 -0
- package/es/api/resource/interface/apiTypes/Rurl.d.ts +10 -0
- package/es/api/resource/interface/apiTypes/Rurl.mjs +2 -0
- package/es/api/resource/interface/apiTypes/Rurl.mjs.map +1 -0
- package/es/api/resource/interface/index.d.ts +2 -0
- package/es/api/resource/interface/index.mjs +2 -0
- package/es/api/resource/interface/index.mjs.map +1 -1
- package/es/components/src/business/uploadPro/UploadPro.vue.d.ts +225 -225
- package/es/components/src/business/uploadPro/UploadPro.vue.mjs +1 -1
- package/es/components/src/business/uploadPro/UploadPro.vue2.mjs +1 -1
- package/es/components/src/business/uploadPro/UploadPro.vue2.mjs.map +1 -1
- package/es/components/src/business/uploadPro/index.d.ts +16 -16
- package/es/components/src/business/uploadPro/uploadPro.d.ts +31 -31
- package/es/components/src/business/uploadPro/uploadPro.mjs.map +1 -1
- package/es/components/src/composite/uploadFile/UploadFile.vue.d.ts +3 -3
- package/es/components/src/composite/uploadFile/UploadFile.vue.mjs +1 -1
- package/es/components/src/composite/uploadFile/UploadFile.vue2.mjs +2 -2
- package/es/components/src/composite/uploadFile/UploadFile.vue2.mjs.map +1 -1
- package/es/components/src/composite/uploadFile/index.d.ts +3 -3
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/es/hooks/base/useUploadFile/index.d.ts +15 -1
- package/es/hooks/base/useUploadFile/index.mjs +1 -0
- package/es/hooks/base/useUploadFile/index.mjs.map +1 -1
- package/es/hooks/store/useUploadTask/index.mjs +1 -1
- package/es/hooks/store/useUploadTask/index.mjs.map +1 -1
- package/es/index.css +101 -101
- package/lib/api/resource/controller/ZiYuanGuanLi/index.d.ts +0 -2
- package/lib/api/resource/controller/ZiYuanGuanLi/index.js +0 -4
- package/lib/api/resource/controller/ZiYuanGuanLi/index.js.map +1 -1
- package/lib/api/resource/controller/ZiYuanGuanLi/postResourceV1ResourcesUrl.d.ts +5 -1
- package/lib/api/resource/controller/ZiYuanGuanLi/postResourceV1ResourcesUrl.js.map +1 -1
- package/lib/api/resource/controller/ZiYuanGuanLi/usePostResourceV1ResourcesUrl.d.ts +81 -1
- package/lib/api/resource/controller/ZiYuanGuanLi/usePostResourceV1ResourcesUrl.js.map +1 -1
- package/lib/api/resource/controller/index.js +0 -4
- package/lib/api/resource/controller/index.js.map +1 -1
- package/lib/api/resource/interface/apiTypes/GenerateUploadUrlRequest.d.ts +1 -1
- package/lib/api/resource/interface/apiTypes/RMapStringObject.d.ts +13 -0
- package/lib/api/resource/interface/apiTypes/RMapStringObject.js +3 -0
- package/lib/api/resource/interface/apiTypes/RMapStringObject.js.map +1 -0
- package/lib/api/resource/interface/apiTypes/ResourceUrlResponse.d.ts +8 -0
- package/lib/api/resource/interface/apiTypes/Rurl.d.ts +10 -0
- package/lib/api/resource/interface/apiTypes/Rurl.js +3 -0
- package/lib/api/resource/interface/apiTypes/Rurl.js.map +1 -0
- package/lib/api/resource/interface/index.d.ts +2 -0
- package/lib/api/resource/interface/index.js +2 -0
- package/lib/api/resource/interface/index.js.map +1 -1
- package/lib/components/src/business/uploadPro/UploadPro.vue.d.ts +225 -225
- package/lib/components/src/business/uploadPro/UploadPro.vue.js +1 -1
- package/lib/components/src/business/uploadPro/UploadPro.vue2.js +1 -1
- package/lib/components/src/business/uploadPro/UploadPro.vue2.js.map +1 -1
- package/lib/components/src/business/uploadPro/index.d.ts +16 -16
- package/lib/components/src/business/uploadPro/uploadPro.d.ts +31 -31
- package/lib/components/src/business/uploadPro/uploadPro.js.map +1 -1
- package/lib/components/src/composite/uploadFile/UploadFile.vue.d.ts +3 -3
- package/lib/components/src/composite/uploadFile/UploadFile.vue.js +1 -1
- package/lib/components/src/composite/uploadFile/UploadFile.vue2.js +2 -2
- package/lib/components/src/composite/uploadFile/UploadFile.vue2.js.map +1 -1
- package/lib/components/src/composite/uploadFile/index.d.ts +3 -3
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/lib/hooks/base/useUploadFile/index.d.ts +15 -1
- package/lib/hooks/base/useUploadFile/index.js +1 -0
- package/lib/hooks/base/useUploadFile/index.js.map +1 -1
- package/lib/hooks/store/useUploadTask/index.js +1 -1
- package/lib/hooks/store/useUploadTask/index.js.map +1 -1
- package/lib/index.css +101 -101
- package/package.json +1 -1
- package/es/api/resource/controller/ZiYuanGuanLi/getResourceV1ResourcesUrl.d.ts +0 -46
- package/es/api/resource/controller/ZiYuanGuanLi/getResourceV1ResourcesUrl.mjs +0 -24
- package/es/api/resource/controller/ZiYuanGuanLi/getResourceV1ResourcesUrl.mjs.map +0 -1
- package/es/api/resource/controller/ZiYuanGuanLi/useGetResourceV1ResourcesUrl.d.ts +0 -225
- package/es/api/resource/controller/ZiYuanGuanLi/useGetResourceV1ResourcesUrl.mjs +0 -34
- package/es/api/resource/controller/ZiYuanGuanLi/useGetResourceV1ResourcesUrl.mjs.map +0 -1
- package/lib/api/resource/controller/ZiYuanGuanLi/getResourceV1ResourcesUrl.d.ts +0 -46
- package/lib/api/resource/controller/ZiYuanGuanLi/getResourceV1ResourcesUrl.js +0 -26
- package/lib/api/resource/controller/ZiYuanGuanLi/getResourceV1ResourcesUrl.js.map +0 -1
- package/lib/api/resource/controller/ZiYuanGuanLi/useGetResourceV1ResourcesUrl.d.ts +0 -225
- package/lib/api/resource/controller/ZiYuanGuanLi/useGetResourceV1ResourcesUrl.js +0 -36
- package/lib/api/resource/controller/ZiYuanGuanLi/useGetResourceV1ResourcesUrl.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../packages/hooks/base/useUploadFile/index.ts"],"sourcesContent":["import axios from 'axios';\nimport { ref } from 'vue';\nimport { postResourceV1ResourcesUrl } from '@giime/api/resource/controller';\nimport { fileMd5, fileValidType, genFileId } from '@giime/utils/src/file';\nimport { GmMessage } from '@giime/components/src/plugins/message';\nimport { useGlobalConfig } from '@giime/hooks/base/useGlobalConfig';\nimport type {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../packages/hooks/base/useUploadFile/index.ts"],"sourcesContent":["import axios from 'axios';\nimport { ref } from 'vue';\nimport { postResourceV1ResourcesUrl } from '@giime/api/resource/controller';\nimport { fileMd5, fileValidType, genFileId } from '@giime/utils/src/file';\nimport { GmMessage } from '@giime/components/src/plugins/message';\nimport { useGlobalConfig } from '@giime/hooks/base/useGlobalConfig';\nimport type {\n UploadProgressEvent,\n UploadRawFile as ElUploadRawFile,\n UploadFile as ElUploadFile,\n UploadUserFile as ElUploadUserFile,\n UploadRequestOptions,\n} from 'element-plus';\n\nexport interface UploadRawFile extends ElUploadRawFile {\n md5?: string;\n}\n\nexport type UploadFile = Omit<ElUploadFile, 'raw'> & { raw?: UploadRawFile };\nexport type UploadFiles = UploadFile[];\n\nexport type UploadUserFile = Omit<ElUploadUserFile, 'raw'> & { raw?: UploadRawFile };\n\nexport interface UseUploadFileOptions {\n /**领域编码 */\n domainCode?: string;\n /**场景编码 */\n sceneCode?: string;\n /**接受上传的文件类型 */\n accept?: string;\n /**文件权限,默认继承桶 */\n acl?: string;\n /**是否禁止上传文件到存储桶 */\n disablePutFile?: boolean;\n /** */\n elOptions?: UploadRequestOptions;\n}\n\nexport const useUploadFile = () => {\n const isLoading = ref(false);\n const domainCode = useGlobalConfig('domainCode');\n const sceneCode = useGlobalConfig('sceneCode');\n // 存储每个文件的取消控制器\n const abortControllers = ref<Map<number, AbortController>>(new Map());\n\n const uploadFile = async (file: UploadRawFile, options?: UseUploadFileOptions) => {\n // 领域编码\n const uploadDomainCode = options?.domainCode ?? domainCode.value;\n const uploadSceneCode = (options?.sceneCode ?? sceneCode.value) || 'internal_oss';\n if (!uploadDomainCode) {\n GmMessage.error('领域编码不能为空');\n throw new Error('领域编码不能为空');\n }\n\n // 创建取消控制器\n const abortController = new AbortController();\n const fileKey = file.uid ?? genFileId();\n abortControllers.value.set(fileKey, abortController);\n\n try {\n isLoading.value = true;\n // 验证文件类型\n if (options?.accept && options?.accept !== '*') {\n const isValidType = fileValidType(file, options.accept);\n if (!isValidType) {\n GmMessage.error(`文件类型不支持,请上传 ${options.accept} 格式的文件`);\n throw new Error(`文件类型不支持,请上传 ${options.accept} 格式的文件`);\n }\n }\n const md5 = await fileMd5(file);\n file.md5 = md5;\n const acl = options?.acl || 'default';\n const contentType = file.type || 'application/octet-stream';\n const { data } = await postResourceV1ResourcesUrl({\n domainCode: uploadDomainCode, // 领域编码\n sceneCode: uploadSceneCode, // 场景编码\n fileName: file.name,\n contentType,\n md5,\n size: file.size,\n acl, // 文件权限\n });\n\n if (data.data.uploadUrl) {\n try {\n await axios.put(data.data.uploadUrl, file, {\n headers: {\n 'Content-Type': contentType,\n 'x-oss-object-acl ': acl,\n 'Cache-Control': 'max-age=2592000',\n },\n signal: abortController.signal,\n onUploadProgress: progressEvent => {\n const progressEvt = progressEvent.event as UploadProgressEvent;\n progressEvt.percent = progressEvt.total > 0 ? (progressEvt.loaded / progressEvt.total) * 100 : 0;\n options?.elOptions?.onProgress(progressEvent.event);\n },\n });\n } catch (error: any) {\n // 如果是取消请求,不显示错误信息\n if (axios.isCancel(error) || error?.name === 'AbortError') {\n console.log('上传请求已取消');\n throw error;\n }\n GmMessage.error('推送至存储桶失败,请重试');\n throw error;\n }\n }\n\n return data.data;\n } finally {\n // 清理取消控制器\n abortControllers.value.delete(fileKey);\n isLoading.value = false;\n }\n };\n // 取消上传请求\n const cancelUpload = (fileUid: number) => {\n const abortController = abortControllers.value.get(fileUid);\n if (abortController) {\n abortController.abort();\n abortControllers.value.delete(fileUid);\n }\n };\n\n // 取消所有上传请求\n const cancelAllUploads = () => {\n abortControllers.value.forEach(controller => {\n controller.abort();\n });\n abortControllers.value.clear();\n };\n\n return {\n isLoading,\n uploadFile,\n cancelUpload,\n cancelAllUploads,\n };\n};\n"],"names":["ref","useGlobalConfig","file","GmMessage","genFileId","fileValidType","fileMd5","postResourceV1ResourcesUrl"],"mappings":"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"}
|
|
@@ -11,7 +11,7 @@ const useUploadTaskStore = pinia.defineStore("uploadTaskS", () => {
|
|
|
11
11
|
const uploadFileTask = async (file, options) => {
|
|
12
12
|
try {
|
|
13
13
|
const data = await uploadFile(file, options);
|
|
14
|
-
uploadResult.trigger(data);
|
|
14
|
+
uploadResult.trigger({ ...data, file });
|
|
15
15
|
return data;
|
|
16
16
|
} catch (error) {
|
|
17
17
|
uploadError.trigger(error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../packages/hooks/store/useUploadTask/index.ts"],"sourcesContent":["import { defineStore } from 'pinia';\nimport { createEventHook } from '@vueuse/core';\nimport { useUploadFile } from '../../base/useUploadFile';\nimport type { UseUploadFileOptions } from '../../base/useUploadFile';\nimport type { UploadRawFile } from 'element-plus';\n\n/**\n * 文件上传Hook\n */\nexport const useUploadTaskStore = defineStore('uploadTaskS', () => {\n const { isLoading, uploadFile, cancelUpload, cancelAllUploads } = useUploadFile();\n\n // 创建事件钩子\n const uploadResult = createEventHook();\n const uploadError = createEventHook();\n\n const uploadFileTask = async (file: UploadRawFile, options?: UseUploadFileOptions) => {\n try {\n const data = await uploadFile(file, options);\n\n uploadResult.trigger(data);\n return data;\n } catch (error) {\n uploadError.trigger(error);\n return error;\n }\n };\n\n return {\n // 事件监听器\n uploadResult: uploadResult.on,\n uploadError: uploadError.on,\n\n // 主要方法\n uploadFileTask,\n cancelUpload,\n cancelAllUploads,\n isLoading,\n };\n});\n"],"names":["defineStore","useUploadFile","createEventHook"],"mappings":";;;;;;AASa,MAAA,kBAAA,GAAqBA,iBAAY,CAAA,aAAA,EAAe,MAAM;AACjE,EAAA,MAAM,EAAE,SAAW,EAAA,UAAA,EAAY,YAAc,EAAA,gBAAA,KAAqBC,mBAAc,EAAA,CAAA;AAGhF,EAAA,MAAM,eAAeC,oBAAgB,EAAA,CAAA;AACrC,EAAA,MAAM,cAAcA,oBAAgB,EAAA,CAAA;AAEpC,EAAM,MAAA,cAAA,GAAiB,OAAO,IAAA,EAAqB,OAAmC,KAAA;AACpF,IAAI,IAAA;AACF,MAAA,MAAM,IAAO,GAAA,MAAM,UAAW,CAAA,IAAA,EAAM,OAAO,CAAA,CAAA;AAE3C,MAAA,YAAA,CAAa,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../packages/hooks/store/useUploadTask/index.ts"],"sourcesContent":["import { defineStore } from 'pinia';\nimport { createEventHook } from '@vueuse/core';\nimport { useUploadFile } from '../../base/useUploadFile';\nimport type { UseUploadFileOptions } from '../../base/useUploadFile';\nimport type { UploadRawFile } from 'element-plus';\n\n/**\n * 文件上传Hook\n */\nexport const useUploadTaskStore = defineStore('uploadTaskS', () => {\n const { isLoading, uploadFile, cancelUpload, cancelAllUploads } = useUploadFile();\n\n // 创建事件钩子\n const uploadResult = createEventHook();\n const uploadError = createEventHook();\n\n const uploadFileTask = async (file: UploadRawFile, options?: UseUploadFileOptions) => {\n try {\n const data = await uploadFile(file, options);\n\n uploadResult.trigger({ ...data, file });\n return data;\n } catch (error) {\n uploadError.trigger(error);\n return error;\n }\n };\n\n return {\n // 事件监听器\n uploadResult: uploadResult.on,\n uploadError: uploadError.on,\n\n // 主要方法\n uploadFileTask,\n cancelUpload,\n cancelAllUploads,\n isLoading,\n };\n});\n"],"names":["defineStore","useUploadFile","createEventHook"],"mappings":";;;;;;AASa,MAAA,kBAAA,GAAqBA,iBAAY,CAAA,aAAA,EAAe,MAAM;AACjE,EAAA,MAAM,EAAE,SAAW,EAAA,UAAA,EAAY,YAAc,EAAA,gBAAA,KAAqBC,mBAAc,EAAA,CAAA;AAGhF,EAAA,MAAM,eAAeC,oBAAgB,EAAA,CAAA;AACrC,EAAA,MAAM,cAAcA,oBAAgB,EAAA,CAAA;AAEpC,EAAM,MAAA,cAAA,GAAiB,OAAO,IAAA,EAAqB,OAAmC,KAAA;AACpF,IAAI,IAAA;AACF,MAAA,MAAM,IAAO,GAAA,MAAM,UAAW,CAAA,IAAA,EAAM,OAAO,CAAA,CAAA;AAE3C,MAAA,YAAA,CAAa,OAAQ,CAAA,EAAE,GAAG,IAAA,EAAM,MAAM,CAAA,CAAA;AACtC,MAAO,OAAA,IAAA,CAAA;AAAA,aACA,KAAO,EAAA;AACd,MAAA,WAAA,CAAY,QAAQ,KAAK,CAAA,CAAA;AACzB,MAAO,OAAA,KAAA,CAAA;AAAA,KACT;AAAA,GACF,CAAA;AAEA,EAAO,OAAA;AAAA;AAAA,IAEL,cAAc,YAAa,CAAA,EAAA;AAAA,IAC3B,aAAa,WAAY,CAAA,EAAA;AAAA;AAAA,IAGzB,cAAA;AAAA,IACA,YAAA;AAAA,IACA,gBAAA;AAAA,IACA,SAAA;AAAA,GACF,CAAA;AACF,CAAC;;;;"}
|
package/lib/index.css
CHANGED
|
@@ -873,12 +873,18 @@ video {
|
|
|
873
873
|
.gm-group:hover .group-hover\:gm-block {
|
|
874
874
|
display: block;
|
|
875
875
|
}
|
|
876
|
-
|
|
877
|
-
|
|
876
|
+
|
|
877
|
+
.gm-range-number .el-form-item[data-v-1ae16d96] {
|
|
878
|
+
margin: 0;
|
|
878
879
|
}
|
|
879
880
|
|
|
880
|
-
.gm-
|
|
881
|
-
|
|
881
|
+
.gm-upload-pro-preview-dialog[data-v-40d129e4] [data-v-40d129e4] .el-dialog__body {
|
|
882
|
+
padding: 0;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
.gm-upload-pro-file-picture-card[data-v-40d129e4] [data-v-40d129e4] .el-upload-list__item, .gm-upload-pro-file-picture-card[data-v-40d129e4] [data-v-40d129e4] .el-upload--picture-card {
|
|
886
|
+
width: auto;
|
|
887
|
+
height: auto;
|
|
882
888
|
}
|
|
883
889
|
.circular[data-v-d7b04fae] {
|
|
884
890
|
animation: loading-rotate-d7b04fae 2s linear infinite;
|
|
@@ -911,19 +917,6 @@ video {
|
|
|
911
917
|
stroke-dashoffset: -120px;
|
|
912
918
|
}
|
|
913
919
|
}
|
|
914
|
-
|
|
915
|
-
.gm-range-number .el-form-item[data-v-1ae16d96] {
|
|
916
|
-
margin: 0;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
.gm-upload-pro-preview-dialog[data-v-e2251a0c] [data-v-e2251a0c] .el-dialog__body {
|
|
920
|
-
padding: 0;
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
.gm-upload-pro-file-picture-card[data-v-e2251a0c] [data-v-e2251a0c] .el-upload-list__item, .gm-upload-pro-file-picture-card[data-v-e2251a0c] [data-v-e2251a0c] .el-upload--picture-card {
|
|
924
|
-
width: auto;
|
|
925
|
-
height: auto;
|
|
926
|
-
}
|
|
927
920
|
.gm-upload-pro-file {
|
|
928
921
|
line-height: normal;
|
|
929
922
|
}
|
|
@@ -962,10 +955,66 @@ video {
|
|
|
962
955
|
.gm-upload-pro-file-disabled .el-upload-list__item-status-label {
|
|
963
956
|
display: none;
|
|
964
957
|
}
|
|
958
|
+
.gm-flex-center[data-v-c17deec9] {
|
|
959
|
+
align-items: center;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.gm-flex-justify-between[data-v-c17deec9] {
|
|
963
|
+
justify-content: space-between;
|
|
964
|
+
}
|
|
965
965
|
[data-v-488ca110] .gmSearchForm .el-form-item {
|
|
966
966
|
margin-right: 0;
|
|
967
967
|
margin-bottom: 4px;
|
|
968
968
|
}
|
|
969
|
+
.gm-number-interval-single[data-v-4e6f4d6f] {
|
|
970
|
+
border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
|
|
971
|
+
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
|
972
|
+
background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
|
|
973
|
+
}
|
|
974
|
+
.gm-number-interval-single[data-v-4e6f4d6f] [data-v-4e6f4d6f] .el-input__wrapper {
|
|
975
|
+
box-shadow: none;
|
|
976
|
+
background: none;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
.gm-number-interval-close[data-v-4e6f4d6f] {
|
|
980
|
+
display: none;
|
|
981
|
+
color: var(--el-input-icon-color, var(--el-text-color-placeholder));
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.gm-number-interval-single[data-v-4e6f4d6f]:hover .gm-number-interval-close[data-v-4e6f4d6f] {
|
|
985
|
+
display: flex;
|
|
986
|
+
}
|
|
987
|
+
.gm-upload-preview-dialog[data-v-312f9322] [data-v-312f9322] .el-dialog__body {
|
|
988
|
+
padding: 0;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
.gm-upload-file-picture-card[data-v-312f9322] [data-v-312f9322] .el-upload-list__item, .gm-upload-file-picture-card[data-v-312f9322] [data-v-312f9322] .el-upload--picture-card {
|
|
992
|
+
width: auto;
|
|
993
|
+
height: auto;
|
|
994
|
+
}
|
|
995
|
+
[data-v-98c2e804] .gmTableNoBorder .el-table__body .el-table__cell {
|
|
996
|
+
border-right: none;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
[data-v-98c2e804] .gmTableNoBorder .el-table__inner-wrapper:before {
|
|
1000
|
+
height: 0;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
[data-v-98c2e804] .gmTableNoBorder.el-table--border .el-table__inner-wrapper:after {
|
|
1004
|
+
height: 0;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
[data-v-98c2e804] .gmTableNoBorder.el-table--border:after {
|
|
1008
|
+
height: 0;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
[data-v-98c2e804] .gmTableNoBorder.el-table--border:before {
|
|
1012
|
+
height: 0;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
[data-v-98c2e804] .gmTableNoBorder .el-table__border-left-patch {
|
|
1016
|
+
height: 0;
|
|
1017
|
+
}
|
|
969
1018
|
[data-v-2c351ff8] .gmTableNoBorder .el-table__body .el-table__cell {
|
|
970
1019
|
border-right: none;
|
|
971
1020
|
}
|
|
@@ -989,33 +1038,50 @@ video {
|
|
|
989
1038
|
[data-v-2c351ff8] .gmTableNoBorder .el-table__border-left-patch {
|
|
990
1039
|
height: 0;
|
|
991
1040
|
}
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
background: #fff;
|
|
995
|
-
padding-top: 12px;
|
|
1041
|
+
.gm-upload-file {
|
|
1042
|
+
line-height: normal;
|
|
996
1043
|
}
|
|
997
|
-
.
|
|
998
|
-
|
|
1044
|
+
.gm-upload-file .el-checkbox {
|
|
1045
|
+
position: absolute;
|
|
1046
|
+
left: 10px;
|
|
1047
|
+
top: 0;
|
|
1048
|
+
z-index: 9;
|
|
999
1049
|
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
|
|
1003
|
-
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
|
1004
|
-
background-color: var(--el-input-bg-color, var(--el-fill-color-blank));
|
|
1050
|
+
.gm-upload-file .el-upload-list--picture-card {
|
|
1051
|
+
gap: 10px;
|
|
1005
1052
|
}
|
|
1006
|
-
.gm-
|
|
1007
|
-
|
|
1008
|
-
|
|
1053
|
+
.gm-upload-file .el-upload-list__item {
|
|
1054
|
+
margin: 0;
|
|
1055
|
+
}
|
|
1056
|
+
.gm-upload-file .el-upload-list__item-file-name {
|
|
1057
|
+
line-height: normal;
|
|
1058
|
+
}
|
|
1059
|
+
.gm-upload-file .el-upload-dragger {
|
|
1060
|
+
padding: 0;
|
|
1061
|
+
border: none;
|
|
1062
|
+
width: 100%;
|
|
1063
|
+
height: 100%;
|
|
1064
|
+
display: flex;
|
|
1065
|
+
}
|
|
1066
|
+
.gm-upload-file .el-upload--picture-card {
|
|
1067
|
+
border: none;
|
|
1009
1068
|
}
|
|
1010
1069
|
|
|
1011
|
-
.gm-
|
|
1070
|
+
.gm-upload-file-disabled .el-upload--picture-card {
|
|
1071
|
+
display: none;
|
|
1072
|
+
}
|
|
1073
|
+
.gm-upload-file-disabled .el-upload-list__item-status-label {
|
|
1012
1074
|
display: none;
|
|
1013
|
-
color: var(--el-input-icon-color, var(--el-text-color-placeholder));
|
|
1014
1075
|
}
|
|
1015
1076
|
|
|
1016
|
-
.
|
|
1017
|
-
|
|
1077
|
+
.pagination-container[data-v-47d35e7b] {
|
|
1078
|
+
background: #fff;
|
|
1079
|
+
padding-top: 12px;
|
|
1080
|
+
}
|
|
1081
|
+
.pagination-container.hidden[data-v-47d35e7b] {
|
|
1082
|
+
display: none;
|
|
1018
1083
|
}
|
|
1084
|
+
|
|
1019
1085
|
@charset "UTF-8";
|
|
1020
1086
|
.custom-operate-drawer .el-drawer__header {
|
|
1021
1087
|
padding: 10px 15px;
|
|
@@ -1072,29 +1138,6 @@ video {
|
|
|
1072
1138
|
border-radius: 10px;
|
|
1073
1139
|
background: #eee;
|
|
1074
1140
|
}
|
|
1075
|
-
[data-v-98c2e804] .gmTableNoBorder .el-table__body .el-table__cell {
|
|
1076
|
-
border-right: none;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
[data-v-98c2e804] .gmTableNoBorder .el-table__inner-wrapper:before {
|
|
1080
|
-
height: 0;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
[data-v-98c2e804] .gmTableNoBorder.el-table--border .el-table__inner-wrapper:after {
|
|
1084
|
-
height: 0;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
[data-v-98c2e804] .gmTableNoBorder.el-table--border:after {
|
|
1088
|
-
height: 0;
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
[data-v-98c2e804] .gmTableNoBorder.el-table--border:before {
|
|
1092
|
-
height: 0;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
[data-v-98c2e804] .gmTableNoBorder .el-table__border-left-patch {
|
|
1096
|
-
height: 0;
|
|
1097
|
-
}
|
|
1098
1141
|
@charset "UTF-8";
|
|
1099
1142
|
.table-custom-header-drawer .el-drawer__header {
|
|
1100
1143
|
padding: 10px 15px;
|
|
@@ -1150,47 +1193,4 @@ video {
|
|
|
1150
1193
|
box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);
|
|
1151
1194
|
border-radius: 10px;
|
|
1152
1195
|
background: #eee;
|
|
1153
|
-
}
|
|
1154
|
-
.gm-upload-preview-dialog[data-v-12e65ac7] [data-v-12e65ac7] .el-dialog__body {
|
|
1155
|
-
padding: 0;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
.gm-upload-file-picture-card[data-v-12e65ac7] [data-v-12e65ac7] .el-upload-list__item, .gm-upload-file-picture-card[data-v-12e65ac7] [data-v-12e65ac7] .el-upload--picture-card {
|
|
1159
|
-
width: auto;
|
|
1160
|
-
height: auto;
|
|
1161
|
-
}
|
|
1162
|
-
.gm-upload-file {
|
|
1163
|
-
line-height: normal;
|
|
1164
|
-
}
|
|
1165
|
-
.gm-upload-file .el-checkbox {
|
|
1166
|
-
position: absolute;
|
|
1167
|
-
left: 10px;
|
|
1168
|
-
top: 0;
|
|
1169
|
-
z-index: 9;
|
|
1170
|
-
}
|
|
1171
|
-
.gm-upload-file .el-upload-list--picture-card {
|
|
1172
|
-
gap: 10px;
|
|
1173
|
-
}
|
|
1174
|
-
.gm-upload-file .el-upload-list__item {
|
|
1175
|
-
margin: 0;
|
|
1176
|
-
}
|
|
1177
|
-
.gm-upload-file .el-upload-list__item-file-name {
|
|
1178
|
-
line-height: normal;
|
|
1179
|
-
}
|
|
1180
|
-
.gm-upload-file .el-upload-dragger {
|
|
1181
|
-
padding: 0;
|
|
1182
|
-
border: none;
|
|
1183
|
-
width: 100%;
|
|
1184
|
-
height: 100%;
|
|
1185
|
-
display: flex;
|
|
1186
|
-
}
|
|
1187
|
-
.gm-upload-file .el-upload--picture-card {
|
|
1188
|
-
border: none;
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
.gm-upload-file-disabled .el-upload--picture-card {
|
|
1192
|
-
display: none;
|
|
1193
|
-
}
|
|
1194
|
-
.gm-upload-file-disabled .el-upload-list__item-status-label {
|
|
1195
|
-
display: none;
|
|
1196
1196
|
}
|
package/package.json
CHANGED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type AxiosRequestConfig } from "axios";
|
|
2
|
-
/**
|
|
3
|
-
* 查询资源链接
|
|
4
|
-
* /resource/v1/resources/url
|
|
5
|
-
*/
|
|
6
|
-
export declare function getResourceV1ResourcesUrl(params: GetResourceV1ResourcesUrlParams, config?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<{
|
|
7
|
-
code: number;
|
|
8
|
-
bizCode: number;
|
|
9
|
-
data: {
|
|
10
|
-
url: string;
|
|
11
|
-
exists: boolean;
|
|
12
|
-
uploadUrl: string;
|
|
13
|
-
key: string;
|
|
14
|
-
};
|
|
15
|
-
msg: string;
|
|
16
|
-
}, any>>;
|
|
17
|
-
export interface GetResourceV1ResourcesUrlParams {
|
|
18
|
-
/** 领域编码 */
|
|
19
|
-
domainCode: string;
|
|
20
|
-
/** 文件名 */
|
|
21
|
-
fileName?: string;
|
|
22
|
-
/** 内容类型 */
|
|
23
|
-
contentType: string;
|
|
24
|
-
/** 文件MD5值 */
|
|
25
|
-
md5: string;
|
|
26
|
-
/** 文件大小(字节) */
|
|
27
|
-
size: number;
|
|
28
|
-
/** 文件权限,默认继承桶 */
|
|
29
|
-
acl?: string;
|
|
30
|
-
/** 场景编码 */
|
|
31
|
-
sceneCode?: string;
|
|
32
|
-
/** 有效期限,时间毫秒数 */
|
|
33
|
-
expires?: number;
|
|
34
|
-
/** 是否覆盖同名文件 0 否 1 是 */
|
|
35
|
-
cover?: number;
|
|
36
|
-
/** 元数据 */
|
|
37
|
-
metaData?: GetResourceV1ResourcesUrlParamsMetaData;
|
|
38
|
-
/** 扩展数据 */
|
|
39
|
-
extData?: GetResourceV1ResourcesUrlParamsExtData;
|
|
40
|
-
}
|
|
41
|
-
export interface GetResourceV1ResourcesUrlParamsMetaData {
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
}
|
|
44
|
-
export interface GetResourceV1ResourcesUrlParamsExtData {
|
|
45
|
-
[key: string]: any;
|
|
46
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import service from '../../request.mjs';
|
|
2
|
-
|
|
3
|
-
function getResourceV1ResourcesUrl(params, config) {
|
|
4
|
-
const paramsInput = {
|
|
5
|
-
domainCode: params.domainCode,
|
|
6
|
-
fileName: params.fileName,
|
|
7
|
-
contentType: params.contentType,
|
|
8
|
-
md5: params.md5,
|
|
9
|
-
size: params.size,
|
|
10
|
-
acl: params.acl,
|
|
11
|
-
sceneCode: params.sceneCode,
|
|
12
|
-
expires: params.expires,
|
|
13
|
-
cover: params.cover,
|
|
14
|
-
...params.metaData,
|
|
15
|
-
...params.extData
|
|
16
|
-
};
|
|
17
|
-
return service.get(`/resource/v1/resources/url`, {
|
|
18
|
-
params: paramsInput,
|
|
19
|
-
...config
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { getResourceV1ResourcesUrl };
|
|
24
|
-
//# sourceMappingURL=getResourceV1ResourcesUrl.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getResourceV1ResourcesUrl.mjs","sources":["../../../../../../../packages/api/resource/controller/ZiYuanGuanLi/getResourceV1ResourcesUrl.ts"],"sourcesContent":["import request from \"@giime/api/resource/request\";\nimport { type RResourceUrlResponse, type DeepRequired } from \"../../interface\";\nimport { type AxiosRequestConfig } from \"axios\";\n\n/**\n * 查询资源链接\n * /resource/v1/resources/url\n */\nexport function getResourceV1ResourcesUrl(params: GetResourceV1ResourcesUrlParams, config?: AxiosRequestConfig) {\n const paramsInput = {\n domainCode: params.domainCode,\n fileName: params.fileName,\n contentType: params.contentType,\n md5: params.md5,\n size: params.size,\n acl: params.acl,\n sceneCode: params.sceneCode,\n expires: params.expires,\n cover: params.cover,\n ...params.metaData,\n ...params.extData,\n };\n return request.get<DeepRequired<RResourceUrlResponse>>(`/resource/v1/resources/url`, {\n params: paramsInput,\n ...config,\n });\n}\n\nexport interface GetResourceV1ResourcesUrlParams {\n /** 领域编码 */\n domainCode: string;\n /** 文件名 */\n fileName?: string;\n /** 内容类型 */\n contentType: string;\n /** 文件MD5值 */\n md5: string;\n /** 文件大小(字节) */\n size: number;\n /** 文件权限,默认继承桶 */\n acl?: string;\n /** 场景编码 */\n sceneCode?: string;\n /** 有效期限,时间毫秒数 */\n expires?: number;\n /** 是否覆盖同名文件 0 否 1 是 */\n cover?: number;\n /** 元数据 */\n metaData?: GetResourceV1ResourcesUrlParamsMetaData;\n /** 扩展数据 */\n extData?: GetResourceV1ResourcesUrlParamsExtData;\n}\n\nexport interface GetResourceV1ResourcesUrlParamsMetaData {\n [key: string]: any;\n}\n\nexport interface GetResourceV1ResourcesUrlParamsExtData {\n [key: string]: any;\n}\n"],"names":["request"],"mappings":";;AAQgB,SAAA,yBAAA,CAA0B,QAAyC,MAA6B,EAAA;AAC5G,EAAA,MAAM,WAAc,GAAA;AAAA,IAChB,YAAY,MAAO,CAAA,UAAA;AAAA,IACnB,UAAU,MAAO,CAAA,QAAA;AAAA,IACjB,aAAa,MAAO,CAAA,WAAA;AAAA,IACpB,KAAK,MAAO,CAAA,GAAA;AAAA,IACZ,MAAM,MAAO,CAAA,IAAA;AAAA,IACb,KAAK,MAAO,CAAA,GAAA;AAAA,IACZ,WAAW,MAAO,CAAA,SAAA;AAAA,IAClB,SAAS,MAAO,CAAA,OAAA;AAAA,IAChB,OAAO,MAAO,CAAA,KAAA;AAAA,IACd,GAAG,MAAO,CAAA,QAAA;AAAA,IACV,GAAG,MAAO,CAAA,OAAA;AAAA,GACd,CAAA;AACA,EAAO,OAAAA,OAAA,CAAQ,IAAwC,CAA8B,0BAAA,CAAA,EAAA;AAAA,IACjF,MAAQ,EAAA,WAAA;AAAA,IACR,GAAG,MAAA;AAAA,GACN,CAAA,CAAA;AACL;;;;"}
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { type UseAxiosOptions } from "../../../../hooks/base/useAxios";
|
|
2
|
-
import { type AxiosRequestConfig } from "axios";
|
|
3
|
-
import { type DeepRequired, type RResourceUrlResponse } from "../../interface";
|
|
4
|
-
import { type GetResourceV1ResourcesUrlParams } from "./getResourceV1ResourcesUrl";
|
|
5
|
-
/**
|
|
6
|
-
* 查询资源链接
|
|
7
|
-
* /resource/v1/resources/url
|
|
8
|
-
*/
|
|
9
|
-
export declare function useGetResourceV1ResourcesUrl(config?: AxiosRequestConfig, options?: UseAxiosOptions<DeepRequired<RResourceUrlResponse>>): {
|
|
10
|
-
exec: (params: GetResourceV1ResourcesUrlParams, axiosConfig?: AxiosRequestConfig) => Promise<import("../../../../hooks/base/useAxios").StrictUseAxiosReturn<{
|
|
11
|
-
code: number;
|
|
12
|
-
bizCode: number;
|
|
13
|
-
data: {
|
|
14
|
-
url: string;
|
|
15
|
-
exists: boolean;
|
|
16
|
-
uploadUrl: string;
|
|
17
|
-
key: string;
|
|
18
|
-
};
|
|
19
|
-
msg: string;
|
|
20
|
-
}, import("axios").AxiosResponse<{
|
|
21
|
-
code: number;
|
|
22
|
-
bizCode: number;
|
|
23
|
-
data: {
|
|
24
|
-
url: string;
|
|
25
|
-
exists: boolean;
|
|
26
|
-
uploadUrl: string;
|
|
27
|
-
key: string;
|
|
28
|
-
};
|
|
29
|
-
msg: string;
|
|
30
|
-
}, any>, any, import("../../../../hooks/base/useAxios").UseAxiosOptionsBase<{
|
|
31
|
-
code: number;
|
|
32
|
-
bizCode: number;
|
|
33
|
-
data: {
|
|
34
|
-
url: string;
|
|
35
|
-
exists: boolean;
|
|
36
|
-
uploadUrl: string;
|
|
37
|
-
key: string;
|
|
38
|
-
};
|
|
39
|
-
msg: string;
|
|
40
|
-
}>>>;
|
|
41
|
-
execute: (url?: string | AxiosRequestConfig<any> | undefined, config?: AxiosRequestConfig<any> | undefined) => Promise<import("../../../../hooks/base/useAxios").StrictUseAxiosReturn<{
|
|
42
|
-
code: number;
|
|
43
|
-
bizCode: number;
|
|
44
|
-
data: {
|
|
45
|
-
url: string;
|
|
46
|
-
exists: boolean;
|
|
47
|
-
uploadUrl: string;
|
|
48
|
-
key: string;
|
|
49
|
-
};
|
|
50
|
-
msg: string;
|
|
51
|
-
}, import("axios").AxiosResponse<{
|
|
52
|
-
code: number;
|
|
53
|
-
bizCode: number;
|
|
54
|
-
data: {
|
|
55
|
-
url: string;
|
|
56
|
-
exists: boolean;
|
|
57
|
-
uploadUrl: string;
|
|
58
|
-
key: string;
|
|
59
|
-
};
|
|
60
|
-
msg: string;
|
|
61
|
-
}, any>, any, import("../../../../hooks/base/useAxios").UseAxiosOptionsBase<{
|
|
62
|
-
code: number;
|
|
63
|
-
bizCode: number;
|
|
64
|
-
data: {
|
|
65
|
-
url: string;
|
|
66
|
-
exists: boolean;
|
|
67
|
-
uploadUrl: string;
|
|
68
|
-
key: string;
|
|
69
|
-
};
|
|
70
|
-
msg: string;
|
|
71
|
-
}>>>;
|
|
72
|
-
response: import("vue").ShallowRef<import("axios").AxiosResponse<{
|
|
73
|
-
code: number;
|
|
74
|
-
bizCode: number;
|
|
75
|
-
data: {
|
|
76
|
-
url: string;
|
|
77
|
-
exists: boolean;
|
|
78
|
-
uploadUrl: string;
|
|
79
|
-
key: string;
|
|
80
|
-
};
|
|
81
|
-
msg: string;
|
|
82
|
-
}, any> | undefined>;
|
|
83
|
-
data: import("vue").Ref<{
|
|
84
|
-
code: number;
|
|
85
|
-
bizCode: number;
|
|
86
|
-
data: {
|
|
87
|
-
url: string;
|
|
88
|
-
exists: boolean;
|
|
89
|
-
uploadUrl: string;
|
|
90
|
-
key: string;
|
|
91
|
-
};
|
|
92
|
-
msg: string;
|
|
93
|
-
} | undefined>;
|
|
94
|
-
isFinished: import("vue").Ref<boolean>;
|
|
95
|
-
isLoading: import("vue").Ref<boolean>;
|
|
96
|
-
isAborted: import("vue").Ref<boolean>;
|
|
97
|
-
error: import("vue").ShallowRef<unknown>;
|
|
98
|
-
abort: (message?: string | undefined) => void;
|
|
99
|
-
cancel: (message?: string | undefined) => void;
|
|
100
|
-
isCanceled: import("vue").Ref<boolean>;
|
|
101
|
-
then<TResult1 = import("../../../../hooks/base/useAxios").StrictUseAxiosReturn<{
|
|
102
|
-
code: number;
|
|
103
|
-
bizCode: number;
|
|
104
|
-
data: {
|
|
105
|
-
url: string;
|
|
106
|
-
exists: boolean;
|
|
107
|
-
uploadUrl: string;
|
|
108
|
-
key: string;
|
|
109
|
-
};
|
|
110
|
-
msg: string;
|
|
111
|
-
}, import("axios").AxiosResponse<{
|
|
112
|
-
code: number;
|
|
113
|
-
bizCode: number;
|
|
114
|
-
data: {
|
|
115
|
-
url: string;
|
|
116
|
-
exists: boolean;
|
|
117
|
-
uploadUrl: string;
|
|
118
|
-
key: string;
|
|
119
|
-
};
|
|
120
|
-
msg: string;
|
|
121
|
-
}, any>, any, import("../../../../hooks/base/useAxios").UseAxiosOptionsBase<{
|
|
122
|
-
code: number;
|
|
123
|
-
bizCode: number;
|
|
124
|
-
data: {
|
|
125
|
-
url: string;
|
|
126
|
-
exists: boolean;
|
|
127
|
-
uploadUrl: string;
|
|
128
|
-
key: string;
|
|
129
|
-
};
|
|
130
|
-
msg: string;
|
|
131
|
-
}>>, TResult2 = never>(onfulfilled?: ((value: import("../../../../hooks/base/useAxios").StrictUseAxiosReturn<{
|
|
132
|
-
code: number;
|
|
133
|
-
bizCode: number;
|
|
134
|
-
data: {
|
|
135
|
-
url: string;
|
|
136
|
-
exists: boolean;
|
|
137
|
-
uploadUrl: string;
|
|
138
|
-
key: string;
|
|
139
|
-
};
|
|
140
|
-
msg: string;
|
|
141
|
-
}, import("axios").AxiosResponse<{
|
|
142
|
-
code: number;
|
|
143
|
-
bizCode: number;
|
|
144
|
-
data: {
|
|
145
|
-
url: string;
|
|
146
|
-
exists: boolean;
|
|
147
|
-
uploadUrl: string;
|
|
148
|
-
key: string;
|
|
149
|
-
};
|
|
150
|
-
msg: string;
|
|
151
|
-
}, any>, any, import("../../../../hooks/base/useAxios").UseAxiosOptionsBase<{
|
|
152
|
-
code: number;
|
|
153
|
-
bizCode: number;
|
|
154
|
-
data: {
|
|
155
|
-
url: string;
|
|
156
|
-
exists: boolean;
|
|
157
|
-
uploadUrl: string;
|
|
158
|
-
key: string;
|
|
159
|
-
};
|
|
160
|
-
msg: string;
|
|
161
|
-
}>>) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
|
|
162
|
-
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<import("../../../../hooks/base/useAxios").StrictUseAxiosReturn<{
|
|
163
|
-
code: number;
|
|
164
|
-
bizCode: number;
|
|
165
|
-
data: {
|
|
166
|
-
url: string;
|
|
167
|
-
exists: boolean;
|
|
168
|
-
uploadUrl: string;
|
|
169
|
-
key: string;
|
|
170
|
-
};
|
|
171
|
-
msg: string;
|
|
172
|
-
}, import("axios").AxiosResponse<{
|
|
173
|
-
code: number;
|
|
174
|
-
bizCode: number;
|
|
175
|
-
data: {
|
|
176
|
-
url: string;
|
|
177
|
-
exists: boolean;
|
|
178
|
-
uploadUrl: string;
|
|
179
|
-
key: string;
|
|
180
|
-
};
|
|
181
|
-
msg: string;
|
|
182
|
-
}, any>, any, import("../../../../hooks/base/useAxios").UseAxiosOptionsBase<{
|
|
183
|
-
code: number;
|
|
184
|
-
bizCode: number;
|
|
185
|
-
data: {
|
|
186
|
-
url: string;
|
|
187
|
-
exists: boolean;
|
|
188
|
-
uploadUrl: string;
|
|
189
|
-
key: string;
|
|
190
|
-
};
|
|
191
|
-
msg: string;
|
|
192
|
-
}>> | TResult>;
|
|
193
|
-
finally(onfinally?: (() => void) | null | undefined): Promise<import("../../../../hooks/base/useAxios").StrictUseAxiosReturn<{
|
|
194
|
-
code: number;
|
|
195
|
-
bizCode: number;
|
|
196
|
-
data: {
|
|
197
|
-
url: string;
|
|
198
|
-
exists: boolean;
|
|
199
|
-
uploadUrl: string;
|
|
200
|
-
key: string;
|
|
201
|
-
};
|
|
202
|
-
msg: string;
|
|
203
|
-
}, import("axios").AxiosResponse<{
|
|
204
|
-
code: number;
|
|
205
|
-
bizCode: number;
|
|
206
|
-
data: {
|
|
207
|
-
url: string;
|
|
208
|
-
exists: boolean;
|
|
209
|
-
uploadUrl: string;
|
|
210
|
-
key: string;
|
|
211
|
-
};
|
|
212
|
-
msg: string;
|
|
213
|
-
}, any>, any, import("../../../../hooks/base/useAxios").UseAxiosOptionsBase<{
|
|
214
|
-
code: number;
|
|
215
|
-
bizCode: number;
|
|
216
|
-
data: {
|
|
217
|
-
url: string;
|
|
218
|
-
exists: boolean;
|
|
219
|
-
uploadUrl: string;
|
|
220
|
-
key: string;
|
|
221
|
-
};
|
|
222
|
-
msg: string;
|
|
223
|
-
}>>>;
|
|
224
|
-
[Symbol.toStringTag]: string;
|
|
225
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { useAxios } from '../../../../hooks/base/useAxios/index.mjs';
|
|
2
|
-
import service from '../../request.mjs';
|
|
3
|
-
|
|
4
|
-
function useGetResourceV1ResourcesUrl(config, options) {
|
|
5
|
-
const useAxiosReturn = useAxios(
|
|
6
|
-
"/resource/v1/resources/url",
|
|
7
|
-
{ method: "get", ...config },
|
|
8
|
-
service,
|
|
9
|
-
{ immediate: false, ...options }
|
|
10
|
-
);
|
|
11
|
-
function exec(params, axiosConfig) {
|
|
12
|
-
const paramsInput = {
|
|
13
|
-
domainCode: params.domainCode,
|
|
14
|
-
fileName: params.fileName,
|
|
15
|
-
contentType: params.contentType,
|
|
16
|
-
md5: params.md5,
|
|
17
|
-
size: params.size,
|
|
18
|
-
acl: params.acl,
|
|
19
|
-
sceneCode: params.sceneCode,
|
|
20
|
-
expires: params.expires,
|
|
21
|
-
cover: params.cover,
|
|
22
|
-
...params.metaData,
|
|
23
|
-
...params.extData
|
|
24
|
-
};
|
|
25
|
-
return useAxiosReturn.execute({
|
|
26
|
-
params: paramsInput,
|
|
27
|
-
...axiosConfig
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return { ...useAxiosReturn, exec };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { useGetResourceV1ResourcesUrl };
|
|
34
|
-
//# sourceMappingURL=useGetResourceV1ResourcesUrl.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useGetResourceV1ResourcesUrl.mjs","sources":["../../../../../../../packages/api/resource/controller/ZiYuanGuanLi/useGetResourceV1ResourcesUrl.ts"],"sourcesContent":["import { type UseAxiosOptions, useAxios } from \"@giime/hooks/base/useAxios\";\nimport { type AxiosRequestConfig } from \"axios\";\nimport { type DeepRequired, type RResourceUrlResponse } from \"../../interface\";\nimport request from \"@giime/api/resource/request\";\nimport { type GetResourceV1ResourcesUrlParams } from \"./getResourceV1ResourcesUrl\";\n\n/**\n * 查询资源链接\n * /resource/v1/resources/url\n */\nexport function useGetResourceV1ResourcesUrl(config?: AxiosRequestConfig, options?: UseAxiosOptions<DeepRequired<RResourceUrlResponse>>) {\n const useAxiosReturn = useAxios<DeepRequired<RResourceUrlResponse>>(\n '/resource/v1/resources/url',\n { method: 'get', ...config },\n request,\n { immediate: false, ...options }\n )\n\n function exec(params: GetResourceV1ResourcesUrlParams, axiosConfig?: AxiosRequestConfig) {\n const paramsInput = {\n domainCode: params.domainCode,\n fileName: params.fileName,\n contentType: params.contentType,\n md5: params.md5,\n size: params.size,\n acl: params.acl,\n sceneCode: params.sceneCode,\n expires: params.expires,\n cover: params.cover,\n ...params.metaData,\n ...params.extData,\n };\n return useAxiosReturn.execute({\n params: paramsInput,\n ...axiosConfig,\n });\n }\n return { ...useAxiosReturn, exec };\n}\n"],"names":["request"],"mappings":";;;AAUgB,SAAA,4BAAA,CAA6B,QAA6B,OAA+D,EAAA;AACrI,EAAA,MAAM,cAAiB,GAAA,QAAA;AAAA,IACnB,4BAAA;AAAA,IACA,EAAE,MAAA,EAAQ,KAAO,EAAA,GAAG,MAAO,EAAA;AAAA,IAC3BA,OAAA;AAAA,IACA,EAAE,SAAA,EAAW,KAAO,EAAA,GAAG,OAAQ,EAAA;AAAA,GACnC,CAAA;AAEA,EAAS,SAAA,IAAA,CAAK,QAAyC,WAAkC,EAAA;AACrF,IAAA,MAAM,WAAc,GAAA;AAAA,MAChB,YAAY,MAAO,CAAA,UAAA;AAAA,MACnB,UAAU,MAAO,CAAA,QAAA;AAAA,MACjB,aAAa,MAAO,CAAA,WAAA;AAAA,MACpB,KAAK,MAAO,CAAA,GAAA;AAAA,MACZ,MAAM,MAAO,CAAA,IAAA;AAAA,MACb,KAAK,MAAO,CAAA,GAAA;AAAA,MACZ,WAAW,MAAO,CAAA,SAAA;AAAA,MAClB,SAAS,MAAO,CAAA,OAAA;AAAA,MAChB,OAAO,MAAO,CAAA,KAAA;AAAA,MACd,GAAG,MAAO,CAAA,QAAA;AAAA,MACV,GAAG,MAAO,CAAA,OAAA;AAAA,KACd,CAAA;AACA,IAAA,OAAO,eAAe,OAAQ,CAAA;AAAA,MAC1B,MAAQ,EAAA,WAAA;AAAA,MACR,GAAG,WAAA;AAAA,KACN,CAAA,CAAA;AAAA,GACL;AACA,EAAO,OAAA,EAAE,GAAG,cAAA,EAAgB,IAAK,EAAA,CAAA;AACrC;;;;"}
|