Commit 71ab99b2ddc2c42f0779e4cf714bf5017db437a6

Authored by ww
1 parent 1da996ec

perf: 分享徽标新增颜色区分

... ... @@ -28,6 +28,7 @@
28 28 import { ViewTypeNameEnum } from '../../common/ShareModal/config';
29 29 import { useModal } from '/@/components/Modal';
30 30 import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard';
  31 + import { ViewType } from '../../visual/board/config/panelDetail';
31 32
32 33 const listColumn = ref(5);
33 34
... ... @@ -231,7 +232,13 @@
231 232 </template>
232 233 <template #renderItem="{ item }">
233 234 <List.Item>
234   - <Card hoverable class="card-container">
  235 + <Card
  236 + :style="{
  237 + '--viewType': item.viewType === ViewType.PUBLIC_VIEW ? '#1890ff' : '#faad14',
  238 + }"
  239 + hoverable
  240 + class="card-container"
  241 + >
235 242 <template #cover>
236 243 <div
237 244 class="img-container h-full w-full !flex justify-center items-center text-center p-1 relative"
... ... @@ -360,6 +367,6 @@
360 367 }
361 368
362 369 .card-container:deep(.ant-card-cover) {
363   - background-color: #2db7f5;
  370 + background-color: var(--viewType);
364 371 }
365 372 </style>
... ...
... ... @@ -29,6 +29,7 @@
29 29 import { ShareModal } from '/@/views/common/ShareModal';
30 30 import { ViewTypeNameEnum } from '../common/ShareModal/config';
31 31 import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard';
  32 + import { ViewType } from '../visual/board/config/panelDetail';
32 33
33 34 const listColumn = ref(5);
34 35
... ... @@ -226,7 +227,12 @@
226 227 </template>
227 228 <template #renderItem="{ item }">
228 229 <List.Item>
229   - <Card class="card-container">
  230 + <Card
  231 + :style="{
  232 + '--viewType': item.viewType === ViewType.PUBLIC_VIEW ? '#1890ff' : '#faad14',
  233 + }"
  234 + class="card-container"
  235 + >
230 236 <template #cover>
231 237 <div class="h-full w-full relative hover-show-modal-content img-container">
232 238 <img
... ... @@ -424,6 +430,6 @@
424 430 }
425 431
426 432 .card-container:deep(.ant-card-cover) {
427   - background-color: #2db7f5;
  433 + background-color: var(--viewType);
428 434 }
429 435 </style>
... ...