u
This commit is contained in:
1 parent
32d423b759
commit
78eb811ff7
102 files changed
+12067
-209
No files matched your search
@@ -0,0 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
// 只读:隐藏上传 / 删除入口,只保留浏览与下载
|
||||
import { G3Attachment } from '@g3soft/ui'
|
||||
import type { AttachmentItem } from '@g3soft/ui'
|
||||
|
||||
const PHOTO = `data:image/svg+xml;utf8,${encodeURIComponent(
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" width="320" height="200"><rect width="320" height="200" fill="#dbeafe"/><text x="160" y="108" font-size="18" text-anchor="middle" fill="#1d4ed8">现场照片</text></svg>',
|
||||
)}`
|
||||
|
||||
const files: AttachmentItem[] = [
|
||||
{ id: 1, name: '立项批复.pdf', size: 320_000 },
|
||||
{ id: 2, name: '现场照片.jpg', size: 1_024_000, url: PHOTO },
|
||||
{ id: 3, name: '预算表.xlsx', size: 64_000 },
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- readonly 同时关掉「全选 / 批量删除 / 底栏上传」,拖拽与粘贴也会失效 -->
|
||||
<G3Attachment :files="files" readonly :height="420" />
|
||||
</template>
|
||||
Reference in new issue
Block a user