This commit is contained in:
xiaozhiyong
2026-06-16 11:31:26 +08:00
parent 17d1b6663e
commit 82c1cce942
22 changed files with 2711 additions and 59 deletions

View File

@@ -0,0 +1,25 @@
<template>
<div>
<DeviceList v-show="!showDetail" @select-device="handleSelectDevice" />
<DeviceDetail v-show="showDetail" :device="currentDevice" @back="handleBack" />
</div>
</template>
<script setup>
import { ref } from 'vue'
import DeviceList from './components/list/index.vue'
import DeviceDetail from './components/detail/index.vue'
const showDetail = ref(false)
const currentDevice = ref(null)
const handleSelectDevice = (device) => {
currentDevice.value = device
showDetail.value = true
}
const handleBack = () => {
showDetail.value = false
currentDevice.value = null
}
</script>