halo/ui
Ryan Wang 3f5b69d5d0
Support async permission checks in route menu generator (#7688)
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.21.x

#### What this PR does / why we need it:

Support async permission checks in route menu generator

example:

```ts
{
  path: "",
  name: "Foo",
  component: Foo,
  meta: {
    title: "Foo",
    searchable: true,
    permissions: async () => {
      const { data } = await checkPermission();
      return data;
    },
    menu: {
      name: "Foo",
      group: "content",
      icon: markRaw(MingcuteBook2Line),
      priority: 4,
      mobile: false,
    },
  },
}
```

#### Which issue(s) this PR fixes:

Fixes #

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
开发者相关:路由的权限检查支持函数
```
2025-08-17 15:43:10 +00:00
..
.husky Fix the problem of being unable to commit (#5362) 2024-02-18 08:00:16 +00:00
.vscode chore: add prettier-plugin-organize-imports plugin to organize imports (#6836) 2024-10-12 07:05:09 +00:00
console-src Support async permission checks in route menu generator (#7688) 2025-08-17 15:43:10 +00:00
docs Comments now support rich text formatting display (#7674) 2025-08-12 06:26:47 +00:00
packages Comments now support rich text formatting display (#7674) 2025-08-12 06:26:47 +00:00
public Move folder console to ui 2024-02-02 22:22:51 +08:00
scripts feat: add i18n tooling scripts and refine translations (#7269) 2025-03-06 10:16:59 +00:00
src Support async permission checks in route menu generator (#7688) 2025-08-17 15:43:10 +00:00
uc-src Support async permission checks in route menu generator (#7688) 2025-08-17 15:43:10 +00:00
.editorconfig Move folder console to ui 2024-02-02 22:22:51 +08:00
.env.development chore: remove unnecessary env (#6022) 2024-05-30 08:31:16 +00:00
.env.production chore: remove unnecessary env (#6022) 2024-05-30 08:31:16 +00:00
.gitignore Move folder console to ui 2024-02-02 22:22:51 +08:00
.npmrc Move folder console to ui 2024-02-02 22:22:51 +08:00
.prettierignore chore: update prettier and simplify config (#7589) 2025-06-25 09:47:21 +00:00
Makefile Move folder console to ui 2024-02-02 22:22:51 +08:00
README.md chore: bump pnpm version to 10 (#7597) 2025-06-27 07:29:24 +00:00
build.gradle Refactor dependencies and plugins with version catelog 2025-05-19 16:05:56 +08:00
env.d.ts Support async permission checks in route menu generator (#7688) 2025-08-17 15:43:10 +00:00
eslint.config.ts Ingore build directory while linting ui project (#7658) 2025-08-04 12:02:07 +08:00
index.html chore: update prettier and simplify config (#7589) 2025-06-25 09:47:21 +00:00
package.json Comments now support rich text formatting display (#7674) 2025-08-12 06:26:47 +00:00
pnpm-lock.yaml Comments now support rich text formatting display (#7674) 2025-08-12 06:26:47 +00:00
pnpm-workspace.yaml chore: update prettier and simplify config (#7589) 2025-06-25 09:47:21 +00:00
postcss.config.cjs chore: bump vite to 5.x (#5920) 2024-05-16 06:18:36 +00:00
tailwind.config.ts chore: bump tailwindcss version to 3.4 (#7604) 2025-06-29 02:25:27 +00:00
tsconfig.app.json chore: bump vue version to 3.5 (#6696) 2024-09-26 08:11:31 +00:00
tsconfig.json Move folder console to ui 2024-02-02 22:22:51 +08:00
tsconfig.node.json chore: bump tailwindcss version to 3.4 (#7604) 2025-06-29 02:25:27 +00:00
tsconfig.vitest.json Move folder console to ui 2024-02-02 22:22:51 +08:00
vite.config.ts chore: organize and fix imports (#6152) 2024-06-26 10:42:50 +00:00
vite.uc.config.ts chore: organize and fix imports (#6152) 2024-06-26 10:42:50 +00:00
vitest.config.ts chore: use rolldown-vite (#7489) 2025-06-19 16:31:11 +00:00

README.md

README

Halo logo

Halo 2.0 的管理端项目(原 halo-admin

GitHub release GitHub GitHub last commit GitHub Workflow Status Gitpod ready-to-code


当前仓库已经将 halo-admin 改为了 console。但对于 Halo 1.x 版本,依旧保持 halo-admin 的概念。

开发环境运行

npm install -g pnpm@10
pnpm install
pnpm build:packages
pnpm dev

生产构建

pnpm build

状态

Repobeats analytics