LearnPopup.vue
2.18 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
<template>
<uni-popup
ref="learnPopup"
type="center"
:is-mask-click="false"
>
<view class="learn-box">
<view class="sprite-icon icon-learn-bg"></view>
<view class="learn-content">
<view class="learn-title">退出提醒</view>
<text class="learn-text">{{content}}</text>
</view>
<view class="learn-footer flex">
<view
class="learn-btn learn-confirm"
@click="confirm"
>确认退出</view>
<view
class="learn-btn learn-cancel"
@click="cancel"
>继续学习</view>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
content: {
type: String,
default: ''
}
},
name: '',
data () {
return {
}
},
computed: {
learnRef () {
return this.$refs.learnPopup
}
},
mounted () {
},
methods: {
open () {
this.learnRef.open()
},
cancel () {
this.close()
this.$emit('cancel')
},
close () {
this.learnRef.close()
},
confirm () {
this.close()
this.$emit('confirm')
}
}
}
</script>
<style scoped lang='scss'>
.learn-box {
width: toRpx(848);
height: toRpx(648);
border-radius: toRpx(48);
background: #ffffff;
position: relative;
overflow: hidden;
.sprite-icon{
position: absolute;
top: 0;
left: 0;
zoom: 2;
}
.learn-content {
padding: toRpx(296) toRpx(64) toRpx(32);
text-align: center;
.learn-title {
color: #333333;
font-size: toRpx(40);
font-weight: 500;
margin-bottom: toRpx(16);
}
.learn-text {
color: #666666;
font-size: toRpx(32);
}
}
.learn-footer {
height: toRpx(160);
padding: 0 toRpx(64);
justify-content: space-between;
.learn-btn {
width: toRpx(344);
height: toRpx(80);
border-radius: toRpx(64);
background: #f0f1f5;
display: flex;
align-items: center;
justify-content: center;
color: #1a1a1a;
font-size: toRpx(28);
}
.learn-cancel {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #fff;
}
}
}
</style>