diff --git a/apps/backend-mock/nitro.config.ts b/apps/backend-mock/nitro.config.ts index b3013298de4..c2d7297fb75 100644 --- a/apps/backend-mock/nitro.config.ts +++ b/apps/backend-mock/nitro.config.ts @@ -1,5 +1,6 @@ import errorHandler from './error'; +process.env.COMPATIBILITY_DATE = new Date().toISOString(); export default defineNitroConfig({ devErrorHandler: errorHandler, errorHandler: '~/error', diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 60e919fa343..10c8498f3f9 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -1,6 +1,6 @@ { "name": "@vben/web-antd", - "version": "5.4.3", + "version": "5.4.4", "homepage": "https://vben.pro", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/apps/web-antd/src/adapter/vxe-table.ts b/apps/web-antd/src/adapter/vxe-table.ts index 06c3f1a4df3..d296b205059 100644 --- a/apps/web-antd/src/adapter/vxe-table.ts +++ b/apps/web-antd/src/adapter/vxe-table.ts @@ -38,7 +38,7 @@ setupVbenVxeTable({ // 表格配置项可以用 cellRender: { name: 'CellImage' }, vxeUI.renderer.add('CellImage', { - renderDefault(_renderOpts, params) { + renderTableDefault(_renderOpts, params) { const { column, row } = params; return h(Image, { src: row[column.field] }); }, @@ -46,7 +46,7 @@ setupVbenVxeTable({ // 表格配置项可以用 cellRender: { name: 'CellLink' }, vxeUI.renderer.add('CellLink', { - renderDefault(renderOpts) { + renderTableDefault(renderOpts) { const { props } = renderOpts; return h( Button, diff --git a/apps/web-antd/src/bootstrap.ts b/apps/web-antd/src/bootstrap.ts index f88b41b1224..963d1c7f731 100644 --- a/apps/web-antd/src/bootstrap.ts +++ b/apps/web-antd/src/bootstrap.ts @@ -1,11 +1,14 @@ -import { createApp } from 'vue'; +import { createApp, watchEffect } from 'vue'; import { registerAccessDirective } from '@vben/access'; +import { preferences } from '@vben/preferences'; import { initStores } from '@vben/stores'; import '@vben/styles'; import '@vben/styles/antd'; -import { setupI18n } from '#/locales'; +import { useTitle } from '@vueuse/core'; + +import { $t, setupI18n } from '#/locales'; import { initComponentAdapter } from './adapter/component'; import App from './app.vue'; @@ -29,6 +32,16 @@ async function bootstrap(namespace: string) { // 配置路由及路由守卫 app.use(router); + // 动态更新标题 + watchEffect(() => { + if (preferences.app.dynamicTitle) { + const routeTitle = router.currentRoute.value.meta?.title; + const pageTitle = + (routeTitle ? `${$t(routeTitle)} - ` : '') + preferences.app.name; + useTitle(pageTitle); + } + }); + app.mount('#app'); } diff --git a/apps/web-antd/src/router/guard.ts b/apps/web-antd/src/router/guard.ts index 52edfe015b6..fce5a892c21 100644 --- a/apps/web-antd/src/router/guard.ts +++ b/apps/web-antd/src/router/guard.ts @@ -5,9 +5,6 @@ import { preferences } from '@vben/preferences'; import { useAccessStore, useUserStore } from '@vben/stores'; import { startProgress, stopProgress } from '@vben/utils'; -import { useTitle } from '@vueuse/core'; - -import { $t } from '#/locales'; import { accessRoutes, coreRouteNames } from '#/router/routes'; import { useAuthStore } from '#/store'; @@ -40,13 +37,6 @@ function setupCommonGuard(router: Router) { if (preferences.transition.progress) { stopProgress(); } - - // 动态修改标题 - if (preferences.app.dynamicTitle) { - const { title } = to.meta; - // useTitle(`${$t(title)} - ${preferences.app.name}`); - useTitle(`${$t(title)} - ${preferences.app.name}`); - } }); } diff --git a/apps/web-ele/package.json b/apps/web-ele/package.json index e4e733fd9ea..507f428ec77 100644 --- a/apps/web-ele/package.json +++ b/apps/web-ele/package.json @@ -1,6 +1,6 @@ { "name": "@vben/web-ele", - "version": "5.4.3", + "version": "5.4.4", "homepage": "https://vben.pro", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/apps/web-ele/src/adapter/vxe-table.ts b/apps/web-ele/src/adapter/vxe-table.ts index 067451e4646..44b31eaed00 100644 --- a/apps/web-ele/src/adapter/vxe-table.ts +++ b/apps/web-ele/src/adapter/vxe-table.ts @@ -38,7 +38,7 @@ setupVbenVxeTable({ // 表格配置项可以用 cellRender: { name: 'CellImage' }, vxeUI.renderer.add('CellImage', { - renderDefault(_renderOpts, params) { + renderTableDefault(_renderOpts, params) { const { column, row } = params; const src = row[column.field]; return h(ElImage, { src, previewSrcList: [src] }); @@ -47,7 +47,7 @@ setupVbenVxeTable({ // 表格配置项可以用 cellRender: { name: 'CellLink' }, vxeUI.renderer.add('CellLink', { - renderDefault(renderOpts) { + renderTableDefault(renderOpts) { const { props } = renderOpts; return h( ElButton, diff --git a/apps/web-ele/src/bootstrap.ts b/apps/web-ele/src/bootstrap.ts index 7311d665c46..de18847307d 100644 --- a/apps/web-ele/src/bootstrap.ts +++ b/apps/web-ele/src/bootstrap.ts @@ -1,11 +1,14 @@ -import { createApp } from 'vue'; +import { createApp, watchEffect } from 'vue'; import { registerAccessDirective } from '@vben/access'; +import { preferences } from '@vben/preferences'; import { initStores } from '@vben/stores'; import '@vben/styles'; import '@vben/styles/ele'; -import { setupI18n } from '#/locales'; +import { useTitle } from '@vueuse/core'; + +import { $t, setupI18n } from '#/locales'; import { initComponentAdapter } from './adapter/component'; import App from './app.vue'; @@ -28,6 +31,16 @@ async function bootstrap(namespace: string) { // 配置路由及路由守卫 app.use(router); + // 动态更新标题 + watchEffect(() => { + if (preferences.app.dynamicTitle) { + const routeTitle = router.currentRoute.value.meta?.title; + const pageTitle = + (routeTitle ? `${$t(routeTitle)} - ` : '') + preferences.app.name; + useTitle(pageTitle); + } + }); + app.mount('#app'); } diff --git a/apps/web-ele/src/router/guard.ts b/apps/web-ele/src/router/guard.ts index 52edfe015b6..fce5a892c21 100644 --- a/apps/web-ele/src/router/guard.ts +++ b/apps/web-ele/src/router/guard.ts @@ -5,9 +5,6 @@ import { preferences } from '@vben/preferences'; import { useAccessStore, useUserStore } from '@vben/stores'; import { startProgress, stopProgress } from '@vben/utils'; -import { useTitle } from '@vueuse/core'; - -import { $t } from '#/locales'; import { accessRoutes, coreRouteNames } from '#/router/routes'; import { useAuthStore } from '#/store'; @@ -40,13 +37,6 @@ function setupCommonGuard(router: Router) { if (preferences.transition.progress) { stopProgress(); } - - // 动态修改标题 - if (preferences.app.dynamicTitle) { - const { title } = to.meta; - // useTitle(`${$t(title)} - ${preferences.app.name}`); - useTitle(`${$t(title)} - ${preferences.app.name}`); - } }); } diff --git a/apps/web-naive/package.json b/apps/web-naive/package.json index 1d4dae0b337..9fc512d286a 100644 --- a/apps/web-naive/package.json +++ b/apps/web-naive/package.json @@ -1,6 +1,6 @@ { "name": "@vben/web-naive", - "version": "5.4.3", + "version": "5.4.4", "homepage": "https://vben.pro", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/apps/web-naive/src/adapter/vxe-table.ts b/apps/web-naive/src/adapter/vxe-table.ts index 271a5baf2fe..081cfb29ebe 100644 --- a/apps/web-naive/src/adapter/vxe-table.ts +++ b/apps/web-naive/src/adapter/vxe-table.ts @@ -38,7 +38,7 @@ setupVbenVxeTable({ // 表格配置项可以用 cellRender: { name: 'CellImage' }, vxeUI.renderer.add('CellImage', { - renderDefault(_renderOpts, params) { + renderTableDefault(_renderOpts, params) { const { column, row } = params; return h(NImage, { src: row[column.field] }); }, @@ -46,7 +46,7 @@ setupVbenVxeTable({ // 表格配置项可以用 cellRender: { name: 'CellLink' }, vxeUI.renderer.add('CellLink', { - renderDefault(renderOpts) { + renderTableDefault(renderOpts) { const { props } = renderOpts; return h( NButton, diff --git a/apps/web-naive/src/bootstrap.ts b/apps/web-naive/src/bootstrap.ts index 13ab95cba92..fc7f961d6e9 100644 --- a/apps/web-naive/src/bootstrap.ts +++ b/apps/web-naive/src/bootstrap.ts @@ -1,10 +1,13 @@ -import { createApp } from 'vue'; +import { createApp, watchEffect } from 'vue'; import { registerAccessDirective } from '@vben/access'; +import { preferences } from '@vben/preferences'; import { initStores } from '@vben/stores'; import '@vben/styles'; -import { setupI18n } from '#/locales'; +import { useTitle } from '@vueuse/core'; + +import { $t, setupI18n } from '#/locales'; import { initComponentAdapter } from './adapter/component'; import App from './app.vue'; @@ -27,6 +30,16 @@ async function bootstrap(namespace: string) { // 配置路由及路由守卫 app.use(router); + // 动态更新标题 + watchEffect(() => { + if (preferences.app.dynamicTitle) { + const routeTitle = router.currentRoute.value.meta?.title; + const pageTitle = + (routeTitle ? `${$t(routeTitle)} - ` : '') + preferences.app.name; + useTitle(pageTitle); + } + }); + app.mount('#app'); } diff --git a/apps/web-naive/src/router/guard.ts b/apps/web-naive/src/router/guard.ts index d12003c0611..c95d994ecb7 100644 --- a/apps/web-naive/src/router/guard.ts +++ b/apps/web-naive/src/router/guard.ts @@ -5,9 +5,6 @@ import { preferences } from '@vben/preferences'; import { useAccessStore, useUserStore } from '@vben/stores'; import { startProgress, stopProgress } from '@vben/utils'; -import { useTitle } from '@vueuse/core'; - -import { $t } from '#/locales'; import { accessRoutes, coreRouteNames } from '#/router/routes'; import { useAuthStore } from '#/store'; @@ -40,13 +37,6 @@ function setupCommonGuard(router: Router) { if (preferences.transition.progress) { stopProgress(); } - - // 动态修改标题 - if (preferences.app.dynamicTitle) { - const { title } = to.meta; - // useTitle(`${$t(title)} - ${preferences.app.name}`); - useTitle(`${$t(title)} - ${preferences.app.name}`); - } }); } diff --git a/docs/package.json b/docs/package.json index 0585e667873..1ffb313bfe5 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "@vben/docs", - "version": "5.4.3", + "version": "5.4.4", "private": true, "scripts": { "build": "vitepress build", diff --git a/docs/src/en/guide/essentials/development.md b/docs/src/en/guide/essentials/development.md index 287c0a96158..da7cfd8cee2 100644 --- a/docs/src/en/guide/essentials/development.md +++ b/docs/src/en/guide/essentials/development.md @@ -150,6 +150,12 @@ To run the `docs` application: pnpm dev:docs ``` +## Public Static Resources + +If you need to use public static resources in the project, such as images, static HTML, etc., and you want to directly import them in the development process through `src="/xxx.png"`. + +You need to put the resource in the corresponding project's `public/static` directory. The import path for the resource should be `src="/static/xxx.png"`. + ## DevTools The project has a built-in [Vue DevTools](https://github.com/vuejs/devtools-next) plugin, which can be used during development. It is disabled by default, but can be enabled in the `.env.development` file. After enabling it, restart the project: diff --git a/docs/src/en/guide/introduction/quick-start.md b/docs/src/en/guide/introduction/quick-start.md index da51b970e0a..d4829dcefd1 100644 --- a/docs/src/en/guide/introduction/quick-start.md +++ b/docs/src/en/guide/introduction/quick-start.md @@ -10,7 +10,7 @@ outline: deep Before starting the project, ensure that your environment meets the following requirements: -- [Node.js](https://nodejs.org/en) version 20 or above. It is recommended to use [fnm](https://github.com/Schniz/fnm) or [nvm](https://github.com/nvm-sh/nvm) for version management. +- [Node.js](https://nodejs.org/en) version 20.15.0 or above. It is recommended to use [fnm](https://github.com/Schniz/fnm), [nvm](https://github.com/nvm-sh/nvm), or directly use [pnpm](https://pnpm.io/cli/env) for version management. - [Git](https://git-scm.com/) any version. To verify if your environment meets the above requirements, you can check the versions using the following commands: diff --git a/docs/src/guide/essentials/development.md b/docs/src/guide/essentials/development.md index 7e64564f20b..556e4c9dd99 100644 --- a/docs/src/guide/essentials/development.md +++ b/docs/src/guide/essentials/development.md @@ -150,6 +150,12 @@ pnpm dev:ele pnpm dev:docs ``` +## 公共静态资源 + +项目中需要使用到的公共静态资源,如:图片、静态HTML等,需要在开发中通过 `src="/xxx.png"` 直接引入的。 + +需要将资源放在对应项目的 `public/static` 目录下。引入的路径为:`src="/static/xxx.png"`。 + ## DevTools 项目内置了 [Vue DevTools](https://github.com/vuejs/devtools-next) 插件,可以在开发过程中使用。默认关闭,可在`.env.development` 内开启,并重新运行项目即可: diff --git a/docs/src/guide/in-depth/loading.md b/docs/src/guide/in-depth/loading.md index ff89dcb895a..60e69378cad 100644 --- a/docs/src/guide/in-depth/loading.md +++ b/docs/src/guide/in-depth/loading.md @@ -6,7 +6,7 @@ ## 原理 -由 `vite-plugin-inject-app-loading` 插件实现,插件会在每个应用的注入一个全局的 `loading html`。 +由 `vite-plugin-inject-app-loading` 插件实现,插件会在每个应用都注入一个全局的 `loading html`。 ## 关闭 diff --git a/docs/src/guide/introduction/quick-start.md b/docs/src/guide/introduction/quick-start.md index 9863e0d4969..1d7437f9bee 100644 --- a/docs/src/guide/introduction/quick-start.md +++ b/docs/src/guide/introduction/quick-start.md @@ -10,7 +10,7 @@ outline: deep 在启动项目前,你需要确保你的环境满足以下要求: -- [Node.js](https://nodejs.org/en) 20.15.0 及以上版本,推荐使用 [fnm](https://github.com/Schniz/fnm) 或者 [nvm](https://github.com/nvm-sh/nvm) 进行版本管理。 +- [Node.js](https://nodejs.org/en) 20.15.0 及以上版本,推荐使用 [fnm](https://github.com/Schniz/fnm) 、 [nvm](https://github.com/nvm-sh/nvm) 或者直接使用[pnpm](https://pnpm.io/cli/env) 进行版本管理。 - [Git](https://git-scm.com/) 任意版本。 验证你的环境是否满足以上要求,你可以通过以下命令查看版本: diff --git a/internal/lint-configs/commitlint-config/package.json b/internal/lint-configs/commitlint-config/package.json index e32b0e4105c..4c6ebea46ff 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.3", + "version": "5.4.4", "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 9a18202e378..d492731d832 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.3", + "version": "5.4.4", "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 06377d03e27..76e5b83bc8f 100644 --- a/internal/node-utils/package.json +++ b/internal/node-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vben/node-utils", - "version": "5.4.3", + "version": "5.4.4", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", diff --git a/internal/tailwind-config/build.config.ts b/internal/tailwind-config/build.config.ts index e79fb56fabc..1f3c3c22087 100644 --- a/internal/tailwind-config/build.config.ts +++ b/internal/tailwind-config/build.config.ts @@ -4,7 +4,6 @@ export default defineBuildConfig({ clean: true, declaration: true, entries: ['src/index', './src/postcss.config'], - externals: ['@vben/node-utils'], rollup: { emitCJS: true, }, diff --git a/internal/tailwind-config/package.json b/internal/tailwind-config/package.json index e0c65983cc5..f3062b9cf9e 100644 --- a/internal/tailwind-config/package.json +++ b/internal/tailwind-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/tailwind-config", - "version": "5.4.3", + "version": "5.4.4", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", @@ -12,7 +12,7 @@ "license": "MIT", "type": "module", "scripts": { - "stub": "pnpm unbuild --stub" + "stub": "pnpm unbuild" }, "files": [ "dist" @@ -48,6 +48,7 @@ "dependencies": { "@iconify/json": "catalog:", "@iconify/tailwind": "catalog:", + "@manypkg/get-packages": "catalog:", "@tailwindcss/nesting": "catalog:", "@tailwindcss/typography": "catalog:", "autoprefixer": "catalog:", @@ -60,7 +61,6 @@ "tailwindcss-animate": "catalog:" }, "devDependencies": { - "@types/postcss-import": "catalog:", - "@vben/node-utils": "workspace:*" + "@types/postcss-import": "catalog:" } } diff --git a/internal/tailwind-config/src/index.ts b/internal/tailwind-config/src/index.ts index caee73e7b57..dafaaf91e73 100644 --- a/internal/tailwind-config/src/index.ts +++ b/internal/tailwind-config/src/index.ts @@ -2,9 +2,8 @@ import type { Config } from 'tailwindcss'; import path from 'node:path'; -import { getPackagesSync } from '@vben/node-utils'; - import { addDynamicIconSelectors } from '@iconify/tailwind'; +import { getPackagesSync } from '@manypkg/get-packages'; import typographyPlugin from '@tailwindcss/typography'; import animate from 'tailwindcss-animate'; @@ -12,7 +11,7 @@ import { enterAnimationPlugin } from './plugins/entry'; // import defaultTheme from 'tailwindcss/defaultTheme'; -const { packages } = getPackagesSync(); +const { packages } = getPackagesSync(process.cwd()); const tailwindPackages: string[] = []; diff --git a/internal/tsconfig/package.json b/internal/tsconfig/package.json index f978a12c75f..e8d491e2b8b 100644 --- a/internal/tsconfig/package.json +++ b/internal/tsconfig/package.json @@ -1,6 +1,6 @@ { "name": "@vben/tsconfig", - "version": "5.4.3", + "version": "5.4.4", "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 18250107b9f..5f674f4769b 100644 --- a/internal/vite-config/package.json +++ b/internal/vite-config/package.json @@ -1,6 +1,6 @@ { "name": "@vben/vite-config", - "version": "5.4.3", + "version": "5.4.4", "private": true, "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", @@ -35,7 +35,6 @@ "html-minifier-terser": "catalog:", "nitropack": "catalog:", "resolve.exports": "catalog:", - "vite-plugin-lib-inject-css": "catalog:", "vite-plugin-pwa": "catalog:", "vite-plugin-vue-devtools": "catalog:" }, diff --git a/internal/vite-config/src/config/common.ts b/internal/vite-config/src/config/common.ts index 2addff0cbfe..653f21040b7 100644 --- a/internal/vite-config/src/config/common.ts +++ b/internal/vite-config/src/config/common.ts @@ -3,7 +3,7 @@ import type { UserConfig } from 'vite'; async function getCommonConfig(): Promise { return { build: { - chunkSizeWarningLimit: 1000, + chunkSizeWarningLimit: 2000, reportCompressedSize: false, sourcemap: false, }, diff --git a/internal/vite-config/src/config/library.ts b/internal/vite-config/src/config/library.ts index 759fc7bc3ff..08b8135207f 100644 --- a/internal/vite-config/src/config/library.ts +++ b/internal/vite-config/src/config/library.ts @@ -19,7 +19,6 @@ function defineLibraryConfig(userConfigPromise?: DefineLibraryOptions) { const plugins = await loadLibraryPlugins({ dts: false, - injectLibCss: true, injectMetadata: true, isBuild, mode, diff --git a/internal/vite-config/src/plugins/index.ts b/internal/vite-config/src/plugins/index.ts index 1a8e7c263ee..691d32249a6 100644 --- a/internal/vite-config/src/plugins/index.ts +++ b/internal/vite-config/src/plugins/index.ts @@ -14,7 +14,6 @@ import { visualizer as viteVisualizerPlugin } from 'rollup-plugin-visualizer'; import viteCompressPlugin from 'vite-plugin-compression'; import viteDtsPlugin from 'vite-plugin-dts'; import { createHtmlPlugin as viteHtmlPlugin } from 'vite-plugin-html'; -import { libInjectCss as viteLibInjectCss } from 'vite-plugin-lib-inject-css'; import { VitePWA } from 'vite-plugin-pwa'; import viteVueDevTools from 'vite-plugin-vue-devtools'; @@ -225,7 +224,7 @@ async function loadLibraryPlugins( ): Promise { // 单独取,否则commonOptions拿不到 const isBuild = options.isBuild; - const { dts, injectLibCss, ...commonOptions } = options; + const { dts, ...commonOptions } = options; const commonPlugins = await loadCommonPlugins(commonOptions); return await loadConditionPlugins([ ...commonPlugins, @@ -233,10 +232,6 @@ async function loadLibraryPlugins( condition: isBuild && !!dts, plugins: () => [viteDtsPlugin({ logLevel: 'error' })], }, - { - condition: injectLibCss, - plugins: () => [viteLibInjectCss()], - }, ]); } diff --git a/internal/vite-config/src/typing.ts b/internal/vite-config/src/typing.ts index 907a723e48b..31683cc75bf 100644 --- a/internal/vite-config/src/typing.ts +++ b/internal/vite-config/src/typing.ts @@ -130,9 +130,6 @@ interface ApplicationPluginOptions extends CommonPluginOptions { interface LibraryPluginOptions extends CommonPluginOptions { /** 开启 dts 输出 */ dts?: boolean | PluginOptions; - - /** 是否注入lib css */ - injectLibCss?: boolean; } type ApplicationOptions = ApplicationPluginOptions; diff --git a/package.json b/package.json index eeb59afdf62..0b9b6e65479 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vben-admin-monorepo", - "version": "5.4.3", + "version": "5.4.4", "private": true, "keywords": [ "monorepo", @@ -107,6 +107,7 @@ } }, "overrides": { + "@ast-grep/napi": "catalog:", "@ctrl/tinycolor": "catalog:", "clsx": "catalog:", "pinia": "catalog:", diff --git a/packages/@core/base/design/package.json b/packages/@core/base/design/package.json index 54495aba44f..6bd979adc38 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.3", + "version": "5.4.4", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { @@ -28,7 +28,7 @@ ".": { "types": "./src/index.ts", "development": "./src/index.ts", - "default": "./dist/index.mjs" + "default": "./dist/style.css" } }, "publishConfig": { diff --git a/packages/@core/base/icons/package.json b/packages/@core/base/icons/package.json index 216d11f1e08..ae7eda6ec0a 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.3", + "version": "5.4.4", "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 747610b04f2..6541b7772f4 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.3", + "version": "5.4.4", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { @@ -81,10 +81,12 @@ "dependencies": { "@ctrl/tinycolor": "catalog:", "@tanstack/vue-store": "catalog:", + "@types/lodash.get": "catalog:", "@vue/shared": "catalog:", "clsx": "catalog:", "defu": "catalog:", "lodash.clonedeep": "catalog:", + "lodash.get": "catalog:", "nprogress": "catalog:", "tailwind-merge": "catalog:", "theme-colors": "catalog:" diff --git a/packages/@core/base/typings/package.json b/packages/@core/base/typings/package.json index 43863abbf7d..4fee2e31b5d 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.3", + "version": "5.4.4", "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 a0a864550b9..b42b9366282 100644 --- a/packages/@core/composables/package.json +++ b/packages/@core/composables/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/composables", - "version": "5.4.3", + "version": "5.4.4", "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 5961a1b64b1..6eaca4d640d 100644 --- a/packages/@core/preferences/package.json +++ b/packages/@core/preferences/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/preferences", - "version": "5.4.3", + "version": "5.4.4", "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/layout-ui/package.json b/packages/@core/ui-kit/layout-ui/package.json index 46f8074d92b..15f0b58e1b4 100644 --- a/packages/@core/ui-kit/layout-ui/package.json +++ b/packages/@core/ui-kit/layout-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/layout-ui", - "version": "5.4.3", + "version": "5.4.4", "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/menu-ui/package.json b/packages/@core/ui-kit/menu-ui/package.json index 39edef3b935..b421d9e4682 100644 --- a/packages/@core/ui-kit/menu-ui/package.json +++ b/packages/@core/ui-kit/menu-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/menu-ui", - "version": "5.4.3", + "version": "5.4.4", "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/shadcn-ui/package.json b/packages/@core/ui-kit/shadcn-ui/package.json index 87a3a264dc4..9b9cce10267 100644 --- a/packages/@core/ui-kit/shadcn-ui/package.json +++ b/packages/@core/ui-kit/shadcn-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/shadcn-ui", - "version": "5.4.3", + "version": "5.4.4", "#main": "./dist/index.mjs", "#module": "./dist/index.mjs", "homepage": "https://github.com/vbenjs/vue-vben-admin", diff --git a/packages/@core/ui-kit/tabs-ui/package.json b/packages/@core/ui-kit/tabs-ui/package.json index cd8ee183d03..e52285a8ef2 100644 --- a/packages/@core/ui-kit/tabs-ui/package.json +++ b/packages/@core/ui-kit/tabs-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben-core/tabs-ui", - "version": "5.4.3", + "version": "5.4.4", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/constants/package.json b/packages/constants/package.json index 1746e89f20f..a91bbf40be0 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -1,6 +1,6 @@ { "name": "@vben/constants", - "version": "5.4.3", + "version": "5.4.4", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/effects/access/package.json b/packages/effects/access/package.json index 99acf7d7e68..e5368f85f55 100644 --- a/packages/effects/access/package.json +++ b/packages/effects/access/package.json @@ -1,6 +1,6 @@ { "name": "@vben/access", - "version": "5.4.3", + "version": "5.4.4", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/effects/common-ui/package.json b/packages/effects/common-ui/package.json index bb5063c0246..9d18a0710e2 100644 --- a/packages/effects/common-ui/package.json +++ b/packages/effects/common-ui/package.json @@ -1,6 +1,6 @@ { "name": "@vben/common-ui", - "version": "5.4.3", + "version": "5.4.4", "homepage": "https://github.com/vbenjs/vue-vben-admin", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "repository": { diff --git a/packages/effects/common-ui/src/ui/authentication/code-login.vue b/packages/effects/common-ui/src/ui/authentication/code-login.vue index cf950abdd0b..7de5dd3b438 100644 --- a/packages/effects/common-ui/src/ui/authentication/code-login.vue +++ b/packages/effects/common-ui/src/ui/authentication/code-login.vue @@ -53,7 +53,7 @@ const emit = defineEmits<{ const router = useRouter(); -const [Form, { validate, getValues }] = useVbenForm( +const [Form, formApi] = useVbenForm( reactive({ commonConfig: { hideLabel: true, @@ -65,8 +65,8 @@ const [Form, { validate, getValues }] = useVbenForm( ); async function handleSubmit() { - const { valid } = await validate(); - const values = await getValues(); + const { valid } = await formApi.validate(); + const values = await formApi.getValues(); if (valid) { emit('submit', { code: values?.code, @@ -78,6 +78,10 @@ async function handleSubmit() { function goToLogin() { router.push(props.loginPath); } + +defineExpose({ + getFormApi: () => formApi, +});