<template>
	<div class="test">
		<p>Conversation Item - {{ id }}</p>
		<button @click="openCanvas">打开画布</button>
	</div>
</template>

<script setup lang="ts">
	import myEvent from '@/utils/myEvent'
	import { computed, onMounted } from 'vue'
	import { useRoute } from 'vue-router'
	const route = useRoute()
	const id = computed(() => route.params.id)
	const openCanvas = () => {
		myEvent.emit('openFlowCanvas')
	}
	onMounted(() => {
		openCanvas();
	})
</script>

<style lang="less" scoped>
	.test {
		margin: 2rem;
		border-radius: 2rem;
		background-color: rgb(242, 130, 90);
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		> p {
			font-size: 10rem;
		}
	}
</style>
