zjf
2023-02-24 2126cd24b8a0174ac0597340917c0a4595f72254
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
<template>
  <div class="section">
    <div
      v-if="title && title.length > 0"
      class="section-header">
      <div
        :style="{ 'border-left-color': mColor }"
        class="section-mark"/>
      <div class="section-title">{{ title }}</div>
      <slot name="header"/>
    </div>
    <div class="content">
      <slot/>
    </div>
  </div>
</template>
<script type="text/javascript">
export default {
  name: 'CreateSections',
  components: {},
  props: {
    title: {
      type: String,
      default: ''
    },
    mColor: {
      type: String,
      default: '#4D88FF'
    }
  },
  data () {
    return {}
  },
  computed: {},
  mounted () {},
  methods: {}
}
</script>
<style lang="less" scoped>
.section {
  position: relative;
  background-color: white;
  margin-top: 8px;
}
.section:first-child {
  margin-top: 0;
}
 
.section-mark {
  border-left-width: 2px;
  border-left-style: solid;
  height: 16px;
}
 
.section-header {
  display: flex;
  align-items: center;
  padding: 5px 15px;
  margin-bottom: 30px;
}
.section-title {
  font-size: 18px;
  color: #333;
  margin-left: 8px;
  flex-shrink: 0;
  font-weight: 550;
}
 
.content {
  padding: 0 10px;
}
</style>