@keyblade/pro-components 1.13.8-alpha.8 → 1.14.0

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.
Files changed (156) hide show
  1. package/es/components.d.ts +7 -0
  2. package/es/global-props.d.ts +21 -2
  3. package/es/global-props.js +6 -2
  4. package/es/index.d.ts +7 -0
  5. package/es/index.js +47 -28
  6. package/es/inerface.d.ts +5 -1
  7. package/es/pro-calendar/calendar.vue.d.ts +75 -0
  8. package/es/pro-calendar/calendar.vue.js +159 -0
  9. package/es/pro-calendar/calendar.vue3.js +5 -0
  10. package/es/pro-calendar/enum.d.ts +6 -0
  11. package/es/pro-calendar/enum.js +4 -0
  12. package/es/pro-calendar/header.vue.d.ts +35 -0
  13. package/es/pro-calendar/header.vue.js +146 -0
  14. package/es/pro-calendar/header.vue2.js +4 -0
  15. package/es/pro-calendar/hooks/useCellClassName.d.ts +12 -0
  16. package/es/pro-calendar/hooks/useCellClassName.js +40 -0
  17. package/es/pro-calendar/index.d.ts +117 -0
  18. package/es/pro-calendar/index.js +12 -0
  19. package/es/pro-calendar/interface.d.ts +89 -0
  20. package/es/pro-calendar/month.d.ts +5 -0
  21. package/es/pro-calendar/month.js +53 -0
  22. package/es/pro-calendar/month.vue.d.ts +22 -0
  23. package/es/pro-calendar/month.vue.js +126 -0
  24. package/es/pro-calendar/month.vue2.js +4 -0
  25. package/es/pro-calendar/week.vue.d.ts +3 -0
  26. package/es/pro-calendar/week.vue.js +34 -0
  27. package/es/pro-calendar/week.vue2.js +4 -0
  28. package/es/pro-calendar/year.vue.d.ts +3 -0
  29. package/es/pro-calendar/year.vue.js +123 -0
  30. package/es/pro-calendar/year.vue2.js +4 -0
  31. package/es/pro-date-range-picker/index.d.ts +183 -13
  32. package/es/pro-date-range-picker/index.js +6 -7
  33. package/es/pro-date-range-picker/interface.d.ts +38 -0
  34. package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +173 -6
  35. package/es/pro-date-range-picker/pro-date-range-picker.vue.js +1 -1
  36. package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +127 -97
  37. package/es/pro-dates-picker/index.d.ts +49 -0
  38. package/es/pro-dates-picker/index.js +11 -0
  39. package/es/pro-dates-picker/index.vue.d.ts +29 -0
  40. package/es/pro-dates-picker/index.vue.js +135 -0
  41. package/es/pro-dates-picker/index.vue3.js +5 -0
  42. package/es/pro-dates-picker/interface.d.ts +38 -0
  43. package/es/pro-dates-picker/util.d.ts +12 -0
  44. package/es/pro-dates-picker/util.js +9 -0
  45. package/es/pro-find-password/enum.d.ts +8 -0
  46. package/es/pro-find-password/enum.js +4 -0
  47. package/es/pro-find-password/index.d.ts +11 -0
  48. package/es/pro-find-password/index.js +11 -0
  49. package/es/pro-find-password/index.vue.d.ts +4459 -0
  50. package/es/pro-find-password/index.vue.js +176 -0
  51. package/es/pro-find-password/index.vue3.js +5 -0
  52. package/es/pro-find-password/interface.d.ts +45 -0
  53. package/es/pro-find-password/reset-password.vue.d.ts +591 -0
  54. package/es/pro-find-password/reset-password.vue.js +179 -0
  55. package/es/pro-find-password/reset-password.vue2.js +4 -0
  56. package/es/pro-find-password/verify-user-name.vue.d.ts +795 -0
  57. package/es/pro-find-password/verify-user-name.vue.js +112 -0
  58. package/es/pro-find-password/verify-user-name.vue3.js +5 -0
  59. package/es/pro-footer-bar/index.d.ts +6 -3
  60. package/es/pro-footer-bar/index.js +6 -7
  61. package/es/pro-footer-bar/index.vue.d.ts +1 -1
  62. package/es/pro-footer-bar/index.vue.js +2 -2
  63. package/es/pro-footer-bar/index.vue2.js +24 -26
  64. package/es/pro-footer-bar/{inerface.d.ts → interface.d.ts} +1 -0
  65. package/es/pro-form-group/index.d.ts +7 -6
  66. package/es/pro-form-group/index.js +6 -8
  67. package/es/pro-form-group/index.vue.d.ts +2 -2
  68. package/es/pro-form-group/index.vue.js +1 -1
  69. package/es/pro-form-group/index.vue2.js +31 -32
  70. package/es/pro-image-upload/cropper.vue.js +2 -2
  71. package/es/pro-image-upload/cropper.vue2.js +200 -190
  72. package/es/pro-image-upload/image-upload.vue.d.ts +1124 -371
  73. package/es/pro-image-upload/image-upload.vue.js +178 -144
  74. package/es/pro-image-upload/index.d.ts +1727 -1001
  75. package/es/pro-image-upload/index.js +6 -8
  76. package/es/pro-keep-alive-router-view/index.d.ts +1 -0
  77. package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.js +17 -18
  78. package/es/pro-layout/hooks.d.ts +80 -1
  79. package/es/pro-layout/hooks.js +133 -84
  80. package/es/pro-layout/index.d.ts +9 -6
  81. package/es/pro-layout/index.js +6 -11
  82. package/es/pro-layout/pro-layout.vue.d.ts +4 -2
  83. package/es/pro-layout/pro-layout.vue.js +220 -208
  84. package/es/pro-loader/index.d.ts +43 -0
  85. package/es/pro-loader/index.js +11 -0
  86. package/es/pro-loader/index.vue.d.ts +28 -0
  87. package/es/pro-loader/index.vue.js +112 -0
  88. package/es/pro-loader/index.vue3.js +5 -0
  89. package/es/pro-loader/interface.d.ts +16 -0
  90. package/es/pro-login/enum.d.ts +6 -0
  91. package/es/pro-login/enum.js +4 -0
  92. package/es/pro-login/form-mobile.vue.d.ts +797 -0
  93. package/es/pro-login/form-mobile.vue.js +146 -0
  94. package/es/pro-login/form-mobile.vue2.js +4 -0
  95. package/es/pro-login/form-password.vue.d.ts +584 -0
  96. package/es/pro-login/form-password.vue.js +99 -0
  97. package/es/pro-login/form-password.vue2.js +4 -0
  98. package/es/pro-login/index.d.ts +11 -0
  99. package/es/pro-login/index.js +11 -0
  100. package/es/pro-login/index.vue.d.ts +4429 -0
  101. package/es/pro-login/index.vue.js +105 -0
  102. package/es/pro-login/index.vue3.js +5 -0
  103. package/es/pro-login/interface.d.ts +72 -0
  104. package/es/pro-login/regexp.d.ts +17 -0
  105. package/es/pro-login/regexp.js +28 -0
  106. package/es/pro-menu/index.d.ts +18 -80
  107. package/es/pro-menu/index.js +6 -7
  108. package/es/pro-menu/interface.d.ts +31 -0
  109. package/es/pro-menu/menu-item.vue.d.ts +27 -0
  110. package/es/pro-menu/menu-item.vue.js +35 -0
  111. package/es/pro-menu/menu-item.vue2.js +4 -0
  112. package/es/pro-menu/pro-menu-item.vue.d.ts +9 -0
  113. package/es/pro-menu/pro-menu-item.vue.js +63 -0
  114. package/es/pro-menu/pro-menu-item.vue2.js +4 -0
  115. package/es/pro-menu/pro-menu.vue.d.ts +9 -55
  116. package/es/pro-menu/pro-menu.vue.js +36 -119
  117. package/es/pro-menu/sub-menu.vue.d.ts +22 -0
  118. package/es/pro-menu/sub-menu.vue.js +55 -0
  119. package/es/pro-menu/sub-menu.vue2.js +4 -0
  120. package/es/pro-menu/util.d.ts +9 -0
  121. package/es/pro-menu/util.js +7 -0
  122. package/es/pro-page-container/constant.d.ts +2 -0
  123. package/es/pro-page-container/constant.js +9 -0
  124. package/es/pro-page-container/index.d.ts +7 -21
  125. package/es/pro-page-container/index.js +6 -8
  126. package/es/pro-page-container/interface.d.ts +12 -0
  127. package/es/pro-page-container/pro-page-container.vue.d.ts +4 -15
  128. package/es/pro-page-container/pro-page-container.vue.js +58 -38
  129. package/es/pro-page-header/constant.d.ts +2 -0
  130. package/es/pro-page-header/constant.js +13 -0
  131. package/es/pro-page-header/index.d.ts +12 -146
  132. package/es/pro-page-header/index.js +6 -8
  133. package/es/pro-page-header/interface.d.ts +21 -0
  134. package/es/pro-page-header/pro-page-header.vue.d.ts +18 -103
  135. package/es/pro-page-header/pro-page-header.vue.js +141 -124
  136. package/es/pro-reuse-tabs/index.d.ts +8 -6
  137. package/es/pro-reuse-tabs/index.js +6 -7
  138. package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +2 -2
  139. package/es/pro-reuse-tabs/pro-reuse-tabs.vue.js +33 -35
  140. package/es/pro-table/index.d.ts +18 -18
  141. package/es/pro-table/index.js +6 -7
  142. package/es/pro-table/index.vue.d.ts +6 -6
  143. package/es/pro-table/index.vue.js +94 -39
  144. package/es/pro-table/interface.d.ts +73 -65
  145. package/es/pro-textarea/index.d.ts +7 -5
  146. package/es/pro-textarea/index.js +5 -6
  147. package/es/pro-textarea/index.vue.d.ts +1 -1
  148. package/es/pro-textarea/index.vue.js +1 -1
  149. package/es/pro-textarea/index.vue2.js +14 -16
  150. package/es/pro-textarea/{inerface.d.ts → interface.d.ts} +19 -18
  151. package/es/style.css +1 -1
  152. package/es/utils.d.ts +6 -0
  153. package/es/utils.js +7 -0
  154. package/package.json +5 -4
  155. package/es/pro-date-range-picker/type.d.ts +0 -22
  156. package/es/pro-page-container/inerface.d.ts +0 -12
