fuc-new/doc/node_modules/@vuepress/helper/lib/client/composables/useRoutePaths.js
hellcat 6adbc04d4b 1
2025-10-03 17:17:08 +08:00

14 lines
361 B
JavaScript

import { computed } from 'vue';
import { useRoutes } from 'vuepress/client';
/**
* Composables for route paths
*
* 获取路由路径的组合函数
*
* @returns Computed reference to route paths / 路由路径的计算引用
*/
export const useRoutePaths = () => {
const routes = useRoutes();
return computed(() => Object.keys(routes.value));
};