zhengyiming
2025-02-10 0f686ea1fe4700a909a6159efcf1fcb0e1f88a17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<template>
  <Card class="attention-card-wrapper">
    <div class="attention-card-inner">
      <InfoAvatar
        :src="avatarUrl ? setOSSLink(avatarUrl) : ''"
        :name="name"
        :company="enterpriseName"
        class="attention-card-avatar"
        :size="size"
      />
      <div class="attention-card-actions">
        <slot name="actions" />
      </div>
    </div>
  </Card>
</template>
 
<script setup lang="ts">
import Card from './Card.vue';
import { InfoAvatar } from '@12333/components';
import { setOSSLink } from '@12333/utils';
 
defineOptions({
  name: 'AttentionCard',
});
 
type Props = {
  avatarUrl?: string;
  name?: string;
  enterpriseName?: string;
  size?: 'normal' | 'small';
};
 
const props = withDefaults(defineProps<Props>(), {
  size: 'normal',
});
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.attention-card-wrapper {
  border-radius: 0;
  padding: 0 boleGetCssVar('size', 'body-padding-h');
  margin-bottom: 0;
 
  &:last-child {
    .attention-card-inner {
      border-bottom: none;
    }
  }
 
  .attention-card-inner {
    border-bottom: 2px solid #f6f6f6;
    padding: 32px 0;
    display: flex;
    align-items: center;
 
    .attention-card-avatar {
      flex: 1;
      min-width: 0;
    }
 
    .attention-card-actions {
      display: flex;
      align-items: center;
 
      .card-action {
        --nut-button-default-height: 48px;
        border: 2px solid boleGetCssVar('text-color', 'secondary');
        font-weight: bold;
        font-size: 24px;
        color: boleGetCssVar('text-color', 'primary');
        padding: 0 30px;
      }
    }
  }
}
</style>