zhengyiming
2025-02-12 8ddaa42086bc67dac16ea596d212b79d3b832313
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
<template>
  <div class="bole-cell-wrapper">
    <div class="cell-title-wrapper" v-if="showTitle">
      <slot name="title">
        <div :class="titleSize === 'normal' ? 'cell-title' : 'cell-title-large'">{{ title }}</div>
        <slot name="title-right"></slot>
      </slot>
    </div>
    <slot></slot>
  </div>
</template>
 
<script setup lang="ts">
defineOptions({
  name: 'Cell',
});
 
type Props = {
  title?: string;
  titleSize?: 'large' | 'normal';
  showTitle?: boolean;
};
 
const props = withDefaults(defineProps<Props>(), {
  titleSize: 'normal',
  showTitle: true,
});
</script>
 
<style lang="scss">
@import '@/styles/common.scss';
 
.bole-cell-wrapper {
  background: #ffffff;
  border-radius: 12px;
  padding: 36px 34px;
  margin-bottom: 20px;
 
  .cell-title-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    justify-content: space-between;
 
    .cell-title {
      font-weight: 600;
      font-size: 28px;
      color: boleGetCssVar('text-color', 'primary');
      line-height: 40px;
      position: relative;
      z-index: 1;
      @include ellipsis;
 
      &::after {
        content: '';
        width: 100%;
        height: 16px;
        background: linear-gradient(90deg, #cfe4ff 0%, rgba(207, 228, 255, 0) 100%);
        border-radius: 8px;
        position: absolute;
        bottom: 0;
        left: 0;
        z-index: -1;
      }
    }
 
    .cell-title-large {
      font-weight: 600;
      font-size: 30px;
      color: boleGetCssVar('text-color', 'primary');
      line-height: 42px;
      @include ellipsis;
    }
  }
}
</style>