shuhao 1 місяць тому
батько
коміт
df86e776f1
1 змінених файлів з 6 додано та 1 видалено
  1. 6 1
      src/components/toolList.vue

+ 6 - 1
src/components/toolList.vue

@@ -7,6 +7,8 @@
 <script setup>
 import {ref} from 'vue'
 import eventBus from "@/api/eventBus";
+import {useRouter} from "vue-router";
+const router = useRouter();
 const props = defineProps({
   direction: {
     type: String,
@@ -28,6 +30,9 @@ const active = ref(0)
 const handleActive = (value,index) =>{
     active.value = index
     emit('handleActive',value)
+    if(index == 0){
+      router.push('/warningHome')
+    }
 }
 </script>
 
@@ -84,4 +89,4 @@ const handleActive = (value,index) =>{
     }
   }
 }
-</style>
+</style>