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
80
81
82
83
84
85
| <template>
| <div class="content-box">
| <div class="content-box-title" :class="getTitlePos">
| <slot name="title">{{title}}</slot>
| </div>
| <div class="content-box-content">
| <slot></slot>
| </div>
| </div>
| </template>
|
| <script>
| export default {
| name: 'contentBox',
| props: {
| titleLeft: {
| type: Boolean,
| default: false
| },
| title: {
| type: String,
| default: '头部信息'
| }
| },
| computed: {
| getTitlePos: function() {
| return this.titleLeft?'txt-left': '';
| }
| },
| mounted(){
| //console.log(this.titleLeft);
| }
| }
| </script>
|
| <style scoped>
| .content-box {
| position: relative;
| height: 100%;
| border: 1px solid #FFFFFF;
| border-radius: 0.08rem;
| font-size: 0.16rem;
| }
| .content-box-title {
| position: absolute;
| top: 0.04rem;
| left: 0.04rem;
| right: 0.04rem;
| padding-left: 0.1rem;
| border-radius: 0.06rem;
| font-size: 0.14rem;
| text-align: center;
| background-image: linear-gradient(rgb(62, 189, 201), #016A95,#00638D, #006999, #009EE3);
| line-height: 0.32rem;
| font-weight: bold;
| }
| .content-box-title.txt-left {
| text-align: left;
| }
| .content-box-content {
| position: absolute;
| top: 0.4rem;
| left: 0.04rem;
| right: 0.04rem;
| bottom: 0;
| overflow-y: auto;
| }
| .content-box-content::-webkit-scrollbar {
| /* 滚动条整体样式 */
| width: 0.1rem;
| height: 0.01;
| }
| .content-box-content::-webkit-scrollbar-thumb {
| /* 滚动条里面小方块 */
| border-radius: 0.1rem;
| -webkit-box-shadow: inset 0 0 0.05rem rgba(0,0,0,0.2);
| background: #535353;
| }
| .content-box-content::-webkit-scrollbar-track {
| /* 滚动条里面轨道 */
| -webkit-box-shadow: inset 0 0 0.05rem rgba(0,0,0,0.2);
| border-radius: 0.1rem;
| background: #EDEDED;
| }
| </style>
|
|