Compare commits

..

24 Commits

Author SHA1 Message Date
vben
c8dd9bbf0b chore: release 5.4.8 2024-11-24 22:00:41 +08:00
Vben
3587ec54eb fix: supplement datepicker component (#4943)
* fix: supplement datepicker component

* chore: typo
2024-11-24 21:56:41 +08:00
Vben
dbcb7138f2 fix: resolve issue with Upload component not working correctly inside Form (#4916) 2024-11-17 21:37:37 +08:00
ryomahan
fe58af2e78 fix: form-api.setValues can't resolve nested fields (#4915)
fix #4912
2024-11-17 21:04:35 +08:00
huangxiaomin
94c68c966e fix: fieldMappingTime data error when clear inputvalue (#4906) 2024-11-17 21:04:04 +08:00
Arthur Darkstone
77083abcc5 feat: add 3 resize examples (#4907) 2024-11-17 21:01:32 +08:00
Netfan
1302092798 fix: dialog opened/closed event triggered incorrectly,fixed #4902 (#4908) 2024-11-17 20:55:19 +08:00
Mintnoii
ec53bf8084 docs: optimize the introduction in both Chinese and English (#4913)
* 优化简介中文文档

1. 优化文案及病句
2. 统一格式

* Optimize the introduction English document

1. Optimize copywriting and sentences
2. Uniform format
2024-11-17 20:54:28 +08:00
Netfan
b87d41bada fix: adjust useWatermark logic (#4896) 2024-11-15 14:06:13 +08:00
vben
788a29a8cb chore: release v5.4.7 2024-11-14 22:15:46 +08:00
zyy
3bd5ef4523 fix(@vben/common-ui): pagination current page error (#4893) 2024-11-14 22:11:32 +08:00
Vben
86e52ce58a fix: resolve onChange issue in form component (#4890) 2024-11-13 22:53:09 +08:00
Vben
9ddaba5333 fix: correct grid styling issue (#4889) 2024-11-13 22:28:30 +08:00
Vben
5b079471b9 fix: resolve issue with grid reload parameter not working (#4888) 2024-11-13 22:27:50 +08:00
Arthur Darkstone
8cc73cf59c feat: add reize components & demo (#4862)
* feat: resize component

* chore: change positon of resize components

* feat: add resize demo

* chore: resize demo completed

* chore: fix display number

* chore: add infer comment

* fix: move reszie demo to examples

* fix: fix icon & removed scss
2024-11-13 15:43:17 +08:00
vince
a89711610d chore: update eslint configuration (#4872) 2024-11-12 13:42:32 +08:00
vince
67c2b13713 fix: drawer console warning (#4871) 2024-11-12 13:34:47 +08:00
Netfan
1ff1e4a8d7 fix: form enter event handling, fixed #4865 (#4867) 2024-11-12 13:20:48 +08:00
Arthur Darkstone
ea8af98324 docs: add route config desc (#4857) 2024-11-11 19:22:39 +08:00
Arthur Darkstone
dc15accd04 fix: clipboard demo not working with a-input (#4856) 2024-11-11 14:50:30 +08:00
vben
94efcec7da chore: release v5.4.6 2024-11-10 11:50:46 +08:00
Vben
a3d0d2ed34 feat: added file download examples (#4853) 2024-11-10 11:50:06 +08:00
Vben
90dc00b168 fix: unable to preventDefault inside passive event listener invocation (#4852) 2024-11-10 10:26:35 +08:00
Vben
ba36ce8836 feat: pinInput supports disabled props (#4851)
* feat: pinInput supports disabled props
2024-11-10 10:09:06 +08:00
86 changed files with 4172 additions and 2693 deletions

View File

@@ -222,5 +222,6 @@
"commentTranslate.hover.enabled": false,
"commentTranslate.multiLineMerge": true,
"vue.server.hybridMode": true,
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"oxc.enable": false
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/web-antd",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://vben.pro",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -17,12 +17,12 @@ const dynamicRoutes: RouteRecordRaw[] = mergeRouteModules(dynamicRouteFiles);
/** 外部路由列表访问这些页面可以不需要Layout可能用于内嵌在别的系统(不会显示在菜单中) */
// const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles);
/** 不需要权限的菜单列表(会显示在菜单中) */
// const staticRoutes: RouteRecordRaw[] = mergeRouteModules(staticRouteFiles);
const staticRoutes: RouteRecordRaw[] = [];
const externalRoutes: RouteRecordRaw[] = [];
/** 路由列表,由基本路由+静态路由组成 */
/** 路由列表,由基本路由、外部路由和404兜底路由组成
* 无需走权限验证(会一直显示在菜单中) */
const routes: RouteRecordRaw[] = [
...coreRoutes,
...externalRoutes,
@@ -32,5 +32,6 @@ const routes: RouteRecordRaw[] = [
/** 基本路由列表,这些路由不需要进入权限拦截 */
const coreRouteNames = traverseTreeValues(coreRoutes, (route) => route.name);
/** 有权限校验的路由列表,包含动态路由和静态路由 */
const accessRoutes = [...dynamicRoutes, ...staticRoutes];
export { accessRoutes, coreRouteNames, routes };

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/web-ele",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://vben.pro",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -15,6 +15,7 @@ import {
ElButton,
ElCheckbox,
ElCheckboxGroup,
ElDatePicker,
ElDivider,
ElInput,
ElInputNumber,
@@ -79,6 +80,7 @@ async function initComponentAdapter() {
Space: ElSpace,
Switch: ElSwitch,
TimePicker: ElTimePicker,
DatePicker: ElDatePicker,
TreeSelect: withDefaultPlaceholder(ElTreeSelect, 'select'),
Upload: ElUpload,
};

View File

@@ -17,12 +17,12 @@ const dynamicRoutes: RouteRecordRaw[] = mergeRouteModules(dynamicRouteFiles);
/** 外部路由列表访问这些页面可以不需要Layout可能用于内嵌在别的系统(不会显示在菜单中) */
// const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles);
/** 不需要权限的菜单列表(会显示在菜单中) */
// const staticRoutes: RouteRecordRaw[] = mergeRouteModules(staticRouteFiles);
const staticRoutes: RouteRecordRaw[] = [];
const externalRoutes: RouteRecordRaw[] = [];
/** 路由列表,由基本路由+静态路由组成 */
/** 路由列表,由基本路由、外部路由和404兜底路由组成
* 无需走权限验证(会一直显示在菜单中) */
const routes: RouteRecordRaw[] = [
...coreRoutes,
...externalRoutes,
@@ -32,5 +32,6 @@ const routes: RouteRecordRaw[] = [
/** 基本路由列表,这些路由不需要进入权限拦截 */
const coreRouteNames = traverseTreeValues(coreRoutes, (route) => route.name);
/** 有权限校验的路由列表,包含动态路由和静态路由 */
const accessRoutes = [...dynamicRoutes, ...staticRoutes];
export { accessRoutes, coreRouteNames, routes };

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/web-naive",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://vben.pro",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -17,12 +17,12 @@ const dynamicRoutes: RouteRecordRaw[] = mergeRouteModules(dynamicRouteFiles);
/** 外部路由列表访问这些页面可以不需要Layout可能用于内嵌在别的系统(不会显示在菜单中) */
// const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles);
/** 不需要权限的菜单列表(会显示在菜单中) */
// const staticRoutes: RouteRecordRaw[] = mergeRouteModules(staticRouteFiles);
const staticRoutes: RouteRecordRaw[] = [];
const externalRoutes: RouteRecordRaw[] = [];
/** 路由列表,由基本路由+静态路由组成 */
/** 路由列表,由基本路由、外部路由和404兜底路由组成
* 无需走权限验证(会一直显示在菜单中) */
const routes: RouteRecordRaw[] = [
...coreRoutes,
...externalRoutes,
@@ -32,5 +32,6 @@ const routes: RouteRecordRaw[] = [
/** 基本路由列表,这些路由不需要进入权限拦截 */
const coreRouteNames = traverseTreeValues(coreRoutes, (route) => route.name);
/** 有权限校验的路由列表,包含动态路由和静态路由 */
const accessRoutes = [...dynamicRoutes, ...staticRoutes];
export { accessRoutes, coreRouteNames, routes };

View File

@@ -4,53 +4,55 @@
"language": "en,en-US",
"allowCompoundWords": true,
"words": [
"clsx",
"esno",
"demi",
"unref",
"taze",
"acmr",
"antd",
"lucide",
"antdv",
"astro",
"brotli",
"clsx",
"defu",
"demi",
"echarts",
"ependencies",
"esno",
"etag",
"execa",
"iconify",
"iconoir",
"intlify",
"lockb",
"lucide",
"minh",
"minw",
"mkdist",
"mockjs",
"vitejs",
"naiveui",
"nocheck",
"noopener",
"noreferrer",
"nprogress",
"nuxt",
"pinia",
"prefixs",
"publint",
"qrcode",
"shadcn",
"sonner",
"sortablejs",
"styl",
"taze",
"ui-kit",
"uicons",
"unplugin",
"unref",
"vben",
"vbenjs",
"vueuse",
"yxxx",
"nuxt",
"lockb",
"astro",
"ui-kit",
"styl",
"vnode",
"nocheck",
"prefixs",
"vitepress",
"antdv",
"ependencies",
"vite",
"echarts",
"sortablejs",
"etag",
"naiveui",
"uicons",
"iconoir"
"vitejs",
"vitepress",
"vnode",
"vueuse",
"yxxx"
],
"ignorePaths": [
"**/node_modules/**",

View File

@@ -221,9 +221,9 @@ function nav(): DefaultTheme.NavItem[] {
link: '/commercial/community',
text: '👨‍👦‍👦 Community',
},
{
link: '/friend-links/',
text: '🤝 Friend Links',
},
// {
// link: '/friend-links/',
// text: '🤝 Friend Links',
// },
];
}

View File

@@ -124,7 +124,7 @@ function sidebarCommercial(): DefaultTheme.SidebarItem[] {
return [
{
link: 'community',
text: '社区',
text: '交流群',
},
{
link: 'technical-support',
@@ -266,7 +266,7 @@ function nav(): DefaultTheme.NavItem[] {
},
{
link: '/commercial/community',
text: '👨‍👦‍👦 社区',
text: '👨‍👦‍👦 交流群',
// items: [
// {
// link: 'https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&appChannel=share&inviteCode=22ySzj7pKiw&businessType=9&from=246610&biz=ka&mainSourceId=share&subSourceId=others&jumpsource=shorturl#/pc',
@@ -282,10 +282,10 @@ function nav(): DefaultTheme.NavItem[] {
// },
// ],
},
{
link: '/friend-links/',
text: '🤝 友情链接',
},
// {
// link: '/friend-links/',
// text: '🤝 友情链接',
// },
];
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/docs",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"scripts": {
"build": "vitepress build",

View File

@@ -20,7 +20,10 @@
::: tip
因为微信群人数有限制,加微信群前,你可以通过[赞助](../sponsor/personal.md)任意金额,主动发送截图给作者,备注`加入微信群`即可。
因为微信群人数有限制,加微信群要求:
- 通过[赞助](../sponsor/personal.md)任意金额。
- 发送赞助`截图`,备注`加入微信群`即可。
:::

View File

@@ -2,42 +2,66 @@
outline: deep
---
# Routing and Menus
# Routes and Menus
In the project, the framework provides a basic routing system and **automatically generates the corresponding menu structure based on the routing file**.
::: info
## Route Types
This page is translated by machine translation and may not be very accurate.
Routes are divided into static routes and dynamic routes. Static routes are routes that have been determined when the project starts. Dynamic routes are generally routes that are dynamically generated based on the user's permissions after the user logs in.
:::
In the project, the framework provides a basic routing system and **automatically generates the corresponding menu structure based on the routing files**.
## Types of Routes
Routes are divided into core routes, static routes, and dynamic routes. Core routes are built-in routes of the framework, including root routes, login routes, 404 routes, etc.; static routes are routes that are determined when the project starts; dynamic routes are generally generated dynamically based on the user's permissions after the user logs in.
Both static and dynamic routes go through permission control, which can be controlled by configuring the `authority` field in the `meta` property of the route.
### Core Routes
Core routes are built-in routes of the framework, including root routes, login routes, 404 routes, etc. The configuration of core routes is in the `src/router/routes/core` directory under the application.
::: tip
Core routes are mainly used for the basic functions of the framework, so it is not recommended to put business-related routes in core routes. It is recommended to put business-related routes in static or dynamic routes.
:::
### Static Routes
If your page project does not require permission control, you can directly use static routes. The configuration of static routes is in the `src/router/routes/index` directory under the application. Open the commented file content:
The configuration of static routes is in the `src/router/routes/index` directory under the application. Open the commented file content:
::: tip
Permission control is controlled by the `authority` field in the `meta` property of the route. If your page project does not require permission control, you can omit the `authority` field.
:::
```ts
// If necessary, you can open your own comments and create folders
// Uncomment if needed and create the folder
// const externalRouteFiles = import.meta.glob('./external/**/*.ts', { eager: true }); // [!code --]
const staticRouteFiles = import.meta.glob('./static/**/*.ts', { eager: true }); // [!code ++]
/** Dynamic routing */
/** Dynamic routes */
const dynamicRoutes: RouteRecordRaw[] = mergeRouteModules(dynamicRouteFiles);
/** External routing lists, which can be accessed without Layout, may be used for embedding in other systems */
/** External route list, these pages can be accessed without Layout, possibly used for embedding in other systems */
// const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles) // [!code --]
const externalRoutes: RouteRecordRaw[] = []; // [!code --]
const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles); // [!code ++]
```
### Dynamic routing
### Dynamic Routes
The configuration of dynamic routing is in the corresponding application `src/router/routes/modules` directory. All routing files are stored in this directory. The content format of each file is as follows, which is consistent with the routing configuration format of Vue Router. The following is the configuration of secondary routes and multi-level routes.
The configuration of dynamic routes is in the `src/router/routes/modules` directory under the corresponding application. This directory contains all the route files. The content format of each file is consistent with the Vue Router route configuration format. Below is the configuration of secondary and multi-level routes.
## Define the route
## Route Definition
Static routes and dynamic routes are configured in the same way. The configuration of the level-2 and multi-level routes is as follows:
The configuration method of static routes and dynamic routes is the same. Below is the configuration of secondary and multi-level routes:
### Secondary route
### Secondary Routes
::: details Example code of the secondary route
::: details Secondary Route Example Code
```ts
import type { RouteRecordRaw } from 'vue-router';
@@ -81,17 +105,16 @@ export default routes;
:::
### Multilevel routing
### Multi-level Routes
::: tip
- The parent route of multi-level routing does not need to set the 'component' attribute, only the 'children' attribute needs to be set. Unless you really need to display content under nested parent routing.
- If there are no special circumstances, the 'redirect' attribute of the parent route does not need to be specified and will default to the first child route.
- The parent route of multi-level routes does not need to set the `component` property, just set the `children` property. Unless you really need to display content nested under the parent route.
- In most cases, the `redirect` property of the parent route does not need to be specified, it will default to the first child route.
:::
::: details Multilevel Routing Example Code
::: details Multi-level Route Example Code
```ts
import type { RouteRecordRaw } from 'vue-router';
@@ -112,7 +135,7 @@ const routes: RouteRecordRaw[] = [
path: '/demos',
redirect: '/demos/access',
children: [
// 嵌套菜单
// Nested menu
{
meta: {
icon: 'ic:round-menu',
@@ -208,13 +231,13 @@ export default routes;
:::
## Add a New Page
## Adding a New Page
To add a new page, you only need to add a route and the corresponding page component.
### Add a Route
### Adding a Route
Add a route object in the corresponding routing file as follows:
Add a route object in the corresponding route file, as follows:
```ts
import type { RouteRecordRaw } from 'vue-router';
@@ -251,9 +274,9 @@ const routes: RouteRecordRaw[] = [
export default routes;
```
### Add Page Component
### Adding a Page Component
In `#/views/home/`, add a new `index.vue` file as follows:
In `#/views/home/`, add a new `index.vue` file, as follows:
```vue
<template>
@@ -265,11 +288,11 @@ In `#/views/home/`, add a new `index.vue` file as follows:
### Verification
At this point, the page has been added. Access `http://localhost:5555/home/index` to see the corresponding page.
At this point, the page has been added. Visit `http://localhost:5555/home/index` to see the corresponding page.
## Route Configuration
The route configuration mainly resides in the `meta` attribute of the route object. Below are some commonly used configuration items
The route configuration items are mainly in the `meta` property of the route object. The following are common configuration items:
```ts {5-8}
const routes = [
@@ -293,22 +316,21 @@ interface RouteMeta {
*/
activeIcon?: string;
/**
* The currently active menu, used when you want to activate a parent menu instead of the existing one
* @default false
* The currently active menu, sometimes you don't want to activate the existing menu, use this to activate the parent menu
*/
activePath?: string;
/**
* Whether to affix the tab
* Whether to fix the tab
* @default false
*/
affixTab?: boolean;
/**
* The order of the affixed tab
* The order of fixed tabs
* @default 0
*/
affixTabOrder?: number;
/**
* Specific role identifiers required for access
* Specific roles required to access
* @default []
*/
authority?: string[];
@@ -331,22 +353,22 @@ interface RouteMeta {
| 'warning'
| string;
/**
* Children of the current route do not show in the menu
* The children of the current route are not displayed in the menu
* @default false
*/
hideChildrenInMenu?: boolean;
/**
* The current route does not show in the breadcrumb
* The current route is not displayed in the breadcrumb
* @default false
*/
hideInBreadcrumb?: boolean;
/**
* The current route does not show in the menu
* The current route is not displayed in the menu
* @default false
*/
hideInMenu?: boolean;
/**
* The current route does not show in tabs
* The current route is not displayed in the tab
* @default false
*/
hideInTab?: boolean;
@@ -359,16 +381,16 @@ interface RouteMeta {
*/
iframeSrc?: string;
/**
* Ignore access, can be accessed directly
* Ignore permissions, can be accessed directly
* @default false
*/
ignoreAccess?: boolean;
/**
* Enable KeepAlive caching
* Enable KeepAlive cache
*/
keepAlive?: boolean;
/**
* External link - redirect path
* External link - jump path
*/
link?: string;
/**
@@ -381,7 +403,7 @@ interface RouteMeta {
*/
maxNumOfOpenTab?: number;
/**
* The menu is visible, but access will be redirected to 403
* The menu can be seen, but access will be redirected to 403
*/
menuVisibleWithForbidden?: boolean;
/**
@@ -389,9 +411,13 @@ interface RouteMeta {
*/
openInNewWindow?: boolean;
/**
* Used for route->menu sorting
* Used for route -> menu sorting
*/
order?: number;
/**
* Parameters carried by the menu
*/
query?: Recordable;
/**
* Title name
*/
@@ -404,153 +430,169 @@ interface RouteMeta {
### title
- Type: `string`
- Default value: `''`
- Default: `''`
Used to configure the page title, which will be displayed in the menu and tabs. It is generally used in conjunction with internationalization.
Used to configure the title of the page, which will be displayed in the menu and tab. Generally used with internationalization.
### icon
- Type: `string`
- Default value: `''`
- Default: `''`
Used to configure the page icon, which will be displayed in the menu and tabs. It is generally used in conjunction with an icon library. If it is an `http` link, the image will be automatically loaded.
Used to configure the icon of the page, which will be displayed in the menu and tab. Generally used with an icon library, if it is an `http` link, the image will be loaded automatically.
### activeIcon
- Type: `string`
- Default value: `''`
- Default: `''`
Used to configure the active icon of the page, which will be displayed in the menu. It is generally used in conjunction with an icon library. If it is an `http` link, the image will be automatically loaded.
Used to configure the active icon of the page, which will be displayed in the menu. Generally used with an icon library, if it is an `http` link, the image will be loaded automatically.
### keepAlive
- Type: `boolean`
- Default value: `false`
- Default: `false`
Used to configure whether the page caching is enabled. Once enabled, the page will be cached and not reloaded, only effective when tabs are enabled.
Used to configure whether the page cache is enabled. When enabled, the page will be cached and will not reload, only effective when the tab is enabled.
### hideInMenu
- Type: `boolean`
- Default value: `false`
- Default: `false`
Used to configure whether the page is hidden in the menu. If hidden, the page will not be displayed in the menu.
Used to configure whether the page is hidden in the menu. When hidden, the page will not be displayed in the menu.
### hideInTab
- Type: `boolean`
- Default value: `false`
- Default: `false`
Used to configure whether the page is hidden in tabs. If hidden, the page will not be displayed in tabs.
Used to configure whether the page is hidden in the tab. When hidden, the page will not be displayed in the tab.
### hideInBreadcrumb
- Type: `boolean`
- Default value: `false`
- Default: `false`
Used to configure whether the page is hidden in the breadcrumb. If hidden, the page will not be displayed in the breadcrumb.
Used to configure whether the page is hidden in the breadcrumb. When hidden, the page will not be displayed in the breadcrumb.
### hideChildrenInMenu
- Type: `boolean`
- Default value: `false`
- Default: `false`
Used to configure whether the child pages of the page are hidden in the menu. If hidden, the child pages will not be displayed in the menu.
Used to configure whether the subpages of the page are hidden in the menu. When hidden, the subpages will not be displayed in the menu.
### authority
- Type: `string[]`
- Default value: `[]`
- Default: `[]`
Used to configure the page's permissions. Only users with corresponding permissions can access the page. If not configured, no permissions are required.
Used to configure the permissions of the page. Only users with the corresponding permissions can access the page. If not configured, no permissions are required.
### badge
- Type: `string`
- Default value: `''`
- Default: `''`
Used to configure the page's badge, which will be displayed in the menu.
Used to configure the badge of the page, which will be displayed in the menu.
### badgeType
- Type: `'dot' | 'normal'`
- Default value: `'normal'`
- Default: `'normal'`
Used to configure the type of the page's badge. `dot` is a small red dot, `normal` is text.
Used to configure the badge type of the page. `dot` is a small red dot, `normal` is text.
### badgeVariants
- Type: `'default' | 'destructive' | 'primary' | 'success' | 'warning' | string`
- Default value: `'success'`
- Default: `'success'`
Used to configure the color of the page's badge.
Used to configure the badge color of the page.
### activePath
- Type: `string`
- Default value: `''`
- Default: `''`
Used to configure the currently active menu. Sometimes when the page is not displayed in the menu, it is used to activate the parent menu.
Used to configure the currently active menu. Sometimes the page is not displayed in the menu, and this is used to activate the parent menu.
### affixTab
- Type: `boolean`
- Default value: `false`
- Default: `false`
Used to configure whether the page tab is pinned. Once pinned, the page cannot be closed.
Used to configure whether the page is fixed in the tab. When fixed, the page cannot be closed.
### affixTabOrder
- Type: `number`
- Default value: `0`
- Default: `0`
Used to configure the order of the pinned page tabs, sorted in ascending order.
Used to configure the order of fixed tabs, sorted in ascending order.
### iframeSrc
- Type: `string`
- Default value: `''`
- Default: `''`
Used to configure the `iframe` address of the embedded page. Once set, the corresponding page will be embedded in the current page.
Used to configure the `iframe` address of the embedded page. When set, the corresponding page will be embedded in the current page.
### ignoreAccess
- Type: `boolean`
- Default value: `false`
- Default: `false`
Used to configure whether the page ignores permissions and can be accessed directly.
### link
- Type: `string`
- Default value: `''`
- Default: `''`
Used to configure the external link jump path, which will be opened in a new window.
Used to configure the external link jump path, which will open in a new window.
### maxNumOfOpenTab
- Type: `number`
- Default value: `-1`
- Default: `-1`
Used to configure the maximum number of open tabs. Once set, the earliest opened tab will be automatically closed when a new tab is opened (only effective when opening tabs with the same name).
Used to configure the maximum number of open tabs. When set, the earliest opened tab will be automatically closed when opening a new tab (only effective when opening tabs with the same name).
### menuVisibleWithForbidden
- Type: `boolean`
- Default value: `false`
- Default: `false`
Used to configure whether the page can be seen in the menu, but access will be redirected to 403.
### openInNewWindow
- Type: `boolean`
- Default: `false`
When set to `true`, the page will open in a new window.
### order
- Type: `number`
- Default value: `0`
- Default: `0`
Used to configure the page's order, for routing to menu sorting.
Used to configure the sorting of the page, used for route to menu sorting.
_Note:_ Sorting is only effective for first-level menus. The sorting of second-level menus needs to be set in the corresponding first-level menu in code order.
### query
- Type: `Recordable`
- Default: `{}`
Used to configure the menu parameters of the page, which will be passed to the page in the menu.
## Route Refresh
The way to refresh the route is as follows:
The route refresh method is as follows:
```vue
<script setup lang="ts">

View File

@@ -18,7 +18,7 @@
- **Permission Validation**: Comprehensive permission validation solutions, including button-level permission control.
- **Multi-Theme**: Built-in multiple theme configurations & dark mode to meet personalized needs.
- **Dynamic Menu**: Supports dynamic menus that can display based on permissions.
- **Mock Data**: High-performance local Mock data solution based on Nitro.
- **Mock Data**: High-performance local Mock data solution based on `Nitro`.
- **Rich Components**: Provides a wide range of components to meet most business needs.
- **Standardization**: Code quality is ensured with tools like `ESLint`, `Prettier`, `Stylelint`, `Publint`, and `CSpell`.
- **Engineering**: Development efficiency is improved with tools like `Pnpm Monorepo`, `TurboRepo`, and `Changeset`.
@@ -26,9 +26,9 @@
## Browser Support
**Local development** is recommended using the **latest version of Chrome**. **Versions below Chrome 80 are not supported**.
- **Local development** is recommended using the **latest version of Chrome**. **Versions below Chrome 80 are not supported**.
**Production environment** supports modern browsers, IE is not supported.
- **Production environment** supports modern browsers, IE is not supported.
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt="IE" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Safari |
| :-: | :-: | :-: | :-: | :-: |
@@ -37,12 +37,10 @@
## Contribution
- [Vben Admin](https://github.com/vbenjs/vue-vben-admin) is still being actively updated. Contributions are welcome to help maintain and improve the project, aiming to create a better mid- to backend solution.
- If you wish to join us, you can provide suggestions or submit pull requests. We will invite you to join based on your activity.
- If you wish to join us, you can start by contributing in the following ways, and we will invite you to join based on your activity.
::: info Join Us
If you wish to join us, you can start by contributing in the following ways, and we will invite you to join based on your activity:
- Regularly submit `PRs`.
- Provide valuable suggestions.
- Participate in discussions and help resolve some `issues`.

View File

@@ -8,11 +8,29 @@ outline: deep
## 路由类型
路由分为静态路由和动态路由,静态路由是在项目启动时就已经确定的路由动态路由一般是在用户登录后,根据用户的权限动态生成的路由。
路由分为核心路由、静态路由和动态路由,核心路由是框架内置的路由包含了根路由、登录路由、404路由等静态路由是在项目启动时就已经确定的路由动态路由一般是在用户登录后,根据用户的权限动态生成的路由。
静态路由和动态路由都会走权限控制,可以通过配置路由的 `meta` 属性中的 `authority` 字段来控制权限,可以参考[路由权限控制](https://github.com/vbenjs/vue-vben-admin/blob/main/playground/src/router/routes/modules/demos.ts)。
### 核心路由
核心路由是框架内置的路由包含了根路由、登录路由、404路由等核心路由的配置在应用下 `src/router/routes/core` 目录下
::: tip
核心路由主要用于框架的基础功能,因此不建议将业务相关的路由放在核心路由中,推荐将业务相关的路由放在静态路由或动态路由中。
:::
### 静态路由
如果你的页面项目不需要权限控制,可以直接使用静态路由,静态路由的配置在应用下 `src/router/routes/index` 目录下,打开注释的文件内容:
静态路由的配置在应用下 `src/router/routes/index` 目录下,打开注释的文件内容:
::: tip
权限控制是通过路由的 `meta` 属性中的 `authority` 字段来控制的,如果你的页面项目不需要权限控制,可以不设置 `authority` 字段。
:::
```ts
// 有需要可以自行打开注释,并创建文件夹

View File

@@ -18,7 +18,7 @@
- **权限验证**:完善的权限验证方案,按钮级别权限控制。
- **多主题**:内置多种主题配置和黑暗模式,满足个性化需求。
- **动态菜单**:支持动态菜单,可以根据权限配置显示菜单。
- **Mock 数据**:基于 Nitro 的本地高性能 Mock 数据方案。
- **Mock 数据**:基于 `Nitro` 的本地高性能 Mock 数据方案。
- **组件丰富**:提供了丰富的组件,可以满足大部分的业务需求。
- **规范**:代码规范,使用 `ESLint``Prettier``Stylelint``Publint``CSpell` 等工具保证代码质量。
- **工程化**:使用 `Pnpm Monorepo``TurboRepo``Changeset` 等工具,提高开发效率。
@@ -26,9 +26,9 @@
## 浏览器支持
**本地开发**推荐使用`Chrome 最新版`浏览器,**不支持**`Chrome 80`以下版本。
- **本地开发**推荐使用`Chrome 最新版`浏览器,**不支持**`Chrome 80`以下版本。
**生产环境**支持现代浏览器,不支持 IE。
- **生产环境**支持现代浏览器,不支持 IE。
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt="IE" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)Safari |
| :-: | :-: | :-: | :-: | :-: |
@@ -37,13 +37,13 @@
## 贡献
- [Vben Admin](https://github.com/vbenjs/vue-vben-admin) 还在持续更新中,本项目欢迎您的参与,共同维护,逐步完善,打造更好的中后台解决方案。
- 如果你加入我们,可以提供有价值的建议或者参与讨论,协助解决 issue- 如果你想加入我们,可以提供有价值的建议或者参与讨论,协助解决 issue,我们会根据你的活跃度邀请你加入。
- 如果你有兴趣加入我们,可以通过以下方式开始,我们会根据你的活跃度邀请你加入。
::: info 加入我们
- 长期提交 `PR`
- 提供一些好的建议。
- 参与讨论,帮助解决一些 `issue`
- 提供有价值的建议。
- 参与讨论,帮助解决 `issue`
- 共同维护文档。
:::

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/commitlint-config",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",

View File

@@ -22,7 +22,7 @@ export async function typescript(): Promise<Linter.Config[]> {
ecmaVersion: 'latest',
extraFileExtensions: ['.vue'],
jsxPragma: 'React',
project: './tsconfig.*?.json',
project: './tsconfig.*.json',
sourceType: 'module',
},
},

View File

@@ -18,6 +18,7 @@ export async function unicorn(): Promise<Linter.Config[]> {
'unicorn/better-regex': 'off',
'unicorn/consistent-destructuring': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/expiring-todo-comments': 'off',
'unicorn/filename-case': 'off',
'unicorn/import-style': 'off',
'unicorn/no-array-for-each': 'off',

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/stylelint-config",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/node-utils",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/tailwind-config",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/tsconfig",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/vite-config",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",

View File

@@ -1,6 +1,6 @@
{
"name": "vben-admin-monorepo",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"keywords": [
"monorepo",
@@ -99,7 +99,7 @@
"node": ">=20.10.0",
"pnpm": ">=9.12.0"
},
"packageManager": "pnpm@9.12.3",
"packageManager": "pnpm@9.14.2",
"pnpm": {
"peerDependencyRules": {
"allowedVersions": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/design",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/icons",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/shared",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {
@@ -81,13 +81,11 @@
"dependencies": {
"@ctrl/tinycolor": "catalog:",
"@tanstack/vue-store": "catalog:",
"@types/lodash.get": "catalog:",
"@vue/shared": "catalog:",
"clsx": "catalog:",
"dayjs": "catalog:",
"defu": "catalog:",
"lodash.clonedeep": "catalog:",
"lodash.get": "catalog:",
"nprogress": "catalog:",
"tailwind-merge": "catalog:",
"theme-colors": "catalog:"

View File

@@ -0,0 +1,156 @@
import { openWindow } from './window';
interface DownloadOptions<T = string> {
fileName?: string;
source: T;
target?: string;
}
const DEFAULT_FILENAME = 'downloaded_file';
/**
* 通过 URL 下载文件,支持跨域
* @throws {Error} - 当下载失败时抛出错误
*/
export async function downloadFileFromUrl({
fileName,
source,
target = '_blank',
}: DownloadOptions): Promise<void> {
if (!source || typeof source !== 'string') {
throw new Error('Invalid URL.');
}
const isChrome = window.navigator.userAgent.toLowerCase().includes('chrome');
const isSafari = window.navigator.userAgent.toLowerCase().includes('safari');
if (/iP/.test(window.navigator.userAgent)) {
console.error('Your browser does not support download!');
return;
}
if (isChrome || isSafari) {
triggerDownload(source, resolveFileName(source, fileName));
}
if (!source.includes('?')) {
source += '?download';
}
openWindow(source, { target });
}
/**
* 通过 Base64 下载文件
*/
export function downloadFileFromBase64({ fileName, source }: DownloadOptions) {
if (!source || typeof source !== 'string') {
throw new Error('Invalid Base64 data.');
}
const resolvedFileName = fileName || DEFAULT_FILENAME;
triggerDownload(source, resolvedFileName);
}
/**
* 通过图片 URL 下载图片文件
*/
export async function downloadFileFromImageUrl({
fileName,
source,
}: DownloadOptions) {
const base64 = await urlToBase64(source);
downloadFileFromBase64({ fileName, source: base64 });
}
/**
* 通过 Blob 下载文件
*/
export function downloadFileFromBlob({
fileName = DEFAULT_FILENAME,
source,
}: DownloadOptions<Blob>): void {
if (!(source instanceof Blob)) {
throw new TypeError('Invalid Blob data.');
}
const url = URL.createObjectURL(source);
triggerDownload(url, fileName);
}
/**
* 下载文件,支持 Blob、字符串和其他 BlobPart 类型
*/
export function downloadFileFromBlobPart({
fileName = DEFAULT_FILENAME,
source,
}: DownloadOptions<BlobPart>): void {
// 如果 data 不是 Blob则转换为 Blob
const blob =
source instanceof Blob
? source
: new Blob([source], { type: 'application/octet-stream' });
// 创建对象 URL 并触发下载
const url = URL.createObjectURL(blob);
triggerDownload(url, fileName);
}
/**
* img url to base64
* @param url
*/
export function urlToBase64(url: string, mineType?: string): Promise<string> {
return new Promise((resolve, reject) => {
let canvas = document.createElement('CANVAS') as HTMLCanvasElement | null;
const ctx = canvas?.getContext('2d');
const img = new Image();
img.crossOrigin = '';
img.addEventListener('load', () => {
if (!canvas || !ctx) {
return reject(new Error('Failed to create canvas.'));
}
canvas.height = img.height;
canvas.width = img.width;
ctx.drawImage(img, 0, 0);
const dataURL = canvas.toDataURL(mineType || 'image/png');
canvas = null;
resolve(dataURL);
});
img.src = url;
});
}
/**
* 通用下载触发函数
* @param href - 文件下载的 URL
* @param fileName - 下载文件的名称,如果未提供则自动识别
* @param revokeDelay - 清理 URL 的延迟时间 (毫秒)
*/
export function triggerDownload(
href: string,
fileName: string | undefined,
revokeDelay: number = 100,
): void {
const defaultFileName = 'downloaded_file';
const finalFileName = fileName || defaultFileName;
const link = document.createElement('a');
link.href = href;
link.download = finalFileName;
link.style.display = 'none';
if (link.download === undefined) {
link.setAttribute('target', '_blank');
}
document.body.append(link);
link.click();
link.remove();
// 清理临时 URL 以释放内存
setTimeout(() => URL.revokeObjectURL(href), revokeDelay);
}
function resolveFileName(url: string, fileName?: string): string {
return fileName || url.slice(url.lastIndexOf('/') + 1) || DEFAULT_FILENAME;
}

View File

@@ -2,6 +2,7 @@ export * from './cn';
export * from './date';
export * from './diff';
export * from './dom';
export * from './download';
export * from './inference';
export * from './letter';
export * from './merge';

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/typings",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/composables",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/preferences",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/form-ui",
"version": "5.2.1",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -91,6 +91,11 @@ function handleRangeTimeValue(values: Record<string, any>) {
fieldMappingTime.forEach(
([field, [startTimeKey, endTimeKey], format = 'YYYY-MM-DD']) => {
if (startTimeKey && endTimeKey && values[field] === null) {
delete values[startTimeKey];
delete values[endTimeKey];
}
if (!values[field]) {
delete values[field];
return;

View File

@@ -13,13 +13,13 @@ import { toRaw } from 'vue';
import { Store } from '@vben-core/shared/store';
import {
bindMethods,
createMerge,
isFunction,
isObject,
mergeWithArrayOverride,
StateHandler,
} from '@vben-core/shared/utils';
import { objectPick } from '@vueuse/core';
function getDefaultState(): VbenFormProps {
return {
actionWrapperClass: '',
@@ -250,8 +250,17 @@ export class FormApi {
form.setValues(fields, shouldValidate);
return;
}
const fieldNames = this.state?.schema?.map((item) => item.fieldName) ?? [];
const filteredFields = objectPick(fields, fieldNames);
const fieldMergeFn = createMerge((obj, key, value) => {
if (key in obj) {
obj[key] =
!Array.isArray(obj[key]) && isObject(obj[key])
? fieldMergeFn(obj[key], value)
: value;
}
return true;
});
const filteredFields = fieldMergeFn(fields, form.values);
form.setValues(filteredFields, shouldValidate);
}

View File

@@ -209,8 +209,9 @@ function fieldBindEvent(slotProps: Record<string, any>) {
if (modelValue && isObject(modelValue) && bindEventField) {
value = isEventObjectLike(modelValue)
? modelValue?.target?.[bindEventField]
: modelValue;
: (modelValue?.[bindEventField] ?? modelValue);
}
if (bindEventField) {
return {
[`onUpdate:${bindEventField}`]: handler,
@@ -223,6 +224,7 @@ function fieldBindEvent(slotProps: Record<string, any>) {
if (!shouldUnwrap) {
return onChange?.(e);
}
return onChange?.(e?.target?.[bindEventField] ?? e);
},
onInput: () => {},
@@ -238,6 +240,12 @@ function createComponentProps(slotProps: Record<string, any>) {
...slotProps.componentField,
...computedProps.value,
...bindEvents,
...(Reflect.has(computedProps.value, 'onChange')
? { onChange: computedProps.value.onChange }
: {}),
...(Reflect.has(computedProps.value, 'onInput')
? { onInput: computedProps.value.onInput }
: {}),
};
return binds;

View File

@@ -40,6 +40,13 @@ const handleUpdateCollapsed = (value: boolean) => {
};
function handleKeyDownEnter(event: KeyboardEvent) {
if (
!state.value.submitOnEnter ||
!formActionsRef.value ||
!formActionsRef.value.handleSubmit
) {
return;
}
// 如果是 textarea 不阻止默认行为,否则会导致无法换行。
// 跳过 textarea 的回车提交处理
if (event.target instanceof HTMLTextAreaElement) {
@@ -47,9 +54,6 @@ function handleKeyDownEnter(event: KeyboardEvent) {
}
event.preventDefault();
if (!state.value.submitOnEnter || !formActionsRef.value) {
return;
}
formActionsRef.value?.handleSubmit?.();
}
</script>

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/layout-ui",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/menu-ui",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -178,7 +178,12 @@ function handleFocusOutside(e: Event) {
</SheetClose>
</div>
</SheetHeader>
<template v-else>
<VisuallyHidden>
<SheetTitle />
<SheetDescription />
</VisuallyHidden>
</template>
<div
ref="wrapperRef"
:class="

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/shadcn-ui",
"version": "5.4.5",
"version": "5.4.8",
"#main": "./dist/index.mjs",
"#module": "./dist/index.mjs",
"homepage": "https://github.com/vbenjs/vue-vben-admin",

View File

@@ -10,15 +10,18 @@ defineOptions({
inheritAttrs: false,
});
const props = withDefaults(defineProps<PinInputProps>(), {
btnLoading: false,
codeLength: 6,
handleSendCode: async () => {},
maxTime: 60,
});
const {
codeLength = 6,
createText = async () => {},
disabled = false,
handleSendCode = async () => {},
loading = false,
maxTime = 60,
} = defineProps<PinInputProps>();
const emit = defineEmits<{
complete: [];
sendError: [error: any];
}>();
const timer = ref<ReturnType<typeof setTimeout>>();
@@ -30,11 +33,11 @@ const countdown = ref(0);
const btnText = computed(() => {
const countdownValue = countdown.value;
return props.createText?.(countdownValue);
return createText?.(countdownValue);
});
const btnLoading = computed(() => {
return props.loading || countdown.value > 0;
return loading || countdown.value > 0;
});
watch(
@@ -50,10 +53,16 @@ function handleComplete(e: string[]) {
}
async function handleSend(e: Event) {
e?.preventDefault();
await props.handleSendCode();
countdown.value = props.maxTime;
startCountdown();
try {
e?.preventDefault();
await handleSendCode();
countdown.value = maxTime;
startCountdown();
} catch (error) {
console.error('Failed to send code:', error);
// Consider emitting an error event or showing a notification
emit('sendError', error);
}
}
function startCountdown() {
@@ -77,6 +86,7 @@ const id = useId();
<PinInput
:id="id"
v-model="inputValue"
:disabled="disabled"
class="flex w-full justify-between"
otp
placeholder="○"
@@ -92,6 +102,7 @@ const id = useId();
/>
</PinInputGroup>
<VbenButton
:disabled="disabled"
:loading="btnLoading"
class="flex-grow"
size="lg"

View File

@@ -8,6 +8,10 @@ interface PinInputProps {
* 发送验证码按钮文本
*/
createText?: (countdown: number) => string;
/**
* 是否禁用
*/
disabled?: boolean;
/**
* 自定义验证码发送逻辑
* @returns

View File

@@ -48,11 +48,14 @@ const delegatedProps = computed(() => {
const forwarded = useForwardPropsEmits(delegatedProps, emits);
const contentRef = ref<InstanceType<typeof DialogContent> | null>(null);
function onAnimationEnd() {
if (props.open) {
emits('opened');
} else {
emits('closed');
function onAnimationEnd(event: AnimationEvent) {
// 只有在 contentRef 的动画结束时才触发 opened/closed 事件
if (event.target === contentRef.value?.$el) {
if (props.open) {
emits('opened');
} else {
emits('closed');
}
}
}
defineExpose({

View File

@@ -1,6 +1,6 @@
{
"name": "@vben-core/tabs-ui",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/constants",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/access",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/common-ui",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -41,6 +41,7 @@ const emit = defineEmits<{
const refTrigger = useTemplateRef<HTMLElement>('refTrigger');
const currentSelect = ref('');
const currentList = ref(props.icons);
const currentPage = ref(1);
watch(
() => props.icons,
@@ -72,6 +73,7 @@ const handleClick = (icon: string) => {
};
const handlePageChange = (page: number) => {
currentPage.value = page;
setCurrentPage(page);
};
@@ -114,7 +116,6 @@ defineExpose({ changeOpenState });
class="flex-center flex justify-end overflow-hidden border-t py-2 pr-3"
>
<Pagination
v-slot="{ page }"
:items-per-page="36"
:sibling-count="1"
:total="total"
@@ -136,7 +137,7 @@ defineExpose({ changeOpenState });
as-child
>
<Button
:variant="item.value === page ? 'default' : 'outline'"
:variant="item.value === currentPage ? 'default' : 'outline'"
class="size-5 p-0 text-sm"
>
{{ item.value }}

View File

@@ -2,6 +2,7 @@ export * from './captcha';
export * from './ellipsis-text';
export * from './icon-picker';
export * from './page';
export * from './resize';
export * from '@vben-core/form-ui';
export * from '@vben-core/popup-ui';

View File

@@ -0,0 +1 @@
export { default as VResize } from './resize.vue';

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/hooks",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,8 +1,11 @@
import type { Watermark, WatermarkOptions } from 'watermark-js-plus';
import { nextTick, onUnmounted, ref } from 'vue';
import { nextTick, onUnmounted, readonly, ref } from 'vue';
import { updatePreferences } from '@vben/preferences';
const watermark = ref<Watermark>();
const unmountedHooked = ref<boolean>(false);
const cachedOptions = ref<Partial<WatermarkOptions>>({
advancedStyle: {
colorStops: [
@@ -45,7 +48,7 @@ export function useWatermark() {
...options,
};
watermark.value = new Watermark(cachedOptions.value);
updatePreferences({ app: { watermark: true } });
await watermark.value?.create();
}
@@ -62,16 +65,24 @@ export function useWatermark() {
}
function destroyWatermark() {
watermark.value?.destroy();
if (watermark.value) {
watermark.value.destroy();
watermark.value = undefined;
}
updatePreferences({ app: { watermark: false } });
}
onUnmounted(() => {
destroyWatermark();
});
// 只在第一次调用时注册卸载钩子,防止重复注册以致于在路由切换时销毁了水印
if (!unmountedHooked.value) {
unmountedHooked.value = true;
onUnmounted(() => {
destroyWatermark();
});
}
return {
destroyWatermark,
updateWatermark,
watermark,
watermark: readonly(watermark),
};
}

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/layouts",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {
@@ -37,7 +37,6 @@
"@vben/types": "workspace:*",
"@vben/utils": "workspace:*",
"@vueuse/core": "catalog:",
"default-passive-events": "catalog:",
"vue": "catalog:",
"vue-router": "catalog:"
}

View File

@@ -29,8 +29,6 @@ import {
} from './menu';
import { LayoutTabbar } from './tabbar';
import 'default-passive-events';
defineOptions({ name: 'BasicLayout' });
const emit = defineEmits<{ clearPreferencesAndLogout: [] }>();

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/plugins",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {
@@ -34,7 +34,6 @@
"@vben/types": "workspace:*",
"@vben/utils": "workspace:*",
"@vueuse/core": "catalog:",
"dayjs": "catalog:",
"echarts": "catalog:",
"vue": "catalog:",
"vxe-pc-ui": "catalog:",

View File

@@ -1,3 +1,4 @@
import type { Recordable } from '@vben/types';
import type { VxeGridProps, VxeUIExport } from 'vxe-table';
import type { VxeGridApi } from './api';
@@ -7,7 +8,7 @@ import { formatDate, formatDateTime, isFunction } from '@vben/utils';
export function extendProxyOptions(
api: VxeGridApi,
options: VxeGridProps,
getFormValues: () => Record<string, any>,
getFormValues: () => Recordable<any>,
) {
[
'query',
@@ -25,17 +26,28 @@ function extendProxyOption(
key: string,
api: VxeGridApi,
options: VxeGridProps,
getFormValues: () => Record<string, any>,
getFormValues: () => Recordable<any>,
) {
const { proxyConfig } = options;
const configFn = (proxyConfig?.ajax as any)?.[key];
const configFn = (proxyConfig?.ajax as Recordable<any>)?.[key];
if (!isFunction(configFn)) {
return options;
}
const wrapperFn = async (params: any, _formValues: any, ...args: any[]) => {
const wrapperFn = async (
params: Recordable<any>,
customValues: Recordable<any>,
...args: Recordable<any>[]
) => {
const formValues = getFormValues();
const data = await configFn(params, formValues, ...args);
const data = await configFn(
params,
{
...customValues,
...formValues,
},
...args,
);
return data;
};
api.setState({

View File

@@ -81,7 +81,8 @@
}
.vxe-tools--operate {
@apply ml-3;
margin-right: 0.25rem;
margin-left: 0.75rem;
}
.vxe-table-custom--checkbox-option:hover {
@@ -93,6 +94,7 @@
}
.vxe-buttons--wrapper:not(:empty),
.vxe-tools--operate:not(:empty),
.vxe-tools--wrapper:not(:empty) {
padding: 0.6em 0;
}

View File

@@ -32,7 +32,7 @@ import { useTableForm } from './init';
import 'vxe-table/styles/cssvar.scss';
import 'vxe-pc-ui/styles/cssvar.scss';
import './theme.css';
import './style.css';
interface Props extends VxeGridProps {
api: ExtendedVxeGridApi;
@@ -270,7 +270,7 @@ onUnmounted(() => {
ref="gridRef"
:class="
cn(
'p-2',
'p-2 pt-0',
{
'pt-0': showToolbar && !formOptions,
},

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/request",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/icons",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/locales",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/preferences",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/stores",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/styles",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/types",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/utils",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/playground",
"version": "5.4.5",
"version": "5.4.8",
"homepage": "https://vben.pro",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": {

View File

@@ -49,7 +49,8 @@
"fullScreen": "FullScreen",
"clipboard": "Clipboard",
"menuWithQuery": "Menu With Query",
"openInNewWindow": "Open in New Window"
"openInNewWindow": "Open in New Window",
"fileDownload": "File Download"
},
"breadcrumb": {
"navigation": "Breadcrumb Navigation",

View File

@@ -49,7 +49,8 @@
"fullScreen": "全屏",
"clipboard": "剪贴板",
"menuWithQuery": "带参菜单",
"openInNewWindow": "新窗口打开"
"openInNewWindow": "新窗口打开",
"fileDownload": "文件下载"
},
"breadcrumb": {
"navigation": "面包屑导航",

View File

@@ -9,6 +9,9 @@
"ellipsis": {
"title": "文本省略"
},
"resize": {
"title": "拖动调整"
},
"form": {
"title": "表单",
"basic": "基础表单",

View File

@@ -17,12 +17,12 @@ const dynamicRoutes: RouteRecordRaw[] = mergeRouteModules(dynamicRouteFiles);
/** 外部路由列表访问这些页面可以不需要Layout可能用于内嵌在别的系统(不会显示在菜单中) */
// const externalRoutes: RouteRecordRaw[] = mergeRouteModules(externalRouteFiles);
/** 不需要权限的菜单列表(会显示在菜单中) */
// const staticRoutes: RouteRecordRaw[] = mergeRouteModules(staticRouteFiles);
const staticRoutes: RouteRecordRaw[] = [];
const externalRoutes: RouteRecordRaw[] = [];
/** 路由列表,由基本路由+静态路由组成 */
/** 路由列表,由基本路由、外部路由和404兜底路由组成
* 无需走权限验证(会一直显示在菜单中) */
const routes: RouteRecordRaw[] = [
...coreRoutes,
...externalRoutes,
@@ -32,6 +32,6 @@ const routes: RouteRecordRaw[] = [
/** 基本路由列表,这些路由不需要进入权限拦截 */
const coreRouteNames = traverseTreeValues(coreRoutes, (route) => route.name);
/** 有权限校验的路由列表,包含动态路由和静态路由 */
const accessRoutes = [...dynamicRoutes, ...staticRoutes];
export { accessRoutes, coreRouteNames, routes };

View File

@@ -177,6 +177,16 @@ const routes: RouteRecordRaw[] = [
title: $t('demos.features.fullScreen'),
},
},
{
name: 'FileDownloadDemo',
path: '/demos/features/file-download',
component: () =>
import('#/views/demos/features/file-download/index.vue'),
meta: {
icon: 'lucide:hard-drive-download',
title: $t('demos.features.fileDownload'),
},
},
{
name: 'ClipboardDemo',
path: '/demos/features/clipboard',

View File

@@ -228,6 +228,15 @@ const routes: RouteRecordRaw[] = [
title: $t('examples.ellipsis.title'),
},
},
{
name: 'VueResizeDemo',
path: '/demos/resize/basic',
component: () => import('#/views/examples/resize/basic.vue'),
meta: {
icon: 'material-symbols:resize',
title: $t('examples.resize.title'),
},
},
],
},
];

View File

@@ -17,7 +17,7 @@ const { copy, text } = useClipboard({ legacy: true, source });
Current copied: <code>{{ text || 'none' }}</code>
</p>
<div class="flex">
<Input class="mr-3 flex w-[200px]" />
<Input v-model:value="source" class="mr-3 flex w-[200px]" />
<Button type="primary" @click="copy(source)"> Copy </Button>
</div>
</Card>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,74 @@
<script setup lang="ts">
import { Page } from '@vben/common-ui';
import {
downloadFileFromBase64,
downloadFileFromBlobPart,
downloadFileFromImageUrl,
downloadFileFromUrl,
} from '@vben/utils';
import { Button, Card } from 'ant-design-vue';
import imageBase64 from './base64';
</script>
<template>
<Page title="文件下载示例">
<Card title="根据文件地址下载文件">
<Button
type="primary"
@click="
downloadFileFromUrl({
source:
'https://codeload.github.com/vbenjs/vue-vben-admin-doc/zip/main',
target: '_self',
})
"
>
Download File
</Button>
</Card>
<Card class="my-5" title="根据地址下载图片">
<Button
type="primary"
@click="
downloadFileFromImageUrl({
source:
'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp',
fileName: 'vben-logo.png',
})
"
>
Download File
</Button>
</Card>
<Card class="my-5" title="base64流下载">
<Button
type="primary"
@click="
downloadFileFromBase64({
source: imageBase64,
fileName: 'image.png',
})
"
>
Download Image
</Button>
</Card>
<Card class="my-5" title="文本下载">
<Button
type="primary"
@click="
downloadFileFromBlobPart({
source: 'text content',
fileName: 'test.txt',
})
"
>
Download TxT
</Button>
</Card>
</Page>
</template>

View File

@@ -4,7 +4,12 @@ import { useWatermark } from '@vben/hooks';
import { Button, Card } from 'ant-design-vue';
const { destroyWatermark, updateWatermark } = useWatermark();
const { destroyWatermark, updateWatermark, watermark } = useWatermark();
async function recreateWaterMark() {
destroyWatermark();
await updateWatermark({});
}
async function createWaterMark() {
await updateWatermark({
@@ -21,7 +26,7 @@ async function createWaterMark() {
],
type: 'linear',
},
content: 'hello my watermark',
content: `hello my watermark\n${new Date().toLocaleString()}`,
globalAlpha: 0.5,
gridLayoutOptions: {
cols: 2,
@@ -57,10 +62,25 @@ async function createWaterMark() {
</template>
<Card title="使用">
<Button class="mr-2" type="primary" @click="createWaterMark()">
<Button
:disabled="!!watermark"
class="mr-2"
type="primary"
@click="recreateWaterMark"
>
创建水印
</Button>
<Button danger @click="destroyWatermark">移除水印</Button>
<Button
:disabled="!watermark"
class="mr-2"
type="primary"
@click="createWaterMark"
>
更新水印
</Button>
<Button :disabled="!watermark" danger @click="destroyWatermark">
移除水印
</Button>
</Card>
</Page>
</template>

View File

@@ -0,0 +1,58 @@
<script lang="ts" setup>
import { ref } from 'vue';
import { Page, VResize } from '@vben/common-ui';
const colorMap = ['red', 'green', 'yellow', 'gray'];
type TSize = {
height: number;
left: number;
top: number;
width: number;
};
const sizeList = ref<TSize[]>([
{ height: 200, left: 200, top: 200, width: 200 },
{ height: 300, left: 300, top: 300, width: 300 },
{ height: 400, left: 400, top: 400, width: 400 },
{ height: 500, left: 500, top: 500, width: 500 },
]);
const resize = (size?: TSize, rect?: TSize) => {
if (!size || !rect) return;
size.height = rect.height;
size.left = rect.left;
size.top = rect.top;
size.width = rect.width;
};
</script>
<template>
<Page description="Resize组件基础示例" title="Resize组件">
<div class="m-4 bg-blue-500 p-48 text-xl">
<div v-for="size in sizeList" :key="size.width">
{{
`width: ${size.width}px, height: ${size.height}px, top: ${size.top}px, left: ${size.left}px`
}}
</div>
</div>
<template v-for="(_, idx) of 4" :key="idx">
<VResize
:h="100 * (idx + 1)"
:w="100 * (idx + 1)"
:x="100 * (idx + 1)"
:y="100 * (idx + 1)"
@dragging="(rect) => resize(sizeList[idx], rect)"
@resizing="(rect) => resize(sizeList[idx], rect)"
>
<div
:style="{ backgroundColor: colorMap[idx] }"
class="h-full w-full"
></div>
</VResize>
</template>
</Page>
</template>

4677
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -13,54 +13,53 @@ packages:
- docs
- playground
catalog:
'@ast-grep/napi': ^0.29.0
'@ast-grep/napi': ^0.30.0
'@changesets/changelog-github': ^0.5.0
'@changesets/cli': ^2.27.9
'@changesets/git': ^3.0.1
'@clack/prompts': ^0.7.0
'@commitlint/cli': ^19.5.0
'@commitlint/config-conventional': ^19.5.0
'@changesets/cli': ^2.27.10
'@changesets/git': ^3.0.2
'@clack/prompts': ^0.8.2
'@commitlint/cli': ^19.6.0
'@commitlint/config-conventional': ^19.6.0
'@ctrl/tinycolor': ^4.1.0
'@eslint/js': ^9.14.0
'@eslint/js': ^9.15.0
'@faker-js/faker': ^9.2.0
'@iconify/json': ^2.2.270
'@iconify/json': ^2.2.275
'@iconify/tailwind': ^1.1.3
'@iconify/vue': ^4.1.2
'@intlify/core-base': ^10.0.4
'@intlify/unplugin-vue-i18n': ^5.2.0
'@intlify/unplugin-vue-i18n': ^6.0.0
'@jspm/generator': ^2.4.1
'@manypkg/get-packages': ^2.2.2
'@nolebase/vitepress-plugin-git-changelog': ^2.8.1
'@playwright/test': ^1.48.2
'@nolebase/vitepress-plugin-git-changelog': ^2.10.0
'@playwright/test': ^1.49.0
'@pnpm/workspace.read-manifest': ^2.2.1
'@stylistic/stylelint-plugin': ^3.1.1
'@tailwindcss/nesting': 0.0.0-insiders.565cd3e
'@tailwindcss/typography': ^0.5.15
'@tanstack/vue-query': ^5.59.20
'@tanstack/vue-store': ^0.5.6
'@tanstack/vue-query': ^5.61.3
'@tanstack/vue-store': ^0.5.7
'@types/archiver': ^6.0.3
'@types/eslint': ^9.6.1
'@types/html-minifier-terser': ^7.0.2
'@types/jsonwebtoken': ^9.0.7
'@types/lodash.clonedeep': ^4.5.9
'@types/lodash.get': ^4.4.9
'@types/node': ^22.9.0
'@types/node': ^22.9.3
'@types/nprogress': ^0.2.3
'@types/postcss-import': ^14.0.3
'@types/qrcode': ^1.5.5
'@types/sortablejs': ^1.15.8
'@typescript-eslint/eslint-plugin': ^8.13.0
'@typescript-eslint/parser': ^8.13.0
'@typescript-eslint/eslint-plugin': ^8.15.0
'@typescript-eslint/parser': ^8.15.0
'@vee-validate/zod': ^4.14.7
'@vite-pwa/vitepress': ^0.5.3
'@vitejs/plugin-vue': ^5.1.4
'@vitejs/plugin-vue-jsx': ^4.0.1
'@vue/reactivity': ^3.5.12
'@vue/shared': ^3.5.12
'@vitejs/plugin-vue': ^5.2.0
'@vitejs/plugin-vue-jsx': ^4.1.0
'@vue/reactivity': ^3.5.13
'@vue/shared': ^3.5.13
'@vue/test-utils': ^2.4.6
'@vueuse/core': ^11.2.0
'@vueuse/integrations': ^11.2.0
ant-design-vue: ^4.2.5
'@vueuse/core': ^11.3.0
'@vueuse/integrations': ^11.3.0
ant-design-vue: ^4.2.6
archiver: ^7.0.1
autoprefixer: ^10.4.20
axios: ^1.7.7
@@ -79,43 +78,41 @@ catalog:
cz-git: ^1.11.0
czg: ^1.11.0
dayjs: ^1.11.13
default-passive-events: ^2.0.0
defu: ^6.1.4
depcheck: ^1.4.7
dotenv: ^16.4.5
echarts: ^5.5.1
element-plus: ^2.8.7
eslint: ^9.14.0
eslint-config-turbo: ^2.2.3
element-plus: ^2.8.8
eslint: ^9.15.0
eslint-config-turbo: ^2.3.1
eslint-plugin-command: ^0.2.6
eslint-plugin-eslint-comments: ^3.2.0
eslint-plugin-import-x: ^4.4.0
eslint-plugin-jsdoc: ^50.4.3
eslint-plugin-jsonc: ^2.17.0
eslint-plugin-n: ^17.13.1
eslint-plugin-import-x: ^4.4.3
eslint-plugin-jsdoc: ^50.5.0
eslint-plugin-jsonc: ^2.18.2
eslint-plugin-n: ^17.14.0
eslint-plugin-no-only-tests: ^3.3.0
eslint-plugin-perfectionist: ^3.9.1
eslint-plugin-prettier: ^5.2.1
eslint-plugin-regexp: ^2.6.0
eslint-plugin-unicorn: ^56.0.0
eslint-plugin-regexp: ^2.7.0
eslint-plugin-unicorn: ^56.0.1
eslint-plugin-unused-imports: ^4.1.4
eslint-plugin-vitest: ^0.5.4
eslint-plugin-vue: ^9.30.0
eslint-plugin-vue: ^9.31.0
execa: ^9.5.1
find-up: ^7.0.0
get-port: ^7.1.0
globals: ^15.12.0
h3: ^1.13.0
happy-dom: ^15.11.0
happy-dom: ^15.11.6
html-minifier-terser: ^7.2.0
husky: ^9.1.6
husky: ^9.1.7
is-ci: ^3.0.1
jsonc-eslint-parser: ^2.4.0
jsonwebtoken: ^9.0.2
lint-staged: ^15.2.10
lodash.clonedeep: ^4.5.0
lodash.get: ^4.4.2
lucide-vue-next: ^0.456.0
lucide-vue-next: ^0.460.0
medium-zoom: ^1.1.0
naive-ui: ^2.40.1
nitropack: ^2.10.4
@@ -124,24 +121,24 @@ catalog:
pinia: 2.2.2
pinia-plugin-persistedstate: ^4.1.3
pkg-types: ^1.2.1
playwright: ^1.48.2
postcss: ^8.4.47
playwright: ^1.49.0
postcss: ^8.4.49
postcss-antd-fixes: ^0.2.0
postcss-html: ^1.7.0
postcss-import: ^16.1.0
postcss-preset-env: ^10.0.9
postcss-preset-env: ^10.1.1
postcss-scss: ^4.0.9
prettier: ^3.3.3
prettier-plugin-tailwindcss: ^0.6.8
prettier-plugin-tailwindcss: ^0.6.9
publint: ^0.2.12
qrcode: ^1.5.4
radix-vue: ^1.9.9
radix-vue: ^1.9.10
resolve.exports: ^2.0.2
rimraf: ^6.0.1
rollup: ^4.25.0
rollup: ^4.27.4
rollup-plugin-visualizer: ^5.12.0
sass: 1.80.6
sortablejs: ^1.15.3
sortablejs: ^1.15.4
stylelint: ^16.10.0
stylelint-config-recess-order: ^5.1.1
stylelint-config-recommended: ^14.0.1
@@ -150,33 +147,33 @@ catalog:
stylelint-config-standard: ^36.0.1
stylelint-order: ^6.0.4
stylelint-prettier: ^5.0.2
stylelint-scss: ^6.8.1
stylelint-scss: ^6.10.0
tailwind-merge: ^2.5.4
tailwindcss: ^3.4.14
tailwindcss: ^3.4.15
tailwindcss-animate: ^1.0.7
theme-colors: ^0.1.0
turbo: ^2.2.3
typescript: ^5.6.3
turbo: ^2.3.1
typescript: 5.6.3
unbuild: ^3.0.0-rc.11
unplugin-element-plus: ^0.8.0
vee-validate: ^4.14.7
vite: ^5.4.10
vite: ^5.4.11
vite-plugin-compression: ^0.5.1
vite-plugin-dts: 4.2.1
vite-plugin-html: ^3.2.2
vite-plugin-lazy-import: ^1.0.7
vite-plugin-pwa: ^0.20.5
vite-plugin-vue-devtools: ^7.6.3
vite-plugin-pwa: ^0.21.0
vite-plugin-vue-devtools: ^7.6.4
vitepress: ^1.5.0
vitepress-plugin-group-icons: ^1.3.0
vitest: ^2.1.4
vue: ^3.5.12
vitest: ^2.1.5
vue: ^3.5.13
vue-eslint-parser: ^9.4.3
vue-i18n: ^10.0.4
vue-router: ^4.4.5
vue-tsc: ^2.1.10
vxe-pc-ui: ^4.2.49
vxe-table: ^4.8.9
vxe-pc-ui: ^4.3.4
vxe-table: ^4.9.5
watermark-js-plus: ^1.5.7
zod: ^3.23.8
zod-defaults: ^0.1.3

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/turbo-run",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"license": "MIT",
"type": "module",

View File

@@ -1,6 +1,6 @@
{
"name": "@vben/vsh",
"version": "5.4.5",
"version": "5.4.8",
"private": true,
"license": "MIT",
"type": "module",