PhoneTemplate.vue
2.66 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// 手机端背景框组件
<template>
<div class="preview">
<!-- <div class="preview-status">
<div>13:14</div>
</div> -->
<div class="line"></div>
<div class="preview-bar" v-if="isTab">
<i class="icon el-icon-arrow-left"></i>
{{ title }}
<i class="icon el-icon-more"></i>
</div>
<el-scrollbar class="preview-content" wrap-class="scrollbar-wrapper">
<template>
<slot />
<!-- <div class="bottom">看到底啦~</div> -->
</template>
</el-scrollbar>
<div class="line2"></div>
</div>
</template>
<script>
export default {
components: {},
props: {
// 是否显示顶部tab标题栏
isTab: {
type: Boolean,
default: true,
},
title: {
type: String,
default: 'LinkWeChat',
},
},
data() {
return {}
},
computed: {},
created() {},
mounted() {},
methods: {},
}
</script>
<style lang="scss" scoped>
.preview {
display: flex;
flex-direction: column;
margin: 0 auto;
position: relative;
width: var(--phone-width, 350px);
max-width: 375px;
min-width: 320px;
height: 720px;
border: 12px solid #edf2f9;
border-radius: 40px;
box-sizing: content-box;
overflow: hidden;
background: #fff;
// .preview-status {
// display: flex;
// justify-content: space-between;
// align-items: center;
// padding: 0 10px;
// }
.icon {
font-size: 16px;
}
.line {
flex: none;
width: 100px;
height: 25px;
margin: 6px auto;
border-radius: 50px;
background: #bbb;
// border: 10px solid #bbb;
// box-sizing: content-box;
// border-width: 13px 62px;
}
.line2 {
position: absolute;
width: 120px;
height: 5px;
bottom: 0;
left: 50%;
margin: 15px auto;
border-radius: 10px;
background: #bbb;
transform: translateX(-50%);
z-index: 10;
}
.preview-bar {
// position: absolute;
// top: 40px;
// left: 50%;
// transform: translateX(-50%);
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 10px;
height: 40px;
width: 100%;
flex: none;
font-size: 14px;
font-weight: 500;
color: #333333;
}
.preview-content {
position: relative;
flex: auto;
overflow: hidden;
top: 0;
// left: 50%;
// transform: translateX(-50%);
border-radius: 0 0 20px 20px;
background: #f6f8ff;
::v-deep img {
max-width: 100%;
}
}
::v-deep {
.el-scrollbar__wrap {
overflow-x: hidden;
}
.el-scrollbar__bar {
transform: scale(1);
}
}
.bottom {
padding: 15px 0 20px;
line-height: 1;
color: #999;
text-align: center;
}
}
</style>