<template>
	<el-dialog title="子设备详情" v-model="showDialog" fullscreen width="80%">
		<DetailVue :deviceKey="deviceKey" v-if="showDialog"></DetailVue>
	</el-dialog>
</template>
<script lang="ts" setup>
import { ref, defineAsyncComponent } from 'vue';
// import DetailVue from '/@/views/iot/device/instance/detail.vue';
// 异步加载组件，防止循环引用导致打包之后报错
const DetailVue = defineAsyncComponent(() => import('/@/views/iot/device/instance/detail.vue'))

const showDialog = ref(false)
const deviceKey = ref('')

function openDialog(row: any) {
	deviceKey.value = row.key
	showDialog.value = true
}

defineExpose({ openDialog })

</script>
<style scoped></style>
