gx
queenwuli
2021-01-12 a6653e19d20a61e7b8f788037d2a4df3f93a4f32
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
<template>
  <view class="psdIptBx">
    <block v-for="(item , index) in psdIptNum" :key='index'>
      <view class="psdTtem">
        <text v-if="numLng.length > index" class="psdTtemTxt">
          <text v-if="plaintext" class="active">●</text>
          <text v-else>{{numLng[index]}}</text>
        </text>
        <text v-if="numLng.length ==index" class="focus_move">|</text>
      </view>
    </block>
  </view>
</template>
 
<script>
  export default {
    props: {
      //是否明文 默认密文
      plaintext: {
        type: Boolean,
        default: true
      },
      //键盘输入的val
      numLng: {
        type: [String, Number],
        default: ''
      },
      //密码框的个数
      psdIptNum: {
        type: [String, Number],
        default: 6
      }
    },
    data() {
      return {}
    },
    created() {},
    methods: {
    }
  }
</script>
 
<style scoped>
  .psdIptBx {
    display: flex;
    width: 100%;
    text-align: center;
    /* border-bottom: 1px solid #ccc; */
    /* border-top: 1px solid #ccc;
    border-right: 1px solid #ccc; */
  }
 
  .psdTtem {
    flex: 1;
    height: 80rpx;
    border-bottom: 1px solid #EDEAF4;
    margin: 0 6px;
    /* border-left: 1px solid #ccc; */
    line-height: 1;
  }
  .psdTtemTxt {
    text-align: center;
    line-height: 80rpx;
    font-size: 30rpx;
  }
 
  .focus_move {
    color: #518EFF;
    font-size: 30rpx;
    line-height: 80rpx;
    animation: focus 0.8s infinite;
  }
 
  @keyframes focus {
    from {
      opacity: 1;
    }
 
    to {
      opacity: 0;
    }
  }
</style>