From ce3c1c56738735a2b7e80f79914c45edc58be5a4 Mon Sep 17 00:00:00 2001
From: 康鲁杰 <60095866+KangLujie@users.noreply.github.com>
Date: 星期三, 02 四月 2025 16:21:46 +0800
Subject: [PATCH] 数字人比例

---
 easegen-front/src/views/chooseTemplate/index.vue |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/easegen-front/src/views/chooseTemplate/index.vue b/easegen-front/src/views/chooseTemplate/index.vue
index 012371b..d06b627 100644
--- a/easegen-front/src/views/chooseTemplate/index.vue
+++ b/easegen-front/src/views/chooseTemplate/index.vue
@@ -119,7 +119,6 @@
                         left: PPTpositon.x * (thumViewSize.height / 450) + 'px'
                       }"
                       :src="selectHost?.pictureUrl"
-                      fit="cover"
                     />
                     <div class="list-index" :style="element.isActive ? 'background: #409eff' : ''">
                       {{ index + 1 }}
@@ -207,7 +206,7 @@
                 @resize-end="print('PPT resize-end')"
                 style="z-index: 3"
               >
-                <el-image class="ppt-bg" :src="selectPPT.innerPicture.src" fit="cover" />
+                <el-image class="ppt-bg" :src="selectPPT.innerPicture.src"  />
                 <el-icon
                   v-if="PPTpositon.active"
                   size="20"
@@ -220,10 +219,10 @@
               </Vue3DraggableResizable>
               <Vue3DraggableResizable
                 v-if="selectPPT.showDigitalHuman"
-                :parent="true"
-                :lockAspectRatio="true"
+                :parent="false"
                 :initW="PPTpositon.w"
                 :initH="PPTpositon.h"
+                @drag-move="onDragMove"
                 v-model:x="PPTpositon.x"
                 v-model:y="PPTpositon.y"
                 v-model:w="PPTpositon.w"
@@ -244,7 +243,6 @@
                 <el-image
                   class="minddle-host-image"
                   :src="selectHost ? selectHost.pictureUrl : ''"
-                  fit="cover"
                 />
                 <el-icon
                   v-if="PPTpositon.active"
@@ -643,7 +641,19 @@
   nextTick(() => {
     inputRef.value.focus()
   })
-}
+};
+const onDragMove = (evt, data) => {
+  console.log(evt)
+  console.log(data)
+
+  // 闄愬埗鍧愭爣
+  if (data.x < -100) {
+    data.x = -100; // 鍙互璁剧疆鏈�灏忓潗鏍囦负 -100
+  }
+  if (data.y < -100) {
+    data.y = -100; // 鍙互璁剧疆鏈�灏忓潗鏍囦负 -100
+  }
+};
 // 淇濆瓨缂栬緫鍚庣殑鍚嶇О
 const saveEdit = () => {
   isEditing.value = false

--
Gitblit v1.9.3