fix
This commit is contained in:
@@ -16,11 +16,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<setting />
|
||||
<flow-canvas />
|
||||
<flow-canvas ref="flowCanvasRef" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
||||
import LeftNav from './left-nav.vue'
|
||||
import TopNav from './top-nav.vue'
|
||||
import setting from './setting/index.vue'
|
||||
@@ -28,6 +28,16 @@
|
||||
const globalStore = useGlobalStore()
|
||||
const loading = computed(() => globalStore.state.loading)
|
||||
import FlowCanvas from '@/components/Canvas/FlowCanvas/index.vue'
|
||||
import myEvent from '@/utils/myEvent'
|
||||
|
||||
const flowCanvasRef = ref(null)
|
||||
const openFlowCanvas = () => {
|
||||
flowCanvasRef.value.open()
|
||||
}
|
||||
myEvent.add('openFlowCanvas', openFlowCanvas)
|
||||
onUnmounted(() => {
|
||||
myEvent.remove('openFlowCanvas', openFlowCanvas)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
Reference in New Issue
Block a user