更新
This commit is contained in:
25
src/view/privateEquipment/equipment/index.vue
Normal file
25
src/view/privateEquipment/equipment/index.vue
Normal 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>
|
||||
Reference in New Issue
Block a user