diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e8a4686..28afe0f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,61 +1,88 @@ # 更新日志 +## [v1.1.2](https://gitee.com/xlsea/ruoyi-plus-soybean/compare/v1.1.1...v1.1.2) (2025-07-24) + +### 🐞 Bug 修复 + +- 修复 api.d.ts.vm 代码生成模板bug - by **zygalaxy** [(4e8c8)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/4e8c8715) +- **projects**: + - 修复刷新时跳转至登录页问题 - by **AN** [(2587f)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/2587f8cb) + - 修复登录过期不弹窗问题 - by **AN** [(e485f)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/e485f680) + - 修复菜单结构变动后路由无法进入问题 - by @m-xlsea [(f4038)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/f4038a2d) + +### 🛠 优化 + +- **projects**: 优化搜索框FormItem - by **AN** [(a1336)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/a1336d15) + +### 🏡 杂项 + +- **deps**: update deps - by @soybeanjs [(e89b8)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/e89b86ce) + +### 🎨 样式 + +- **projects**: 搜索FormItem占比调整 - by **AN** [(cc29e)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/cc29ea85) + +### ❤️ 贡献者 + +[](https://github.com/m-xlsea) [](https://gitee.com/elio-an) [](https://github.com/soybeanjs) +[zygalaxy](mailto:zygalaxy@qq.com) + ## [v1.1.1](https://gitee.com/xlsea/ruoyi-plus-soybean/compare/v1.1.0...v1.1.1) (2025-07-11) ### 🚀 新功能 - **hooks**: - - 重构下载方法,支持流式下载 - by @m-xlsea [(65067)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/650673e2) + - 重构下载方法,支持流式下载 - by @m-xlsea [(65067)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/650673e2) - **projects**: - - 角色分配用户新增部门与时间查询条件 - by @m-xlsea [(ad48d)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/ad48d8e8) - - 修改操作后列表查询方式 - by @m-xlsea [(d8542)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/d85424ee) + - 角色分配用户新增部门与时间查询条件 - by @m-xlsea [(ad48d)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ad48d8e8) + - 修改操作后列表查询方式 - by @m-xlsea [(d8542)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/d85424ee) ### 🐞 Bug 修复 - **hooks**: - - 解决 streamsaver 访问不到 Github 资源问题 - by @m-xlsea [(566b2)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/566b2c2d) + - 解决 streamsaver 访问不到 Github 资源问题 - by @m-xlsea [(566b2)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/566b2c2d) - **other**: - - 修复代码生成类型定义文件重复问题 - by @m-xlsea [(f7c7f)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/f7c7fc41) + - 修复代码生成类型定义文件重复问题 - by @m-xlsea [(f7c7f)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/f7c7fc41) - **packages**: - - 修复 cleanup 会删除富文本编辑器资源问题 - by @m-xlsea [(9ca7c)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/9ca7ca8f) + - 修复 cleanup 会删除富文本编辑器资源问题 - by @m-xlsea [(9ca7c)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/9ca7ca8f) - **projects**: - - 修复字典数据重复获取问题 - by @m-xlsea [(3628c)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/3628c249) - - 修改强退在线设备接口 - by **AN** [(dbcf8)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/dbcf8d42) - - 修复代码生成逻辑判断问题 - by **AN** [(6fc7b)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/6fc7b11b) - - 修复部门字典 sys_normal_disable 重复获取 Merge pull request !11 from 素还真/N/A - by @m-xlsea [(ad938)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/ad9386eb) - - 修复未清空文件列表,上传回显问题 - by **AN** [(229e0)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/229e0044) - - Fix i18n-ally not working when setting moduleResolution to bundler. fixed #780 - by @xiaobao0505 in https://github.com/m-xlsea/ruoyi-plus-soybean/issues/780 [(41191)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/41191d54) - - 修复角色列表操作栏展示不全问题 - by @m-xlsea [(62f2c)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/62f2c6d5) - - 修复用户导入结果信息未渲染标签问题 - by **AN** [(efc95)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/efc953c0) - - 修复角色用户分配未调用接口问题 - by @m-xlsea [(ff874)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/ff87415d) + - 修复字典数据重复获取问题 - by @m-xlsea [(3628c)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/3628c249) + - 修改强退在线设备接口 - by **AN** [(dbcf8)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/dbcf8d42) + - 修复代码生成逻辑判断问题 - by **AN** [(6fc7b)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/6fc7b11b) + - 修复部门字典 sys_normal_disable 重复获取 Merge pull request !11 from 素还真/N/A - by @m-xlsea [(ad938)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ad9386eb) + - 修复未清空文件列表,上传回显问题 - by **AN** [(229e0)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/229e0044) + - Fix i18n-ally not working when setting moduleResolution to bundler. fixed #780 - by @xiaobao0505 in https://gitee.com/xlsea/ruoyi-plus-soybean/issues/780 [(41191)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/41191d54) + - 修复角色列表操作栏展示不全问题 - by @m-xlsea [(62f2c)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/62f2c6d5) + - 修复用户导入结果信息未渲染标签问题 - by **AN** [(efc95)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/efc953c0) + - 修复角色用户分配未调用接口问题 - by @m-xlsea [(ff874)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/ff87415d) - **styles**: - - 修复登录页平板界面滚动问题 - by @m-xlsea [(90145)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/90145fa5) + - 修复登录页平板界面滚动问题 - by @m-xlsea [(90145)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/90145fa5) - **utils**: - - 修复isNull和IsNotNull判断方法潜在问题 - by **AN** [(90d32)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/90d32ee2) + - 修复isNull和IsNotNull判断方法潜在问题 - by **AN** [(90d32)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/90d32ee2) ### 💅 重构 -- **projects**: 调整租户套餐菜单接口 - by **AN** [(b9999)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/b9999935) +- **projects**: 调整租户套餐菜单接口 - by **AN** [(b9999)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/b9999935) ### 📖 文档 -- **other**: 修改文档内容 - by @m-xlsea [(3ae99)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/3ae9922d) -- **projects**: 优化 cursor 规则及 mcp - by @m-xlsea [(a3199)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/a31994dc) -- **readme**: 更新 README.md 文件 - by @m-xlsea [(99675)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/99675cbc) +- **other**: 修改文档内容 - by @m-xlsea [(3ae99)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/3ae9922d) +- **projects**: 优化 cursor 规则及 mcp - by @m-xlsea [(a3199)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/a31994dc) +- **readme**: 更新 README.md 文件 - by @m-xlsea [(99675)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/99675cbc) ### 🏡 杂项 - **deps**: - - update NodeJS and pnpm version requirements in package.json and documentation - by **Junior25306** [(a5c4b)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/a5c4b4e3) - - update deps - by @soybeanjs [(5cb1c)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/5cb1cebd) - - update deps - by @soybeanjs [(aeb63)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/aeb63690) - - update deps - by @m-xlsea [(89c71)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/89c716e1) + - update NodeJS and pnpm version requirements in package.json and documentation - by **Junior25306** [(a5c4b)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/a5c4b4e3) + - update deps - by @soybeanjs [(5cb1c)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/5cb1cebd) + - update deps - by @soybeanjs [(aeb63)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/aeb63690) + - update deps - by @m-xlsea [(89c71)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/89c716e1) - **packages**: - - update Vite version to 7 in package.json and documentation. - by **Azir** [(03dd6)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/03dd64c5) + - update Vite version to 7 in package.json and documentation. - by **Azir** [(03dd6)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/03dd64c5) - **projects**: - - update pnpm-lock.yaml - by @m-xlsea [(7c6ca)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/7c6ca91e) + - update pnpm-lock.yaml - by @m-xlsea [(7c6ca)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/7c6ca91e) - **vscode**: - - remove unused vue.server.hybridMode setting from .vscode/settings.json - by @soybeanjs [(13319)](https://github.com/m-xlsea/ruoyi-plus-soybean/commit/133196f3) + - remove unused vue.server.hybridMode setting from .vscode/settings.json - by @soybeanjs [(13319)](https://gitee.com/xlsea/ruoyi-plus-soybean/commit/133196f3) ### ❤️ 贡献值 diff --git a/README.md b/README.md index b95ff2d5..d04d2d4b 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,12 @@ # 📢 重要通知 -1.1.1 版本已发布,但仍然建议: +1.1.2 版本已经正式发布,工作流版本迎来首个版本(请切换 [flow](https://gitee.com/xlsea/ruoyi-plus-soybean/tree/flow/) 分支查看),但仍然建议: - 在生产环境使用前进行充分测试 - 关注项目更新,及时获取最新版本 - 积极反馈问题,帮助我们快速迭代 **后续规划** -- 工作流引擎集成 - 多语言国际化完善 - 性能优化和稳定性提升 diff --git a/package.json b/package.json index acf10f3a..c0aec9a5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ruoyi-vue-plus", "type": "module", - "version": "1.1.1", + "version": "1.1.2", "description": "结合了 RuoYi-Vue-Plus 的强大后端功能和 Soybean Admin 的现代化前端特性,为开发者提供了完整的企业管理解决方案。", "author": { "name": "xlsea", diff --git a/src/hooks/business/download.ts b/src/hooks/business/download.ts index 060b4579..b3b70c14 100644 --- a/src/hooks/business/download.ts +++ b/src/hooks/business/download.ts @@ -16,6 +16,12 @@ export function useDownload() { const isHttpProxy = import.meta.env.DEV && import.meta.env.VITE_HTTP_PROXY === 'Y'; const { baseURL } = getServiceBaseURL(import.meta.env, isHttpProxy); + const isHttps = () => { + const protocol = document.location.protocol; + const hostname = document.location.hostname; + return protocol === 'https' || hostname === 'localhost' || hostname === '127.0.0.1'; + }; + /** 获取通用请求头 */ const getCommonHeaders = (contentType = 'application/octet-stream') => ({ Authorization: `Bearer ${localStg.get('token')}`, @@ -109,9 +115,10 @@ export function useDownload() { await handleResponse(response); - const finalFilename = filename || response.headers.get('Download-Filename') || `download-${timestamp}`; + const rawHeader = response.headers.get('Download-Filename'); + const finalFilename = filename || (rawHeader ? decodeURIComponent(rawHeader) : null) || `download-${timestamp}`; - if (response.body) { + if (response.body && isHttps()) { const contentLength = Number(response.headers.get('Content-Length')); await downloadByStream(response.body, finalFilename, contentLength); return; diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index a1a848a7..14ff0f8a 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -65,11 +65,15 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { routes.forEach(route => { if (authRouteMode.value === 'dynamic') { - if (route.path === '/') { - route.children?.forEach(child => { - parseRouter(child); - authRoutesMap.set(child.name, child); - }); + if (route.path === '/' && route.children?.length) { + const child = route.children[0]; + // @ts-expect-error no hidden field + child.hidden = route.hidden; + parseRouter(child); + child.name = Math.random().toString(36).slice(2, 12); + Object.assign(route, child); + delete route.children; + authRoutesMap.set(route.name, route); return; } parseRouter(route); @@ -121,7 +125,6 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { } else if (!isNotNull(route.meta.icon)) { route.meta.icon = defaultIcon; } - // @ts-expect-error no hidden field route.meta.hideInMenu = route.hidden; if (route.meta.hideInMenu && parent) { diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index e028bebc..16675c67 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -113,6 +113,24 @@ function renderLabel({ option }: { option: TreeOption }) { if (label?.startsWith('route.') || label?.startsWith('menu.')) { label = $t(label as App.I18n.I18nKey); } + // 禁用的菜单显示红色 + if (option.status === '1') { + return ( +