diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 287ba122..88619091 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -16,7 +16,7 @@ categories: - title: '🐞 Bug Fixes' labels: - 'bug' - - title: '📈 Performance' + - title: '📈 Performance & Enhancement' labels: - 'perf' - 'enhancement' diff --git a/apps/web-antd/src/views/_core/authentication/code-login.vue b/apps/web-antd/src/views/_core/authentication/code-login.vue index 9b13561e..096544ec 100644 --- a/apps/web-antd/src/views/_core/authentication/code-login.vue +++ b/apps/web-antd/src/views/_core/authentication/code-login.vue @@ -112,6 +112,7 @@ async function handleLogin(values: LoginCodeParams) { smsCode: values.code, grantType: 'sms', }; + console.log('login params', requestParams); await authStore.authLogin(requestParams); } catch (error) { console.error(error); diff --git a/apps/web-antd/src/views/_core/authentication/forget-password.vue b/apps/web-antd/src/views/_core/authentication/forget-password.vue index ddb17b1f..0958e89b 100644 --- a/apps/web-antd/src/views/_core/authentication/forget-password.vue +++ b/apps/web-antd/src/views/_core/authentication/forget-password.vue @@ -1,5 +1,6 @@ diff --git a/apps/web-antd/src/views/_core/authentication/login.vue b/apps/web-antd/src/views/_core/authentication/login.vue index a9accea4..8dffd3f1 100644 --- a/apps/web-antd/src/views/_core/authentication/login.vue +++ b/apps/web-antd/src/views/_core/authentication/login.vue @@ -1,5 +1,5 @@ diff --git a/apps/web-ele/package.json b/apps/web-ele/package.json index 1d2a58f9..0d222698 100644 --- a/apps/web-ele/package.json +++ b/apps/web-ele/package.json @@ -1,6 +1,6 @@ { "name": "@vben/web-ele", - "version": "5.4.1", + "version": "5.4.2", "homepage": "https://vben.pro", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/apps/web-ele/src/locales/langs/zh-CN/page.json b/apps/web-ele/src/locales/langs/zh-CN/page.json index 85fa1597..4cb67081 100644 --- a/apps/web-ele/src/locales/langs/zh-CN/page.json +++ b/apps/web-ele/src/locales/langs/zh-CN/page.json @@ -1,9 +1,9 @@ { "auth": { - "login": "登陆", + "login": "登录", "register": "注册", - "codeLogin": "验证码登陆", - "qrcodeLogin": "二维码登陆", + "codeLogin": "验证码登录", + "qrcodeLogin": "二维码登录", "forgetPassword": "忘记密码" }, "dashboard": { diff --git a/apps/web-ele/src/store/auth.ts b/apps/web-ele/src/store/auth.ts index 052def85..639fb037 100644 --- a/apps/web-ele/src/store/auth.ts +++ b/apps/web-ele/src/store/auth.ts @@ -1,5 +1,4 @@ -import type { LoginAndRegisterParams } from '@vben/common-ui'; -import type { UserInfo } from '@vben/types'; +import type { Recordable, UserInfo } from '@vben/types'; import { ref } from 'vue'; import { useRouter } from 'vue-router'; @@ -26,7 +25,7 @@ export const useAuthStore = defineStore('auth', () => { * @param params 登录表单数据 */ async function authLogin( - params: LoginAndRegisterParams, + params: Recordable, onSuccess?: () => Promise | void, ) { // 异步处理用户登录操作并获取 accessToken @@ -85,7 +84,7 @@ export const useAuthStore = defineStore('auth', () => { resetAllStores(); accessStore.setLoginExpired(false); - // 回登陆页带上当前路由地址 + // 回登录页带上当前路由地址 await router.replace({ path: LOGIN_PATH, query: redirect diff --git a/apps/web-ele/src/views/_core/authentication/code-login.vue b/apps/web-ele/src/views/_core/authentication/code-login.vue index b4ce1b76..1fc15e14 100644 --- a/apps/web-ele/src/views/_core/authentication/code-login.vue +++ b/apps/web-ele/src/views/_core/authentication/code-login.vue @@ -1,5 +1,6 @@ diff --git a/apps/web-ele/src/views/_core/authentication/forget-password.vue b/apps/web-ele/src/views/_core/authentication/forget-password.vue index ddb17b1f..0958e89b 100644 --- a/apps/web-ele/src/views/_core/authentication/forget-password.vue +++ b/apps/web-ele/src/views/_core/authentication/forget-password.vue @@ -1,5 +1,6 @@ diff --git a/apps/web-ele/src/views/_core/authentication/register.vue b/apps/web-ele/src/views/_core/authentication/register.vue index efc0fba5..f264c467 100644 --- a/apps/web-ele/src/views/_core/authentication/register.vue +++ b/apps/web-ele/src/views/_core/authentication/register.vue @@ -1,5 +1,6 @@ diff --git a/apps/web-naive/package.json b/apps/web-naive/package.json index d2a44b4f..86b494c7 100644 --- a/apps/web-naive/package.json +++ b/apps/web-naive/package.json @@ -1,6 +1,6 @@ { "name": "@vben/web-naive", - "version": "5.4.1", + "version": "5.4.2", "homepage": "https://vben.pro", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/apps/web-naive/src/locales/langs/zh-CN/page.json b/apps/web-naive/src/locales/langs/zh-CN/page.json index 6ac9b04e..6fa681ee 100644 --- a/apps/web-naive/src/locales/langs/zh-CN/page.json +++ b/apps/web-naive/src/locales/langs/zh-CN/page.json @@ -1,6 +1,6 @@ { "auth": { - "login": "登陆", + "login": "登录", "register": "注册", "codeLogin": "验证码登陆", "qrcodeLogin": "二维码登陆", diff --git a/apps/web-naive/src/store/auth.ts b/apps/web-naive/src/store/auth.ts index d5088838..20aac562 100644 --- a/apps/web-naive/src/store/auth.ts +++ b/apps/web-naive/src/store/auth.ts @@ -1,5 +1,4 @@ -import type { LoginAndRegisterParams } from '@vben/common-ui'; -import type { UserInfo } from '@vben/types'; +import type { Recordable, UserInfo } from '@vben/types'; import { ref } from 'vue'; import { useRouter } from 'vue-router'; @@ -26,7 +25,7 @@ export const useAuthStore = defineStore('auth', () => { * @param params 登录表单数据 */ async function authLogin( - params: LoginAndRegisterParams, + params: Recordable, onSuccess?: () => Promise | void, ) { // 异步处理用户登录操作并获取 accessToken @@ -85,7 +84,7 @@ export const useAuthStore = defineStore('auth', () => { resetAllStores(); accessStore.setLoginExpired(false); - // 回登陆页带上当前路由地址 + // 回登录页带上当前路由地址 await router.replace({ path: LOGIN_PATH, query: redirect diff --git a/apps/web-naive/src/views/_core/authentication/code-login.vue b/apps/web-naive/src/views/_core/authentication/code-login.vue index b4ce1b76..1fc15e14 100644 --- a/apps/web-naive/src/views/_core/authentication/code-login.vue +++ b/apps/web-naive/src/views/_core/authentication/code-login.vue @@ -1,5 +1,6 @@ diff --git a/apps/web-naive/src/views/_core/authentication/forget-password.vue b/apps/web-naive/src/views/_core/authentication/forget-password.vue index ddb17b1f..0958e89b 100644 --- a/apps/web-naive/src/views/_core/authentication/forget-password.vue +++ b/apps/web-naive/src/views/_core/authentication/forget-password.vue @@ -1,5 +1,6 @@ diff --git a/apps/web-naive/src/views/_core/authentication/register.vue b/apps/web-naive/src/views/_core/authentication/register.vue index efc0fba5..e68a88f3 100644 --- a/apps/web-naive/src/views/_core/authentication/register.vue +++ b/apps/web-naive/src/views/_core/authentication/register.vue @@ -1,5 +1,6 @@ diff --git a/docs/package.json b/docs/package.json index 79d59f87..b60ea0ca 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "@vben/docs", - "version": "5.4.1", + "version": "5.4.2", "private": true, "scripts": { "build": "vitepress build", diff --git a/docs/src/guide/in-depth/access.md b/docs/src/guide/in-depth/access.md index 5558564c..c0c4bc99 100644 --- a/docs/src/guide/in-depth/access.md +++ b/docs/src/guide/in-depth/access.md @@ -11,7 +11,7 @@ outline: deep ## 前端访问控制 -**实现原理**: 在前端固定写死路由的权限,指定路由有哪些权限可以查看。只初始化通用的路由,需要权限才能访问的路由没有被加入路由表内。在登陆后或者其他方式获取用户角色后,通过角色去遍历路由表,获取该角色可以访问的路由表,生成路由表,再通过 `router.addRoute` 添加到路由实例,实现权限的过滤。 +**实现原理**: 在前端固定写死路由的权限,指定路由有哪些权限可以查看。只初始化通用的路由,需要权限才能访问的路由没有被加入路由表内。在登录后或者其他方式获取用户角色后,通过角色去遍历路由表,获取该角色可以访问的路由表,生成路由表,再通过 `router.addRoute` 添加到路由实例,实现权限的过滤。 **缺点**: 权限相对不自由,如果后台改动角色,前台也需要跟着改动。适合角色较固定的系统 diff --git a/internal/lint-configs/commitlint-config/package.json b/internal/lint-configs/commitlint-config/package.json index aefa06ab..11d06231 100644 --- a/internal/lint-configs/commitlint-config/package.json +++ b/internal/lint-configs/commitlint-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/commitlint-config", - "version": "5.4.1", + "version": "5.4.2", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/lint-configs/stylelint-config/package.json b/internal/lint-configs/stylelint-config/package.json index df2570a7..e2d99b32 100644 --- a/internal/lint-configs/stylelint-config/package.json +++ b/internal/lint-configs/stylelint-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/stylelint-config", - "version": "5.4.1", + "version": "5.4.2", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/node-utils/package.json b/internal/node-utils/package.json index c24126b6..4903efb7 100644 --- a/internal/node-utils/package.json +++ b/internal/node-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vben/node-utils", - "version": "5.4.1", + "version": "5.4.2", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/node-utils/src/monorepo.ts b/internal/node-utils/src/monorepo.ts index 15ddb810..b6373e78 100644 --- a/internal/node-utils/src/monorepo.ts +++ b/internal/node-utils/src/monorepo.ts @@ -11,13 +11,10 @@ import { findUpSync } from 'find-up'; * @param cwd */ function findMonorepoRoot(cwd: string = process.cwd()) { - const lockFile = findUpSync( - ['pnpm-lock.yaml', 'yarn.lock', 'package-lock.json'], - { - cwd, - type: 'file', - }, - ); + const lockFile = findUpSync('pnpm-lock.yaml', { + cwd, + type: 'file', + }); return dirname(lockFile || ''); } diff --git a/internal/tailwind-config/package.json b/internal/tailwind-config/package.json index 88173645..d6b281b7 100644 --- a/internal/tailwind-config/package.json +++ b/internal/tailwind-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/tailwind-config", - "version": "5.4.1", + "version": "5.4.2", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/tsconfig/package.json b/internal/tsconfig/package.json index 2ae1803c..c99426d8 100644 --- a/internal/tsconfig/package.json +++ b/internal/tsconfig/package.json @@ -1,6 +1,6 @@ { "name": "@vben/tsconfig", - "version": "5.4.1", + "version": "5.4.2", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/vite-config/package.json b/internal/vite-config/package.json index 18e3cc0d..5636d376 100644 --- a/internal/vite-config/package.json +++ b/internal/vite-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/vite-config", - "version": "5.4.1", + "version": "5.4.2", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/vite-config/src/config/application.ts b/internal/vite-config/src/config/application.ts index f323e662..6e228c34 100644 --- a/internal/vite-config/src/config/application.ts +++ b/internal/vite-config/src/config/application.ts @@ -84,7 +84,7 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) { // 预热文件 clientFiles: [ './index.html', - './bootstrap.ts', + './src/bootstrap.ts', './src/{views,layouts,router,store,api}/*', ], }, diff --git a/package.json b/package.json index 2e88dfe8..c66dcbc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vben-admin-monorepo", - "version": "5.4.1", + "version": "5.4.2", "private": true, "keywords": [ "monorepo", diff --git a/packages/@core/base/design/package.json b/packages/@core/base/design/package.json index 1ab55971..dee14cc5 100644 --- a/packages/@core/base/design/package.json +++ b/packages/@core/base/design/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/design", - "version": "5.4.1", + "version": "5.4.2", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/base/design/src/css/global.css b/packages/@core/base/design/src/css/global.css index 2cee217f..9b96a78d 100644 --- a/packages/@core/base/design/src/css/global.css +++ b/packages/@core/base/design/src/css/global.css @@ -142,6 +142,10 @@ @apply outline-primary left-0 top-0 h-full w-full p-1 opacity-100; } + .vben-link { + @apply text-primary hover:text-primary-hover active:text-primary-active cursor-pointer; + } + .card-box { @apply bg-card text-card-foreground border-border rounded-xl border; } diff --git a/packages/@core/base/icons/package.json b/packages/@core/base/icons/package.json index 48b5e0fa..c3f867d6 100644 --- a/packages/@core/base/icons/package.json +++ b/packages/@core/base/icons/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/icons", - "version": "5.4.1", + "version": "5.4.2", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/base/shared/package.json b/packages/@core/base/shared/package.json index bc0ce04e..f7681efd 100644 --- a/packages/@core/base/shared/package.json +++ b/packages/@core/base/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/shared", - "version": "5.4.1", + "version": "5.4.2", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/base/typings/package.json b/packages/@core/base/typings/package.json index c509995d..f52d6bf6 100644 --- a/packages/@core/base/typings/package.json +++ b/packages/@core/base/typings/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/typings", - "version": "5.4.1", + "version": "5.4.2", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/composables/package.json b/packages/@core/composables/package.json index 1f0c1317..bd2c3489 100644 --- a/packages/@core/composables/package.json +++ b/packages/@core/composables/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/composables", - "version": "5.4.1", + "version": "5.4.2", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/preferences/package.json b/packages/@core/preferences/package.json index 8a8194a9..d8a3dafc 100644 --- a/packages/@core/preferences/package.json +++ b/packages/@core/preferences/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/preferences", - "version": "5.4.1", + "version": "5.4.2", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/@core/ui-kit/form-ui/src/form-render/expandable.ts b/packages/@core/ui-kit/form-ui/src/form-render/expandable.ts index a32614b2..a7b8ef41 100644 --- a/packages/@core/ui-kit/form-ui/src/form-render/expandable.ts +++ b/packages/@core/ui-kit/form-ui/src/form-render/expandable.ts @@ -22,6 +22,7 @@ export function useExpandable(props: FormRenderProps) { for (let index = 1; index <= rows; index++) { maxItem += mapping?.[index] ?? 0; } + // 保持一行 return maxItem - 1 || 1; }); @@ -35,6 +36,7 @@ export function useExpandable(props: FormRenderProps) { if (val) { await nextTick(); rowMapping.value = {}; + isCalculated.value = false; await calculateRowMapping(); } }, diff --git a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue index 17c85aea..af0ed900 100644 --- a/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue +++ b/packages/@core/ui-kit/form-ui/src/form-render/form-field.vue @@ -279,7 +279,7 @@ function autofocus() { 'flex leading-6', { 'mr-2 flex-shrink-0 justify-end': !isVertical, - 'flex-row': isVertical, + 'mb-1 flex-row': isVertical, }, labelClass, ) diff --git a/packages/@core/ui-kit/form-ui/src/form-render/form-label.vue b/packages/@core/ui-kit/form-ui/src/form-render/form-label.vue index f12dae2d..f4876b52 100644 --- a/packages/@core/ui-kit/form-ui/src/form-render/form-label.vue +++ b/packages/@core/ui-kit/form-ui/src/form-render/form-label.vue @@ -12,7 +12,7 @@ const props = defineProps();