添加导出gap

This commit is contained in:
李志鹏
2026-01-07 10:27:48 +08:00
parent e40b707501
commit 29704f9b36
3 changed files with 42 additions and 0 deletions

View File

@@ -1066,6 +1066,7 @@ export class CanvasManager {
angle: v.angle,
name: v.sourceData.name,
priority: v.sourceData.priority,
gap: [0, 0],
}
if(obj.ifSingle){
let left = (v.left - (flLeft - flWidth * flScaleX / 2));
@@ -1092,6 +1093,7 @@ export class CanvasManager {
obj.scale = [scaleXY, scaleXY];
obj.angle = angle;
obj.location = [left, top];
obj.gap = [fill_.gapX, fill_.gapY];
}
if(obj.level2Type === "Pattern"){
prints.push(obj);

View File

@@ -329,6 +329,12 @@ const otherData = {
<template>
<div class="app-container-example">
<div id="test" style="position: fixed;
width: 500px; height: 500px;
top: 0;
left: 0;
z-index: 9999999;"><pingpu
url="/src/assets/images/canvas/yinhua1.jpg" /></div>
<!-- 模拟左侧导航栏 -->
<!-- <div
class="app-wrapper-btns"

View File

@@ -0,0 +1,34 @@
<template>
<div class="pingpu" ref="el"><canvas ref="canvasRef"></canvas></div>
</template>
<script setup>
import {
defineComponent,
ref,
reactive,
nextTick,
toRefs,
inject,
watch,
computed,
} from "vue";
const props = defineProps({
url: { type: String, required: true },
positionX: { type: Number, default: 0 },// px
positionY: { type: Number, default: 0 },// px
angle: { type: Number, default: 0 },// 角度
size: { type: Number, default: 100 },// %
gapX: { type: Number, default: 0 },// px
gapY: { type: Number, default: 0 },// px
});
console.log("==========", props);
</script>
<style lang='less' scoped>
.pingpu {
width: 100%;
height: 100%;
background-color: #f00;
}
</style>