From 8e50a9af37396169f7569e09a45dc1a73d82a4e6 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Wed, 22 Nov 2023 17:17:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=AE=E7=9B=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SimpleKeyboard.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/SimpleKeyboard.vue b/src/components/SimpleKeyboard.vue index 8268178..b9678f9 100644 --- a/src/components/SimpleKeyboard.vue +++ b/src/components/SimpleKeyboard.vue @@ -20,6 +20,7 @@ export default { maxLength: { default: '' } }, data: () => ({ + copy: true, keyboard: null, displayDefault: { '{bksp}': 'backspace', @@ -99,7 +100,13 @@ export default { }, methods: { onChange (input) { - this.$emit('onChange', input) + if (this.copy) { + this.$emit('onChange', this.input + input) + this.copy = !this.copy + return false + } else { + this.$emit('onChange', input) + } }, onKeyPress (button, $event) { // 点击关闭