feat: 更新 @riwa/api-types 依赖版本,添加文件预览组件到关于页面
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
"@elysiajs/eden": "^1.4.5",
|
||||
"@ionic/vue": "^8.7.11",
|
||||
"@ionic/vue-router": "^8.7.11",
|
||||
"@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz",
|
||||
"@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@vee-validate/zod": "^4.15.1",
|
||||
"@vueuse/core": "^14.1.0",
|
||||
|
||||
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@@ -69,8 +69,8 @@ importers:
|
||||
specifier: ^8.7.11
|
||||
version: 8.7.11(@stencil/core@4.39.0)(vue-router@4.6.3(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3))
|
||||
'@riwa/api-types':
|
||||
specifier: http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz
|
||||
version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))'
|
||||
specifier: http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz
|
||||
version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))'
|
||||
'@tailwindcss/vite':
|
||||
specifier: ^4.1.18
|
||||
version: 4.1.18(vite@7.2.7(@types/node@24.10.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.1)(yaml@2.8.2))
|
||||
@@ -2804,9 +2804,9 @@ packages:
|
||||
'@remirror/core-constants@3.0.0':
|
||||
resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==}
|
||||
|
||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz':
|
||||
resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz}
|
||||
version: 0.0.125
|
||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz':
|
||||
resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz}
|
||||
version: 0.0.126
|
||||
peerDependencies:
|
||||
'@elysiajs/eden': ^1.4.5
|
||||
|
||||
@@ -12161,7 +12161,7 @@ snapshots:
|
||||
|
||||
'@remirror/core-constants@3.0.0': {}
|
||||
|
||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
|
||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
|
||||
dependencies:
|
||||
'@elysiajs/eden': 1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3))
|
||||
|
||||
|
||||
@@ -3,18 +3,24 @@ import IcRoundDownload from "~icons/ic/round-download";
|
||||
import { client, safeClient } from "@/api";
|
||||
|
||||
const props = defineProps<{
|
||||
id: string;
|
||||
fileIds: string[];
|
||||
}>();
|
||||
|
||||
const { data } = await safeClient(client.api.file_storage({ id: props.id }).get());
|
||||
const { data } = safeClient(client.api.file_storage.access_urls.post({ fileIds: props.fileIds }));
|
||||
|
||||
function handleDownload(item) {
|
||||
window.open(item.url, "_blank");
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div>{{ data?.fileName }}</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
<div v-for="item in data" :key="item.id" class="p-3 bg-faint rounded-md flex items-center justify-between" @click="handleDownload(item)">
|
||||
<div class="text-success font-medium">
|
||||
{{ item.fileName }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<IcRoundDownload />
|
||||
<div><IcRoundDownload /></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -37,5 +37,6 @@ declare module "vue" {
|
||||
UiTextareaLabel: typeof import("./textarea-label/index.vue")["default"];
|
||||
UiBackButton: typeof import("./back-button/index.vue")["default"];
|
||||
UiEmpty: typeof import("./empty/index.vue")["default"];
|
||||
UiFilePreview: typeof import("./file-preview/index.vue")["default"];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,18 +5,16 @@ import { client, safeClient } from "@/api";
|
||||
const props = defineProps<{
|
||||
data: RwaData | null;
|
||||
}>();
|
||||
|
||||
const { data: file } = safeClient(client.api.file_storage({ id: props.data?.product.proofDocumentIds || "" }).get());
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="mt-2">
|
||||
<!-- document -->
|
||||
<div>
|
||||
<div class="font-semibold">
|
||||
<div class="font-semibold mb-4">
|
||||
相关文档
|
||||
</div>
|
||||
<a class="link" :href="file?.publicUrl || ''" target="_blank" rel="noopener noreferrer">{{ file?.fileName }}</a>
|
||||
|
||||
<ui-file-preview :file-ids="props.data?.product.proofDocumentIds || []" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user