@keyblade/pro-components 1.2.3 → 1.2.4

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,3 +1,8 @@
1
+ .keyblade-pro-reuse-tabs {
2
+ position: relative;
3
+ background-color: var(--color-bg-2);
4
+ padding: 4px 20px;
5
+ }
1
6
  .keyblade-pro-page-container {
2
7
  padding: 0 20px 20px 20px;
3
8
  }
@@ -113,11 +118,6 @@
113
118
  .keyblade-pro-breadcrumb-icon-item {
114
119
  cursor: text;
115
120
  }
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.4",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",