diff --git a/src/components/MyInput.vue b/src/components/MyInput.vue index c018056..d8fc630 100644 --- a/src/components/MyInput.vue +++ b/src/components/MyInput.vue @@ -65,10 +65,11 @@ async function actionInputClick() { } // 键盘输入 -function actionKeyBoardInput(val) { +async function actionKeyBoardInput(val) { if (isFirstClick.value) { - setTimeout(() => value.value = val + ''); isFirstClick.value = false + await nextTick(); + value.value = val + ''; } }