Commit 942eedad by wusiyi

feat: 盘点扫码完光标回到输入框

parent 7deb4ebb
......@@ -951,6 +951,7 @@
</ElDialog>
<ElDialog v-model="scanDialogVisible" width="800px" title="盘点">
<el-input
ref="scanInputRef"
v-model="scanInput"
placeholder="请输入备货单号"
style="width: 90%"
......@@ -2062,6 +2063,7 @@ const scan = async () => {
} finally {
loading.close()
scanInput.value = ''
scanInputRef.value?.focus()
}
}
/**
......@@ -2069,13 +2071,12 @@ const scan = async () => {
*/
const searchFormRef = ref()
const searchBtnRef = ref()
const scanInputRef = ref<InstanceType<typeof ElInput>>()
useEnterKeyTrigger({
formRef: searchFormRef,
btnRef: searchBtnRef,
callback: (event: KeyboardEvent) => {
console.log('回车键被按下', event)
callback: () => {
search()
},
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment