소스 검색

no message

xiaochan 2 달 전
부모
커밋
ac14f50a9c
1개의 변경된 파일14개의 추가작업 그리고 18개의 파일을 삭제
  1. 14 18
      src/components/xmlr/dialog/ScanCodeGun.vue

+ 14 - 18
src/components/xmlr/dialog/ScanCodeGun.vue

@@ -1,44 +1,40 @@
 <script setup lang="ts">
 import sleep from "@/utils/sleep";
 
-const searchCode = ref('');
+const searchCode = ref("");
 const inputRef = shallowRef();
 
-const codeList = ref([])
+const codeList = ref([]);
 
 async function handleBlur() {
-  await sleep(500)
+  await sleep(500);
   inputRef?.value?.focus();
 }
 
 function handleKeyDown() {
-  codeList.value.push(searchCode.value)
-  searchCode.value = ''
+  codeList.value.push(searchCode.value);
+  searchCode.value = "";
 }
 
 onMounted(async () => {
   await nextTick();
   await handleBlur();
-})
+});
 </script>
 
 <template>
   <div class="layout_container">
     <header style="text-align: center">
-      <el-input ref="inputRef"
-                style="width: 220px"
-                v-model="searchCode"
-                @keydown.enter.stop.prevent="handleKeyDown"
-                @blur="handleBlur"/>
+      <el-input
+        ref="inputRef"
+        style="width: 220px"
+        v-model="searchCode"
+        @keydown.enter.stop.prevent="handleKeyDown"
+        @blur="handleBlur"
+      />
     </header>
     <div class="layout_main">
-      <el-table max-height="55vh">
-
-      </el-table>
+      <el-table max-height="55vh"></el-table>
     </div>
   </div>
 </template>
-
-<style lang="scss">
-
-</style>