添加图层剪切功能

This commit is contained in:
李志鹏
2025-11-12 16:12:02 +08:00
parent 2117f9d9d1
commit b24bcf68f2
14 changed files with 835 additions and 16 deletions

View File

@@ -23,6 +23,7 @@ import { BrushStore } from "./store/BrushStore";
import cuowuImg from "@/assets/images/homePage/cuowu.svg";
import { Https } from "@/tool/https";
import SelectImages from "@/component/common/SelectImages.vue";
import CropImage from "./components/CropImage.vue";
import { UrlToFile } from "@/tool/util";
// import { MinimapManager } from "./managers/minimap/MinimapManager";
@@ -907,6 +908,12 @@ const changeCanvas = async (command) => {
}
};
const cropImageRef = ref(null);
const cropImage = (url) => {
return cropImageRef.value.open(url)
};
provide("cropImage", cropImage); // 提供给子组件使用
// 提供外部ref实例方法
defineExpose({
layers, // 图层数据
@@ -1249,6 +1256,9 @@ defineExpose({
/>
</div>
</transition>
<!-- 裁剪图片组件 -->
<CropImage ref="cropImageRef" />
</div>
<!-- <div class="footer-actions">