> For the complete documentation index, see [llms.txt](https://yaa.docs.speaks.life/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yaa.docs.speaks.life/he-xin-gong-neng/shu-ju-biao-ge/lu-you.md).

# 路由

在路径 `ui/src/router/*`中添加路由路径，并在对应的路径中生成文件。

## 示例

以 `user`为例。

因为所属数据为后台，在 `ui/src/router/components/other/admin/index.ts` 文件中修改如下：

```typoscript
const routeKeys = [
    'home',
    'admin',
    'admin-group',
    'admin-log',
    'user', // 添加 user ， 对应在 views/Admin/ 下新建 user/Index.vue 文件
    'menu',
];
```

### 事项一

如果你的页面及路由符合以下格式

* **url   => admin/template**
* **文件(Index.vue) => views/Admin/template/Index.vue**

🎉 你可以，直接在 `routeKeys` 中添加 `template` 即可

### 事项二

当你的文件不符合以上时，请在 `router/components/other/index.ts` 中添加完善路由信息。如下所示：

```typescript
const routes = [
    {
        path: '/test',
        name: 'Test',
        component: () => import('@/views/test/Index.vue'),
    },
]

export default routes
```

添加路由后并完善路由文件信息。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://yaa.docs.speaks.life/he-xin-gong-neng/shu-ju-biao-ge/lu-you.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
