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) { // 点击关闭