Sfoglia il codice sorgente

mod:自定义svg 调整

panqiuyao 6 mesi fa
parent
commit
f40e259766

+ 2 - 1
frontend/src/views/components/PictureEditor/mixin/edit/index.js

@@ -274,7 +274,8 @@ export default  {
                     console.log(svgGroup);
                     // 设置尺寸
                     svgGroup.scaleToWidth(this.clipSettings.svgWidth);
-                    svgGroup.scaleToHeight(this.clipSettings.svgHeight);
+                    console.log(this.clipSettings.svgWidth);
+                    // svgGroup.scaleToHeight(this.clipSettings.svgHeight);
 
                     svgGroup.set({
 

+ 4 - 0
frontend/src/views/components/PictureEditor/mixin/edit/module/tools.js

@@ -58,6 +58,10 @@ cutout(){
           style="width:200px"
         />
       </div>
+      <div v-if="clipSettings.shape === 'svg'" class="flex left" style="margin-left:10px">
+      <el-input-number v-model="clipSettings.svgWidth" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>
+      <el-input-number v-model="clipSettings.svgHeight" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>
+      </div>
     <!-- 矩形参数 -->
     <div v-if="clipSettings.shape === 'rect'" class="flex left" style="margin-left:10px">
       <el-input-number v-model="clipSettings.width" @input="applyClipPath" :step="1" :min="1" size="small" style="width:80px"/>