# 路由

在路径 `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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
