halo/console
Ryan Wang d0cc9005b0
perf: improve router scrollBehavior configuration (#3834)
#### What type of PR is this?

/kind improvement
/area console
/milestone 2.5.x

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

修改 Vue Router 的 scrollBehavior 配置,添加是否是不同路由的跳转,如果是才会在跳转之后滚动到页面顶部。可以解决在 https://github.com/halo-dev/halo/issues/3833 中提到的打开附件详情之后,列表滚动到顶部的问题。这是因为在打开附件详情的时候会修改路由的参数。

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

Fixes #3833 

#### Special notes for your reviewer:

测试方式:

1. 上传若干附件,滚动到列表底部。
2. 然后打开某个附件详情,观察列表是否自动滚动到了顶部,如果没有,则修改有效。

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

```release-note
None
```
2023-04-24 10:00:55 +00:00
..
.changeset Move root to console 2023-03-02 15:49:22 +08:00
.husky Refactor workflow for new console project (#3445) 2023-03-02 18:07:23 +08:00
.vscode Move root to console 2023-03-02 15:49:22 +08:00
cypress Move root to console 2023-03-02 15:49:22 +08:00
docs feat: add accepts and min,max props for attachment selector modal component (#3827) 2023-04-24 07:45:44 +00:00
packages refactor: add custom API for create user (#3803) 2023-04-24 08:19:42 +00:00
public Move root to console 2023-03-02 15:49:22 +08:00
src perf: improve router scrollBehavior configuration (#3834) 2023-04-24 10:00:55 +00:00
.editorconfig Move root to console 2023-03-02 15:49:22 +08:00
.env.development Configure default external-url as slash (#3655) 2023-04-03 03:50:13 +00:00
.env.production Move root to console 2023-03-02 15:49:22 +08:00
.eslintrc.cjs Move root to console 2023-03-02 15:49:22 +08:00
.gitignore Refactor workflow for new console project (#3445) 2023-03-02 18:07:23 +08:00
.gitpod.yml Move root to console 2023-03-02 15:49:22 +08:00
.npmignore Move root to console 2023-03-02 15:49:22 +08:00
.npmrc Move root to console 2023-03-02 15:49:22 +08:00
.prettierignore feat: add i18n supports for console (#3506) 2023-03-23 08:54:33 +00:00
Makefile Support publishing to maven central repository (#3767) 2023-04-18 14:28:23 +08:00
OWNERS Refactor workflow for new console project (#3445) 2023-03-02 18:07:23 +08:00
README.md Move root to console 2023-03-02 15:49:22 +08:00
cypress.json Move root to console 2023-03-02 15:49:22 +08:00
env.d.ts Move root to console 2023-03-02 15:49:22 +08:00
index.html Move root to console 2023-03-02 15:49:22 +08:00
package.json chore: set eslint max-warnings option and remove unused imports (#3822) 2023-04-23 04:37:33 +00:00
pnpm-lock.yaml chore: bump tanstack query version and disable refetchOnWindowFocus option by default (#3771) 2023-04-23 03:37:56 +00:00
pnpm-workspace.yaml Move root to console 2023-03-02 15:49:22 +08:00
postcss.config.js Move root to console 2023-03-02 15:49:22 +08:00
prettier.config.js Move root to console 2023-03-02 15:49:22 +08:00
tailwind.config.js Move root to console 2023-03-02 15:49:22 +08:00
tsconfig.app.json feat: add i18n supports for console (#3506) 2023-03-23 08:54:33 +00:00
tsconfig.json Move root to console 2023-03-02 15:49:22 +08:00
tsconfig.vite-config.json Move root to console 2023-03-02 15:49:22 +08:00
tsconfig.vitest.json Move root to console 2023-03-02 15:49:22 +08:00
vite.config.ts fix: output dir of console (#3591) 2023-03-27 08:34:11 +00:00
vitest.config.ts Move root to console 2023-03-02 15:49:22 +08: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 的概念。

开发环境运行

# pnpm@7.0.0+
npm install -g pnpm
pnpm install 
pnpm build:packages
pnpm dev

生产构建

pnpm build

状态

Repobeats analytics