Compare commits

...

5 Commits

13 changed files with 266 additions and 46 deletions

View File

@@ -1,3 +1,23 @@
# 6.2.0 (2025-10-16)
### 🎫 Features
- Added full-screen `403`, `404`, and `500` error pages. These full-screen error pages are clear and secure, improving the user experience.
### 🐞 Bug Fixes
- Fixed an issue where the built-in homepage did not have a `name` configured, causing cache invalidation after setting the page cache.
- Fixed an issue where, in an embedded same-origin `iframe` page, when the `beforeunload` event was registered, right-clicking a tab and reloading it would cause the browser to prompt two confirmation blocks.
- Fixed an issue where pages with `keepAlive: true` set to cache invalidation when the initial load was slow.
- Fixed an issue where multiple tabs could be activated simultaneously when using the same parameters in different routes.
- Fixed an issue where the right-click menu on a tab displayed incorrectly when passing `params` parameters.
### 🍏 Perf
- Optimized the `nprogress` progress bar. It no longer displays when reloading a page or requesting an interface, improving the user experience.
- Optimized the timing of capturing all unmatched routes and redirecting to a full-screen `404` page.
- Explicitly configured the `Tailwind CSS` entry file path to improve the contextual recognition and prompting performance of the `Tailwind CSS IntelliSense` plugin
# 6.1.0 (2025-07-31) # 6.1.0 (2025-07-31)
### ✔️ Refactor ### ✔️ Refactor

View File

@@ -1,3 +1,23 @@
# 6.2.0 (2025-10-16)
### 🎫 Features
- Added full-screen `403`, `404`, and `500` error pages. These full-screen error pages are clear and secure, improving the user experience.
### 🐞 Bug Fixes
- Fixed an issue where the built-in homepage did not have a `name` configured, causing cache invalidation after setting the page cache.
- Fixed an issue where, in an embedded same-origin `iframe` page, when the `beforeunload` event was registered, right-clicking a tab and reloading it would cause the browser to prompt two confirmation blocks.
- Fixed an issue where pages with `keepAlive: true` set to cache invalidation when the initial load was slow.
- Fixed an issue where multiple tabs could be activated simultaneously when using the same parameters in different routes.
- Fixed an issue where the right-click menu on a tab displayed incorrectly when passing `params` parameters.
### 🍏 Perf
- Optimized the `nprogress` progress bar. It no longer displays when reloading a page or requesting an interface, improving the user experience.
- Optimized the timing of capturing all unmatched routes and redirecting to a full-screen `404` page.
- Explicitly configured the `Tailwind CSS` entry file path to improve the contextual recognition and prompting performance of the `Tailwind CSS IntelliSense` plugin
# 6.1.0 (2025-07-31) # 6.1.0 (2025-07-31)
### ✔️ Refactor ### ✔️ Refactor

View File

@@ -1,3 +1,23 @@
# 6.2.0 (2025-10-16)
### 🎫 Feat
- 添加全屏`403``404``500`页面,全屏错误页面清晰且安全,提升用户体验
### 🐞 Bug fixes
- 修复内置的首页未设置`name`导致设置页面缓存后缓存无效的问题
- 修复在内嵌同源`iframe`页面中,当其注册了`beforeunload`事件时,右键标签页点击重新加载导致浏览器弹出两次确认拦截的问题
- 修复设置了`keepAlive: true`的页面在初次加载缓慢的情况下出现的页面缓存失效的问题
- 修复不同路由使用相同参数时,多个标签页会同时被激活的问题
- 修复`params`传参模式下标签页右键菜单显示不正确的问题
### 🍏 Perf
- 优化`nprogress`进度条,页面重进或接口请求时不再显示进度条,提升用户体验
- 优化当捕获所有未匹配路由并跳转全屏`404`页面的时机
- 显式配置`Tailwind CSS`入口文件路径,优化`Tailwind CSS IntelliSense`插件的上下文识别与提示性能
# 6.1.0 (2025-07-31) # 6.1.0 (2025-07-31)
### ✔️ Refactor ### ✔️ Refactor

View File

