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
| <template>
| <view class="container">
| <view class="tips">{{tips}}</view>
| <view class="input">
| <uni-icons class="input-icon" type="scan" size="16" color="#a6a6a6" @click="scan" />
| <input class="input-input" type="text" v-model="data">
| <uni-icons class="input-icon" type="close" size="16" color="#a6a6a6" @click="clear" />
| </view>
| <view class="option"></view>
|
| </view>
| </template>
|
| <script>
| export default {
| name: "mt-input",
| props: {
| tips: {
| type: String,
| default: '提示'
| },
| }
| }
| </script>
|
| <style scoped>
| .container {
| margin: 16rpx;
| padding: 16rpx;
| background-color: #fff;
| display: flex;
| align-items: center;
| border: 1px solid #999;
| border-radius: 17rpx;
| }
| .tips {
| /* border-right: 2px solid #999; */
| /* padding-right: 8rpx; */
| }
| .input {
| display: flex;
| align-items: center;
| flex: 1;
| }
| .input-input {
| flex: 1;
| }
| .input-icon {
| margin: 0 8rpx;
| }
| </style>
|
|