From 4e6f1e5e23e9737e9ad15af2fb42d7f0b57182af Mon Sep 17 00:00:00 2001 From: weishuodan Date: Fri, 17 Nov 2023 10:42:40 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E6=89=93?= =?UTF-8?q?=E5=8C=85=E5=8F=8A=E7=BB=84=E4=BB=B6=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../images/license-keyboard-del.png} | Bin components/license-plate-keyboard/index.vue | 4 +-- .../license-plate-keyboard/key-board-view.vue | 8 +++--- components/license-plate/demo/cases/demo0.vue | 11 ++++++-- components/license-plate/index.vue | 25 +++++++++++++++--- 5 files changed, 36 insertions(+), 12 deletions(-) rename components/{license-plate-keyboard/assets/close.png => _style/images/license-keyboard-del.png} (100%) diff --git a/components/license-plate-keyboard/assets/close.png b/components/_style/images/license-keyboard-del.png similarity index 100% rename from components/license-plate-keyboard/assets/close.png rename to components/_style/images/license-keyboard-del.png diff --git a/components/license-plate-keyboard/index.vue b/components/license-plate-keyboard/index.vue index 9fa235344..2a6a82039 100644 --- a/components/license-plate-keyboard/index.vue +++ b/components/license-plate-keyboard/index.vue @@ -17,8 +17,8 @@ - From 0152f571a361b2131be9dfc53982d6613ad1dab0 Mon Sep 17 00:00:00 2001 From: weishuodan Date: Fri, 17 Nov 2023 11:08:32 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=BB=98=E8=AE=A4=E5=80=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/license-plate/demo/cases/demo0.vue | 4 ++-- components/license-plate/index.vue | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/components/license-plate/demo/cases/demo0.vue b/components/license-plate/demo/cases/demo0.vue index 3efc05993..efd1e8591 100644 --- a/components/license-plate/demo/cases/demo0.vue +++ b/components/license-plate/demo/cases/demo0.vue @@ -18,8 +18,8 @@ export default { }, mounted() { // setTimeout(()=>{ - // this.defaultValue = '2333' - // },3000) + // this.defaultValue = '23338888888' + // },10000) }, methods: {}, } diff --git a/components/license-plate/index.vue b/components/license-plate/index.vue index 68fa0d734..6267862ec 100644 --- a/components/license-plate/index.vue +++ b/components/license-plate/index.vue @@ -452,14 +452,17 @@ export default { defaultValue: { handler(newVal) { if (newVal !== '') { - const defaultValueArray = - this.defaultValue.split('').length > 8 - ? this.defaultValue.split('').splice(0, 8) - : this.defaultValue.split('') + const defaultValueArray = this.defaultValue.split('') const keyArrayCopy = JSON.parse(JSON.stringify(this.keyArray)) - defaultValueArray.forEach((item, index) => { - keyArrayCopy[index] = item + + keyArrayCopy.forEach((item, index) => { + if (defaultValueArray[index]) { + keyArrayCopy[index] = defaultValueArray[index] + } else { + keyArrayCopy[index] = '' + } }) + this.keyArray = keyArrayCopy } }, From 8537219b5667c36a636bc5e725790664f4c6baa5 Mon Sep 17 00:00:00 2001 From: weishuodan Date: Fri, 17 Nov 2023 11:56:34 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=BC=95=E5=85=A5=E6=96=B9=E5=BC=8F=E5=91=BD=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/license-plate-keyboard/index.vue | 12 ++++++------ components/license-plate/index.vue | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/components/license-plate-keyboard/index.vue b/components/license-plate-keyboard/index.vue index 2a6a82039..74a65838d 100644 --- a/components/license-plate-keyboard/index.vue +++ b/components/license-plate-keyboard/index.vue @@ -1,13 +1,13 @@ -