画布图片预览

This commit is contained in:
lzp
2026-03-06 10:21:05 +08:00
parent 68d3a90940
commit a3938662c9
7 changed files with 170 additions and 107 deletions

View File

@@ -52,6 +52,7 @@
@sub="(e) => flowManager.setZoom(e)"
@home="() => fitView({ maxZoom: 1 })"
/>
<image-preview ref="imagePreviewRef" />
</template>
<script setup lang="ts">
@@ -62,6 +63,7 @@
// 组件
import headerTools from './components/header-tools.vue'
import zoom from '../components/zoom.vue'
import imagePreview from '../components/image-preview.vue'
// 节点
import node from './components/node.vue'
import resultImage from './components/nodes/result-image.vue'
@@ -181,6 +183,13 @@
}
}
const imagePreviewRef = ref<any>()
/** 打开图片预览 */
const openImagePreview = (url: string) => {
imagePreviewRef.value.open(url)
}
provide('openImagePreview', openImagePreview)
onMounted(() => {
// window['vueFlow'] = vueFlow
// window['nodes'] = nodes