Browse Source

fix: fix type error

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

+ 2 - 2
src/components/QmButton.vue

@@ -27,10 +27,10 @@ let parentOnClick = attrs.onClick as (e: Event) => void;
 delete newAttrs["onClick"];
 
 let inInterval = $ref(false);
-const insideClick = (e: PointerEvent) => {
+const insideClick = (e: PointerEvent | MouseEvent) => {
   // console.log(e.pointerType);
   // 不允许键盘触发按钮事件,因为全局监听键盘事件的太多了
-  if (e.pointerType === "") return;
+  if (e instanceof PointerEvent && e.pointerType === "") return;
   inInterval = true;
   // false warning
   // eslint-disable-next-line @typescript-eslint/no-unsafe-argument

+ 2 - 2
src/features/mark/MarkChangeProfile.vue

@@ -11,8 +11,8 @@
     <a-form
       labelAlign="right"
       :labelCol="{ span: 4 }"
-      @keydown.stop
-      @keypress.stop
+      @keydown.stop=""
+      @keypress.stop=""
     >
       <a-form-item class="tw-mb-2" :required="true" label="姓名">
         <a-input v-model:value="user.name" placeholder="姓名" />

+ 2 - 2
src/features/mark/MarkHistory.vue

@@ -13,8 +13,8 @@
         type="text"
         placeholder="查找试卷"
         class="tw-flex-1 tw-rounded tw-h-8 tw-pl-1 tw-pr-8"
-        @keydown.stop
-        @keypress.stop
+        @keydown.stop=""
+        @keypress.stop=""
         @keyup.enter="searchHistoryTask"
       />
       <SearchOutlined