添加图层剪切功能
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user