+
diff --git a/apps/vben5/docs/.vitepress/config/plugins/demo-preview.ts b/apps/vben5/docs/.vitepress/config/plugins/demo-preview.ts
index 03b1698ca..ba3863b0b 100644
--- a/apps/vben5/docs/.vitepress/config/plugins/demo-preview.ts
+++ b/apps/vben5/docs/.vitepress/config/plugins/demo-preview.ts
@@ -84,7 +84,7 @@ export const demoPreviewPlugin = (md: MarkdownRenderer) => {
return '';
}
const firstString = 'index.vue';
- childFiles = childFiles.sort((a, b) => {
+ childFiles = childFiles.toSorted((a, b) => {
if (a === firstString) return -1;
if (b === firstString) return 1;
return a.localeCompare(b, 'en', { sensitivity: 'base' });
diff --git a/apps/vben5/docs/package.json b/apps/vben5/docs/package.json
index f57dfc854..0326d87da 100644
--- a/apps/vben5/docs/package.json
+++ b/apps/vben5/docs/package.json
@@ -1,6 +1,6 @@
{
"name": "@vben/docs",
- "version": "5.5.7",
+ "version": "5.6.0",
"private": true,
"scripts": {
"build": "vitepress build",
@@ -22,7 +22,7 @@
"ant-design-vue": "catalog:",
"lucide-vue-next": "catalog:",
"medium-zoom": "catalog:",
- "radix-vue": "catalog:",
+ "reka-ui": "catalog:",
"vitepress-plugin-group-icons": "catalog:"
},
"devDependencies": {
diff --git a/apps/vben5/docs/src/_env/adapter/vxe-table.ts b/apps/vben5/docs/src/_env/adapter/vxe-table.ts
index bab7f3d38..7bc27056e 100644
--- a/apps/vben5/docs/src/_env/adapter/vxe-table.ts
+++ b/apps/vben5/docs/src/_env/adapter/vxe-table.ts
@@ -40,9 +40,10 @@ if (!import.meta.env.SSR) {
// 表格配置项可以用 cellRender: { name: 'CellImage' },
vxeUI.renderer.add('CellImage', {
- renderTableDefault(_renderOpts, params) {
+ renderTableDefault(renderOpts, params) {
+ const { props } = renderOpts;
const { column, row } = params;
- return h(Image, { src: row[column.field] });
+ return h(Image, { src: row[column.field], ...props });
},
});
diff --git a/apps/vben5/docs/src/components/common-ui/vben-drawer.md b/apps/vben5/docs/src/components/common-ui/vben-drawer.md
index b66bd3a07..3a28cce79 100644
--- a/apps/vben5/docs/src/components/common-ui/vben-drawer.md
+++ b/apps/vben5/docs/src/components/common-ui/vben-drawer.md
@@ -22,7 +22,7 @@ outline: deep
## 基础用法
-使用 `useVbenDrawer` 创建最基础的模态框。
+使用 `useVbenDrawer` 创建最基础的抽屉。
@@ -52,7 +52,7 @@ Drawer 内的内容一般业务中,会比较复杂,所以我们可以将 dra
::: info 注意
-- `VbenDrawer` 组件对与参数的处理优先级是 `slot` > `props` > `state`(通过api更新的状态以及useVbenDrawer参数)。如果你已经传入了 `slot` 或者 `props`,那么 `setState` 将不会生效,这种情况下你可以通过 `slot` 或者 `props` 来更新状态。
+- `VbenDrawer` 组件对于参数的处理优先级是 `slot` > `props` > `state`(通过api更新的状态以及useVbenDrawer参数)。如果你已经传入了 `slot` 或者 `props`,那么 `setState` 将不会生效,这种情况下你可以通过 `slot` 或者 `props` 来更新状态。
- 如果你使用到了 `connectedComponent` 参数,那么会存在 2 个`useVbenDrawer`, 此时,如果同时设置了相同的参数,那么以内部为准(也就是没有设置 connectedComponent 的代码)。比如 同时设置了 `onConfirm`,那么以内部的 `onConfirm` 为准。`onOpenChange`事件除外,内外都会触发。
- 使用了`connectedComponent`参数时,可以配置`destroyOnClose`属性来决定当关闭弹窗时,是否要销毁`connectedComponent`组件(重新创建`connectedComponent`组件,这将会把其内部所有的变量、状态、数据等恢复到初始状态。)。
- 如果抽屉的默认行为不符合你的预期,可以在`src\bootstrap.ts`中修改`setDefaultDrawerProps`的参数来设置默认的属性,如默认隐藏全屏按钮,修改默认ZIndex等。
@@ -77,7 +77,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
| 属性名 | 描述 | 类型 | 默认值 |
| --- | --- | --- | --- |
| appendToMain | 是否挂载到内容区域(默认挂载到body) | `boolean` | `false` |
-| connectedComponent | 连接另一个Modal组件 | `Component` | - |
+| connectedComponent | 连接另一个Drawer组件 | `Component` | - |
| destroyOnClose | 关闭时销毁 | `boolean` | `false` |
| title | 标题 | `string\|slot` | - |
| titleTooltip | 标题提示信息 | `string\|slot` | - |
@@ -96,7 +96,7 @@ const [Drawer, drawerApi] = useVbenDrawer({
| cancelText | 取消按钮文本 | `string\|slot` | `取消` |
| placement | 抽屉弹出位置 | `'left'\|'right'\|'top'\|'bottom'` | `right` |
| showCancelButton | 显示取消按钮 | `boolean` | `true` |
-| showConfirmButton | 显示确认按钮文本 | `boolean` | `true` |
+| showConfirmButton | 显示确认按钮 | `boolean` | `true` |
| class | modal的class,宽度通过这个配置 | `string` | - |
| contentClass | modal内容区域的class | `string` | - |
| footerClass | modal底部区域的class | `string` | - |
diff --git a/apps/vben5/docs/src/components/common-ui/vben-form.md b/apps/vben5/docs/src/components/common-ui/vben-form.md
index 7abb3051e..30cbec448 100644
--- a/apps/vben5/docs/src/components/common-ui/vben-form.md
+++ b/apps/vben5/docs/src/components/common-ui/vben-form.md
@@ -90,30 +90,52 @@ import { h } from 'vue';
import { globalShareState, IconPicker } from '@vben/common-ui';
import { $t } from '@vben/locales';
-import {
- AutoComplete,
- Button,
- Checkbox,
- CheckboxGroup,
- DatePicker,
- Divider,
- Input,
- InputNumber,
- InputPassword,
- Mentions,
- notification,
- Radio,
- RadioGroup,
- RangePicker,
- Rate,
- Select,
- Space,
- Switch,
- Textarea,
- TimePicker,
- TreeSelect,
- Upload,
-} from 'ant-design-vue';
+const AutoComplete = defineAsyncComponent(
+ () => import('ant-design-vue/es/auto-complete'),
+);
+const Button = defineAsyncComponent(() => import('ant-design-vue/es/button'));
+const Checkbox = defineAsyncComponent(
+ () => import('ant-design-vue/es/checkbox'),
+);
+const CheckboxGroup = defineAsyncComponent(() =>
+ import('ant-design-vue/es/checkbox').then((res) => res.CheckboxGroup),
+);
+const DatePicker = defineAsyncComponent(
+ () => import('ant-design-vue/es/date-picker'),
+);
+const Divider = defineAsyncComponent(() => import('ant-design-vue/es/divider'));
+const Input = defineAsyncComponent(() => import('ant-design-vue/es/input'));
+const InputNumber = defineAsyncComponent(
+ () => import('ant-design-vue/es/input-number'),
+);
+const InputPassword = defineAsyncComponent(() =>
+ import('ant-design-vue/es/input').then((res) => res.InputPassword),
+);
+const Mentions = defineAsyncComponent(
+ () => import('ant-design-vue/es/mentions'),
+);
+const Radio = defineAsyncComponent(() => import('ant-design-vue/es/radio'));
+const RadioGroup = defineAsyncComponent(() =>
+ import('ant-design-vue/es/radio').then((res) => res.RadioGroup),
+);
+const RangePicker = defineAsyncComponent(() =>
+ import('ant-design-vue/es/date-picker').then((res) => res.RangePicker),
+);
+const Rate = defineAsyncComponent(() => import('ant-design-vue/es/rate'));
+const Select = defineAsyncComponent(() => import('ant-design-vue/es/select'));
+const Space = defineAsyncComponent(() => import('ant-design-vue/es/space'));
+const Switch = defineAsyncComponent(() => import('ant-design-vue/es/switch'));
+const Textarea = defineAsyncComponent(() =>
+ import('ant-design-vue/es/input').then((res) => res.Textarea),
+);
+const TimePicker = defineAsyncComponent(
+ () => import('ant-design-vue/es/time-picker'),
+);
+const TreeSelect = defineAsyncComponent(
+ () => import('ant-design-vue/es/tree-select'),
+);
+const Upload = defineAsyncComponent(() => import('ant-design-vue/es/upload'));
+
const withDefaultPlaceholder =
(
component: T,
@@ -304,13 +326,16 @@ useVbenForm 返回的第二个参数,是一个对象,包含了一些表单
| 属性名 | 描述 | 类型 | 默认值 |
| --- | --- | --- | --- |
-| layout | 表单项布局 | `'horizontal' \| 'vertical'` | `horizontal` |
+| layout | 表单项布局 | `'horizontal' \| 'vertical'\| 'inline'` | `horizontal` |
| showCollapseButton | 是否显示折叠按钮 | `boolean` | `false` |
| wrapperClass | 表单的布局,基于tailwindcss | `any` | - |
| actionWrapperClass | 表单操作区域class | `any` | - |
+| actionLayout | 表单操作按钮位置 | `'newLine' \| 'rowEnd' \| 'inline'` | `rowEnd` |
+| actionPosition | 表单操作按钮对齐方式 | `'left' \| 'center' \| 'right'` | `right` |
| handleReset | 表单重置回调 | `(values: Record,) => Promise \| void` | - |
| handleSubmit | 表单提交回调 | `(values: Record,) => Promise \| void` | - |
| handleValuesChange | 表单值变化回调 | `(values: Record, fieldsChanged: string[]) => void` | - |
+| handleCollapsedChange | 表单收起展开状态变化回调 | `(collapsed: boolean) => void` | - |
| actionButtonsReverse | 调换操作按钮位置 | `boolean` | `false` |
| resetButtonOptions | 重置按钮组件参数 | `ActionButtonOptions` | - |
| submitButtonOptions | 提交按钮组件参数 | `ActionButtonOptions` | - |
@@ -324,6 +349,7 @@ useVbenForm 返回的第二个参数,是一个对象,包含了一些表单
| submitOnEnter | 按下回车健时提交表单 | `boolean` | false |
| submitOnChange | 字段值改变时提交表单(内部防抖,这个属性一般用于表格的搜索表单) | `boolean` | false |
| compact | 是否紧凑模式(忽略为校验信息所预留的空间) | `boolean` | false |
+| scrollToFirstError | 表单验证失败时是否自动滚动到第一个错误字段 | `boolean` | false |
::: tip handleValuesChange
@@ -394,7 +420,7 @@ export interface FormCommonConfig {
* 所有表单项的栅格布局
* @default ""
*/
- formItemClass?: string;
+ formItemClass?: (() => string) | string;
/**
* 隐藏所有表单项label
* @default false
@@ -448,6 +474,8 @@ export interface FormSchema<
fieldName: string;
/** 帮助信息 */
help?: CustomRenderType;
+ /** 是否隐藏表单项 */
+ hide?: boolean;
/** 表单的标签(如果是一个string,会用于默认必选规则的消息提示) */
label?: CustomRenderType;
/** 自定义组件内部渲染 */
diff --git a/apps/vben5/docs/src/components/common-ui/vben-modal.md b/apps/vben5/docs/src/components/common-ui/vben-modal.md
index 3c8200f90..fc714e279 100644
--- a/apps/vben5/docs/src/components/common-ui/vben-modal.md
+++ b/apps/vben5/docs/src/components/common-ui/vben-modal.md
@@ -56,6 +56,15 @@ Modal 内的内容一般业务中,会比较复杂,所以我们可以将 moda
+## 动画类型
+
+通过 `animationType` 属性可以控制弹窗的动画效果:
+
+- `slide`(默认):从顶部向下滑动进入/退出
+- `scale`:缩放淡入/淡出效果
+
+
+
::: info 注意
- `VbenModal` 组件对与参数的处理优先级是 `slot` > `props` > `state`(通过api更新的状态以及useVbenModal参数)。如果你已经传入了 `slot` 或者 `props`,那么 `setState` 将不会生效,这种情况下你可以通过 `slot` 或者 `props` 来更新状态。
@@ -112,6 +121,7 @@ const [Modal, modalApi] = useVbenModal({
| bordered | 是否显示border | `boolean` | `false` |
| zIndex | 弹窗的ZIndex层级 | `number` | `1000` |
| overlayBlur | 遮罩模糊度 | `number` | - |
+| animationType | 动画类型 | `'slide' \| 'scale'` | `'slide'` |
| submitting | 标记为提交中,锁定弹窗当前状态 | `boolean` | `false` |
::: info appendToMain
diff --git a/apps/vben5/docs/src/demos/vben-drawer/auto-height/drawer.vue b/apps/vben5/docs/src/demos/vben-drawer/auto-height/drawer.vue
index 9ab433ccb..1b09723c2 100644
--- a/apps/vben5/docs/src/demos/vben-drawer/auto-height/drawer.vue
+++ b/apps/vben5/docs/src/demos/vben-drawer/auto-height/drawer.vue
@@ -32,7 +32,7 @@ function handleUpdate(len: number) {
{{ item }}
diff --git a/apps/vben5/docs/src/demos/vben-form/rules/index.vue b/apps/vben5/docs/src/demos/vben-form/rules/index.vue
index 7abcc6f6c..78e598133 100644
--- a/apps/vben5/docs/src/demos/vben-form/rules/index.vue
+++ b/apps/vben5/docs/src/demos/vben-form/rules/index.vue
@@ -15,6 +15,7 @@ const [Form] = useVbenForm({
handleSubmit: onSubmit,
// 垂直布局,label和input在不同行,值为vertical
// 水平布局,label和input在同一行
+ scrollToFirstError: true,
layout: 'horizontal',
schema: [
{
diff --git a/apps/vben5/docs/src/demos/vben-modal/animation-type/index.vue b/apps/vben5/docs/src/demos/vben-modal/animation-type/index.vue
new file mode 100644
index 000000000..79ba9d33a
--- /dev/null
+++ b/apps/vben5/docs/src/demos/vben-modal/animation-type/index.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+ 滑动动画
+ 缩放动画
+
+
+
+ 这是使用滑动动画的弹窗,从顶部向下滑动进入。
+
+
+
+ 这是使用缩放动画的弹窗,以缩放淡入淡出的方式显示。
+
+
+
diff --git a/apps/vben5/docs/src/demos/vben-modal/auto-height/modal.vue b/apps/vben5/docs/src/demos/vben-modal/auto-height/modal.vue
index 8757d5ef0..e270df1ae 100644
--- a/apps/vben5/docs/src/demos/vben-modal/auto-height/modal.vue
+++ b/apps/vben5/docs/src/demos/vben-modal/auto-height/modal.vue
@@ -32,7 +32,7 @@ function handleUpdate(len: number) {
{{ item }}
diff --git a/apps/vben5/docs/src/demos/vben-vxe-table/custom-cell/index.vue b/apps/vben5/docs/src/demos/vben-vxe-table/custom-cell/index.vue
index 517e73f38..6d6c84d8a 100644
--- a/apps/vben5/docs/src/demos/vben-vxe-table/custom-cell/index.vue
+++ b/apps/vben5/docs/src/demos/vben-vxe-table/custom-cell/index.vue
@@ -92,7 +92,7 @@ const [Grid] = useVbenVxeGrid({ gridOptions });
-
+
{{ row.status }}
diff --git a/apps/vben5/docs/src/en/guide/essentials/development.md b/apps/vben5/docs/src/en/guide/essentials/development.md
index 9ff832b7b..437810f7a 100644
--- a/apps/vben5/docs/src/en/guide/essentials/development.md
+++ b/apps/vben5/docs/src/en/guide/essentials/development.md
@@ -60,6 +60,8 @@ The execution command is: `pnpm run [script]` or `npm run [script]`.
"build:ele": "pnpm run build --filter=@vben/web-ele",
// Build the web-naive application separately
"build:naive": "pnpm run build --filter=@vben/naive",
+ // Build the web-tdesign application separately
+ "build:tdesign": "pnpm run build --filter=@vben/web-tdesign",
// Build the playground application separately
"build:play": "pnpm run build --filter=@vben/playground",
// Changeset version management
diff --git a/apps/vben5/docs/src/en/guide/essentials/server.md b/apps/vben5/docs/src/en/guide/essentials/server.md
index 95d505c0a..67e0b1fd0 100644
--- a/apps/vben5/docs/src/en/guide/essentials/server.md
+++ b/apps/vben5/docs/src/en/guide/essentials/server.md
@@ -150,8 +150,8 @@ export async function saveUserApi(user: UserInfo) {
```ts
import { requestClient } from '#/api/request';
-export async function deleteUserApi(user: UserInfo) {
- return requestClient.delete(`/user/${user.id}`, user);
+export async function deleteUserApi(userId: number) {
+ return requestClient.delete(`/user/${userId}`);
}
```
diff --git a/apps/vben5/docs/src/en/guide/essentials/settings.md b/apps/vben5/docs/src/en/guide/essentials/settings.md
index 59a6c5c01..59bb3900a 100644
--- a/apps/vben5/docs/src/en/guide/essentials/settings.md
+++ b/apps/vben5/docs/src/en/guide/essentials/settings.md
@@ -219,6 +219,7 @@ const defaultPreferences: Preferences = {
dynamicTitle: true,
enableCheckUpdates: true,
enablePreferences: true,
+ enableCopyPreferences: true,
enableRefreshToken: false,
isMobile: false,
layout: 'sidebar-nav',
@@ -261,6 +262,7 @@ const defaultPreferences: Preferences = {
enable: true,
fit: 'contain',
source: 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp',
+ // sourceDark: 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-dark.webp', // Optional: Dark theme logo
},
navigation: {
accordion: true,
@@ -375,6 +377,8 @@ interface AppPreferences {
enableCheckUpdates: boolean;
/** Whether to display preferences */
enablePreferences: boolean;
+ /** Whether to display copy preferences button */
+ enableCopyPreferences: boolean;
/**
* @zh_CN Whether to enable refreshToken
*/
@@ -457,6 +461,8 @@ interface LogoPreferences {
fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
/** Logo URL */
source: string;
+ /** Dark theme logo URL (optional, if not set, use source) */
+ sourceDark?: string;
}
interface NavigationPreferences {
diff --git a/apps/vben5/docs/src/en/guide/introduction/quick-start.md b/apps/vben5/docs/src/en/guide/introduction/quick-start.md
index 757679c39..12793c601 100644
--- a/apps/vben5/docs/src/en/guide/introduction/quick-start.md
+++ b/apps/vben5/docs/src/en/guide/introduction/quick-start.md
@@ -85,6 +85,7 @@ You will see an output similar to the following, allowing you to select the proj
│
◆ Select the app you need to run [dev]:
│ ● @vben/web-antd
+│ ○ @vben/web-antdv-next
│ ○ @vben/web-ele
│ ○ @vben/web-naive
│ ○ @vben/docs
diff --git a/apps/vben5/docs/src/en/guide/introduction/thin.md b/apps/vben5/docs/src/en/guide/introduction/thin.md
index a310ef398..7ca0468da 100644
--- a/apps/vben5/docs/src/en/guide/introduction/thin.md
+++ b/apps/vben5/docs/src/en/guide/introduction/thin.md
@@ -56,6 +56,7 @@ After slimming down, you may need to adjust commands according to your project.
"build:docs": "pnpm run build --filter=@vben/docs",
"build:ele": "pnpm run build --filter=@vben/web-ele",
"build:naive": "pnpm run build --filter=@vben/web-naive",
+ "build:tdesign": "pnpm run build --filter=@vben/web-tdesign",
"build:play": "pnpm run build --filter=@vben/playground",
"dev:antd": "pnpm -F @vben/web-antd run dev",
"dev:docs": "pnpm -F @vben/docs run dev",
diff --git a/apps/vben5/docs/src/en/guide/project/standard.md b/apps/vben5/docs/src/en/guide/project/standard.md
index e5417ce7c..4d880c467 100644
--- a/apps/vben5/docs/src/en/guide/project/standard.md
+++ b/apps/vben5/docs/src/en/guide/project/standard.md
@@ -4,7 +4,6 @@
- If you want to contribute code to the project, please ensure your code complies with the project's coding standards.
- If you are using `vscode`, you need to install the following plugins:
-
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - Script code checking
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) - Code formatting
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) - Word syntax checking
@@ -157,7 +156,6 @@ The most effective solution is to perform Lint checks locally before committing.
The project defines corresponding hooks inside `lefthook.yml`:
- `pre-commit`: Runs before commit, used for code formatting and checking
-
- `code-workspace`: Updates VSCode workspace configuration
- `lint-md`: Formats Markdown files
- `lint-vue`: Formats and checks Vue files
@@ -167,7 +165,6 @@ The project defines corresponding hooks inside `lefthook.yml`:
- `lint-json`: Formats other JSON files
- `post-merge`: Runs after merge, used for automatic dependency installation
-
- `install`: Runs `pnpm install` to install new dependencies
- `commit-msg`: Runs during commit, used for checking commit message format
diff --git a/apps/vben5/docs/src/friend-links/index.md b/apps/vben5/docs/src/friend-links/index.md
index 84b61906f..a9dc7ccf4 100644
--- a/apps/vben5/docs/src/friend-links/index.md
+++ b/apps/vben5/docs/src/friend-links/index.md
@@ -18,7 +18,6 @@
### 友情链接
- 在您的网站上添加我们的友情链接,链接如下:
-
- 名称:Vben Admin
- 链接:https://www.vben.pro
- 描述:Vben Admin 企业级开箱即用的中后台前端解决方案
diff --git a/apps/vben5/docs/src/guide/essentials/development.md b/apps/vben5/docs/src/guide/essentials/development.md
index cb55b6b5c..7f4e5107c 100644
--- a/apps/vben5/docs/src/guide/essentials/development.md
+++ b/apps/vben5/docs/src/guide/essentials/development.md
@@ -60,6 +60,8 @@ npm 脚本是项目常见的配置,用于执行一些常见的任务,比如
"build:ele": "pnpm run build --filter=@vben/web-ele",
// 单独构建 web-naive 应用
"build:naive": "pnpm run build --filter=@vben/naive",
+ // 单独构建 web-tdesign 应用
+ "build:tdesign": "pnpm run build --filter=@vben/web-tdesign",
// 单独构建 playground 应用
"build:play": "pnpm run build --filter=@vben/playground",
// changeset 版本管理
diff --git a/apps/vben5/docs/src/guide/essentials/route.md b/apps/vben5/docs/src/guide/essentials/route.md
index 985c48a9b..8383e7620 100644
--- a/apps/vben5/docs/src/guide/essentials/route.md
+++ b/apps/vben5/docs/src/guide/essentials/route.md
@@ -599,6 +599,13 @@ _注意:_ 排序仅针对一级菜单有效,二级菜单的排序需要在对
用于配置当前路由不使用基础布局,仅在顶级时生效。默认情况下,所有的路由都会被包裹在基础布局中(包含顶部以及侧边等导航部件),如果你的页面不需要这些部件,可以设置 `noBasicLayout` 为 `true`。
+### domCached
+
+- 类型:`boolean`
+- 默认值:`false`
+
+用于配置当前路由是否要将route对应dom元素缓存起来。对于一些复杂页面切换tab浏览器回流/重绘会导致卡顿, `domCached` 设为 `true`可解决该问题,但是也有代价:1、内存占用升高 2、vue的部分生命周期不会触发
+
## 路由刷新
路由刷新方式如下:
diff --git a/apps/vben5/docs/src/guide/essentials/server.md b/apps/vben5/docs/src/guide/essentials/server.md
index 9a4949673..cd61d3a51 100644
--- a/apps/vben5/docs/src/guide/essentials/server.md
+++ b/apps/vben5/docs/src/guide/essentials/server.md
@@ -180,8 +180,8 @@ export async function saveUserApi(user: UserInfo) {
```ts
import { requestClient } from '#/api/request';
-export async function deleteUserApi(user: UserInfo) {
- return requestClient.delete(`/user/${user.id}`, user);
+export async function deleteUserApi(userId: number) {
+ return requestClient.delete(`/user/${userId}`);
}
```
diff --git a/apps/vben5/docs/src/guide/essentials/settings.md b/apps/vben5/docs/src/guide/essentials/settings.md
index 9b47c04d3..9637114fe 100644
--- a/apps/vben5/docs/src/guide/essentials/settings.md
+++ b/apps/vben5/docs/src/guide/essentials/settings.md
@@ -218,6 +218,7 @@ const defaultPreferences: Preferences = {
dynamicTitle: true,
enableCheckUpdates: true,
enablePreferences: true,
+ enableCopyPreferences: true,
enableRefreshToken: false,
isMobile: false,
layout: 'sidebar-nav',
@@ -260,6 +261,7 @@ const defaultPreferences: Preferences = {
enable: true,
fit: 'contain',
source: 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp',
+ // sourceDark: 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-dark.webp', // 可选:暗色主题logo
},
navigation: {
accordion: true,
@@ -374,6 +376,8 @@ interface AppPreferences {
enableCheckUpdates: boolean;
/** 是否显示偏好设置 */
enablePreferences: boolean;
+ /** 是否显示复制偏好设置按钮 */
+ enableCopyPreferences: boolean;
/**
* @zh_CN 是否开启refreshToken
*/
@@ -457,6 +461,8 @@ interface LogoPreferences {
fit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
/** logo地址 */
source: string;
+ /** 暗色主题logo地址 (可选,若不设置则使用 source) */
+ sourceDark?: string;
}
interface NavigationPreferences {
diff --git a/apps/vben5/docs/src/guide/introduction/quick-start.md b/apps/vben5/docs/src/guide/introduction/quick-start.md
index 6b451ddfc..f940672de 100644
--- a/apps/vben5/docs/src/guide/introduction/quick-start.md
+++ b/apps/vben5/docs/src/guide/introduction/quick-start.md
@@ -88,7 +88,8 @@ pnpm dev
```bash
│
◆ Select the app you need to run [dev]:
-│ ○ @vben/web-antd
+│ ● @vben/web-antd
+│ ○ @vben/web-antdv-next
│ ○ @vben/web-ele
│ ○ @vben/web-naive
│ ○ @vben/docs
diff --git a/apps/vben5/docs/src/guide/introduction/thin.md b/apps/vben5/docs/src/guide/introduction/thin.md
index 808840058..8a37c2578 100644
--- a/apps/vben5/docs/src/guide/introduction/thin.md
+++ b/apps/vben5/docs/src/guide/introduction/thin.md
@@ -24,7 +24,7 @@ apps/web-naive
## 演示代码精简
-如果你不需要演示代码,你可以直接删除的`playground`文件夹。
+如果你不需要演示代码,你可以直接删除 `playground` 文件夹。
## 文档精简
@@ -60,6 +60,7 @@ pnpm install
"build:docs": "pnpm run build --filter=@vben/docs",
"build:ele": "pnpm run build --filter=@vben/web-ele",
"build:naive": "pnpm run build --filter=@vben/web-naive",
+ "build:tdesign": "pnpm run build --filter=@vben/web-tdesign",
"build:play": "pnpm run build --filter=@vben/playground",
"dev:antd": "pnpm -F @vben/web-antd run dev",
"dev:docs": "pnpm -F @vben/docs run dev",
@@ -87,7 +88,7 @@ pnpm install
- 在应用的 `src/router/routes` 文件中,你可以删除不需要的路由。其中 `core` 文件夹内,如果只需要登录和忘记密码,你可以删除其他路由,如忘记密码、注册等。路由删除后,你可以删除对应的页面文件,在 `src/views/_core` 文件夹中。
-- 在应用的 `src/router/routes` 文件中,你可以按需求删除不需要的路由,如`demos`、`vben` 目录等。路由删除后,你可以删除对应的页面文件,在 `src/views` 文件夹中。
+- 在应用的 `src/router/routes` 文件中,你可以按需求删除不需要的路由,如`demos`、`vben` 目录等。路由删除后,你可以在 `src/views` 文件夹中删除对应的页面文件。
### 删除不需要的组件
diff --git a/apps/vben5/docs/src/guide/project/standard.md b/apps/vben5/docs/src/guide/project/standard.md
index 12a13da3b..02fc5a91e 100644
--- a/apps/vben5/docs/src/guide/project/standard.md
+++ b/apps/vben5/docs/src/guide/project/standard.md
@@ -4,7 +4,6 @@
- 如果你想向项目贡献代码,请确保你的代码符合项目的代码规范。
- 如果你使用的是 `vscode`,需要安装以下插件:
-
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - 脚本代码检查
- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) - 代码格式化
- [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) - 单词语法检查
@@ -157,7 +156,6 @@ git hook 一般结合各种 lint,在 git 提交代码的时候进行代码风
项目在 `lefthook.yml` 内部定义了相应的 hooks:
- `pre-commit`: 在提交前运行,用于代码格式化和检查
-
- `code-workspace`: 更新 VSCode 工作区配置
- `lint-md`: 格式化 Markdown 文件
- `lint-vue`: 格式化并检查 Vue 文件
@@ -167,7 +165,6 @@ git hook 一般结合各种 lint,在 git 提交代码的时候进行代码风
- `lint-json`: 格式化其他 JSON 文件
- `post-merge`: 在合并后运行,用于自动安装依赖
-
- `install`: 运行 `pnpm install` 安装新依赖
- `commit-msg`: 在提交时运行,用于检查提交信息格式
diff --git a/apps/vben5/internal/lint-configs/commitlint-config/index.mjs b/apps/vben5/internal/lint-configs/commitlint-config/index.mjs
index 3d854399f..36c3b09ac 100644
--- a/apps/vben5/internal/lint-configs/commitlint-config/index.mjs
+++ b/apps/vben5/internal/lint-configs/commitlint-config/index.mjs
@@ -21,7 +21,7 @@ const scopeComplete = execSync('git status --porcelain || true')
.trim()
.split('\n')
.find((r) => ~r.indexOf('M src'))
- ?.replace(/(\/)/g, '%%')
+ ?.replaceAll(/(\/)/g, '%%')
?.match(/src%%((\w|-)*)/)?.[1]
?.replace(/s$/, '');
diff --git a/apps/vben5/internal/lint-configs/commitlint-config/package.json b/apps/vben5/internal/lint-configs/commitlint-config/package.json
index a137f947b..3377803d9 100644
--- a/apps/vben5/internal/lint-configs/commitlint-config/package.json
+++ b/apps/vben5/internal/lint-configs/commitlint-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@vben/commitlint-config",
- "version": "5.5.7",
+ "version": "5.6.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
diff --git a/apps/vben5/internal/lint-configs/eslint-config/package.json b/apps/vben5/internal/lint-configs/eslint-config/package.json
index 12556ec5c..e9ba6a303 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/package.json
+++ b/apps/vben5/internal/lint-configs/eslint-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@vben/eslint-config",
- "version": "5.0.0",
+ "version": "5.6.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
@@ -43,14 +43,17 @@
"eslint-plugin-n": "catalog:",
"eslint-plugin-no-only-tests": "catalog:",
"eslint-plugin-perfectionist": "catalog:",
+ "eslint-plugin-pnpm": "catalog:",
"eslint-plugin-prettier": "catalog:",
"eslint-plugin-regexp": "catalog:",
"eslint-plugin-unicorn": "catalog:",
"eslint-plugin-unused-imports": "catalog:",
"eslint-plugin-vitest": "catalog:",
"eslint-plugin-vue": "catalog:",
+ "eslint-plugin-yml": "catalog:",
"globals": "catalog:",
"jsonc-eslint-parser": "catalog:",
- "vue-eslint-parser": "catalog:"
+ "vue-eslint-parser": "catalog:",
+ "yaml-eslint-parser": "catalog:"
}
}
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/command.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/command.ts
index 67651b233..d0c902de2 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/configs/command.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/command.ts
@@ -3,7 +3,6 @@ import createCommand from 'eslint-plugin-command/config';
export async function command() {
return [
{
- // @ts-expect-error - no types
...createCommand(),
},
];
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/ignores.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/ignores.ts
index 136c956de..0a05e9e9e 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/configs/ignores.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/ignores.ts
@@ -46,6 +46,8 @@ export async function ignores(): Promise {
'**/*.sh',
'**/*.ttf',
'**/*.woff',
+ '**/.github',
+ '**/lefthook.yml',
],
},
];
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/index.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/index.ts
index c0284efb2..50f8e1cd5 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/configs/index.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/index.ts
@@ -8,6 +8,7 @@ export * from './jsdoc';
export * from './jsonc';
export * from './node';
export * from './perfectionist';
+export * from './pnpm';
export * from './prettier';
export * from './regexp';
export * from './test';
@@ -15,3 +16,4 @@ export * from './turbo';
export * from './typescript';
export * from './unicorn';
export * from './vue';
+export * from './yaml';
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/jsonc.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/jsonc.ts
index 4072e4cdd..4b92ff447 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/configs/jsonc.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/jsonc.ts
@@ -48,6 +48,7 @@ export async function jsonc(): Promise {
},
sortTsconfig(),
sortPackageJson(),
+ sortCspellJson(),
];
}
@@ -130,6 +131,21 @@ function sortPackageJson(): Linter.Config {
};
}
+function sortCspellJson(): Linter.Config {
+ return {
+ files: ['**/cspell.json', '**/.cspell.json'],
+ rules: {
+ 'jsonc/sort-array-values': [
+ 'error',
+ {
+ order: { type: 'asc' },
+ pathPattern: '^words$|^ignorePaths$',
+ },
+ ],
+ },
+ };
+}
+
function sortTsconfig(): Linter.Config {
return {
files: [
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/node.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/node.ts
index fa960d85e..f8f266436 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/configs/node.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/node.ts
@@ -35,7 +35,7 @@ export async function node(): Promise {
'error',
{
ignores: [],
- version: '>=18.0.0',
+ version: '>=20.12.0',
},
],
'n/prefer-global/buffer': ['error', 'never'],
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/perfectionist.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/perfectionist.ts
index 136bfa332..4a7d12fe9 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/configs/perfectionist.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/perfectionist.ts
@@ -4,7 +4,6 @@ import { interopDefault } from '../util';
export async function perfectionist(): Promise {
const perfectionistPlugin = await interopDefault(
- // @ts-expect-error - no types
import('eslint-plugin-perfectionist'),
);
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/pnpm.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/pnpm.ts
new file mode 100644
index 000000000..a3b28a7f6
--- /dev/null
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/pnpm.ts
@@ -0,0 +1,41 @@
+import type { Linter } from 'eslint';
+
+import { interopDefault } from '../util';
+
+export async function pnpm(): Promise {
+ const [pluginPnpm, parserPnpm, parserJsonc] = await Promise.all([
+ interopDefault(import('eslint-plugin-pnpm')),
+ interopDefault(import('yaml-eslint-parser')),
+ interopDefault(import('jsonc-eslint-parser')),
+ ] as const);
+
+ return [
+ {
+ files: ['package.json', '**/package.json'],
+ languageOptions: {
+ parser: parserJsonc,
+ },
+ plugins: {
+ pnpm: pluginPnpm,
+ },
+ rules: {
+ 'pnpm/json-enforce-catalog': 'error',
+ 'pnpm/json-prefer-workspace-settings': 'error',
+ 'pnpm/json-valid-catalog': 'error',
+ },
+ },
+ {
+ files: ['pnpm-workspace.yaml'],
+ languageOptions: {
+ parser: parserPnpm,
+ },
+ plugins: {
+ pnpm: pluginPnpm,
+ },
+ rules: {
+ 'pnpm/yaml-no-duplicate-catalog-item': 'error',
+ 'pnpm/yaml-no-unused-catalog-item': 'error',
+ },
+ },
+ ];
+}
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/turbo.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/turbo.ts
index 9f6bf75be..bcc27eb69 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/configs/turbo.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/turbo.ts
@@ -4,7 +4,6 @@ import { interopDefault } from '../util';
export async function turbo(): Promise {
const [pluginTurbo] = await Promise.all([
- // @ts-expect-error - no types
interopDefault(import('eslint-config-turbo')),
] as const);
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/typescript.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/typescript.ts
index cff9aa4bc..2f6f97650 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/configs/typescript.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/typescript.ts
@@ -5,7 +5,6 @@ import { interopDefault } from '../util';
export async function typescript(): Promise {
const [pluginTs, parserTs] = await Promise.all([
interopDefault(import('@typescript-eslint/eslint-plugin')),
- // @ts-expect-error missing types
interopDefault(import('@typescript-eslint/parser')),
] as const);
@@ -27,11 +26,11 @@ export async function typescript(): Promise {
},
},
plugins: {
- '@typescript-eslint': pluginTs,
+ '@typescript-eslint': pluginTs as any,
},
rules: {
- ...pluginTs.configs['eslint-recommended'].overrides?.[0].rules,
- ...pluginTs.configs.strict.rules,
+ ...pluginTs.configs['eslint-recommended']?.overrides?.[0]?.rules,
+ ...pluginTs.configs.strict?.rules,
'@typescript-eslint/ban-ts-comment': [
'error',
{
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/vue.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/vue.ts
index a64c55aff..5db72992d 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/configs/vue.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/vue.ts
@@ -6,7 +6,6 @@ export async function vue(): Promise {
const [pluginVue, parserVue, parserTs] = await Promise.all([
interopDefault(import('eslint-plugin-vue')),
interopDefault(import('vue-eslint-parser')),
- // @ts-expect-error missing types
interopDefault(import('@typescript-eslint/parser')),
] as const);
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/configs/yaml.ts b/apps/vben5/internal/lint-configs/eslint-config/src/configs/yaml.ts
new file mode 100644
index 000000000..55aa94d53
--- /dev/null
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/configs/yaml.ts
@@ -0,0 +1,87 @@
+import type { Linter } from 'eslint';
+
+import { interopDefault } from '../util';
+
+export async function yaml(): Promise {
+ const [pluginYaml, parserYaml] = await Promise.all([
+ interopDefault(import('eslint-plugin-yml')),
+ interopDefault(import('yaml-eslint-parser')),
+ ] as const);
+
+ return [
+ {
+ files: ['**/*.y?(a)ml'],
+ plugins: {
+ yaml: pluginYaml as any,
+ },
+ languageOptions: {
+ parser: parserYaml,
+ },
+ rules: {
+ 'style/spaced-comment': 'off',
+
+ 'yaml/block-mapping': 'error',
+ 'yaml/block-sequence': 'error',
+ 'yaml/no-empty-key': 'error',
+ 'yaml/no-empty-sequence-entry': 'error',
+ 'yaml/no-irregular-whitespace': 'error',
+ 'yaml/plain-scalar': 'error',
+
+ 'yaml/vue-custom-block/no-parsing-error': 'error',
+
+ 'yaml/block-mapping-question-indicator-newline': 'error',
+ 'yaml/block-sequence-hyphen-indicator-newline': 'error',
+ 'yaml/flow-mapping-curly-newline': 'error',
+ 'yaml/flow-mapping-curly-spacing': 'error',
+ 'yaml/flow-sequence-bracket-newline': 'error',
+ 'yaml/flow-sequence-bracket-spacing': 'error',
+ 'yaml/indent': ['error', 2],
+ 'yaml/key-spacing': 'error',
+ 'yaml/no-tab-indent': 'error',
+ 'yaml/quotes': [
+ 'error',
+ {
+ avoidEscape: true,
+ prefer: 'single',
+ },
+ ],
+ 'yaml/spaced-comment': 'error',
+ },
+ },
+ {
+ files: ['pnpm-workspace.yaml'],
+ rules: {
+ 'yaml/sort-keys': [
+ 'error',
+ {
+ order: [
+ 'packages',
+ 'overrides',
+ 'patchedDependencies',
+ 'hoistPattern',
+ 'catalog',
+ 'catalogs',
+
+ 'allowedDeprecatedVersions',
+ 'allowNonAppliedPatches',
+ 'configDependencies',
+ 'ignoredBuiltDependencies',
+ 'ignoredOptionalDependencies',
+ 'neverBuiltDependencies',
+ 'onlyBuiltDependencies',
+ 'onlyBuiltDependenciesFile',
+ 'packageExtensions',
+ 'peerDependencyRules',
+ 'supportedArchitectures',
+ ],
+ pathPattern: '^$',
+ },
+ {
+ order: { type: 'asc' },
+ pathPattern: '.*',
+ },
+ ],
+ },
+ },
+ ];
+}
diff --git a/apps/vben5/internal/lint-configs/eslint-config/src/index.ts b/apps/vben5/internal/lint-configs/eslint-config/src/index.ts
index c9f08bd54..d3bbf5754 100644
--- a/apps/vben5/internal/lint-configs/eslint-config/src/index.ts
+++ b/apps/vben5/internal/lint-configs/eslint-config/src/index.ts
@@ -11,6 +11,7 @@ import {
jsonc,
node,
perfectionist,
+ pnpm,
prettier,
regexp,
test,
@@ -18,6 +19,7 @@ import {
typescript,
unicorn,
vue,
+ yaml,
} from './configs';
import { customConfig } from './custom-config';
@@ -48,6 +50,8 @@ async function defineConfig(config: FlatConfig[] = []) {
regexp(),
command(),
turbo(),
+ yaml(),
+ pnpm(),
...customConfig,
...config,
];
diff --git a/apps/vben5/internal/lint-configs/prettier-config/package.json b/apps/vben5/internal/lint-configs/prettier-config/package.json
index 65e8b8f88..5ed785d79 100644
--- a/apps/vben5/internal/lint-configs/prettier-config/package.json
+++ b/apps/vben5/internal/lint-configs/prettier-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@vben/prettier-config",
- "version": "5.0.0",
+ "version": "5.6.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
diff --git a/apps/vben5/internal/lint-configs/stylelint-config/index.mjs b/apps/vben5/internal/lint-configs/stylelint-config/index.mjs
index 08ac82380..47cd12d81 100644
--- a/apps/vben5/internal/lint-configs/stylelint-config/index.mjs
+++ b/apps/vben5/internal/lint-configs/stylelint-config/index.mjs
@@ -75,6 +75,7 @@ export default {
'import-notation': null,
'media-feature-range-notation': null,
'named-grid-areas-no-invalid': null,
+ 'nesting-selector-no-missing-scoping-root': null,
'no-descending-specificity': null,
'no-empty-source': null,
'order/order': [
diff --git a/apps/vben5/internal/lint-configs/stylelint-config/package.json b/apps/vben5/internal/lint-configs/stylelint-config/package.json
index 8e2a97c2c..4d0c26fc6 100644
--- a/apps/vben5/internal/lint-configs/stylelint-config/package.json
+++ b/apps/vben5/internal/lint-configs/stylelint-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@vben/stylelint-config",
- "version": "5.5.7",
+ "version": "5.6.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
diff --git a/apps/vben5/internal/node-utils/package.json b/apps/vben5/internal/node-utils/package.json
index 8b8db7454..f8add8b4e 100644
--- a/apps/vben5/internal/node-utils/package.json
+++ b/apps/vben5/internal/node-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@vben/node-utils",
- "version": "5.5.7",
+ "version": "5.6.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
diff --git a/apps/vben5/internal/tailwind-config/package.json b/apps/vben5/internal/tailwind-config/package.json
index 8506891b5..16016fd0d 100644
--- a/apps/vben5/internal/tailwind-config/package.json
+++ b/apps/vben5/internal/tailwind-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@vben/tailwind-config",
- "version": "5.5.7",
+ "version": "5.6.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
@@ -53,6 +53,7 @@
"@tailwindcss/typography": "catalog:",
"autoprefixer": "catalog:",
"cssnano": "catalog:",
+ "jiti": "catalog:",
"postcss": "catalog:",
"postcss-antd-fixes": "catalog:",
"postcss-import": "catalog:",
diff --git a/apps/vben5/internal/tailwind-config/src/index.ts b/apps/vben5/internal/tailwind-config/src/index.ts
index 93332a3f4..8bbf1f6ec 100644
--- a/apps/vben5/internal/tailwind-config/src/index.ts
+++ b/apps/vben5/internal/tailwind-config/src/index.ts
@@ -175,18 +175,18 @@ export default {
keyframes: {
'accordion-down': {
from: { height: '0' },
- to: { height: 'var(--radix-accordion-content-height)' },
+ to: { height: 'var(--reka-accordion-content-height)' },
},
'accordion-up': {
- from: { height: 'var(--radix-accordion-content-height)' },
+ from: { height: 'var(--reka-accordion-content-height)' },
to: { height: '0' },
},
'collapsible-down': {
from: { height: '0' },
- to: { height: 'var(--radix-collapsible-content-height)' },
+ to: { height: 'var(--reka-collapsible-content-height)' },
},
'collapsible-up': {
- from: { height: 'var(--radix-collapsible-content-height)' },
+ from: { height: 'var(--reka-collapsible-content-height)' },
to: { height: '0' },
},
float: {
diff --git a/apps/vben5/internal/tailwind-config/tsconfig.json b/apps/vben5/internal/tailwind-config/tsconfig.json
index dbd3bcc8d..b2ec3b61e 100644
--- a/apps/vben5/internal/tailwind-config/tsconfig.json
+++ b/apps/vben5/internal/tailwind-config/tsconfig.json
@@ -1,9 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/tsconfig/node.json",
- "compilerOptions": {
- "moduleResolution": "bundler"
- },
"include": ["src"],
"exclude": ["node_modules"]
}
diff --git a/apps/vben5/internal/tsconfig/node.json b/apps/vben5/internal/tsconfig/node.json
index 31ce8f18f..01bde7a78 100644
--- a/apps/vben5/internal/tsconfig/node.json
+++ b/apps/vben5/internal/tsconfig/node.json
@@ -6,6 +6,7 @@
"composite": false,
"lib": ["ESNext"],
"baseUrl": "./",
+ "moduleResolution": "bundler",
"types": ["node"],
"noImplicitAny": true
}
diff --git a/apps/vben5/internal/tsconfig/package.json b/apps/vben5/internal/tsconfig/package.json
index 44ee3f1b0..59bff7ca1 100644
--- a/apps/vben5/internal/tsconfig/package.json
+++ b/apps/vben5/internal/tsconfig/package.json
@@ -1,6 +1,6 @@
{
"name": "@vben/tsconfig",
- "version": "5.5.7",
+ "version": "5.6.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
diff --git a/apps/vben5/internal/vite-config/package.json b/apps/vben5/internal/vite-config/package.json
index d7ba6a655..445cbf248 100644
--- a/apps/vben5/internal/vite-config/package.json
+++ b/apps/vben5/internal/vite-config/package.json
@@ -1,6 +1,6 @@
{
"name": "@vben/vite-config",
- "version": "5.5.6",
+ "version": "5.6.0",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
diff --git a/apps/vben5/internal/vite-config/src/config/application.ts b/apps/vben5/internal/vite-config/src/config/application.ts
index f9808cc74..a5d33c604 100644
--- a/apps/vben5/internal/vite-config/src/config/application.ts
+++ b/apps/vben5/internal/vite-config/src/config/application.ts
@@ -114,7 +114,7 @@ function createCssOptions(injectGlobalScss = true): CSSOptions {
}
return content;
},
- api: 'modern',
+ // api: 'modern',
importers: [new NodePackageImporter()],
},
}
diff --git a/apps/vben5/internal/vite-config/src/config/index.ts b/apps/vben5/internal/vite-config/src/config/index.ts
index d04a84a86..b8c770a95 100644
--- a/apps/vben5/internal/vite-config/src/config/index.ts
+++ b/apps/vben5/internal/vite-config/src/config/index.ts
@@ -1,4 +1,4 @@
-import type { DefineConfig } from '../typing';
+import type { DefineConfig, VbenViteConfig } from '../typing';
import { existsSync } from 'node:fs';
import { join } from 'node:path';
@@ -12,7 +12,7 @@ export * from './library';
function defineConfig(
userConfigPromise?: DefineConfig,
type: 'application' | 'auto' | 'library' = 'auto',
-) {
+): VbenViteConfig {
let projectType = type;
// 根据包是否存在 index.html,自动判断类型
diff --git a/apps/vben5/internal/vite-config/src/index.ts b/apps/vben5/internal/vite-config/src/index.ts
index 352a3235a..c9c2b20df 100644
--- a/apps/vben5/internal/vite-config/src/index.ts
+++ b/apps/vben5/internal/vite-config/src/index.ts
@@ -1,4 +1,5 @@
export * from './config';
export * from './options';
export * from './plugins';
+export type * from './typing';
export { loadAndConvertEnv } from './utils/env';
diff --git a/apps/vben5/internal/vite-config/src/typing.ts b/apps/vben5/internal/vite-config/src/typing.ts
index f730bdb91..2dd048306 100644
--- a/apps/vben5/internal/vite-config/src/typing.ts
+++ b/apps/vben5/internal/vite-config/src/typing.ts
@@ -1,5 +1,10 @@
import type { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
-import type { ConfigEnv, PluginOption, UserConfig } from 'vite';
+import type {
+ ConfigEnv,
+ PluginOption,
+ UserConfig,
+ UserConfigFnPromise,
+} from 'vite';
import type { PluginOptions } from 'vite-plugin-dts';
import type { Options as PwaPluginOptions } from 'vite-plugin-pwa';
@@ -327,6 +332,8 @@ type DefineLibraryOptions = (config?: ConfigEnv) => Promise<{
*/
type DefineConfig = DefineApplicationOptions | DefineLibraryOptions;
+type VbenViteConfig = Promise | UserConfig | UserConfigFnPromise;
+
export type {
ApplicationPluginOptions,
ArchiverPluginOptions,
@@ -340,4 +347,5 @@ export type {
LibraryPluginOptions,
NitroMockPluginOptions,
PrintPluginOptions,
+ VbenViteConfig,
};
diff --git a/apps/vben5/package.json b/apps/vben5/package.json
index c72e052f1..ce4a1afb5 100644
--- a/apps/vben5/package.json
+++ b/apps/vben5/package.json
@@ -1,6 +1,6 @@
{
"name": "vben-admin-monorepo",
- "version": "5.5.7",
+ "version": "5.6.0",
"private": true,
"keywords": [
"monorepo",
@@ -33,6 +33,7 @@
"build:docs": "pnpm run build --filter=@vben/docs",
"build:ele": "pnpm run build --filter=@vben/web-ele",
"build:naive": "pnpm run build --filter=@vben/web-naive",
+ "build:tdesign": "pnpm run build --filter=@vben/web-tdesign",
"build:play": "pnpm run build --filter=@vben/playground",
"changeset": "pnpm exec changeset",
"check": "pnpm run check:circular && pnpm run check:dep && pnpm run check:type && pnpm check:cspell",
@@ -45,9 +46,11 @@
"dev": "turbo-run dev",
"dev:app": "pnpm -F @abp/app-antd run dev",
"dev:antd": "pnpm -F @vben/web-antd run dev",
+ "dev:antdv-next": "pnpm -F @vben/web-antdv-next run dev",
"dev:docs": "pnpm -F @vben/docs run dev",
"dev:ele": "pnpm -F @vben/web-ele run dev",
"dev:naive": "pnpm -F @vben/web-naive run dev",
+ "dev:tdesign": "pnpm -F @vben/web-tdesign run dev",
"dev:play": "pnpm -F @vben/playground run dev",
"format": "vsh lint --format",
"lint": "vsh lint",
@@ -98,27 +101,8 @@
"vue-tsc": "catalog:"
},
"engines": {
- "node": ">=20.10.0",
- "pnpm": ">=9.12.0"
+ "node": ">=20.19.0",
+ "pnpm": ">=10.0.0"
},
- "packageManager": "pnpm@10.10.0",
- "pnpm": {
- "peerDependencyRules": {
- "allowedVersions": {
- "eslint": "*"
- }
- },
- "overrides": {
- "@ast-grep/napi": "catalog:",
- "@ctrl/tinycolor": "catalog:",
- "clsx": "catalog:",
- "esbuild": "0.25.3",
- "pinia": "catalog:",
- "vue": "catalog:"
- },
- "neverBuiltDependencies": [
- "canvas",
- "node-gyp"
- ]
- }
+ "packageManager": "pnpm@10.28.2"
}
diff --git a/apps/vben5/packages/@abp/account/package.json b/apps/vben5/packages/@abp/account/package.json
index c742f9666..bf144f240 100644
--- a/apps/vben5/packages/@abp/account/package.json
+++ b/apps/vben5/packages/@abp/account/package.json
@@ -1,6 +1,6 @@
{
"name": "@abp/account",
- "version": "9.2.0",
+ "version": "10.0.2",
"homepage": "https://github.com/colinin/abp-next-admin",
"bugs": "https://github.com/colinin/abp-next-admin/issues",
"repository": {
@@ -26,6 +26,7 @@
"@abp/identity": "workspace:*",
"@abp/notifications": "workspace:*",
"@abp/request": "workspace:*",
+ "@abp/settings": "workspace:*",
"@abp/ui": "workspace:*",
"@ant-design/icons-vue": "catalog:",
"@vben-core/shadcn-ui": "workspace:*",
@@ -40,7 +41,7 @@
"ant-design-vue": "catalog:",
"oidc-client-ts": "catalog:",
"secure-ls": "catalog:",
- "vue": "catalog:*",
+ "vue": "catalog:",
"vue-router": "catalog:"
}
}
diff --git a/apps/vben5/packages/@abp/account/src/components/MySetting.vue b/apps/vben5/packages/@abp/account/src/components/MySetting.vue
index 848cf6630..e3afae865 100644
--- a/apps/vben5/packages/@abp/account/src/components/MySetting.vue
+++ b/apps/vben5/packages/@abp/account/src/components/MySetting.vue
@@ -26,9 +26,11 @@ const props = defineProps<{
disablePersonalData?: boolean;
disableSecurity?: boolean;
disableSession?: boolean;
+ disableSystemSetting?: boolean;
}>();
const emits = defineEmits<{
(event: 'onBindInit'): void;
+ (event: 'onConfirm', params: Record): void;
}>();
const AuthenticatorSettings = defineAsyncComponent(
() => import('./components/AuthenticatorSettings.vue'),
@@ -51,6 +53,9 @@ const SessionSettings = defineAsyncComponent(
const PersonalDataSettings = defineAsyncComponent(
() => import('./components/PersonalDataSettings.vue'),
);
+const UserSettings = defineAsyncComponent(
+ () => import('./components/UserSettings.vue'),
+);
const { getApi, updateApi } = useProfileApi();
const userStore = useUserStore();
const { query } = useRoute();
@@ -86,6 +91,10 @@ const basicMenuItems: MenuItem[] = [
key: 'personal-data',
label: $t('abp.account.settings.personalDataSettings'),
},
+ {
+ key: 'system-settings',
+ label: $t('abp.account.settings.systemSettings'),
+ },
];
const getEnabledMenus = computed(() => {
return basicMenuItems.filter((x) => {
@@ -96,6 +105,7 @@ const getEnabledMenus = computed(() => {
if (x.key === 'personal-data') return !props.disablePersonalData;
if (x.key === 'security') return !props.disableSecurity;
if (x.key === 'session') return !props.disableSession;
+ if (x.key === 'system-settings') return !props.disableSystemSetting;
return true; // default case for any unexpected keys
});
});
@@ -130,7 +140,7 @@ const [ChangePhoneNumberModal, changePhoneNumberModalApi] = useVbenModal({
() => import('./components/ChangePhoneNumberModal.vue'),
),
});
-function onEmailConfirm() {
+function onBindConfirm() {
if (query?.confirmToken) {
setTimeout(() => {
emailConfirmModalApi.setData({
@@ -139,6 +149,7 @@ function onEmailConfirm() {
});
emailConfirmModalApi.open();
}, 300);
+ emits('onConfirm', query);
}
}
async function onGetProfile() {
@@ -173,13 +184,13 @@ function onChangePhoneNumber() {
}
onMounted(async () => {
await onGetProfile();
- onEmailConfirm();
+ onBindConfirm();
});
-
-
+
+
-
diff --git a/apps/vben5/packages/@abp/account/src/components/components/AuthenticatorSettings.vue b/apps/vben5/packages/@abp/account/src/components/components/AuthenticatorSettings.vue
index f41ec0dfa..ec5d9b247 100644
--- a/apps/vben5/packages/@abp/account/src/components/components/AuthenticatorSettings.vue
+++ b/apps/vben5/packages/@abp/account/src/components/components/AuthenticatorSettings.vue
@@ -37,10 +37,7 @@ onMounted(onGet);
-
+
{
-
+