import { defineStore } from 'pinia' import { ref, reactive, computed } from 'vue' export const useRoutesStore = defineStore('routes', () => { const hasRoutes = ref(false) const routes = reactive([]) // const getSubRoutes = computed((path: string) => routes.find((item: any) => { // console.log('哈哈', path); // if (item.path === path) { // return item.children // } // })); return { hasRoutes, routes } })