@@ -1,12 +1,10 @@
1
- import e from "./image-upload.vue.js";
2
- import { Modal as s, Upload as t, Button as n, Tooltip as u, Spin as m, Space as c, Message as i } from "@arco-design/web-vue";
3
- import { IconZoomIn as r, IconZoomOut as l, IconRotateLeft as I, IconRotateRight as f, IconSync as d } from "@arco-design/web-vue/es/icon";
4
- const S = Object.assign(e, {
5
- install: (o) => {
6
- o.use(s), o.use(t), o.use(n), o.use(u), o.use(m), o.use(c), o.use(i), o.use(r), o.use(l), o.use(I), o.use(f), o.use(d), o.component("KbProImageUpload", e);
1
+ import o from "./image-upload.vue.js";
2
+ const e = Object.assign(o, {
3
+ install: (a) => {
4
+ a.component("KbProImageUpload", o);
7
5
  }
8
6
  });
9
7
  export {
10
- S as ProImageUpload,
11
- S as default
8
+ e as ProImageUpload,
9
+ e as default
12
10
  };
@@ -74,5 +74,6 @@ declare const ProKeepAliveRouterView: {
74
74
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
75
75
  install: (app: App) => void;
76
76
  };
77
+ /** 导出组件 */
77
78
  export { ProKeepAliveRouterView };
78
79
  export default ProKeepAliveRouterView;
@@ -1,6 +1,5 @@
1
- import { defineComponent as f, inject as s, computed as r, resolveComponent as A, createBlock as i, openBlock as t, withCtx as k, KeepAlive as x, resolveDynamicComponent as y } from "vue";
2
- import "vue-router";
3
- const I = /* @__PURE__ */ f({
1
+ import { defineComponent as o, inject as s, computed as v, resolveComponent as k, createBlock as p, openBlock as i, withCtx as A, KeepAlive as y, resolveDynamicComponent as x } from "vue";
2
+ const _ = /* @__PURE__ */ o({
4
3
  __name: "pro-keep-alive-router-view",
5
4
  props: {
6
5
  /** 包含 */
@@ -23,35 +22,35 @@ const I = /* @__PURE__ */ f({
23
22
  }
24
23
  },
25
24
  setup(d) {
26
- const m = (e) => {
27
- var p, n, c, a;
28
- if ((p = e == null ? void 0 : e.meta) != null && p.componentKey) {
25
+ const u = (e) => {
26
+ var t, n, c, a;
27
+ if ((t = e == null ? void 0 : e.meta) != null && t.componentKey) {
29
28
  if (((c = e == null ? void 0 : e.meta) == null ? void 0 : c.componentKey) === "path")
30
29
  return e.path;
31
30
  if (((a = e == null ? void 0 : e.meta) == null ? void 0 : a.componentKey) === "fullPath")
32
31
  return e.fullPath;
33
32
  } else
34
33
  return (n = e == null ? void 0 : e.meta) != null && n.ignoreCache ? e.path : e.fullPath;
35
- }, l = d, u = s("ProKeepAliveInclude", []), v = r(() => l.keepAliveInclude instanceof Array && l.keepAliveInclude.length === 0 || !l.keepAliveInclude ? u.value : l.keepAliveInclude || []), o = r(() => l.keepAliveExclude || []);
36
- return (e, p) => {
37
- const n = A("router-view");
38
- return t(), i(n, null, {
39
- default: k(({ Component: c, route: a }) => [
40
- (t(), i(x, {
41
- include: v.value,
42
- exclude: o.value,
34
+ }, l = d, m = s("ProKeepAliveInclude", []), r = v(() => l.keepAliveInclude instanceof Array && l.keepAliveInclude.length === 0 || !l.keepAliveInclude ? m.value : l.keepAliveInclude || []), f = v(() => l.keepAliveExclude || []);
35
+ return (e, t) => {
36
+ const n = k("router-view");
37
+ return r.value.length > 0 ? (i(), p(n, { key: 0 }, {
38
+ default: A(({ Component: c, route: a }) => [
39
+ (i(), p(y, {
40
+ include: r.value,
41
+ exclude: f.value,
43
42
  max: d.keepAliveMax
44
43
  }, [
45
- (t(), i(y(c), {
46
- key: m(a)
44
+ (i(), p(x(c), {
45
+ key: u(a)
47
46
  }))
48
47
  ], 1032, ["include", "exclude", "max"]))
49
48
  ]),
50
49
  _: 1
51
- });
50
+ })) : (i(), p(n, { key: 1 }));
52
51
  };
53
52
  }
54
53
  });
55
54
  export {
56
- I as default
55
+ _ as default
57
56
  };
@@ -2,7 +2,7 @@ import { IProMenuItem } from '../pro-menu';
2
2
  import { IProTab } from '../pro-reuse-tabs';
3
3
  import { ProLayoutMenuType } from './enum.ts';
4
4
  import { IProLayoutProps } from './type.ts';
5
- export declare function useHooks(props: IProLayoutProps): {
5
+ export declare const useHooks: (props: IProLayoutProps) => {
6
6
  topMenuItems: import('vue').Ref<{
7
7
  name: string;
8
8
  path: string;
@@ -12,6 +12,8 @@ export declare function useHooks(props: IProLayoutProps): {
12
12
  activatedKeys?: string[] | undefined;
13
13
  icon?: string | undefined;
14
14
  selectedIcon?: string | undefined;
15
+ order?: number | undefined;
16
+ fixed?: boolean | undefined;
15
17
  hideInMenu?: boolean | undefined;
16
18
  hideChildrenInMenu?: boolean | undefined;
17
19
  noAffix?: boolean | undefined;
@@ -22,6 +24,23 @@ export declare function useHooks(props: IProLayoutProps): {
22
24
  ignoreCache?: boolean | undefined;
23
25
  componentKey?: "path" | "fullPath" | undefined;
24
26
  children?: /*elided*/ any[] | undefined;
27
+ redirect?: string | ((to: import('vue-router').RouteLocation) => import('vue-router').RouteLocationRaw) | {
28
+ name?: import('vue-router').RouteRecordNameGeneric;
29
+ params?: import('vue-router').RouteParamsRawGeneric | undefined;
30
+ path?: undefined | undefined;
31
+ query?: import('vue-router').LocationQueryRaw | undefined;
32
+ hash?: string | undefined;
33
+ replace?: boolean | undefined;
34
+ force?: boolean | undefined;
35
+ state?: import('vue-router').HistoryState | undefined;
36
+ } | {
37
+ path: string;
38
+ query?: import('vue-router').LocationQueryRaw | undefined;
39
+ hash?: string | undefined;
40
+ replace?: boolean | undefined;
41
+ force?: boolean | undefined;
42
+ state?: import('vue-router').HistoryState | undefined;
43
+ } | undefined;
25
44
  }[], IProMenuItem[] | {
26
45
  name: string;
27
46
  path: string;
@@ -31,6 +50,8 @@ export declare function useHooks(props: IProLayoutProps): {
31
50
  activatedKeys?: string[] | undefined;
32
51
  icon?: string | undefined;
33
52
  selectedIcon?: string | undefined;
53
+ order?: number | undefined;
54
+ fixed?: boolean | undefined;
34
55
  hideInMenu?: boolean | undefined;
35
56
  hideChildrenInMenu?: boolean | undefined;
36
57
  noAffix?: boolean | undefined;
@@ -41,6 +62,23 @@ export declare function useHooks(props: IProLayoutProps): {
41
62
  ignoreCache?: boolean | undefined;
42
63
  componentKey?: "path" | "fullPath" | undefined;
43
64
  children?: /*elided*/ any[] | undefined;
65
+ redirect?: string | ((to: import('vue-router').RouteLocation) => import('vue-router').RouteLocationRaw) | {
66
+ name?: import('vue-router').RouteRecordNameGeneric;
67
+ params?: import('vue-router').RouteParamsRawGeneric | undefined;
68
+ path?: undefined | undefined;
69
+ query?: import('vue-router').LocationQueryRaw | undefined;
70
+ hash?: string | undefined;
71
+ replace?: boolean | undefined;
72
+ force?: boolean | undefined;
73
+ state?: import('vue-router').HistoryState | undefined;
74
+ } | {
75
+ path: string;
76
+ query?: import('vue-router').LocationQueryRaw | undefined;
77
+ hash?: string | undefined;
78
+ replace?: boolean | undefined;
79
+ force?: boolean | undefined;
80
+ state?: import('vue-router').HistoryState | undefined;
81
+ } | undefined;
44
82
  }[]>;
45
83
  siderMenuItems: import('vue').Ref<{
46
84
  name: string;
@@ -51,6 +89,8 @@ export declare function useHooks(props: IProLayoutProps): {
51
89
  activatedKeys?: string[] | undefined;
52
90
  icon?: string | undefined;
53
91
  selectedIcon?: string | undefined;
92
+ order?: number | undefined;
93
+ fixed?: boolean | undefined;
54
94
  hideInMenu?: boolean | undefined;
55
95
  hideChildrenInMenu?: boolean | undefined;
56
96
  noAffix?: boolean | undefined;
@@ -61,6 +101,23 @@ export declare function useHooks(props: IProLayoutProps): {
61
101
  ignoreCache?: boolean | undefined;
62
102
  componentKey?: "path" | "fullPath" | undefined;
63
103
  children?: /*elided*/ any[] | undefined;
104
+ redirect?: string | ((to: import('vue-router').RouteLocation) => import('vue-router').RouteLocationRaw) | {
105
+ name?: import('vue-router').RouteRecordNameGeneric;
106
+ params?: import('vue-router').RouteParamsRawGeneric | undefined;
107
+ path?: undefined | undefined;
108
+ query?: import('vue-router').LocationQueryRaw | undefined;
109
+ hash?: string | undefined;
110
+ replace?: boolean | undefined;
111
+ force?: boolean | undefined;
112
+ state?: import('vue-router').HistoryState | undefined;
113
+ } | {
114
+ path: string;
115
+ query?: import('vue-router').LocationQueryRaw | undefined;
116
+ hash?: string | undefined;
117
+ replace?: boolean | undefined;
118
+ force?: boolean | undefined;
119
+ state?: import('vue-router').HistoryState | undefined;
120
+ } | undefined;
64
121
  }[], IProMenuItem[] | {
65
122
  name: string;
66
123
  path: string;
@@ -70,6 +127,8 @@ export declare function useHooks(props: IProLayoutProps): {
70
127
  activatedKeys?: string[] | undefined;
71
128
  icon?: string | undefined;
72
129
  selectedIcon?: string | undefined;
130
+ order?: number | undefined;
131
+ fixed?: boolean | undefined;
73
132
  hideInMenu?: boolean | undefined;
74
133
  hideChildrenInMenu?: boolean | undefined;
75
134
  noAffix?: boolean | undefined;
@@ -80,9 +139,28 @@ export declare function useHooks(props: IProLayoutProps): {
80
139
  ignoreCache?: boolean | undefined;
81
140
  componentKey?: "path" | "fullPath" | undefined;
82
141
  children?: /*elided*/ any[] | undefined;
142
+ redirect?: string | ((to: import('vue-router').RouteLocation) => import('vue-router').RouteLocationRaw) | {
143
+ name?: import('vue-router').RouteRecordNameGeneric;
144
+ params?: import('vue-router').RouteParamsRawGeneric | undefined;
145
+ path?: undefined | undefined;
146
+ query?: import('vue-router').LocationQueryRaw | undefined;
147
+ hash?: string | undefined;
148
+ replace?: boolean | undefined;
149
+ force?: boolean | undefined;
150
+ state?: import('vue-router').HistoryState | undefined;
151
+ } | {
152
+ path: string;
153
+ query?: import('vue-router').LocationQueryRaw | undefined;
154
+ hash?: string | undefined;
155
+ replace?: boolean | undefined;
156
+ force?: boolean | undefined;
157
+ state?: import('vue-router').HistoryState | undefined;
158
+ } | undefined;
83
159
  }[]>;
84
160
  topMenuSelectedKeys: import('vue').Ref<string[], string[]>;
85
161
  siderMenuSelectedKeys: import('vue').Ref<string[], string[]>;
162
+ topMenuOpenKeys: import('vue').Ref<string[], string[]>;
163
+ siderMenuOpenKeys: import('vue').Ref<string[], string[]>;
86
164
  activeMenuItem: import('vue').Ref<IProMenuItem | undefined, IProMenuItem | undefined>;
87
165
  menuItemMap: import('vue').Ref<Record<string, IProMenuItem>, Record<string, IProMenuItem>>;
88
166
  breadcrumbItems: import('vue').Ref<{
@@ -110,6 +188,7 @@ export declare function useHooks(props: IProLayoutProps): {
110
188
  }[]>;
111
189
  keepAliveInclude: import('vue').Ref<string[], string[]>;
112
190
  onProMenuItemClick: (menuType: ProLayoutMenuType, item: IProMenuItem) => Promise<void>;
191
+ onProMenuOpenKeysChange: (menuType: ProLayoutMenuType, keys: string[]) => void;
113
192
  onTabClick: (key: string) => void;
114
193
  onTabDelete: (key: string) => void;
115
194
  };
@@ -1,146 +1,195 @@
1
- import { ref as h, computed as L, watch as g } from "vue";
2
- import { useRoute as R, useRouter as W } from "vue-router";
3
- import { ProLayoutMode as P, ProLayoutMenuType as B } from "./enum.js";
4
- function z(o) {
5
- const u = R(), r = W(), y = h([]), T = h([]), i = h(), v = h([]), M = h({}), k = h([]), s = h([]), p = h([]), b = h([]), f = h([]), d = L(() => {
1
+ var V = Object.defineProperty, X = Object.defineProperties;
2
+ var Y = Object.getOwnPropertyDescriptors;
3
+ var x = Object.getOwnPropertySymbols;
4
+ var Z = Object.prototype.hasOwnProperty, $ = Object.prototype.propertyIsEnumerable;
5
+ var J = (o, s, i) => s in o ? V(o, s, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[s] = i, w = (o, s) => {
6
+ for (var i in s || (s = {}))
7
+ Z.call(s, i) && J(o, i, s[i]);
8
+ if (x)
9
+ for (var i of x(s))
10
+ $.call(s, i) && J(o, i, s[i]);
11
+ return o;
12
+ }, A = (o, s) => X(o, Y(s));
13
+ var L = (o, s, i) => new Promise((T, y) => {
14
+ var b = (u) => {
15
+ try {
16
+ c(i.next(u));
17
+ } catch (d) {
18
+ y(d);
19
+ }
20
+ }, g = (u) => {
21
+ try {
22
+ c(i.throw(u));
23
+ } catch (d) {
24
+ y(d);
25
+ }
26
+ }, c = (u) => u.done ? T(u.value) : Promise.resolve(u.value).then(b, g);
27
+ c((i = i.apply(o, s)).next());
28
+ });
29
+ import { ref as v, computed as _, watch as E } from "vue";
30
+ import { useRoute as I, useRouter as m } from "vue-router";
31
+ import { ProLayoutMode as k, ProLayoutMenuType as R } from "./enum.js";
32
+ const te = (o) => {
33
+ const s = I(), i = m(), T = v([]), y = v([]), b = v([]), g = v([]), c = v(), u = v([]), d = v({}), N = v([]), f = v([]), K = v([]), P = v([]), p = v([]), M = _(() => {
6
34
  const e = [...o.menuItems], a = (t) => {
7
35
  t.forEach((l) => {
8
36
  if (l != null && l.children && l.children.length > 0) {
9
37
  if ((l == null ? void 0 : l.topChildrenMenu) !== void 0)
10
- l.children = l.children.map((n) => ({ ...n, topMenu: l == null ? void 0 : l.topChildrenMenu }));
38
+ l.children = l.children.map((n) => A(w({}, n), { topMenu: l == null ? void 0 : l.topChildrenMenu }));
11
39
  else {
12
- const n = l.children.find((c) => c.topMenu !== void 0);
13
- n && (l.topChildrenMenu = n.topMenu, l.children = l.children.map((c) => ({ ...c, topMenu: n.topMenu })));
40
+ const n = l.children.find((r) => r.topMenu !== void 0);
41
+ n && (l.topChildrenMenu = n.topMenu, l.children = l.children.map((r) => A(w({}, r), { topMenu: n.topMenu })));
14
42
  }
15
43
  a(l.children);
16
44
  }
17
45
  });
18
46
  };
19
- return o.layout === P.mix && a(e), e;
20
- }), C = (e) => {
47
+ return o.layout === k.mix && a(e), e;
48
+ }), W = (e) => {
21
49
  var a;
22
- y.value = [e.name], !(e != null && e.children) || ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) === 0 ? (f.value = [], r == null || r.push({ path: e.path })) : f.value = e.children;
23
- }, E = (e) => {
24
- e != null && e.name ? r == null || r.push({ name: e.name }) : r == null || r.push({ path: e.path, params: {} }), T.value = [e.name];
25
- }, N = async (e, a) => {
26
- if (a != null && a.path && !(o != null && o.onMenuItemClick && !await o.onMenuItemClick(a))) {
50
+ if (T.value = [e.name], !(e != null && e.children) || ((a = e == null ? void 0 : e.children) == null ? void 0 : a.length) === 0)
51
+ p.value = [], i == null || i.push({ path: e.path });
52
+ else if (p.value = e.children, e != null && e.redirect)
53
+ if (typeof e.redirect == "string")
54
+ i == null || i.push({ path: e.redirect });
55
+ else if (typeof e.redirect == "function") {
56
+ const t = e.redirect(s);
57
+ i == null || i.push(t);
58
+ } else
59
+ i == null || i.push(e.redirect);
60
+ }, B = (e) => {
61
+ e != null && e.name ? i == null || i.push({ name: e.name }) : i == null || i.push({ path: e.path }), y.value = [e.name];
62
+ }, D = (e, a) => L(null, null, function* () {
63
+ if (a != null && a.path && !(o != null && o.onMenuItemClick && !(yield o.onMenuItemClick(a)))) {
27
64
  if (a.path.startsWith("http") || a.path.startsWith("https")) {
28
65
  window.open(a.path);
29
66
  return;
30
67
  }
31
- e === B.top ? C(a) : E(a);
68
+ e === R.top ? W(a) : B(a);
32
69
  }
33
- }, S = () => {
70
+ }), H = (e, a) => {
71
+ e === R.top ? b.value = a : g.value = a;
72
+ }, j = () => {
34
73
  const e = [], a = (t) => {
35
74
  var l;
36
75
  for (const n in t) {
37
- const c = t[n];
38
- if (c.name === ((l = i == null ? void 0 : i.value) == null ? void 0 : l.name) || c.children && c.children.length > 0 && a(c.children))
39
- return e.unshift(c), !0;
76
+ const r = t[n];
77
+ if (r.name === ((l = c == null ? void 0 : c.value) == null ? void 0 : l.name) || r.children && r.children.length > 0 && a(r.children))
78
+ return e.unshift(r), !0;
40
79
  }
41
80
  return !1;
42
81
  };
43
- a(JSON.parse(JSON.stringify(d.value))), v.value = e;
44
- }, x = () => {
82
+ a(JSON.parse(JSON.stringify(M.value))), u.value = e;
83
+ }, q = () => {
45
84
  var a, t, l;
46
- const e = (a = v.value) == null ? void 0 : a.map((n) => ({ path: n == null ? void 0 : n.path, label: n == null ? void 0 : n.title }));
47
- k.value = (t = i.value) != null && t.breadcrumbs ? (l = i.value) == null ? void 0 : l.breadcrumbs : e.length !== 0 ? e : [];
85
+ const e = (a = u.value) == null ? void 0 : a.map((n) => ({ path: n == null ? void 0 : n.path, label: n == null ? void 0 : n.title }));
86
+ N.value = (t = c.value) != null && t.breadcrumbs ? (l = c.value) == null ? void 0 : l.breadcrumbs : e.length !== 0 ? e : [];
48
87
  };
49
- function A() {
50
- if (!i.value || i.value.noAffix) {
51
- s.value.forEach((n) => {
88
+ function z() {
89
+ if (!c.value || c.value.noAffix) {
90
+ f.value.forEach((n) => {
52
91
  n.active = !1;
53
92
  });
54
93
  return;
55
94
  }
56
- const { name: e, title: a } = i.value;
95
+ const { name: e, title: a } = c.value;
57
96
  let t = -1;
58
- s.value.forEach((n, c) => {
59
- n.active = !1, n.name === e && (t = c);
97
+ f.value.forEach((n, r) => {
98
+ n.active = !1, n.name === e && (t = r);
60
99
  });
61
100
  const l = {
62
101
  name: e,
63
- parentNames: v.value.map((n) => n.name),
64
- title: a ?? e,
65
- fullPath: u.fullPath,
102
+ parentNames: u.value.map((n) => n.name),
103
+ title: a != null ? a : e,
104
+ fullPath: s.fullPath,
66
105
  active: !0
67
106
  };
68
107
  if (~t) {
69
- const n = s.value[t];
70
- n.fullPath === u.fullPath ? (n.active = !0, n.fullPath = u.fullPath) : (s.value.splice(t, 1), setTimeout(() => {
71
- s.value.push(l);
108
+ const n = f.value[t];
109
+ n.fullPath === s.fullPath ? (n.active = !0, n.fullPath = s.fullPath) : (f.value.splice(t, 1), setTimeout(() => {
110
+ f.value.push(l);
72
111
  }));
73
112
  } else
74
- s.value.push(l);
113
+ f.value.push(l);
75
114
  }
76
- const w = (e) => {
77
- const a = s.value.findIndex((l) => l.name === e), t = s.value[a];
78
- r.push(t.fullPath);
79
- }, K = (e) => {
115
+ const F = (e) => {
116
+ const a = f.value.findIndex((l) => l.name === e), t = f.value[a];
117
+ i.push(t.fullPath);
118
+ }, G = (e) => {
80
119
  let a = -1, t = -1;
81
- if (s.value.forEach((n, c) => {
82
- n.name === e && (t = c), n.active && (a = c);
120
+ if (f.value.forEach((n, r) => {
121
+ n.name === e && (t = r), n.active && (a = r);
83
122
  }), a === t) {
84
123
  let n;
85
- t === 0 ? n = s.value[t + 1] : n = s.value[t - 1], n.active = !0, r.push(n.fullPath);
124
+ t === 0 ? n = f.value[t + 1] : n = f.value[t - 1], n.active = !0, i.push(n.fullPath);
86
125
  }
87
- const l = s.value.splice(t, 1);
88
- O(l[0]);
89
- }, J = () => {
126
+ const l = f.value.splice(t, 1);
127
+ U(l[0]);
128
+ }, Q = () => {
90
129
  var a;
91
- if (o != null && o.disableKeepAlive || (a = u == null ? void 0 : u.meta) != null && a.ignoreCache)
130
+ if (o != null && o.disableKeepAlive || (a = s == null ? void 0 : s.meta) != null && a.ignoreCache)
92
131
  return;
93
- const e = new Set(p.value);
94
- v.value.forEach((t) => {
132
+ const e = new Set(K.value);
133
+ u.value.forEach((t) => {
95
134
  t.name && e.add(t.name);
96
- }), p.value = Array.from(e.values());
97
- }, O = (e) => {
98
- const a = new Set(p.value);
135
+ }), K.value = Array.from(e.values());
136
+ }, U = (e) => {
137
+ const a = new Set(K.value);
99
138
  e.parentNames.forEach((t) => {
100
139
  a.delete(t);
101
- }), s.value.forEach((t) => {
140
+ }), f.value.forEach((t) => {
102
141
  t.parentNames.forEach((l) => {
103
- const n = M.value[l];
104
- n != null && n.ignoreCache || a.add(n.name);
142
+ const n = d.value[l];
143
+ n && (n != null && n.ignoreCache || a.add(n.name));
105
144
  });
106
- }), p.value = Array.from(a.values());
145
+ }), K.value = Array.from(a.values());
107
146
  };
108
- return g(() => d.value, () => {
147
+ return E(() => M.value, () => {
109
148
  const e = {}, a = (t) => {
110
149
  t.forEach((l) => {
111
150
  l.children && l.children.length > 0 && a(l.children), delete l.children, e[l.name] = l;
112
151
  });
113
152
  };
114
- a(JSON.parse(JSON.stringify(d.value))), M.value = e;
115
- }, { immediate: !0 }), g(() => [o.layout, d.value], () => {
153
+ a(JSON.parse(JSON.stringify(M.value))), d.value = e;
154
+ }, { immediate: !0 }), E(() => [o.layout, M.value], () => {
116
155
  var e;
117
- if (b.value = [], f.value = [], o.layout === P.side)
118
- f.value = d.value;
119
- else if (o.layout === P.mix) {
120
- const a = (e = d.value) == null ? void 0 : e.filter((t) => t.topMenu);
121
- (a == null ? void 0 : a.length) === 0 ? f.value = d.value : b.value = a;
156
+ if (P.value = [], p.value = [], o.layout === k.side)
157
+ p.value = M.value;
158
+ else if (o.layout === k.mix) {
159
+ const a = (e = M.value) == null ? void 0 : e.filter((t) => t.topMenu);
160
+ (a == null ? void 0 : a.length) === 0 ? p.value = M.value : P.value = a;
122
161
  }
123
- }, { immediate: !0 }), g(() => u == null ? void 0 : u.name, () => {
162
+ }, { immediate: !0 }), E(() => s == null ? void 0 : s.name, () => {
124
163
  var t, l, n;
125
- const e = u == null ? void 0 : u.name;
126
- i.value = M.value[e], S();
127
- const a = v.value.filter((c) => c.topMenu);
128
- a.length > 0 && b.value.length > 0 && (f.value = ((t = a[a.length - 1]) == null ? void 0 : t.children) || []), y.value = i != null && i.value ? [...a.map((c) => c.name), ...((l = i.value) == null ? void 0 : l.activatedKeys) || []] : [], T.value = i != null && i.value ? [i.value.name, ...((n = i.value) == null ? void 0 : n.activatedKeys) || []] : [], x(), o.hideTabs || A(), J();
164
+ const e = s == null ? void 0 : s.name;
165
+ c.value = d.value[e], j();
166
+ const a = u.value.filter((r) => r.topMenu);
167
+ if (a.length > 0 && P.value.length > 0 && (p.value = ((t = a[a.length - 1]) == null ? void 0 : t.children) || []), T.value = c != null && c.value ? [...a.map((r) => r.name), ...((l = c.value) == null ? void 0 : l.activatedKeys) || []] : [], y.value = c != null && c.value ? [c.value.name, ...((n = c.value) == null ? void 0 : n.activatedKeys) || []] : [], c.value) {
168
+ const r = u.value.filter((h, C) => C < u.value.length - 1), S = r.filter((h) => h.topMenu).map((h) => h.name), O = r.filter((h) => !h.topMenu).map((h) => h.name);
169
+ c.value.activatedKeys && c.value.activatedKeys.length > 0 && c.value.activatedKeys.forEach((h) => {
170
+ const C = d.value[h];
171
+ C && (C.topMenu ? S.push(h) : O.push(h));
172
+ }), b.value = Array.from(/* @__PURE__ */ new Set([...b.value, ...S])), g.value = Array.from(/* @__PURE__ */ new Set([...g.value, ...O]));
173
+ }
174
+ q(), o.hideTabs || z(), Q();
129
175
  }, { immediate: !0 }), {
130
- topMenuItems: b,
131
- siderMenuItems: f,
132
- topMenuSelectedKeys: y,
133
- siderMenuSelectedKeys: T,
134
- activeMenuItem: i,
135
- menuItemMap: M,
136
- breadcrumbItems: k,
137
- tabs: s,
138
- keepAliveInclude: p,
139
- onProMenuItemClick: N,
140
- onTabClick: w,
141
- onTabDelete: K
176
+ topMenuItems: P,
177
+ siderMenuItems: p,
178
+ topMenuSelectedKeys: T,
179
+ siderMenuSelectedKeys: y,
180
+ topMenuOpenKeys: b,
181
+ siderMenuOpenKeys: g,
182
+ activeMenuItem: c,
183
+ menuItemMap: d,
184
+ breadcrumbItems: N,
185
+ tabs: f,
186
+ keepAliveInclude: K,
187
+ onProMenuItemClick: D,
188
+ onProMenuOpenKeysChange: H,
189
+ onTabClick: F,
190
+ onTabDelete: G
142
191
  };
143
- }
192
+ };
144
193
  export {
145
- z as useHooks
194
+ te as useHooks
146
195
  };
@@ -7,12 +7,12 @@ declare const ProLayout: {
7
7
  collapse: (_collapsed: boolean) => void;
8
8
  keepAliveIncludeChange: (_keepAliveInclude: string[]) => void;
9
9
  }, import('vue').PublicProps, {
10
+ layout: import('./enum').ProLayoutMode;
10
11
  title: string;
11
- menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
12
12
  tabsSize: "mini" | "small" | "medium" | "large";
13
13
  tabsType: "line" | "card" | "card-gutter" | "text" | "rounded" | "capsule";
14
14
  tabsHeaderPadding: boolean;
15
- layout: import('./enum').ProLayoutMode;
15
+ menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
16
16
  hideHeader: boolean;
17
17
  hiderSider: boolean;
18
18
  headerHeight: number;
@@ -36,12 +36,12 @@ declare const ProLayout: {
36
36
  onCollapse?: ((_collapsed: boolean) => any) | undefined;
37
37
  onKeepAliveIncludeChange?: ((_keepAliveInclude: string[]) => any) | undefined;
38
38
  }>, {}, {}, {}, {}, {
39
+ layout: import('./enum').ProLayoutMode;
39
40
  title: string;
40
- menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
41
41
  tabsSize: "mini" | "small" | "medium" | "large";
42
42
  tabsType: "line" | "card" | "card-gutter" | "text" | "rounded" | "capsule";
43
43
  tabsHeaderPadding: boolean;
44
- layout: import('./enum').ProLayoutMode;
44
+ menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
45
45
  hideHeader: boolean;
46
46
  hiderSider: boolean;
47
47
  headerHeight: number;
@@ -65,12 +65,12 @@ declare const ProLayout: {
65
65
  collapse: (_collapsed: boolean) => void;
66
66
  keepAliveIncludeChange: (_keepAliveInclude: string[]) => void;
67
67
  }, string, {
68
+ layout: import('./enum').ProLayoutMode;
68
69
  title: string;
69
- menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
70
70
  tabsSize: "mini" | "small" | "medium" | "large";
71
71
  tabsType: "line" | "card" | "card-gutter" | "text" | "rounded" | "capsule";
72
72
  tabsHeaderPadding: boolean;
73
- layout: import('./enum').ProLayoutMode;
73
+ menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
74
74
  hideHeader: boolean;
75
75
  hiderSider: boolean;
76
76
  headerHeight: number;
@@ -86,6 +86,8 @@ declare const ProLayout: {
86
86
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
87
87
  $slots: {
88
88
  'header-left'?(_: {}): any;
89
+ 'header-left-logo-img'?(_: {}): any;
90
+ 'header-left-logo-title'?(_: {}): any;
89
91
  'header-center-left'?(_: {}): any;
90
92
  'header-center-center'?(_: {}): any;
91
93
  'header-center-right'?(_: {}): any;
@@ -96,5 +98,6 @@ declare const ProLayout: {
96
98
  }) & {
97
99
  install: (app: App) => void;
98
100
  };
101
+ /** 导出组件 */
99
102
  export { ProLayout };
100
103
  export default ProLayout;
@@ -1,16 +1,11 @@
1
- import e from "./pro-layout.vue.js";
1
+ import o from "./pro-layout.vue.js";
2
2
  /* empty css */
3
- import { Layout as r, Space as u, Typography as t, Button as s, Affix as m } from "@arco-design/web-vue";
4
- import { ProKeepAliveRouterView as i } from "../pro-keep-alive-router-view/index.js";
5
- import { ProMenu as n } from "../pro-menu/index.js";
6
- import { ProReuseTabs as f } from "../pro-reuse-tabs/index.js";
7
- import { IconMenuFold as c, IconMenuUnfold as l } from "@arco-design/web-vue/es/icon";
8
- const x = Object.assign(e, {
9
- install: (o) => {
10
- o.use(r), o.use(u), o.use(t), o.use(s), o.use(m), o.use(n), o.use(f), o.use(i), o.use(c), o.use(l), o.component("KbProLayout", e);
3
+ const r = Object.assign(o, {
4
+ install: (t) => {
5
+ t.component("KbProLayout", o);
11
6
  }
12
7
  });
13
8
  export {
14
- x as ProLayout,
15
- x as default
9
+ r as ProLayout,
10
+ r as default
16
11
  };
@@ -4,6 +4,8 @@ declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
5
  slots: {
6
6
  'header-left'?(_: {}): any;
7
+ 'header-left-logo-img'?(_: {}): any;
8
+ 'header-left-logo-title'?(_: {}): any;
7
9
  'header-center-left'?(_: {}): any;
8
10
  'header-center-center'?(_: {}): any;
9
11
  'header-center-right'?(_: {}): any;
@@ -22,12 +24,12 @@ declare const __VLS_component: import('vue').DefineComponent<IProLayoutProps, {}
22
24
  onCollapse?: ((_collapsed: boolean) => any) | undefined;
23
25
  onKeepAliveIncludeChange?: ((_keepAliveInclude: string[]) => any) | undefined;
24
26
  }>, {
27
+ layout: ProLayoutMode;
25
28
  title: string;
26
- menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
27
29
  tabsSize: "mini" | "small" | "medium" | "large";
28
30
  tabsType: "line" | "card" | "card-gutter" | "text" | "rounded" | "capsule";
29
31
  tabsHeaderPadding: boolean;
30
- layout: ProLayoutMode;
32
+ menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
31
33
  hideHeader: boolean;
32
34
  hiderSider: boolean;
33
35
  headerHeight: number;