<script>
import DeviceTree from '@/components/DeviceTree/index.vue'
export default {
  name: 'deviceTreeDemo',
  components: {DeviceTree},
  methods:{
    onDeviceSelect(id, level){
      console.log("selected id:",id)
      console.log("selected level:",level)
    }
  }
}
</script>

<template>
  <div>
    <device-tree :max-level="1" @select-device="onDeviceSelect"/>
  </div>
</template>

<style scoped>

</style>