浏览代码

fix 鼠标drag

Michael Wang 4 年之前
父节点
当前提交
19249fe9c8
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      src/components/QmDialog.vue

+ 7 - 6
src/components/QmDialog.vue

@@ -5,12 +5,13 @@
       :style="positionStyle"
       @click="increaseZIndex"
     >
-      <header
-        ref="mouseHandler"
-        class="tw-flex tw-place-content-between"
-        @mousedown="handleDragMouseDown"
-      >
-        <div class="tw-text-2xl tw-cursor-move tw-flex-grow">{{ title }}</div>
+      <header ref="mouseHandler" class="tw-flex tw-place-content-between">
+        <div
+          class="tw-text-2xl tw-cursor-move tw-flex-grow"
+          @mousedown="handleDragMouseDown"
+        >
+          {{ title }}
+        </div>
         <a-button shape="circle" @click="$emit('close')">
           <template #icon><CloseOutlined /></template>
         </a-button>