hejianhao
2025-04-16 dab2d210ca06c1faa514c6388fbd5de1ab355360
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>
  <div
    class='box'
    :class="[{'mini':mini},{'large':large}]"
  >
    <h6>{{title}}</h6>
    <div class="m">
      <slot></slot>
    </div>
  </div>
</template>
 
<script>
export default {
  props: {
    title: { type: String, default: "" },
    mini: { type: Boolean, default: false },
    large: { type: Boolean, default: false },
  },
  components: {},
  data() {
    return {};
  },
  watch: {},
  methods: {},
  mounted() {},
};
</script>
<style lang='less' scoped>
.box {
  background-color: #fff;
  box-sizing: border-box;
  padding: 20px;
  box-shadow: 0 0 10px #f2f2f2;
  margin-bottom: 20px;
  &.mini {
    width: 500px;
    margin-right: 20px;
    height: 430px;
  }
  &.large {
    width: calc(~"100% - 520px");
    height: 430px;
    min-width: 600px;
  }
  h6 {
    line-height: 20px;
    height: 20px;
    font-size: 15px;
    padding: 20px;
    position: relative;
    padding-top: 0;
    margin-bottom: 15px;
    &::before {
      position: absolute;
      content: "";
      height: 20px;
      left: 0;
      width: 4px;
      background-color: #2bb7ff;
    }
  }
  &.mini,
  &.large {
    h6 {
      padding-left: 0;
      &::before {
        opacity: 0;
      }
    }
    .m {
      height: calc(~"100% - 55px");
    }
  }
  .m {
    position: relative;
  }
}
</style>