Browse Source

feat: 数据检查限制答案输入框按键

chenhao 2 năm trước cách đây
mục cha
commit
44b1e94c0e

+ 1 - 1
src/features/admin/confirmPaper/ConfirmPaper.vue

@@ -315,13 +315,13 @@ const allowKey = [
   "ArrowLeft",
   "ArrowLeft",
   "ArrowRight",
   "ArrowRight",
   "#",
   "#",
-  "ShiftLeft",
   "Shift",
   "Shift",
   "[A-Za-z]",
   "[A-Za-z]",
 ];
 ];
 const allowKeyRef = new RegExp(allowKey.join("|"));
 const allowKeyRef = new RegExp(allowKey.join("|"));
 
 
 function onPreventAnswerKey(e: KeyboardEvent) {
 function onPreventAnswerKey(e: KeyboardEvent) {
+  console.log(e)
   if (!allowKeyRef.test(e.key)) {
   if (!allowKeyRef.test(e.key)) {
     e.preventDefault();
     e.preventDefault();
   }
   }