From 9ab6b38c098f857f2ce0772693142c930e4f9b6d Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期六, 30 三月 2024 10:44:03 +0800 Subject: [PATCH] # --- components/z-input/z-input.vue | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/z-input/z-input.vue b/components/z-input/z-input.vue index cabe92b..287ed1b 100644 --- a/components/z-input/z-input.vue +++ b/components/z-input/z-input.vue @@ -85,10 +85,11 @@ return } if (val.length != this.lenCheck) { + console.log(val); setTimeout(()=>{ this.data = '' this.$emit('input','') - },0) + },10) } else { this.$emit('input',val) } @@ -115,17 +116,15 @@ this.$emit('clickBtn'); }, inputVal() { - this.$emit('inputVal',[this.data,this.name]); + this.$emit('inputVal',{title:this.name,value:this.data}); }, scanCode() { let _this = this uni.scanCode({ onlyFromCamera: true, success(res) { - _this.$parent.scanCode(res.result) _this.data = res.result - console.log('鎵埌浜�'); - console.log(res); + _this.$emit('inputVal',{title:_this.name,value:_this.data}) } }) } -- Gitblit v1.9.1