textareaAlert.vue
1.8 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
<template>
<view class="alertWrap">
<view class="alert">
<view class="closeBtn">
<image @click="$emit('close')" src="../static/image/ic_94@2x.png" mode=""></image>
</view>
<view class="alertTitle">
失败原因
</view>
<view class="alertContent">
<textarea maxlength="100" v-model="reason" placeholder="请输入失败原因" />
<view class="textLength">
{{reason.length}}/100
</view>
</view>
<view class="bottomBtnAlt">
<view class="bottomBtn">
发送
</view>
</view>
</view>
</view>
</template>
<script>
export default{
data(){
return{
reason:''
}
}
}
</script>
<style lang="scss" scoped>
.alertWrap{
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: $uni-bg-color-mask;
display: flex;
justify-content: center;
align-items: center;
z-index: 2;
.alert{
width: 638rpx;
background: #ffffff;
border-radius: 44rpx;
padding: 32rpx;
.closeBtn{
display: flex;
justify-content: flex-end;
image{width: $uni-img-size-40;height: $uni-img-size-40;}
}
.alertTitle{
font-size: $uni-font-size-40;
text-align: center;
height: 90rpx;
line-height: 90rpx;
font-weight: 600;
}
.alertContent{
padding: 20rpx;
border-radius: 20rpx;
font-size: $uni-font-size-26;
line-height: $uni-font-lh-40;
background: $uni-bg-color-hui;
color: $uni-text-color-hui;
textarea{
width: 100%;
}
.textLength{
text-align: right;
}
}
.bottomBtnAlt{
padding-top: 38rpx;
display: flex;
justify-content: center;
.bottomBtn{
flex: 1;
height: 84rpx;
background: #2e7ff9;
border-radius: 68rpx;
font-size: $uni-font-size-32;
color: $uni-text-color-bai;
line-height: 84rpx;
text-align: center;
}
}
}
}
</style>