fix(admin): 流程时间线附件图片改用 AuthImage 支持鉴权加载
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import AuthImage from '@/shared/components/business/AuthImage.vue'
|
||||
import { formatCentWithSymbol } from '@/shared/utils/money'
|
||||
import { formatDateTime } from '@/shared/utils/time'
|
||||
|
||||
@@ -535,13 +536,17 @@ function hasMore(item: ProcessTimelineEvent) {
|
||||
</details>
|
||||
|
||||
<div v-if="item.attachment_urls?.length" class="process-attachments">
|
||||
<el-image
|
||||
v-for="url in item.attachment_urls"
|
||||
<AuthImage
|
||||
v-for="(url, idx) in item.attachment_urls"
|
||||
:key="url"
|
||||
:src="url"
|
||||
:source="url"
|
||||
:preview-src-list="item.attachment_urls"
|
||||
:preview-initial-index="idx"
|
||||
preview-teleported
|
||||
fit="cover"
|
||||
admin
|
||||
image-class="attachment-img"
|
||||
fallback-class="attachment-fallback"
|
||||
/>
|
||||
</div>
|
||||
</article>
|
||||
@@ -1111,11 +1116,43 @@ function hasMore(item: ProcessTimelineEvent) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.process-attachments :deep(.el-image) {
|
||||
.process-attachments :deep(.attachment-img),
|
||||
.process-attachments :deep(.el-image),
|
||||
.process-attachments :deep(img) {
|
||||
width: 76px;
|
||||
height: 76px;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 6px;
|
||||
border-radius: 8px;
|
||||
object-fit: cover;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
transform 0.15s ease,
|
||||
box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
.process-attachments :deep(.attachment-img:hover),
|
||||
.process-attachments :deep(.el-image:hover),
|
||||
.process-attachments :deep(img:hover) {
|
||||
transform: scale(1.04);
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
||||
border-color: #cbd5e1;
|
||||
}
|
||||
|
||||
.process-attachments :deep(.attachment-fallback),
|
||||
.process-attachments :deep(.auth-image-fallback) {
|
||||
width: 76px;
|
||||
height: 76px;
|
||||
min-height: 76px;
|
||||
padding: 4px;
|
||||
border-radius: 8px;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
border: 1px dashed #d8dee8;
|
||||
background: #f8fafc;
|
||||
color: #94a3b8;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
|
||||
Reference in New Issue
Block a user