@@ -1,6 +1,6 @@
{ {
"name": "vue-pure-admin", "name": "vue-pure-admin",
"version": "6.1.0", "version": "6.2.0",
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
@@ -72,7 +72,7 @@
"deep-chat": "^2.2.2", "deep-chat": "^2.2.2",
"echarts": "^6.0.0", "echarts": "^6.0.0",
"el-table-infinite-scroll": "^3.0.7", "el-table-infinite-scroll": "^3.0.7",
"element-plus": "^2.11.4", "element-plus": "^2.11.7",
"highlight.js": "^11.11.1", "highlight.js": "^11.11.1",
"intro.js": "^7.2.0", "intro.js": "^7.2.0",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",

36
pnpm-lock.yaml generated
View File

@@ -25,10 +25,10 @@ importers:
version: 1.2.28 version: 1.2.28
'@pureadmin/descriptions': '@pureadmin/descriptions':
specifier: ^1.2.1 specifier: ^1.2.1
version: 1.2.1(echarts@6.0.0)(element-plus@2.11.4(vue@3.5.22(typescript@5.9.3)))(typescript@5.9.3) version: 1.2.1(echarts@6.0.0)(element-plus@2.11.7(vue@3.5.22(typescript@5.9.3)))(typescript@5.9.3)
'@pureadmin/table': '@pureadmin/table':
specifier: ^3.3.0 specifier: ^3.3.0
version: 3.3.0(element-plus@2.11.4(vue@3.5.22(typescript@5.9.3)))(typescript@5.9.3) version: 3.3.0(element-plus@2.11.7(vue@3.5.22(typescript@5.9.3)))(typescript@5.9.3)
'@pureadmin/utils': '@pureadmin/utils':
specifier: ^2.6.2 specifier: ^2.6.2
version: 2.6.2(echarts@6.0.0)(vue@3.5.22(typescript@5.9.3)) version: 2.6.2(echarts@6.0.0)(vue@3.5.22(typescript@5.9.3))
@@ -84,8 +84,8 @@ importers:
specifier: ^3.0.7 specifier: ^3.0.7
version: 3.0.7(typescript@5.9.3) version: 3.0.7(typescript@5.9.3)
element-plus: element-plus:
specifier: ^2.11.4 specifier: ^2.11.7
version: 2.11.4(vue@3.5.22(typescript@5.9.3)) version: 2.11.7(vue@3.5.22(typescript@5.9.3))
highlight.js: highlight.js:
specifier: ^11.11.1 specifier: ^11.11.1
version: 11.11.1 version: 11.11.1
@@ -124,7 +124,7 @@ importers:
version: 3.27.0 version: 3.27.0
plus-pro-components: plus-pro-components:
specifier: ^0.1.29 specifier: ^0.1.29
version: 0.1.29(element-plus@2.11.4(vue@3.5.22(typescript@5.9.3)))(vue@3.5.22(typescript@5.9.3)) version: 0.1.29(element-plus@2.11.7(vue@3.5.22(typescript@5.9.3)))(vue@3.5.22(typescript@5.9.3))
qrcode: qrcode:
specifier: ^1.5.4 specifier: ^1.5.4
version: 1.5.4 version: 1.5.4
@@ -2842,8 +2842,8 @@ packages:
electron-to-chromium@1.5.234: electron-to-chromium@1.5.234:
resolution: {integrity: sha512-RXfEp2x+VRYn8jbKfQlRImzoJU01kyDvVPBmG39eU2iuRVhuS6vQNocB8J0/8GrIMLnPzgz4eW6WiRnJkTuNWg==} resolution: {integrity: sha512-RXfEp2x+VRYn8jbKfQlRImzoJU01kyDvVPBmG39eU2iuRVhuS6vQNocB8J0/8GrIMLnPzgz4eW6WiRnJkTuNWg==}
element-plus@2.11.4: element-plus@2.11.7:
resolution: {integrity: sha512-sLq+Ypd0cIVilv8wGGMEGvzRVBBsRpJjnAS5PsI/1JU1COZXqzH3N1UYMUc/HCdvdjf6dfrBy80Sj7KcACsT7w==} resolution: {integrity: sha512-Bh47wuzsqaNBNDkbtlOlZER1cGcOB8GsXp/+C9b95MOrk0wvoHUV4NKKK7xMkfYNFYdYysQ752oMhnExgAL6+g==}
peerDependencies: peerDependencies:
vue: ^3.2.0 vue: ^3.2.0
@@ -2929,9 +2929,6 @@ packages:
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
engines: {node: '>=6'} engines: {node: '>=6'}
escape-html@1.0.3:
resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==}
escape-string-regexp@2.0.0: escape-string-regexp@2.0.0:
resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==}
engines: {node: '>=8'} engines: {node: '>=8'}
@@ -6793,19 +6790,19 @@ snapshots:
'@popperjs/core@2.11.8': {} '@popperjs/core@2.11.8': {}
'@pureadmin/descriptions@1.2.1(echarts@6.0.0)(element-plus@2.11.4(vue@3.5.22(typescript@5.9.3)))(typescript@5.9.3)': '@pureadmin/descriptions@1.2.1(echarts@6.0.0)(element-plus@2.11.7(vue@3.5.22(typescript@5.9.3)))(typescript@5.9.3)':
dependencies: dependencies:
'@element-plus/icons-vue': 2.3.2(vue@3.5.22(typescript@5.9.3)) '@element-plus/icons-vue': 2.3.2(vue@3.5.22(typescript@5.9.3))
'@pureadmin/utils': 2.6.2(echarts@6.0.0)(vue@3.5.22(typescript@5.9.3)) '@pureadmin/utils': 2.6.2(echarts@6.0.0)(vue@3.5.22(typescript@5.9.3))
element-plus: 2.11.4(vue@3.5.22(typescript@5.9.3)) element-plus: 2.11.7(vue@3.5.22(typescript@5.9.3))
vue: 3.5.22(typescript@5.9.3) vue: 3.5.22(typescript@5.9.3)
transitivePeerDependencies: transitivePeerDependencies:
- echarts - echarts
- typescript - typescript
'@pureadmin/table@3.3.0(element-plus@2.11.4(vue@3.5.22(typescript@5.9.3)))(typescript@5.9.3)': '@pureadmin/table@3.3.0(element-plus@2.11.7(vue@3.5.22(typescript@5.9.3)))(typescript@5.9.3)':
dependencies: dependencies:
element-plus: 2.11.4(vue@3.5.22(typescript@5.9.3)) element-plus: 2.11.7(vue@3.5.22(typescript@5.9.3))
vue: 3.5.22(typescript@5.9.3) vue: 3.5.22(typescript@5.9.3)
transitivePeerDependencies: transitivePeerDependencies:
- typescript - typescript
@@ -8277,7 +8274,7 @@ snapshots:
el-table-infinite-scroll@3.0.7(typescript@5.9.3): el-table-infinite-scroll@3.0.7(typescript@5.9.3):
dependencies: dependencies:
core-js: 3.46.0 core-js: 3.46.0
element-plus: 2.11.4(vue@3.5.22(typescript@5.9.3)) element-plus: 2.11.7(vue@3.5.22(typescript@5.9.3))
vue: 3.5.22(typescript@5.9.3) vue: 3.5.22(typescript@5.9.3)
transitivePeerDependencies: transitivePeerDependencies:
- '@vue/composition-api' - '@vue/composition-api'
@@ -8285,7 +8282,7 @@ snapshots:
electron-to-chromium@1.5.234: {} electron-to-chromium@1.5.234: {}
element-plus@2.11.4(vue@3.5.22(typescript@5.9.3)): element-plus@2.11.7(vue@3.5.22(typescript@5.9.3)):
dependencies: dependencies:
'@ctrl/tinycolor': 3.6.1 '@ctrl/tinycolor': 3.6.1
'@element-plus/icons-vue': 2.3.2(vue@3.5.22(typescript@5.9.3)) '@element-plus/icons-vue': 2.3.2(vue@3.5.22(typescript@5.9.3))
@@ -8296,7 +8293,6 @@ snapshots:
'@vueuse/core': 9.13.0(vue@3.5.22(typescript@5.9.3)) '@vueuse/core': 9.13.0(vue@3.5.22(typescript@5.9.3))
async-validator: 4.2.5 async-validator: 4.2.5
dayjs: 1.11.18 dayjs: 1.11.18
escape-html: 1.0.3
lodash: 4.17.21 lodash: 4.17.21
lodash-es: 4.17.21 lodash-es: 4.17.21
lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21) lodash-unified: 1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.17.21)(lodash@4.17.21)
@@ -8430,8 +8426,6 @@ snapshots:
escalade@3.2.0: {} escalade@3.2.0: {}
escape-html@1.0.3: {}
escape-string-regexp@2.0.0: {} escape-string-regexp@2.0.0: {}
escape-string-regexp@4.0.0: {} escape-string-regexp@4.0.0: {}
@@ -9991,10 +9985,10 @@ snapshots:
exsolve: 1.0.7 exsolve: 1.0.7
pathe: 2.0.3 pathe: 2.0.3
plus-pro-components@0.1.29(element-plus@2.11.4(vue@3.5.22(typescript@5.9.3)))(vue@3.5.22(typescript@5.9.3)): plus-pro-components@0.1.29(element-plus@2.11.7(vue@3.5.22(typescript@5.9.3)))(vue@3.5.22(typescript@5.9.3)):
dependencies: dependencies:
'@element-plus/icons-vue': 2.3.2(vue@3.5.22(typescript@5.9.3)) '@element-plus/icons-vue': 2.3.2(vue@3.5.22(typescript@5.9.3))
element-plus: 2.11.4(vue@3.5.22(typescript@5.9.3)) element-plus: 2.11.7(vue@3.5.22(typescript@5.9.3))
lodash-es: 4.17.21 lodash-es: 4.17.21
sortablejs: 1.15.6 sortablejs: 1.15.6
vue: 3.5.22(typescript@5.9.3) vue: 3.5.22(typescript@5.9.3)

