画布图片预览
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user