@keyblade/pro-components 1.2.3 → 1.2.5

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.
@@ -153,9 +153,10 @@ function useHooks(menuItems, options) {
153
153
  menuItemMap.value = _menuItemMap;
154
154
  }, { immediate: true });
155
155
  watch(() => route == null ? void 0 : route.name, () => {
156
+ var _a;
156
157
  const routeName = route == null ? void 0 : route.name;
157
158
  activeMenuItem.value = menuItemMap.value[routeName];
158
- menuSelectedKeys.value = (activeMenuItem == null ? void 0 : activeMenuItem.value) ? [activeMenuItem.value.name] : [];
159
+ menuSelectedKeys.value = (activeMenuItem == null ? void 0 : activeMenuItem.value) ? [activeMenuItem.value.name, ...((_a = activeMenuItem.value) == null ? void 0 : _a.activatedKeys) || []] : [];
159
160
  setActiveMenuItemPaths();
160
161
  setBreadcrumbItems();
161
162
  if (options.showTabs) {
@@ -5,6 +5,8 @@ export interface IProMenuItem {
5
5
  path: string;
6
6
  /** 中文名称 */
7
7
  title: string;
8
+ /** 当此节点被选中的时候也会选中 activatedKeys 的节点 */
9
+ activatedKeys?: string[];
8
10
  /**
9
11
  * 菜单图标
10
12
  * arco design icon: 'icon-apps'
package/es/style.css CHANGED
@@ -1,6 +1,17 @@
1
+ .keyblade-pro-breadcrumb {
2
+ margin: 16px 0;
3
+ }
4
+ .keyblade-pro-breadcrumb-icon-item {
5
+ cursor: text;
6
+ }
1
7
  .keyblade-pro-page-container {
2
8
  padding: 0 20px 20px 20px;
3
9
  }
10
+ .keyblade-pro-reuse-tabs {
11
+ position: relative;
12
+ background-color: var(--color-bg-2);
13
+ padding: 4px 20px;
14
+ }
4
15
  .keyblade-pro-layout {
5
16
  width: 100%;
6
17
  height: 100%;
@@ -107,17 +118,6 @@
107
118
  .keyblade-pro-layout-side .keyblade-pro-layout-sider-collapsed .keyblade-pro-layout-sider-content-top {
108
119
  padding: 16px 8px;
109
120
  }
110
- .keyblade-pro-breadcrumb {
111
- margin: 16px 0;
112
- }
113
- .keyblade-pro-breadcrumb-icon-item {
114
- cursor: text;
115
- }
116
- .keyblade-pro-reuse-tabs {
117
- position: relative;
118
- background-color: var(--color-bg-2);
119
- padding: 4px 20px;
120
- }
121
121
  .keyblade-pro-menu-item-img {
122
122
  width: 14px;
123
123
  height: auto;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyblade/pro-components",
3
3
  "description": "KeyBlade Pro Components",
4
4
  "author": "yangshuai <704807396@qq.com>",
5
- "version": "1.2.3",
5
+ "version": "1.2.5",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",