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
| <template>
| <view class="a_mask">
| <view class="a_box" @submit="formSubmit" @reset="formReset">
| <view class="a_head">
| {{title}}
| </view>
| <view class="a_input">
| <input type="text" v-model="input" :placeholder="placeholder"/>
| </view>
| <view class="a_btn">
| <view style="color:#999" @tap="formReset">取消</view>
| <view style="color:#333" @tap="formSubmit">确认</view>
| </view>
| </view>
| </view>
| </template>
|
| <script>
| export default {
| props:{
| title:{
| type:String,
| default:'服务器地址'
| },
| placeholder:{
| type:String,
| default:'请点击输入'
| },
| },
| data() {
| return {
| input:'',
| };
| },
| created() {
|
| },
| methods: {
| formSubmit: function(e) {
| this.$emit('confirm',this.input)
| },
| formReset: function(e) {
| this.$emit('cancel')
| }
| }
| }
| </script>
|
| <style lang="scss">
| .a_mask{
| position: fixed;
| z-index: 99999;
| background-color: rgba(0,0,0,0.5);
| top: 0;
| left: 0;
| bottom: 0;
| right: 0;
| .a_box{
| width: 620upx;
| overflow: hidden;
|
| background-color: #FFFFFF;
| border-radius: 10upx;
| position: absolute;
| top: 40%;
| left: 50%;
| transform: translate(-50%,-50%);
|
| .a_head{
| text-align: center;
| font-size: 30rpx;
| line-height: 200%;
| margin-top: 20rpx;
| padding-bottom: 20rpx;
| // border-bottom: 1rpx solid #eee;
| }
| .a_input{
| height: 140rpx;
| margin: 0 20rpx;
| margin-top: 35rpx;
| text-align: justify;
| input{
| text-align: center;
| background-color: #f5f5f5;
| height: 70rpx;
| }
| }
| .a_btn{
| text-align: center;
| font-size: 30upx;
| line-height: 88rpx;
| display: flex;
| justify-content: space-between;
| border-top: 1px solid #eee;
| view{
| width: 50%;
| background-color: #fff;
| font-size: 30upx;
| border-radius: 0upx;
| padding: 0;
| &::after{
| border:none
| }
| &:first-child{
| border-right: 1rpx solid #eee;
| color: #999999;
| box-sizing: border-box;
| }
| &:last-child{
| color: #333;
| }
| }
|
| }
| }
| }
| </style>
|
|