he wei
5 天以前 3c3576d5792bfabcef84979757ee344712e71cd3
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
<script setup>
import { ref } from "vue";
const props = defineProps({
    label: {
        type: String,
        default: "",
    },
    value: {
        type: String,
        default: "",
    },
});
</script>
 
<template>
  <div class="info">
    <div class="label">{{ label }}</div>
    <div class="value">
      <slot v-if="$slots.value" name="value" />
      <template v-else>{{ value }}</template>
    </div>
  </div>
</template>
 
<style scoped lang="less">
.info {
  display: flex;
  background: #193B69;
  height: 32px;
  font-size: 14px;
 
  .label {
    min-width: 6em;
    color: #fff;
    background: linear-gradient(#3476BE, #3476BE) left center e('/') 2px 100% no-repeat,
      linear-gradient(#1E497E, #1E497E) center center e('/') contain no-repeat;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding-right: 0.6em;
      &::after {
        content: ':';
      }
  }
 
  .value {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 1em;
    color: #48a5d0;
    background: linear-gradient(#3476BE, #3476BE) left center e('/') 2px 46% no-repeat,
        linear-gradient(#377ED2, #377ED2) right bottom e('/') 3px 3px no-repeat;
  }
}
</style>