github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/static_source/admin/src/views/Dashboard/view.vue (about) 1 <script setup lang="ts"> 2 import {computed} from "vue"; 3 import View from "@/views/Dashboard/view/view.vue"; 4 import {useRoute} from "vue-router"; 5 6 const route = useRoute(); 7 const dashboardId = computed(() => parseInt(route.params.id as string) as number); 8 9 </script> 10 11 <template> 12 <View v-if="dashboardId" :id="dashboardId"/> 13 </template> 14 15 <style lang="less" scoped> 16 17 </style>