whychdw
2019-07-24 9b8bf853abf6bcab5592913508d8ec3cb15c2440
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
<template>
    <div class="component-container">
        <div class="divider-card" style="margin-bottom: 32px;">
            <div class="divider-card-title center">{{title}}</div>
            <div class="divider-card-content" :style="style">
                <slot><div class="center">暂无内容</div></slot>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    props:{
        title: {
            type: [String, Number],
            default: '未知'
        },
        maxHeight: {
            type: String,
            default: '300px'
        }
    },
    data() {
        return {
            style: {
                maxHeight: this.maxHeight
            }
        }
    }
}
</script>
<style scoped>
    .divider-card {
        position: relative;
        border: 1px solid #0070C0;
    }
    .divider-card-title {
        position: absolute;
        font-size: 18px;
        background-color: #0070C0;
        color: #FFFFFF;
        padding: 4px 16px;
        left: 32px;
        top: -20px;
    }
    .divider-card-content {
        padding: 24px 8px;
        overflow-y: auto;
    }
</style>