Commit bbb0705a authored by zhengke's avatar zhengke

修改

parent 5cab2d6c
......@@ -51,7 +51,7 @@
maxlength: {
immediate: true,
handler: function(newV) {
this.ranges = [];
this.ranges = [];
for(let i=1;i<=newV;i++){
this.ranges.push(Number(i))
}
......@@ -59,7 +59,7 @@
},
value: {
immediate: true,
handler: function(newV) {
handler: function(newV) {
if (newV !== this.inputValue) {
this.inputValue = newV
this.toMakeAndCheck(newV)
......@@ -77,7 +77,7 @@
},
methods: {
getVal(e) {
const val = e.detail.value
const val = e.detail.value
this.inputValue = val
this.$emit('input', val)
this.toMakeAndCheck(val)
......@@ -85,7 +85,8 @@
toMakeAndCheck(val) {
const arr = val.split('')
this.codeIndex = arr.length + 1
this.codeArr = arr
this.codeArr = arr
if (this.codeIndex > Number(this.maxlength)) {
this.$emit('finish', this.codeArr.join(''))
}
......@@ -131,19 +132,35 @@
justify-content: center;
flex-wrap: wrap;
position: relative;
width:100%;
overflow: hidden;
}
.flex-box .hide-input {
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
text-align: left;
z-index: 9;
opacity: 0;
color:transparent;
caret-color:transparent;
}
/* .flex-box .hide-input {
position: absolute;
top: 0;
width: 200%;
height: 100%;
text-align: left;
z-index: 9;
opacity: 0;
}
left:-100%;
color:transparent;
padding-left: 30.6rpx;
letter-spacing: 50.4rpx!important;
caret-color: transparent!important;
} */
.flex-box .item {
position: relative;
width: 80upx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment