@keyblade/pro-components 0.0.5 → 0.0.6

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.
@@ -4,13 +4,13 @@ export declare function useHooks(menuItems: Ref<IProMenuItem[]>, options: {
4
4
  tabsMode: boolean;
5
5
  }): {
6
6
  menuSelectedKeys: Ref<string[]>;
7
- menuOpenKeys: Ref<string[]>;
8
7
  onMenuItemClick: (key: string) => void;
9
- onSubMenuClick: (key: string, openKeys: string[]) => void;
10
8
  activeMenuItem: Ref<IProMenuItem | undefined>;
9
+ menuItemMap: Ref<Record<string, IProMenuItem>>;
11
10
  breadcrumbItems: Ref<string[]>;
12
11
  tabs: Ref<{
13
12
  name: string;
13
+ parentNames: string[];
14
14
  title: string;
15
15
  fullPath: string;
16
16
  active: boolean;
@@ -4,44 +4,42 @@ function useHooks(menuItems, options) {
4
4
  const route = useRoute();
5
5
  const router = useRouter();
6
6
  const menuSelectedKeys = ref([]);
7
- const menuOpenKeys = ref([]);
8
7
  const onMenuItemClick = (key) => {
9
8
  menuSelectedKeys.value = [key];
10
9
  };
11
- const onSubMenuClick = (key, openKeys) => {
12
- menuOpenKeys.value = openKeys;
13
- };
14
10
  const activeMenuItem = ref();
11
+ const activeMenuItemPaths = ref([]);
15
12
  const menuItemMap = ref({});
16
13
  const breadcrumbItems = ref([]);
17
14
  const tabs = ref([]);
18
- const setBreadcrumbItems = () => {
19
- var _a, _b;
20
- const menuItemPaths = [];
21
- const recursion = (_menuItem) => {
22
- var _a2;
23
- let find = false;
24
- for (const i in _menuItem) {
25
- if (_menuItem[i].name === ((_a2 = activeMenuItem == null ? void 0 : activeMenuItem.value) == null ? void 0 : _a2.name)) {
26
- find = true;
27
- menuItemPaths.push(_menuItem[i]);
15
+ const setActiveMenuItemPaths = () => {
16
+ const paths = [];
17
+ const recursion = (_menuItems) => {
18
+ var _a;
19
+ for (const i in _menuItems) {
20
+ const menuItem = _menuItems[i];
21
+ if (menuItem.name === ((_a = activeMenuItem == null ? void 0 : activeMenuItem.value) == null ? void 0 : _a.name)) {
22
+ delete menuItem.children;
23
+ paths.unshift(menuItem);
24
+ return true;
28
25
  }
29
- const children = _menuItem[i].children;
30
- if (children) {
31
- const node = recursion(children);
32
- if (node) {
33
- menuItemPaths.push(_menuItem[i]);
26
+ if (menuItem.children && menuItem.children.length > 0) {
27
+ const ok = recursion(menuItem.children);
28
+ if (ok) {
29
+ delete menuItem.children;
30
+ paths.unshift(menuItem);
31
+ return true;
34
32
  }
35
33
  }
36
34
  }
37
- return find;
35
+ return false;
38
36
  };
39
- recursion(menuItems.value);
40
- const activeMenuItemPaths = menuItemPaths.reverse();
41
- const parentMenuPaths = activeMenuItemPaths.filter((_, i) => i !== activeMenuItemPaths.length - 1);
42
- const keySet = /* @__PURE__ */ new Set([...parentMenuPaths.map((v) => v.name), ...menuOpenKeys.value]);
43
- menuOpenKeys.value = [...keySet];
44
- const activeMenuItemTitles = activeMenuItemPaths.map((v) => v.title);
37
+ recursion(JSON.parse(JSON.stringify(menuItems.value)));
38
+ activeMenuItemPaths.value = paths;
39
+ };
40
+ const setBreadcrumbItems = () => {
41
+ var _a, _b;
42
+ const activeMenuItemTitles = activeMenuItemPaths.value.map((v) => v.title);
45
43
  breadcrumbItems.value = ((_a = activeMenuItem.value) == null ? void 0 : _a.breadcrumbs) ? (_b = activeMenuItem.value) == null ? void 0 : _b.breadcrumbs : activeMenuItemTitles.length !== 0 ? activeMenuItemTitles : [];
46
44
  };
47
45
  function setTabs() {
@@ -64,6 +62,7 @@ function useHooks(menuItems, options) {
64
62
  });
65
63
  const newTab = {
66
64
  name: menuItemName,
65
+ parentNames: activeMenuItemPaths.value.map((v) => v.name),
67
66
  title: menuItemTitle ?? menuItemName,
68
67
  fullPath: route.fullPath,
69
68
  active: true
@@ -129,6 +128,7 @@ function useHooks(menuItems, options) {
129
128
  const routeName = route == null ? void 0 : route.name;
130
129
  activeMenuItem.value = menuItemMap.value[routeName];
131
130
  menuSelectedKeys.value = (activeMenuItem == null ? void 0 : activeMenuItem.value) ? [activeMenuItem.value.name] : [];
131
+ setActiveMenuItemPaths();
132
132
  setBreadcrumbItems();
133
133
  if (options.tabsMode) {
134
134
  setTabs();
@@ -136,10 +136,9 @@ function useHooks(menuItems, options) {
136
136
  }, { immediate: true });
137
137
  return {
138
138
  menuSelectedKeys,
139
- menuOpenKeys,
140
139
  onMenuItemClick,
141
- onSubMenuClick,
142
140
  activeMenuItem,
141
+ menuItemMap,
143
142
  breadcrumbItems,
144
143
  tabs,
145
144
  onTabClick,
@@ -111,13 +111,13 @@ declare const ProLayout: {
111
111
  [name: string]: Slot | undefined;
112
112
  }>;
113
113
  menuSelectedKeys: Ref<string[]>;
114
- menuOpenKeys: Ref<string[]>;
115
114
  onMenuItemClick: (key: string) => void;
116
- onSubMenuClick: (key: string, openKeys: string[]) => void;
117
115
  activeMenuItem: Ref<IProMenuItem | undefined>;
116
+ menuItemMap: Ref<Record<string, IProMenuItem>>;
118
117
  breadcrumbItems: Ref<string[]>;
119
118
  tabs: Ref<{
120
119
  name: string;
120
+ parentNames: string[];
121
121
  title: string;
122
122
  fullPath: string;
123
123
  active: boolean;
@@ -125,6 +125,8 @@ declare const ProLayout: {
125
125
  onTabClick: (key: string) => void;
126
126
  onTabDelete: (key: string) => void;
127
127
  keepAliveKeys: ComputedRef<string[]>;
128
+ headerHeight: number;
129
+ headerHeightWidthPx: string;
128
130
  siderWidth: number;
129
131
  siderCollapsedWidth: number;
130
132
  siderWidthPx: string;
@@ -208,13 +210,13 @@ declare const ProLayout: {
208
210
  [name: string]: Slot | undefined;
209
211
  }>;
210
212
  menuSelectedKeys: Ref<string[]>;
211
- menuOpenKeys: Ref<string[]>;
212
213
  onMenuItemClick: (key: string) => void;
213
- onSubMenuClick: (key: string, openKeys: string[]) => void;
214
214
  activeMenuItem: Ref<IProMenuItem | undefined>;
215
+ menuItemMap: Ref<Record<string, IProMenuItem>>;
215
216
  breadcrumbItems: Ref<string[]>;
216
217
  tabs: Ref<{
217
218
  name: string;
219
+ parentNames: string[];
218
220
  title: string;
219
221
  fullPath: string;
220
222
  active: boolean;
@@ -222,6 +224,8 @@ declare const ProLayout: {
222
224
  onTabClick: (key: string) => void;
223
225
  onTabDelete: (key: string) => void;
224
226
  keepAliveKeys: ComputedRef<string[]>;
227
+ headerHeight: number;
228
+ headerHeightWidthPx: string;
225
229
  siderWidth: number;
226
230
  siderCollapsedWidth: number;
227
231
  siderWidthPx: string;
@@ -279,13 +283,13 @@ declare const ProLayout: {
279
283
  [name: string]: Slot | undefined;
280
284
  }>;
281
285
  menuSelectedKeys: Ref<string[]>;
282
- menuOpenKeys: Ref<string[]>;
283
286
  onMenuItemClick: (key: string) => void;
284
- onSubMenuClick: (key: string, openKeys: string[]) => void;
285
287
  activeMenuItem: Ref<IProMenuItem | undefined>;
288
+ menuItemMap: Ref<Record<string, IProMenuItem>>;
286
289
  breadcrumbItems: Ref<string[]>;
287
290
  tabs: Ref<{
288
291
  name: string;
292
+ parentNames: string[];
289
293
  title: string;
290
294
  fullPath: string;
291
295
  active: boolean;
@@ -293,6 +297,8 @@ declare const ProLayout: {
293
297
  onTabClick: (key: string) => void;
294
298
  onTabDelete: (key: string) => void;
295
299
  keepAliveKeys: ComputedRef<string[]>;
300
+ headerHeight: number;
301
+ headerHeightWidthPx: string;
296
302
  siderWidth: number;
297
303
  siderCollapsedWidth: number;
298
304
  siderWidthPx: string;
@@ -45,13 +45,13 @@ declare const _sfc_main: DefineComponent<{
45
45
  [name: string]: Slot | undefined;
46
46
  }>;
47
47
  menuSelectedKeys: Ref<string[]>;
48
- menuOpenKeys: Ref<string[]>;
49
48
  onMenuItemClick: (key: string) => void;
50
- onSubMenuClick: (key: string, openKeys: string[]) => void;
51
49
  activeMenuItem: Ref<IProMenuItem | undefined>;
50
+ menuItemMap: Ref<Record<string, IProMenuItem>>;
52
51
  breadcrumbItems: Ref<string[]>;
53
52
  tabs: Ref<{
54
53
  name: string;
54
+ parentNames: string[];
55
55
  title: string;
56
56
  fullPath: string;
57
57
  active: boolean;
@@ -59,6 +59,8 @@ declare const _sfc_main: DefineComponent<{
59
59
  onTabClick: (key: string) => void;
60
60
  onTabDelete: (key: string) => void;
61
61
  keepAliveKeys: ComputedRef<string[]>;
62
+ headerHeight: number;
63
+ headerHeightWidthPx: string;
62
64
  siderWidth: number;
63
65
  siderCollapsedWidth: number;
64
66
  siderWidthPx: string;
@@ -1,4 +1,4 @@
1
- import { defineComponent, useCssVars, toRefs, useSlots, provide, computed, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createVNode, createElementVNode, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, resolveDynamicComponent, KeepAlive } from "vue";
1
+ import { defineComponent, useCssVars, toRefs, useSlots, computed, provide, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createVNode, createElementVNode, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, resolveDynamicComponent, KeepAlive } from "vue";
2
2
  import { useHooks } from "./hooks.js";
3
3
  const _hoisted_1 = ["src"];
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -46,18 +46,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
46
  setup(__props, { emit }) {
47
47
  const props = __props;
48
48
  useCssVars((_ctx) => ({
49
- "1e11aed1": siderWidthPx,
50
- "043fd9d8": siderCollapsedWidthPx
49
+ "aa0adaee": headerHeightWidthPx,
50
+ "f32a33f8": siderWidthPx,
51
+ "5b964541": siderCollapsedWidthPx
51
52
  }));
52
53
  const prefixClsName = "keyblade-pro-layout";
53
54
  const { menuItems } = toRefs(props);
54
55
  const slots = useSlots();
55
56
  const {
56
57
  menuSelectedKeys,
57
- menuOpenKeys,
58
58
  onMenuItemClick,
59
- onSubMenuClick,
60
59
  activeMenuItem,
60
+ menuItemMap,
61
61
  breadcrumbItems,
62
62
  tabs,
63
63
  onTabClick,
@@ -65,18 +65,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
65
65
  } = useHooks(menuItems, {
66
66
  tabsMode: props.tabsMode
67
67
  });
68
- provide("ProBreadcrumbItems", breadcrumbItems);
69
68
  const keepAliveKeys = computed(() => {
70
- const keys = [];
69
+ const keys = /* @__PURE__ */ new Set();
71
70
  tabs.value.forEach((tab) => {
72
- var _a, _b;
73
- if (tab.name === ((_a = activeMenuItem == null ? void 0 : activeMenuItem.value) == null ? void 0 : _a.name) && ((_b = activeMenuItem.value) == null ? void 0 : _b.ignoreCache)) {
74
- return;
75
- }
76
- keys.push(tab.name);
71
+ tab.parentNames.forEach((name) => {
72
+ const menuItem = menuItemMap.value[name];
73
+ if (menuItem.ignoreCache) {
74
+ return;
75
+ }
76
+ keys.add(menuItem.name);
77
+ });
77
78
  });
78
- return keys;
79
+ return Array.from(keys.values());
79
80
  });
81
+ provide("ProBreadcrumbItems", breadcrumbItems);
82
+ provide("ProKeepAliveKeys", keepAliveKeys);
83
+ const headerHeight = 60;
84
+ const headerHeightWidthPx = `${headerHeight}px`;
80
85
  const siderWidth = 220;
81
86
  const siderCollapsedWidth = 48;
82
87
  const siderWidthPx = `${siderWidth}px`;
@@ -103,6 +108,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
103
108
  const _component_kb_pro_menu = resolveComponent("kb-pro-menu");
104
109
  const _component_a_layout_sider = resolveComponent("a-layout-sider");
105
110
  const _component_kb_pro_reuse_tabs = resolveComponent("kb-pro-reuse-tabs");
111
+ const _component_a_affix = resolveComponent("a-affix");
106
112
  const _component_router_view = resolveComponent("router-view");
107
113
  const _component_kb_pro_page_wrapper = resolveComponent("kb-pro-page-wrapper");
108
114
  const _component_a_layout_content = resolveComponent("a-layout-content");
@@ -168,12 +174,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
168
174
  style: { "flex": "1" },
169
175
  collapsed: siderCollapsed.value,
170
176
  "selected-keys": unref(menuSelectedKeys),
171
- "open-keys": unref(menuOpenKeys),
172
177
  items: unref(menuItems),
173
178
  onCollapse: onSiderCollapse,
174
- onMenuItemClick: unref(onMenuItemClick),
175
- onSubMenuClick: unref(onSubMenuClick)
176
- }, null, 8, ["collapsed", "selected-keys", "open-keys", "items", "onMenuItemClick", "onSubMenuClick"])
179
+ onMenuItemClick: unref(onMenuItemClick)
180
+ }, null, 8, ["collapsed", "selected-keys", "items", "onMenuItemClick"])
177
181
  ], 2)
178
182
  ]),
179
183
  _: 3
@@ -182,16 +186,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
182
186
  class: normalizeClass(`${prefixClsName}-body` + (siderCollapsed.value ? ` ${prefixClsName}-body-collapsed` : ""))
183
187
  }, {
184
188
  default: withCtx(() => [
189
+ createVNode(_component_a_affix, {
190
+ class: normalizeClass(`${prefixClsName}-body-affix`),
191
+ offsetTop: headerHeight
192
+ }, {
193
+ default: withCtx(() => [
194
+ __props.tabsMode && unref(tabs).length > 0 ? (openBlock(), createBlock(_component_kb_pro_reuse_tabs, {
195
+ key: 0,
196
+ tabs: unref(tabs),
197
+ onTabClick: unref(onTabClick),
198
+ onTabDelete: unref(onTabDelete)
199
+ }, null, 8, ["tabs", "onTabClick", "onTabDelete"])) : createCommentVNode("", true)
200
+ ]),
201
+ _: 1
202
+ }, 8, ["class"]),
185
203
  createVNode(_component_a_layout_content, null, {
186
204
  default: withCtx(() => {
187
205
  var _a;
188
206
  return [
189
- __props.tabsMode && unref(tabs).length > 0 ? (openBlock(), createBlock(_component_kb_pro_reuse_tabs, {
190
- key: 0,
191
- tabs: unref(tabs),
192
- onTabClick: unref(onTabClick),
193
- onTabDelete: unref(onTabDelete)
194
- }, null, 8, ["tabs", "onTabClick", "onTabDelete"])) : createCommentVNode("", true),
195
207
  createVNode(_component_kb_pro_page_wrapper, {
196
208
  "hide-page-wrapper": (_a = unref(activeMenuItem)) == null ? void 0 : _a.hidePageWrapper
197
209
  }, {
@@ -14,10 +14,6 @@ declare const ProMenu: {
14
14
  type: PropType<string[]>;
15
15
  required: true;
16
16
  };
17
- openKeys: {
18
- type: PropType<string[]>;
19
- required: true;
20
- };
21
17
  items: {
22
18
  type: PropType<IProMenuItem[]>;
23
19
  required: true;
@@ -49,10 +45,6 @@ declare const ProMenu: {
49
45
  type: PropType<string[]>;
50
46
  required: true;
51
47
  };
52
- openKeys: {
53
- type: PropType<string[]>;
54
- required: true;
55
- };
56
48
  items: {
57
49
  type: PropType<IProMenuItem[]>;
58
50
  required: true;
@@ -63,7 +55,9 @@ declare const ProMenu: {
63
55
  "onSub-menu-click"?: ((key: string, openKeys: string[]) => any) | undefined;
64
56
  }, {
65
57
  prefixClsName: string;
58
+ props: any;
66
59
  emit: ((event: "collapse", collapsed: boolean) => void) & ((event: "menu-item-click", key: string) => void) & ((event: "sub-menu-click", key: string, openKeys: string[]) => void);
60
+ onMenuItemClick: (key: string) => void;
67
61
  ProMenuItem: DefineComponent<{
68
62
  item: {
69
63
  type: null;
@@ -111,10 +105,6 @@ declare const ProMenu: {
111
105
  type: PropType<string[]>;
112
106
  required: true;
113
107
  };
114
- openKeys: {
115
- type: PropType<string[]>;
116
- required: true;
117
- };
118
108
  items: {
119
109
  type: PropType<IProMenuItem[]>;
120
110
  required: true;
@@ -125,7 +115,9 @@ declare const ProMenu: {
125
115
  "onSub-menu-click"?: ((key: string, openKeys: string[]) => any) | undefined;
126
116
  } & ShallowUnwrapRef<{
127
117
  prefixClsName: string;
118
+ props: any;
128
119
  emit: ((event: "collapse", collapsed: boolean) => void) & ((event: "menu-item-click", key: string) => void) & ((event: "sub-menu-click", key: string, openKeys: string[]) => void);
120
+ onMenuItemClick: (key: string) => void;
129
121
  ProMenuItem: DefineComponent<{
130
122
  item: {
131
123
  type: null;
@@ -153,10 +145,6 @@ declare const ProMenu: {
153
145
  type: PropType<string[]>;
154
146
  required: true;
155
147
  };
156
- openKeys: {
157
- type: PropType<string[]>;
158
- required: true;
159
- };
160
148
  items: {
161
149
  type: PropType<IProMenuItem[]>;
162
150
  required: true;
@@ -167,7 +155,9 @@ declare const ProMenu: {
167
155
  "onSub-menu-click"?: ((key: string, openKeys: string[]) => any) | undefined;
168
156
  }, {
169
157
  prefixClsName: string;
158
+ props: any;
170
159
  emit: ((event: "collapse", collapsed: boolean) => void) & ((event: "menu-item-click", key: string) => void) & ((event: "sub-menu-click", key: string, openKeys: string[]) => void);
160
+ onMenuItemClick: (key: string) => void;
171
161
  ProMenuItem: DefineComponent<{
172
162
  item: {
173
163
  type: null;
@@ -14,6 +14,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
14
14
  if (!(item == null ? void 0 : item.path)) {
15
15
  return;
16
16
  }
17
+ if (item.path.startsWith("http") || item.path.startsWith("https")) {
18
+ window.open(item.path);
19
+ return;
20
+ }
17
21
  router.push({ path: item.path });
18
22
  };
19
23
  return (_ctx, _cache) => {
@@ -10,17 +10,15 @@ declare const _sfc_main: DefineComponent<{
10
10
  type: PropType<string[]>;
11
11
  required: true;
12
12
  };
13
- openKeys: {
14
- type: PropType<string[]>;
15
- required: true;
16
- };
17
13
  items: {
18
14
  type: PropType<IProMenuItem[]>;
19
15
  required: true;
20
16
  };
21
17
  }, {
22
18
  prefixClsName: string;
19
+ props: any;
23
20
  emit: ((event: "collapse", collapsed: boolean) => void) & ((event: "menu-item-click", key: string) => void) & ((event: "sub-menu-click", key: string, openKeys: string[]) => void);
21
+ onMenuItemClick: (key: string) => void;
24
22
  ProMenuItem: DefineComponent<{
25
23
  item: {
26
24
  type: null;
@@ -48,10 +46,6 @@ declare const _sfc_main: DefineComponent<{
48
46
  type: PropType<string[]>;
49
47
  required: true;
50
48
  };
51
- openKeys: {
52
- type: PropType<string[]>;
53
- required: true;
54
- };
55
49
  items: {
56
50
  type: PropType<IProMenuItem[]>;
57
51
  required: true;
@@ -11,10 +11,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  type: Array,
12
12
  required: true
13
13
  },
14
- openKeys: {
15
- type: Array,
16
- required: true
17
- },
18
14
  items: {
19
15
  type: Array,
20
16
  required: true
@@ -26,19 +22,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
26
22
  "sub-menu-click": (key, openKeys) => true
27
23
  },
28
24
  setup(__props, { emit }) {
25
+ const props = __props;
29
26
  const prefixClsName = "keyblade-pro-menu";
27
+ const onMenuItemClick = (key) => {
28
+ let findItem;
29
+ const find = (items) => {
30
+ var _a;
31
+ for (let i = 0; i < items.length; i++) {
32
+ const item = items[i];
33
+ if (item.name === key) {
34
+ findItem = item;
35
+ return;
36
+ }
37
+ if ((item == null ? void 0 : item.children) && ((_a = item.children) == null ? void 0 : _a.length) > 0) {
38
+ find(item.children);
39
+ }
40
+ }
41
+ };
42
+ find(props.items);
43
+ if (findItem && (findItem.path.startsWith("http") || findItem.path.startsWith("https"))) {
44
+ return;
45
+ }
46
+ emit("menu-item-click", key);
47
+ };
30
48
  return (_ctx, _cache) => {
31
49
  const _component_a_menu = resolveComponent("a-menu");
32
50
  return openBlock(), createBlock(_component_a_menu, {
33
51
  class: normalizeClass(prefixClsName),
34
52
  collapsed: __props.collapsed,
35
- "open-keys": __props.openKeys,
36
53
  "selected-keys": __props.selectedKeys,
37
54
  "show-collapse-button": "",
55
+ "auto-open-selected": "",
38
56
  breakpoint: "md",
39
57
  onCollapse: _cache[0] || (_cache[0] = ($event) => emit("collapse", $event)),
40
- onMenuItemClick: _cache[1] || (_cache[1] = ($event) => emit("menu-item-click", $event)),
41
- onSubMenuClick: _cache[2] || (_cache[2] = (_key, _openKeys) => emit("sub-menu-click", _key, _openKeys))
58
+ onMenuItemClick,
59
+ onSubMenuClick: _cache[1] || (_cache[1] = (_key, _openKeys) => emit("sub-menu-click", _key, _openKeys))
42
60
  }, {
43
61
  default: withCtx(() => [
44
62
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
@@ -49,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
49
67
  }), 128))
50
68
  ]),
51
69
  _: 1
52
- }, 8, ["collapsed", "open-keys", "selected-keys"]);
70
+ }, 8, ["collapsed", "selected-keys"]);
53
71
  };
54
72
  }
55
73
  });
@@ -4,6 +4,8 @@
4
4
  export interface IProTab {
5
5
  /** 菜单名称 */
6
6
  name: string;
7
+ /** 所有父级且包含自己的所有名称(主要用作路由缓存) */
8
+ parentNames: string[];
7
9
  /** 菜单标题 */
8
10
  title: string;
9
11
  /** 完整路径 */
package/es/style.css CHANGED
@@ -1,11 +1,11 @@
1
+ .keyblade-pro-page-wrapper {
2
+ padding: 0 20px 20px 20px;
3
+ }
1
4
  .keyblade-pro-reuse-tabs {
2
5
  position: relative;
3
6
  background-color: var(--color-bg-2);
4
7
  padding: 4px 20px;
5
8
  }
6
- .keyblade-pro-page-wrapper {
7
- padding: 0 20px 20px 20px;
8
- }
9
9
  .keyblade-pro-layout {
10
10
  width: 100%;
11
11
  height: 100%;
@@ -18,7 +18,7 @@
18
18
  top: 0;
19
19
  left: 0;
20
20
  width: 100%;
21
- height: 60px;
21
+ height: var(--aa0adaee);
22
22
  z-index: 100;
23
23
  display: flex;
24
24
  align-items: center;
@@ -40,7 +40,7 @@
40
40
  font-size: 18px;
41
41
  }
42
42
  .keyblade-pro-layout-sider {
43
- padding-top: 60px;
43
+ padding-top: var(--aa0adaee);
44
44
  position: fixed;
45
45
  top: 0;
46
46
  left: 0;
@@ -55,8 +55,8 @@
55
55
  overflow: auto;
56
56
  }
57
57
  .keyblade-pro-layout-body {
58
- padding-top: 60px;
59
- padding-left: var(--1e11aed1);
58
+ padding-top: var(--aa0adaee);
59
+ padding-left: var(--f32a33f8);
60
60
  min-height: 100vh;
61
61
  overflow-y: hidden;
62
62
  background-color: var(--color-fill-2);
@@ -76,5 +76,5 @@
76
76
  text-align: center;
77
77
  }
78
78
  .keyblade-pro-layout-body-collapsed {
79
- padding-left: var(--043fd9d8);
79
+ padding-left: var(--5b964541);
80
80
  }
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": "0.0.5",
5
+ "version": "0.0.6",
6
6
  "private": false,
7
7
  "type": "module",
8
8
  "main": "es/index.js",