View File

@@ -1,5 +1,5 @@
{ {
"Version": "6.1.0", "Version": "6.2.0",
"Title": "PureAdmin", "Title": "PureAdmin",
"FixedHeader": true, "FixedHeader": true,
"HiddenSideBar": false, "HiddenSideBar": false,

View File

@@ -35,8 +35,20 @@ type DialogProps = {
top?: string; top?: string;
/** 是否需要遮罩层,默认 `true` */ /** 是否需要遮罩层,默认 `true` */
modal?: boolean; modal?: boolean;
/** 是否允许穿透遮罩层,默认 `false`。使用时需将 `modal` 属性设置为 `false` */
modalPenetrable?: boolean;
/** 遮罩的自定义类名 */
modalClass?: string;
/** `header` 部分的自定义 `class` 名 */
headerClass?: string;
/** `body` 部分的自定义 `class` 名 */
bodyClass?: string;
/** `footer` 部分的自定义 `class` 名 */
footerClass?: string;
/** `Dialog` 自身是否插入至 `body` 元素上。嵌套的 `Dialog` 必须指定该属性并赋值为 `true`,默认 `false` */ /** `Dialog` 自身是否插入至 `body` 元素上。嵌套的 `Dialog` 必须指定该属性并赋值为 `true`,默认 `false` */
appendToBody?: boolean; appendToBody?: boolean;
/** `Dialog` 挂载到哪个 `DOM` 元素,该属性会覆盖 `append-to-body` 属性,默认 `body` */
appendTo?: string | HTMLElement;
/** 是否在 `Dialog` 出现时将 `body` 滚动锁定,默认 `true` */ /** 是否在 `Dialog` 出现时将 `body` 滚动锁定,默认 `true` */
lockScroll?: boolean; lockScroll?: boolean;
/** `Dialog` 的自定义类名 */ /** `Dialog` 的自定义类名 */
@@ -57,12 +69,22 @@ type DialogProps = {
beforeClose?: (done: DoneFn) => void; beforeClose?: (done: DoneFn) => void;
/** 为 `Dialog` 启用可拖拽功能,默认 `false` */ /** 为 `Dialog` 启用可拖拽功能,默认 `false` */
draggable?: boolean; draggable?: boolean;
/** 拖动范围可以超出可视区,默认 `false` */
overflow?: boolean;
/** 是否让 `Dialog` 的 `header` 和 `footer` 部分居中排列,默认 `false` */ /** 是否让 `Dialog` 的 `header` 和 `footer` 部分居中排列,默认 `false` */
center?: boolean; center?: boolean;
/** 是否水平垂直对齐对话框,默认 `false` */ /** 是否水平垂直对齐对话框,默认 `false` */
alignCenter?: boolean; alignCenter?: boolean;
/** 当关闭 `Dialog` 时,销毁其中的元素,默认 `false` */ /** 当关闭 `Dialog` 时,销毁其中的元素,默认 `false` */
destroyOnClose?: boolean; destroyOnClose?: boolean;
/** 自定义关闭图标,默认 `Close` */
closeIcon?: string | Component;
/** 和原生的 `CSS` 的 `z-index` 相同,改变 `z` 轴的顺序 */
zIndex?: number;
/** `header` 的 `aria-level` 属性 */
headerAriaLevel?: string;
/** 对话框动画的自定义过渡配置。可以是一个字符串(过渡名称),也可以是一个包含 `Vue` 过渡属性的对象,默认 `dialog-fade` */
transition?: string | object;
}; };
//element-plus.org/zh-CN/component/popconfirm.html#attributes //element-plus.org/zh-CN/component/popconfirm.html#attributes

View File

@@ -6,7 +6,6 @@ type ArgsType = {
/** `cancel` 点击取消按钮、`sure` 点击确定按钮、`close` 点击右上角关闭按钮或空白页或按下了 `esc` 键 */ /** `cancel` 点击取消按钮、`sure` 点击确定按钮、`close` 点击右上角关闭按钮或空白页或按下了 `esc` 键 */
command: "cancel" | "sure" | "close"; command: "cancel" | "sure" | "close";
}; };
type ButtonType = type ButtonType =
| "primary" | "primary"
| "success" | "success"
@@ -20,11 +19,11 @@ type DrawerProps = {
visible?: boolean; visible?: boolean;
/** `Drawer` 自身是否插入至 `body` 元素上。嵌套的 `Drawer` 必须指定该属性并赋值为 `true`,默认 `false` */ /** `Drawer` 自身是否插入至 `body` 元素上。嵌套的 `Drawer` 必须指定该属性并赋值为 `true`,默认 `false` */
appendToBody?: boolean; appendToBody?: boolean;
/** 挂载到哪个 `DOM` 元素覆盖 `appendToBody` */ /** 挂载到哪个 `DOM` 元素,会覆盖 `appendToBody` 属性,默认 `body` */
appendTo?: string; appendTo?: string;
/** 是否在 `Drawer` 出现时将 `body` 滚动锁定,默认 `true` */ /** 是否在 `Drawer` 出现时将 `body` 滚动锁定,默认 `true` */
lockScroll?: boolean; lockScroll?: boolean;
/** 关闭前的回调,会暂停 `Drawer` 的关闭 回调函数内执行 `done` 参数方法的时候才是真正关闭对话框的时候 */ /** 关闭前的回调,会暂停 `Drawer` 的关闭回调函数内执行 `done` 参数方法的时候才是真正关闭对话框的时候 */
beforeClose?: (done: DoneFn) => void; beforeClose?: (done: DoneFn) => void;
/** 是否可以通过点击 `modal` 关闭 `Drawer` ,默认 `true` */ /** 是否可以通过点击 `modal` 关闭 `Drawer` ,默认 `true` */
closeOnClickModal?: boolean; closeOnClickModal?: boolean;
@@ -44,9 +43,13 @@ type DrawerProps = {
destroyOnClose?: boolean; destroyOnClose?: boolean;
/** 是否需要遮罩层,默认 `true` */ /** 是否需要遮罩层,默认 `true` */
modal?: boolean; modal?: boolean;
/** 是否允许穿透遮罩层,默认 `false`。使用时需将 `modal` 属性设置为 `false` */
modalPenetrable?: boolean;
/** `Drawer` 打开的方向,默认 `rtl` */ /** `Drawer` 打开的方向,默认 `rtl` */
direction?: "rtl" | "ltr" | "ttb" | "btt"; direction?: "rtl" | "ltr" | "ttb" | "btt";
/** `Drawer` 窗体的大小, 当使用 `number` 类型时, 以像素为单位, 当使用 `string` 类型时, 请传入 `'x%'`, 否则便会以 `number` 类型解释 */ /** 是否启用可调整大小的功能,默认 `false` */
resizable?: boolean;
/** `Drawer` 窗体的大小, 当使用 `number` 类型时, 以像素为单位, 当使用 `string` 类型时, 请传入 `'x%'`, 否则便会以 `number` 类型解释,默认 `30%` */
size?: string | number; size?: string | number;
/** `Drawer` 的标题 */ /** `Drawer` 的标题 */
title?: string; title?: string;
@@ -54,6 +57,12 @@ type DrawerProps = {
withHeader?: boolean; withHeader?: boolean;
/** 遮罩层的自定义类名 */ /** 遮罩层的自定义类名 */
modalClass?: string; modalClass?: string;
/** `header` 部分的自定义 `class` 名 */
headerClass?: string;
/** `body` 部分的自定义 `class` 名 */
bodyClass?: string;
/** `footer` 部分的自定义 `class` 名 */
footerClass?: string;
/** 设置 `z-index` */ /** 设置 `z-index` */
zIndex?: number; zIndex?: number;
/** `header` 的 `aria-level` 属性,默认 `2` */ /** `header` 的 `aria-level` 属性,默认 `2` */

View File

@@ -100,7 +100,7 @@ export default defineComponent({
"pt-[3px]", "pt-[3px]",
"px-[11px]", "px-[11px]",
"border-b-[1px]", "border-b-[1px]",
"border-solid", "border-b-solid",
"border-[#dcdfe6]", "border-[#dcdfe6]",
"dark:border-[#303030]" "dark:border-[#303030]"
]; ];

View File

@@ -93,7 +93,7 @@ export default defineComponent({
"pt-[3px]", "pt-[3px]",
"px-[11px]", "px-[11px]",
"border-b-[1px]", "border-b-[1px]",
"border-solid", "border-b-solid",
"border-[#dcdfe6]", "border-[#dcdfe6]",
"dark:border-[#303030]" "dark:border-[#303030]"
]; ];

View File

@@ -172,10 +172,6 @@
.is-active > .el-sub-menu__title, .is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown { .is-active.submenu-title-noDropdown {
color: var(--pure-theme-sub-menu-active-text) !important; color: var(--pure-theme-sub-menu-active-text) !important;
i {
color: var(--pure-theme-sub-menu-active-text) !important;
}
} }
.is-active { .is-active {
@@ -270,10 +266,6 @@
.is-active > .el-sub-menu__title, .is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown { .is-active.submenu-title-noDropdown {
color: var(--pure-theme-sub-menu-active-text) !important; color: var(--pure-theme-sub-menu-active-text) !important;
i {
color: var(--pure-theme-sub-menu-active-text) !important;
}
} }
/* 子菜单中还有子菜单 */ /* 子菜单中还有子菜单 */
@@ -374,10 +366,6 @@
.is-active > .el-sub-menu__title, .is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown { .is-active.submenu-title-noDropdown {
color: var(--pure-theme-sub-menu-active-text) !important; color: var(--pure-theme-sub-menu-active-text) !important;
i {
color: var(--pure-theme-sub-menu-active-text) !important;
}
} }
.nest-menu .el-sub-menu > .el-sub-menu__title, .nest-menu .el-sub-menu > .el-sub-menu__title,
@@ -541,10 +529,6 @@
.is-active > .el-sub-menu__title, .is-active > .el-sub-menu__title,
.is-active.submenu-title-noDropdown { .is-active.submenu-title-noDropdown {
color: var(--pure-theme-sub-menu-active-text) !important; color: var(--pure-theme-sub-menu-active-text) !important;
i {
color: var(--pure-theme-sub-menu-active-text) !important;
}
} }
.is-active { .is-active {

View File

@@ -463,6 +463,16 @@ function onSureBtnLoading() {
} }
}); });
} }
// 自定义动画
function onTransitionClick(title, transition) {
addDialog({
width: "30%",
title,
transition,
contentRenderer: () => <p>{JSON.stringify(transition)}</p>
});
}
</script> </script>
<template> <template>
@@ -551,5 +561,112 @@ function onSureBtnLoading() {
点击底部确定按钮可开启按钮动画 点击底部确定按钮可开启按钮动画
</el-button> </el-button>
</el-space> </el-space>
<el-divider />
<el-space wrap>
<el-button
@click="onTransitionClick('淡入淡出动画(默认)', 'dialog-fade')"
>
淡入淡出动画默认
</el-button>
<el-button @click="onTransitionClick('缩放动画', 'dialog-scale')">
缩放动画
</el-button>
<el-button @click="onTransitionClick('滑动动画', 'dialog-slide')">
滑动动画
</el-button>
<el-button @click="onTransitionClick('弹跳动画', 'dialog-bounce')">
弹跳动画
</el-button>
<el-button
@click="
onTransitionClick('自定义动画事件处理器(可配置对象)', {
name: 'dialog-custom-object',
appear: true,
mode: 'out-in',
duration: 500
})
"
>
自定义动画事件处理器可配置对象
</el-button>
</el-space>
</el-card> </el-card>
</template> </template>
<style>
/* Scale Animation */
.dialog-scale-enter-active,
.dialog-scale-leave-active,
.dialog-scale-enter-active .el-dialog,
.dialog-scale-leave-active .el-dialog {
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.dialog-scale-enter-from,
.dialog-scale-leave-to {
opacity: 0;
}
.dialog-scale-enter-from .el-dialog,
.dialog-scale-leave-to .el-dialog {
opacity: 0;
transform: scale(0.5);
}
/* Slide Animation */
.dialog-slide-enter-active,
.dialog-slide-leave-active,
.dialog-slide-enter-active .el-dialog,
.dialog-slide-leave-active .el-dialog {
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.dialog-slide-enter-from,
.dialog-slide-leave-to {
opacity: 0;
}
.dialog-slide-enter-from .el-dialog,
.dialog-slide-leave-to .el-dialog {
opacity: 0;
transform: translateY(-100px);
}
/* Bounce Animation */
.dialog-bounce-enter-active,
.dialog-bounce-leave-active,
.dialog-bounce-enter-active .el-dialog,
.dialog-bounce-leave-active .el-dialog {
transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.dialog-bounce-enter-from,
.dialog-bounce-leave-to {
opacity: 0;
}
.dialog-bounce-enter-from .el-dialog,
.dialog-bounce-leave-to .el-dialog {
opacity: 0;
transform: scale(0.3) translateY(-50px);
}
/* Object Configuration Animation */
.dialog-custom-object-enter-active,
.dialog-custom-object-leave-active,
.dialog-custom-object-enter-active .el-dialog,
.dialog-custom-object-leave-active .el-dialog {
transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.dialog-custom-object-enter-from,
.dialog-custom-object-leave-to {
opacity: 0;
}
.dialog-custom-object-enter-from .el-dialog,
.dialog-custom-object-leave-to .el-dialog {
opacity: 0;
transform: rotate(180deg) scale(0.5);
}
</style>

View File

@@ -422,6 +422,17 @@ function onSureBtnLoading() {
} }
}); });
} }
function onResizableClick(title, content, direction) {
addDrawer({
title,
direction,
resizable: true, // 启用可调整大小的功能
contentRenderer: () => (
<p class="text-[var(--el-color-primary)]">{content}</p> // jsx 语法 (注意在.vue文件启用jsx语法需要在script开启lang="tsx"
)
});
}
</script> </script>
<template> <template>
@@ -498,5 +509,28 @@ function onSureBtnLoading() {
点击底部确定按钮可开启按钮动画 点击底部确定按钮可开启按钮动画
</el-button> </el-button>
</el-space> </el-space>
<el-divider />
<el-space wrap>
<el-button
@click="onResizableClick('从左侧打开', '拖动抽屉右侧边缘', 'ltr')"
>
拖拽调整大小从左侧打开
</el-button>
<el-button
@click="onResizableClick('从右侧打开', '拖动抽屉左侧边缘', 'rtl')"
>
拖拽调整大小从右侧打开
</el-button>
<el-button
@click="onResizableClick('从顶部打开', '拖动抽屉底部边缘', 'ttb')"
>
拖拽调整大小从顶部打开
</el-button>
<el-button
@click="onResizableClick('从底部打开', '拖动抽屉顶部边缘', 'btt')"
>
拖拽调整大小从底部打开
</el-button>
</el-space>
</el-card> </el-card>
</template> </template>