zhengyiming
9 天以前 1ba3a11308cf59c513d70fbc3608961f19a02621
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
<template>
  <div class="static-wrapper">
    <div class="static-wrapper-main">
      <div class="static-title-wrapper">
        <div class="static-title-left">
          <img v-if="props.titleIcon" :src="props.titleIcon" class="static-title-icon" />
          <div class="static-title">{{ title }}</div>
        </div>
        <div class="static-title-right">
          <slot name="title-right"></slot>
        </div>
      </div>
      <slot></slot>
    </div>
  </div>
</template>
 
<script setup lang="ts">
defineOptions({
  name: 'StaticBar',
});
 
type Props = {
  title?: string;
  titleIcon?: string;
};
 
const props = withDefaults(defineProps<Props>(), {});
</script>
 
<style lang="scss" scoped>
@use '@/style/common.scss' as *;
 
.static-wrapper {
  padding-bottom: 16px;
 
  .static-wrapper-main {
    padding: 20px boleGetCssVar('proTable', 'filter-bar-horizontal-padding');
    font-size: 18px;
    background-color: #ffffff;
 
    .static-title-wrapper {
      display: flex;
      align-items: center;
      width: 100%;
 
      .static-title-left {
        display: flex;
        align-items: center;
        min-width: 0;
        flex: 1;
 
        .static-title-icon {
          margin-right: 16px;
          width: 30px;
          height: 30px;
        }
 
        .static-title {
          min-width: 0;
          flex: 1;
          font-size: 18px;
          color: getCssVar('text-color', 'primary');
          @include utils-ellipsis;
        }
      }
    }
  }
}
</style>