diff --git a/.changeset/bright-spinners-wait.md b/.changeset/bright-spinners-wait.md new file mode 100644 index 000000000..5cdf2576c --- /dev/null +++ b/.changeset/bright-spinners-wait.md @@ -0,0 +1,5 @@ +--- +'@vben/layouts': patch +--- + +fix route spinner timing during fast and overlapping navigation diff --git a/.changeset/calm-apes-select.md b/.changeset/calm-apes-select.md new file mode 100644 index 000000000..10d89e057 --- /dev/null +++ b/.changeset/calm-apes-select.md @@ -0,0 +1,5 @@ +--- +'@vben/common-ui': patch +--- + +fix: forward ApiComponent updates for custom model value props diff --git a/.changeset/calm-themes-reset.md b/.changeset/calm-themes-reset.md new file mode 100644 index 000000000..85267f18e --- /dev/null +++ b/.changeset/calm-themes-reset.md @@ -0,0 +1,5 @@ +--- +'@vben-core/preferences': patch +--- + +fix: apply preference reset theme updates before cache persistence diff --git a/.changeset/eight-deserts-kneel.md b/.changeset/eight-deserts-kneel.md new file mode 100644 index 000000000..1e868b988 --- /dev/null +++ b/.changeset/eight-deserts-kneel.md @@ -0,0 +1,5 @@ +--- +'@vben-core/form-ui': patch +--- + +fix(@vben-core/form-ui): 字段名与
固有属性冲突时剥离原生 name(#8214) diff --git a/.changeset/fancy-ears-walk.md b/.changeset/fancy-ears-walk.md deleted file mode 100644 index f73cb596b..000000000 --- a/.changeset/fancy-ears-walk.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@vben/styles': patch -'@vben-core/form-ui': patch -'@vben/web-naive': patch ---- - -feat(@core/form-ui): 新增 useVbenForm 数组编辑器 VbenFormFieldArray diff --git a/.changeset/fresh-tiptap-model.md b/.changeset/fresh-tiptap-model.md new file mode 100644 index 000000000..9de9acd18 --- /dev/null +++ b/.changeset/fresh-tiptap-model.md @@ -0,0 +1,6 @@ +--- +'@vben/web-antdv-next': patch +'@vben/playground': patch +--- + +fix: bind VbenTiptap through the standard Vue model protocol diff --git a/.changeset/gentle-bells-ring.md b/.changeset/gentle-bells-ring.md new file mode 100644 index 000000000..718cf8340 --- /dev/null +++ b/.changeset/gentle-bells-ring.md @@ -0,0 +1,5 @@ +--- +'@vben/layouts': patch +--- + +fix(@vben/layouts): keep the notification status indicator circular across theme radii diff --git a/.changeset/lucky-pandas-hover.md b/.changeset/lucky-pandas-hover.md new file mode 100644 index 000000000..67d4bec8c --- /dev/null +++ b/.changeset/lucky-pandas-hover.md @@ -0,0 +1,7 @@ +--- +'@vben-core/layout-ui': patch +--- + +fix(@vben-core/layout-ui): guard sidebar hover handlers in mobile drawer mode + +移动端抽屉模式不存在 hover 语义。resize 跨断点时浏览器会对正在卸载/重排的侧栏派发合成 mouseenter/mouseleave,`handleMouseleave` 缺少 `isMobile` 守卫会把折叠态写入 `collapse` 并经 v-model 链持久化,导致窗口放大后侧栏保持折叠(#8274)。本次为 `handleMouseenter`/`handleMouseleave` 增加 `isMobile` 守卫,并附 4 项回归测试(移动端 mouseenter/mouseleave 不写状态、桌面端行为不变)。 diff --git a/.changeset/quiet-caches-wait.md b/.changeset/quiet-caches-wait.md new file mode 100644 index 000000000..092cf6878 --- /dev/null +++ b/.changeset/quiet-caches-wait.md @@ -0,0 +1,5 @@ +--- +'@vben-core/preferences': patch +--- + +fix(@vben-core/preferences): avoid unscoped localStorage before initialization diff --git a/.changeset/steady-grids-measure.md b/.changeset/steady-grids-measure.md new file mode 100644 index 000000000..b928b16d0 --- /dev/null +++ b/.changeset/steady-grids-measure.md @@ -0,0 +1,5 @@ +--- +'@vben/plugins': patch +--- + +fix(@vben/plugins): keep vxe toolbar options stable when slot content updates diff --git a/.gitattributes b/.gitattributes index d4e5bd3ed..775caa34f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,8 +4,18 @@ * text=auto eol=lf # Declare files that will always have CRLF line endings on checkout. -*.{cmd,[cC][mM][dD]} text eol=crlf -*.{bat,[bB][aA][tT]} text eol=crlf +*.cmd text eol=crlf +*.[cC][mM][dD] text eol=crlf +*.bat text eol=crlf +*.[bB][aA][tT] text eol=crlf # Denote all files that are truly binary and should not be modified. -*.{ico,png,jpg,jpeg,gif,webp,svg,woff,woff2} binary \ No newline at end of file +*.ico binary +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.webp binary +*.svg binary +*.woff binary +*.woff2 binary \ No newline at end of file diff --git a/.github/config.yml b/.github/config.yml index fe32bf9a9..0b2a1d0d3 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -21,12 +21,10 @@ newPRWelcomeComment: | firstPRMergeComment: > Thanks for your contribution! 🎉🎉🎉 - # Comment to be posted to on first time issues newIssueWelcomeComment: > Thanks for opening your first issue! Be sure to follow the issue template and provide every bit of information to help the developers! - # *OPTIONAL* default titles to check against for lack of descriptiveness # MUST BE ALL LOWERCASE requestInfoDefaultTitles: @@ -36,4 +34,3 @@ requestInfoDefaultTitles: # *Required* Comment to reply with requestInfoReplyComment: > Thanks for filing this issue/PR! It would be much appreciated if you could provide us with more information so we can effectively analyze the situation in context. - diff --git a/.github/workflows/issue-close-require.yml b/.github/workflows/issue-close-require.yml index 4efc9ce7f..794292f43 100644 --- a/.github/workflows/issue-close-require.yml +++ b/.github/workflows/issue-close-require.yml @@ -19,7 +19,7 @@ jobs: steps: # 关闭未活动的 Issues - name: Close Inactive Issues - uses: actions/stale@v10 + uses: actions/stale@v11 with: days-before-stale: -1 # Issues and PR will never be flagged stale automatically. stale-issue-label: needs-reproduction # Label that flags an issue as stale. diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3bf7ecee7..a6fd1c0ef 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -9,7 +9,7 @@ jobs: if: github.repository == 'vbenjs/vue-vben-admin' runs-on: ubuntu-latest steps: - - uses: actions/stale@v10 + - uses: actions/stale@v11 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days' diff --git a/.gitignore b/.gitignore index 20fba96c3..3a7e7ced9 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ vite.config.ts.* skills-lock.json .atomcode datalog +.playwright-mcp diff --git a/.vscode/extensions.json b/.vscode/extensions.json index d4e28662b..802025b92 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -8,8 +8,6 @@ "oxc.oxc-vscode", // Visual Studio Code 的官方 Stylelint 扩展 "stylelint.vscode-stylelint", - // 使用 oxfmt 的代码格式化程序 - "oxc.oxc-vscode", // 支持 dotenv 文件语法 "mikestead.dotenv", // YAML 语言支持,供 ESLint 校验 pnpm-workspace.yaml 等文件 diff --git a/README.ja-JP.md b/README.ja-JP.md index ca0a9775d..cd4f85b51 100644 --- a/README.ja-JP.md +++ b/README.ja-JP.md @@ -128,7 +128,7 @@ Tailwind CSS v4.0 is designed for Safari 16.4+, Chrome 111+, and Firefox 128+ ## スター歴史 -[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date) +[![Star History Chart](https://star-history.dera.page/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.dera.page/#vbenjs/vue-vben-admin&Date) ## 寄付 diff --git a/README.md b/README.md index e1c9f29cd..dd6ab8826 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ Support modern browsers, not IE ## Star History -[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date) +[![Star History Chart](https://star-history.dera.page/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.dera.page/#vbenjs/vue-vben-admin&Date) ## Donate diff --git a/README.zh-CN.md b/README.zh-CN.md index da7ec5fa8..f80f66c1d 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -128,7 +128,7 @@ Tailwind CSS v4.0 is designed for Safari 16.4+, Chrome 111+, and Firefox 128+ ## Star 历史 -[![Star History Chart](https://api.star-history.com/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.com/#vbenjs/vue-vben-admin&Date) +[![Star History Chart](https://star-history.dera.page/svg?repos=vbenjs/vue-vben-admin&type=Date)](https://star-history.dera.page/#vbenjs/vue-vben-admin&Date) ## 捐赠 diff --git a/apps/backend-mock/CHANGELOG.md b/apps/backend-mock/CHANGELOG.md new file mode 100644 index 000000000..e6a4479c2 --- /dev/null +++ b/apps/backend-mock/CHANGELOG.md @@ -0,0 +1,3 @@ +# @vben/backend-mock + +## 5.8.0 diff --git a/apps/backend-mock/package.json b/apps/backend-mock/package.json index 66961d4da..85066fc91 100644 --- a/apps/backend-mock/package.json +++ b/apps/backend-mock/package.json @@ -1,6 +1,6 @@ { "name": "@vben/backend-mock", - "version": "5.7.0", + "version": "5.8.0", "description": "", "private": true, "license": "MIT", diff --git a/apps/backend-mock/utils/mock-data.ts b/apps/backend-mock/utils/mock-data.ts index 84c416deb..82a50dd66 100644 --- a/apps/backend-mock/utils/mock-data.ts +++ b/apps/backend-mock/utils/mock-data.ts @@ -19,6 +19,7 @@ export const MOCK_USERS: UserInfo[] = [ realName: 'Vben', roles: ['super'], username: 'vben', + homePath: '/dashboard/workspace', }, { id: 1, @@ -194,18 +195,46 @@ export const MOCK_MENUS = [ export const MOCK_MENU_LIST = [ { id: 1, - name: 'Workspace', + name: 'Dashboard', status: 1, - type: 'menu', - icon: 'mdi:dashboard', - path: '/workspace', - component: '/dashboard/workspace/index', + type: 'catalog', + icon: 'lucide:layout-dashboard', + path: '/dashboard', meta: { - icon: 'carbon:workspace', - title: 'page.dashboard.workspace', - affixTab: true, - order: 0, + icon: 'lucide:layout-dashboard', + order: -1, + title: 'page.dashboard.title', }, + children: [ + { + id: 101, + pid: 1, + status: 1, + type: 'menu', + name: 'Analytics', + path: 'analytics', + component: '/dashboard/analytics/index', + meta: { + affixTab: true, + icon: 'lucide:area-chart', + title: 'page.dashboard.analytics', + keepAlive: true, + }, + }, + { + id: 102, + pid: 1, + status: 1, + type: 'menu', + name: 'Workspace', + path: 'workspace', + component: '/views/dashboard/workspace/index', + meta: { + icon: 'carbon:workspace', + title: 'page.dashboard.workspace', + }, + }, + ], }, { id: 2, diff --git a/apps/web-antd/CHANGELOG.md b/apps/web-antd/CHANGELOG.md new file mode 100644 index 000000000..534937066 --- /dev/null +++ b/apps/web-antd/CHANGELOG.md @@ -0,0 +1,23 @@ +# @vben/web-antd + +## 5.8.0 + +### Patch Changes + +- [#8308](https://github.com/vbenjs/vue-vben-admin/pull/8308) [`81f179e`](https://github.com/vbenjs/vue-vben-admin/commit/81f179ed4c39cffe05aa0243843679ffd5c13dcd) Thanks [@kilisamemarisaaa](https://github.com/kilisamemarisaaa)! - fix(apps): pass withCredentials as request config for refresh/logout + +- Updated dependencies [[`9ffd42f`](https://github.com/vbenjs/vue-vben-admin/commit/9ffd42f013825f94278165027bc210a5314d3998), [`1d95f29`](https://github.com/vbenjs/vue-vben-admin/commit/1d95f298bdce48a1f3d4cec1ed1f182bfe265268), [`390efe9`](https://github.com/vbenjs/vue-vben-admin/commit/390efe9f604d7994f82156b89b0a76f61788a5d9), [`728ba5f`](https://github.com/vbenjs/vue-vben-admin/commit/728ba5f5744b5c2de3850a99bff5afe0b9872198)]: + - @vben/styles@5.8.0 + - @vben/plugins@5.8.0 + - @vben/preferences@5.8.0 + - @vben/layouts@5.8.0 + - @vben/common-ui@5.8.0 + - @vben/access@5.8.0 + - @vben/hooks@5.8.0 + - @vben/constants@5.8.0 + - @vben/request@5.8.0 + - @vben/icons@5.8.0 + - @vben/locales@5.8.0 + - @vben/stores@5.8.0 + - @vben/types@5.8.0 + - @vben/utils@5.8.0 diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 7b315532d..476ab4375 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -1,6 +1,6 @@ { "name": "@vben/web-antd", - "version": "5.7.0", + "version": "5.8.0", "homepage": "https://vben.pro", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/apps/web-antd/src/adapter/form.ts b/apps/web-antd/src/adapter/form.ts index b14015a5d..67aae1560 100644 --- a/apps/web-antd/src/adapter/form.ts +++ b/apps/web-antd/src/adapter/form.ts @@ -1,6 +1,7 @@ import type { VbenFormProps as FormProps, VbenFormSchema as FormSchema, + FormValues, } from '@vben/common-ui'; import type { ComponentPropsMap, ComponentType } from './component'; @@ -22,7 +23,7 @@ async function initSetupVbenForm() { Upload: 'fileList', }, }, - defineRules: { + rules: { // 输入项目必填国际化适配 required: (value, _params, ctx) => { if (value === undefined || value === null || value.length === 0) { @@ -41,9 +42,27 @@ async function initSetupVbenForm() { }); } -const useVbenForm = useForm; +function useVbenForm< + TFormValues extends FormValues = FormValues, + TSubmitValues extends FormValues = TFormValues, +>( + options: FormProps< + ComponentType, + ComponentPropsMap, + TFormValues, + TSubmitValues + >, +) { + return useForm( + options, + ); +} export { initSetupVbenForm, useVbenForm, z }; -export type VbenFormSchema = FormSchema; -export type VbenFormProps = FormProps; +export type VbenFormSchema = + FormSchema; +export type VbenFormProps< + TFormValues extends FormValues = FormValues, + TSubmitValues extends FormValues = TFormValues, +> = FormProps; diff --git a/apps/web-antd/src/adapter/vxe-table.ts b/apps/web-antd/src/adapter/vxe-table.ts index 7dd273f5e..75b56375d 100644 --- a/apps/web-antd/src/adapter/vxe-table.ts +++ b/apps/web-antd/src/adapter/vxe-table.ts @@ -1,3 +1,4 @@ +import type { FormValues } from '@vben/common-ui'; import type { VxeTableGridOptions } from '@vben/plugins/vxe-table'; import type { ComponentPropsMap, ComponentType } from './component'; @@ -70,8 +71,23 @@ setupVbenVxeTable({ useVbenForm, }); -export const useVbenVxeGrid = >( - ...rest: Parameters> -) => useGrid(...rest); +export const useVbenVxeGrid = < + T extends Record, + TFormValues extends FormValues = FormValues, + TSubmitValues extends FormValues = TFormValues, +>( + ...rest: Parameters< + typeof useGrid< + T, + ComponentType, + ComponentPropsMap, + TFormValues, + TSubmitValues + > + > +) => + useGrid( + ...rest, + ); export type * from '@vben/plugins/vxe-table'; diff --git a/apps/web-antd/src/api/core/auth.ts b/apps/web-antd/src/api/core/auth.ts index 71d9f9943..42d54dcb2 100644 --- a/apps/web-antd/src/api/core/auth.ts +++ b/apps/web-antd/src/api/core/auth.ts @@ -29,16 +29,20 @@ export async function loginApi(data: AuthApi.LoginParams) { * 刷新accessToken */ export async function refreshTokenApi() { - return baseRequestClient.post('/auth/refresh', { - withCredentials: true, - }); + return baseRequestClient.post( + '/auth/refresh', + undefined, + { + withCredentials: true, + }, + ); } /** * 退出登录 */ export async function logoutApi() { - return baseRequestClient.post('/auth/logout', { + return baseRequestClient.post('/auth/logout', undefined, { withCredentials: true, }); } diff --git a/apps/web-antd/src/layouts/basic.vue b/apps/web-antd/src/layouts/basic.vue index c938f09cd..e85dd1cfc 100644 --- a/apps/web-antd/src/layouts/basic.vue +++ b/apps/web-antd/src/layouts/basic.vue @@ -217,7 +217,12 @@ watch(