Kaynağa Gözat

用户浮动框拖动

Michael Wang 4 yıl önce
ebeveyn
işleme
878c7372e8
1 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 5 5
      src/components/QmDialog.vue

+ 5 - 5
src/components/QmDialog.vue

@@ -17,7 +17,7 @@
         </a-button>
       </header>
 
-      <div class="tw-m-1 tw-overflow-scroll" style="height: calc(100% - 60px)">
+      <div class="tw-m-1 tw-overflow-scroll" style="height: calc(100% - 40px)">
         <slot></slot>
       </div>
 
@@ -62,8 +62,8 @@ export default defineComponent({
     if (savedStyle?.left) positionStyle.left = savedStyle?.left;
     if (savedStyle?.width) positionStyle.width = savedStyle?.width;
     if (savedStyle?.height) positionStyle.height = savedStyle?.height;
-    const mouseHandler = ref((null as unknown) as HTMLHeadElement);
-    const resizeHandler = ref((null as unknown) as HTMLDivElement);
+    const mouseHandler = ref(null as unknown as HTMLHeadElement);
+    const resizeHandler = ref(null as unknown as HTMLDivElement);
 
     const mousePosition = {
       offsetX: 0,
@@ -177,8 +177,8 @@ header {
 }
 .resize-handler {
   position: absolute;
-  bottom: 0;
-  right: 0;
+  bottom: -10px;
+  right: -10px;
   width: 20px;
   height: 20px;
   cursor: nwse-resize;