PreBackPopup.vue
2.26 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
<template>
<view class="exam-submit-popup-wrapper">
<view class="content-box">
<view class="text-box">
退出将消耗1次跳过机会
</view>
<view class="sub-text">
剩余次数2次,是否确认退出?
</view>
</view>
<view class="button-group">
<view class="cancel-button" @click="handleCancel">
取消
</view>
<view class="confirm-button" @click="handleConfirm">
{{ confirmText }}
</view>
</view>
</view>
</template>
<script>
export default {
name: 'ExamSubmitPopup',
props: {
confirmText: {
type: String,
default: '确认'
}
},
methods: {
handleCancel() {
this.$emit('cancel')
},
handleConfirm() {
this.$emit('confirm')
},
}
}
</script>
<style lang="scss" scoped>
.exam-submit-popup-wrapper {
position: relative;
width: 100%;
min-height: toRpx(400);
display: flex;
flex-direction: column;
align-items: center;
padding-bottom: toRpx(48);
}
.content-box {
width: toRpx(720);
height: toRpx(156);
border-radius: toRpx(16);
background: #FDECE9;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-bottom: toRpx(24);
}
.text-box {
font-size: toRpx(40);
color: #333;
text-align: center;
font-weight: 500;
line-height: toRpx(60);
}
.sub-text {
color: #999;
text-align: center;
font-size: toRpx(28);
font-style: normal;
font-weight: 400;
line-height: toRpx(48);
}
.button-group {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
gap: toRpx(16);
margin-top: toRpx(48);
}
.cancel-button {
width: toRpx(344);
height: toRpx(80);
border-radius: toRpx(64);
background: #f0f1f5;
color: #1a1a1a;
font-size: toRpx(28);
font-weight: 400;
font-family: "HarmonyOSSansSC";
text-align: center;
line-height: toRpx(80);
}
.confirm-button {
width: toRpx(360);
height: toRpx(80);
border-radius: toRpx(48);
border: toRpx(2) solid #979797;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #ffffff;
font-size: toRpx(28);
font-weight: 500;
font-family: "HarmonyOSSansSC";
text-align: center;
line-height: toRpx(80);
&:active {
opacity: 0.8;
}
}
</style>