@lambo-design/pro-layout 1.0.0-beta.433 → 1.0.0-beta.435

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/pro-layout",
3
- "version": "1.0.0-beta.433",
3
+ "version": "1.0.0-beta.435",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -281,7 +281,21 @@ export default {
281
281
  const currentApp = appList.find(app => app.appId === this.activeName);
282
282
  // 如果找到应用且隐藏了左侧菜单,该应用应该保持激活状态
283
283
  if (currentApp) {
284
- const isHideLeftMenu = currentApp.extendProps?.is_hide_left_menu || currentApp.setting?.is_hide_left_menu;
284
+ let isHideLeftMenu;
285
+ if (currentApp.extendProps) {
286
+ if (typeof currentApp.extendProps === 'string') {
287
+ isHideLeftMenu = JSON.parse(currentApp.extendProps)?.is_hide_left_menu;
288
+ } else {
289
+ isHideLeftMenu = currentApp.extendProps.is_hide_left_menu;
290
+ }
291
+ }
292
+ if (!isHideLeftMenu && currentApp.setting) {
293
+ if (typeof currentApp.setting === 'string') {
294
+ isHideLeftMenu = JSON.parse(currentApp.setting)?.is_hide_left_menu;
295
+ } else {
296
+ isHideLeftMenu = currentApp.setting.is_hide_left_menu;
297
+ }
298
+ }
285
299
  if ((isHideLeftMenu === '1' || isHideLeftMenu === 1) && this.activeName === item.appId) {
286
300
  return true;
287
301
  }
@@ -449,7 +449,21 @@ export default {
449
449
  const currentApp = appList.find(app => app.appId === this.activeName);
450
450
  // 如果找到应用且隐藏了左侧菜单,返回 activeName
451
451
  if (currentApp) {
452
- const isHideLeftMenu = currentApp.extendProps?.is_hide_left_menu;
452
+ let isHideLeftMenu;
453
+ if (currentApp.extendProps) {
454
+ if (typeof currentApp.extendProps === 'string') {
455
+ isHideLeftMenu = JSON.parse(currentApp.extendProps)?.is_hide_left_menu;
456
+ } else {
457
+ isHideLeftMenu = currentApp.extendProps.is_hide_left_menu;
458
+ }
459
+ }
460
+ if (!isHideLeftMenu && currentApp.setting) {
461
+ if (typeof currentApp.setting === 'string') {
462
+ isHideLeftMenu = JSON.parse(currentApp.setting)?.is_hide_left_menu;
463
+ } else {
464
+ isHideLeftMenu = currentApp.setting.is_hide_left_menu;
465
+ }
466
+ }
453
467
  if (isHideLeftMenu === '1' || isHideLeftMenu === 1) {
454
468
  return this.activeName;
455
469
  }