@keyblade/pro-components 1.13.8-alpha.2 → 1.13.8-alpha.20

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 (86) hide show
  1. package/es/components.d.ts +5 -0
  2. package/es/global-props.d.ts +13 -0
  3. package/es/global-props.js +4 -0
  4. package/es/index.d.ts +7 -1
  5. package/es/index.js +31 -22
  6. package/es/inerface.d.ts +2 -0
  7. package/es/pro-calendar/calendar.vue.d.ts +75 -0
  8. package/es/pro-calendar/calendar.vue.js +158 -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 +27 -0
  13. package/es/pro-calendar/header.vue.js +135 -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 +41 -0
  17. package/es/pro-calendar/index.d.ts +118 -0
  18. package/es/pro-calendar/index.js +11 -0
  19. package/es/pro-calendar/inerface.d.ts +87 -0
  20. package/es/pro-calendar/month.d.ts +5 -0
  21. package/es/pro-calendar/month.js +43 -0
  22. package/es/pro-calendar/month.vue.d.ts +22 -0
  23. package/es/pro-calendar/month.vue.js +127 -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 +112 -0
  30. package/es/pro-calendar/year.vue2.js +4 -0
  31. package/es/pro-date-range-picker/index.d.ts +8 -8
  32. package/es/pro-date-range-picker/{type.d.ts → inerface.d.ts} +5 -1
  33. package/es/pro-date-range-picker/pro-date-range-picker.vue.d.ts +1 -1
  34. package/es/pro-date-range-picker/pro-date-range-picker.vue.js +3 -3
  35. package/es/pro-date-range-picker/pro-date-range-picker.vue2.js +70 -56
  36. package/es/pro-footer-bar/index.d.ts +38 -0
  37. package/es/pro-footer-bar/index.js +11 -0
  38. package/es/pro-footer-bar/index.vue.d.ts +24 -0
  39. package/es/pro-footer-bar/index.vue.js +7 -0
  40. package/es/pro-footer-bar/index.vue2.js +44 -0
  41. package/es/pro-footer-bar/inerface.d.ts +7 -0
  42. package/es/pro-form-group/index.d.ts +43 -0
  43. package/es/pro-form-group/index.js +12 -0
  44. package/es/pro-form-group/index.vue.d.ts +28 -0
  45. package/es/pro-form-group/index.vue.js +7 -0
  46. package/es/pro-form-group/index.vue2.js +43 -0
  47. package/es/pro-image-upload/image-upload.vue.d.ts +1 -1
  48. package/es/pro-image-upload/index.d.ts +3 -3
  49. package/es/pro-layout/hooks.d.ts +1 -1
  50. package/es/pro-layout/hooks.js +84 -84
  51. package/es/pro-layout/pro-layout.vue.js +35 -37
  52. package/es/pro-menu/index.d.ts +11 -80
  53. package/es/pro-menu/interface.d.ts +19 -0
  54. package/es/pro-menu/menu-item.vue.d.ts +25 -0
  55. package/es/pro-menu/menu-item.vue.js +35 -0
  56. package/es/pro-menu/menu-item.vue2.js +4 -0
  57. package/es/pro-menu/pro-menu-item.vue.d.ts +7 -0
  58. package/es/pro-menu/pro-menu-item.vue.js +63 -0
  59. package/es/pro-menu/pro-menu-item.vue2.js +4 -0
  60. package/es/pro-menu/pro-menu.vue.d.ts +7 -55
  61. package/es/pro-menu/pro-menu.vue.js +28 -114
  62. package/es/pro-menu/sub-menu.vue.d.ts +22 -0
  63. package/es/pro-menu/sub-menu.vue.js +54 -0
  64. package/es/pro-menu/sub-menu.vue2.js +4 -0
  65. package/es/pro-menu/util.d.ts +9 -0
  66. package/es/pro-menu/util.js +7 -0
  67. package/es/pro-page-container/index.d.ts +36 -130
  68. package/es/pro-page-container/index.js +7 -6
  69. package/es/pro-page-container/inerface.d.ts +12 -0
  70. package/es/pro-page-container/pro-page-container.vue.d.ts +21 -79
  71. package/es/pro-page-container/pro-page-container.vue.js +38 -36
  72. package/es/pro-table/index.d.ts +7 -5
  73. package/es/pro-table/index.js +5 -4
  74. package/es/pro-table/index.vue.d.ts +10 -3
  75. package/es/pro-table/index.vue.js +30 -20
  76. package/es/pro-table/index.vue3.js +5 -0
  77. package/es/pro-table/interface.d.ts +1 -0
  78. package/es/pro-textarea/index.d.ts +25 -0
  79. package/es/pro-textarea/index.js +11 -0
  80. package/es/pro-textarea/index.vue.d.ts +4 -0
  81. package/es/pro-textarea/index.vue.js +7 -0
  82. package/es/pro-textarea/index.vue2.js +40 -0
  83. package/es/pro-textarea/inerface.d.ts +43 -0
  84. package/es/style.css +1 -1
  85. package/package.json +1 -1
  86. package/es/pro-table/index.vue2.js +0 -4
@@ -1,131 +1,131 @@
1
- import { ref as r, computed as L, watch as g } from "vue";
1
+ import { ref as h, computed as L, watch as g } from "vue";
2
2
  import { useRoute as R, useRouter as W } from "vue-router";
3
3
  import { ProLayoutMode as P, ProLayoutMenuType as B } from "./enum.js";
4
- function z(u) {
5
- const o = R(), h = W(), y = r([]), T = r([]), i = r(), v = r([]), M = r({}), k = r([]), s = r([]), p = r([]), b = r([]), f = r([]), d = L(() => {
6
- const a = [...u.menuItems], e = (n) => {
7
- n.forEach((l) => {
4
+ const 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(() => {
6
+ const e = [...o.menuItems], a = (t) => {
7
+ t.forEach((l) => {
8
8
  if (l != null && l.children && l.children.length > 0) {
9
9
  if ((l == null ? void 0 : l.topChildrenMenu) !== void 0)
10
- l.children = l.children.map((t) => ({ ...t, topMenu: l == null ? void 0 : l.topChildrenMenu }));
10
+ l.children = l.children.map((n) => ({ ...n, topMenu: l == null ? void 0 : l.topChildrenMenu }));
11
11
  else {
12
- const t = l.children.find((c) => c.topMenu !== void 0);
13
- t && (l.topChildrenMenu = t.topMenu, l.children = l.children.map((c) => ({ ...c, topMenu: t.topMenu })));
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 })));
14
14
  }
15
- e(l.children);
15
+ a(l.children);
16
16
  }
17
17
  });
18
18
  };
19
- return u.layout === P.mix && e(a), a;
20
- }), C = (a) => {
21
- var e;
22
- y.value = [a.name], !(a != null && a.children) || ((e = a == null ? void 0 : a.children) == null ? void 0 : e.length) === 0 ? (f.value = [], h == null || h.push({ path: a.path })) : f.value = a.children;
23
- }, E = (a) => {
24
- h == null || h.push({ path: a.path }), T.value = [a.name];
25
- }, N = async (a, e) => {
26
- if (e != null && e.path && !(u != null && u.onMenuItemClick && !await u.onMenuItemClick(e))) {
27
- if (e.path.startsWith("http") || e.path.startsWith("https")) {
28
- window.open(e.path);
19
+ return o.layout === P.mix && a(e), e;
20
+ }), C = (e) => {
21
+ 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))) {
27
+ if (a.path.startsWith("http") || a.path.startsWith("https")) {
28
+ window.open(a.path);
29
29
  return;
30
30
  }
31
- a === B.top ? C(e) : E(e);
31
+ e === B.top ? C(a) : E(a);
32
32
  }
33
33
  }, S = () => {
34
- const a = [], e = (n) => {
34
+ const e = [], a = (t) => {
35
35
  var l;
36
- for (const t in n) {
37
- const c = n[t];
38
- if (c.name === ((l = i == null ? void 0 : i.value) == null ? void 0 : l.name) || c.children && c.children.length > 0 && e(c.children))
39
- return a.unshift(c), !0;
36
+ 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;
40
40
  }
41
41
  return !1;
42
42
  };
43
- e(JSON.parse(JSON.stringify(d.value))), v.value = a;
43
+ a(JSON.parse(JSON.stringify(d.value))), v.value = e;
44
44
  }, x = () => {
45
- var e, n, l;
46
- const a = (e = v.value) == null ? void 0 : e.map((t) => ({ path: t == null ? void 0 : t.path, label: t == null ? void 0 : t.title }));
47
- k.value = (n = i.value) != null && n.breadcrumbs ? (l = i.value) == null ? void 0 : l.breadcrumbs : a.length !== 0 ? a : [];
45
+ 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 : [];
48
48
  };
49
49
  function A() {
50
50
  if (!i.value || i.value.noAffix) {
51
- s.value.forEach((t) => {
52
- t.active = !1;
51
+ s.value.forEach((n) => {
52
+ n.active = !1;
53
53
  });
54
54
  return;
55
55
  }
56
- const { name: a, title: e } = i.value;
57
- let n = -1;
58
- s.value.forEach((t, c) => {
59
- t.active = !1, t.name === a && (n = c);
56
+ const { name: e, title: a } = i.value;
57
+ let t = -1;
58
+ s.value.forEach((n, c) => {
59
+ n.active = !1, n.name === e && (t = c);
60
60
  });
61
61
  const l = {
62
- name: a,
63
- parentNames: v.value.map((t) => t.name),
64
- title: e ?? a,
65
- fullPath: o.fullPath,
62
+ name: e,
63
+ parentNames: v.value.map((n) => n.name),
64
+ title: a ?? e,
65
+ fullPath: u.fullPath,
66
66
  active: !0
67
67
  };
68
- if (~n) {
69
- const t = s.value[n];
70
- t.fullPath === o.fullPath ? (t.active = !0, t.fullPath = o.fullPath) : (s.value.splice(n, 1), setTimeout(() => {
68
+ 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
71
  s.value.push(l);
72
72
  }));
73
73
  } else
74
74
  s.value.push(l);
75
75
  }
76
- const w = (a) => {
77
- const e = s.value.findIndex((l) => l.name === a), n = s.value[e];
78
- h.push(n.fullPath);
79
- }, K = (a) => {
80
- let e = -1, n = -1;
81
- if (s.value.forEach((t, c) => {
82
- t.name === a && (n = c), t.active && (e = c);
83
- }), e === n) {
84
- let t;
85
- n === 0 ? t = s.value[n + 1] : t = s.value[n - 1], t.active = !0, h.push(t.fullPath);
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) => {
80
+ let a = -1, t = -1;
81
+ if (s.value.forEach((n, c) => {
82
+ n.name === e && (t = c), n.active && (a = c);
83
+ }), a === t) {
84
+ let n;
85
+ t === 0 ? n = s.value[t + 1] : n = s.value[t - 1], n.active = !0, r.push(n.fullPath);
86
86
  }
87
- const l = s.value.splice(n, 1);
87
+ const l = s.value.splice(t, 1);
88
88
  O(l[0]);
89
89
  }, J = () => {
90
- var e;
91
- if (u != null && u.disableKeepAlive || (e = o == null ? void 0 : o.meta) != null && e.ignoreCache)
90
+ var a;
91
+ if (o != null && o.disableKeepAlive || (a = u == null ? void 0 : u.meta) != null && a.ignoreCache)
92
92
  return;
93
- const a = new Set(p.value);
94
- v.value.forEach((n) => {
95
- n.name && a.add(n.name);
96
- }), p.value = Array.from(a.values());
97
- }, O = (a) => {
98
93
  const e = new Set(p.value);
99
- a.parentNames.forEach((n) => {
100
- e.delete(n);
101
- }), s.value.forEach((n) => {
102
- n.parentNames.forEach((l) => {
103
- const t = M.value[l];
104
- t != null && t.ignoreCache || e.add(t.name);
105
- });
94
+ v.value.forEach((t) => {
95
+ t.name && e.add(t.name);
106
96
  }), p.value = Array.from(e.values());
97
+ }, O = (e) => {
98
+ const a = new Set(p.value);
99
+ e.parentNames.forEach((t) => {
100
+ a.delete(t);
101
+ }), s.value.forEach((t) => {
102
+ t.parentNames.forEach((l) => {
103
+ const n = M.value[l];
104
+ n != null && n.ignoreCache || a.add(n.name);
105
+ });
106
+ }), p.value = Array.from(a.values());
107
107
  };
108
108
  return g(() => d.value, () => {
109
- const a = {}, e = (n) => {
110
- n.forEach((l) => {
111
- l.children && l.children.length > 0 && e(l.children), delete l.children, a[l.name] = l;
109
+ const e = {}, a = (t) => {
110
+ t.forEach((l) => {
111
+ l.children && l.children.length > 0 && a(l.children), delete l.children, e[l.name] = l;
112
112
  });
113
113
  };
114
- e(JSON.parse(JSON.stringify(d.value))), M.value = a;
115
- }, { immediate: !0 }), g(() => [u.layout, d.value], () => {
116
- var a;
117
- if (b.value = [], f.value = [], u.layout === P.side)
114
+ a(JSON.parse(JSON.stringify(d.value))), M.value = e;
115
+ }, { immediate: !0 }), g(() => [o.layout, d.value], () => {
116
+ var e;
117
+ if (b.value = [], f.value = [], o.layout === P.side)
118
118
  f.value = d.value;
119
- else if (u.layout === P.mix) {
120
- const e = (a = d.value) == null ? void 0 : a.filter((n) => n.topMenu);
121
- (e == null ? void 0 : e.length) === 0 ? f.value = d.value : b.value = e;
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;
122
122
  }
123
- }, { immediate: !0 }), g(() => o == null ? void 0 : o.name, () => {
124
- var n, l, t;
125
- const a = o == null ? void 0 : o.name;
126
- i.value = M.value[a], S();
127
- const e = v.value.filter((c) => c.topMenu);
128
- e.length > 0 && b.value.length > 0 && (f.value = ((n = e[e.length - 1]) == null ? void 0 : n.children) || []), y.value = i != null && i.value ? [...e.map((c) => c.name), ...((l = i.value) == null ? void 0 : l.activatedKeys) || []] : [], T.value = i != null && i.value ? [i.value.name, ...((t = i.value) == null ? void 0 : t.activatedKeys) || []] : [], x(), u.hideTabs || A(), J();
123
+ }, { immediate: !0 }), g(() => u == null ? void 0 : u.name, () => {
124
+ 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();
129
129
  }, { immediate: !0 }), {
130
130
  topMenuItems: b,
131
131
  siderMenuItems: f,
@@ -140,7 +140,7 @@ function z(u) {
140
140
  onTabClick: w,
141
141
  onTabDelete: K
142
142
  };
143
- }
143
+ };
144
144
  export {
145
145
  z as useHooks
146
146
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as le, useCssVars as ae, ref as N, useSlots as se, computed as de, provide as C, onMounted as ne, watch as V, resolveComponent as s, createBlock as i, openBlock as l, normalizeClass as a, withCtx as d, createCommentVNode as n, createVNode as p, createElementVNode as h, renderSlot as c, createElementBlock as m, unref as o, Fragment as k, createTextVNode as T, toDisplayString as P } from "vue";
1
+ import { defineComponent as le, useCssVars as ae, ref as N, useSlots as se, computed as de, provide as C, onMounted as ne, watch as V, resolveComponent as s, createBlock as i, openBlock as l, normalizeClass as a, withCtx as d, createCommentVNode as n, createVNode as p, createElementVNode as y, renderSlot as c, createElementBlock as h, unref as o, Fragment as b, createTextVNode as T, toDisplayString as P } from "vue";
2
2
  import { useHooks as re } from "./hooks.js";
3
3
  import { ProLayoutMode as ie, ProLayoutMenuType as F } from "./enum.js";
4
4
  const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @__PURE__ */ le({
@@ -26,18 +26,18 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
26
26
  },
27
27
  emits: {
28
28
  /** 收缩事件 */
29
- collapse: (g) => !0,
29
+ collapse: (_) => !0,
30
30
  /** keepAlive改变事件 */
31
- keepAliveIncludeChange: (g) => !0
31
+ keepAliveIncludeChange: (_) => !0
32
32
  },
33
- setup(g, { emit: E }) {
33
+ setup(_, { emit: E }) {
34
34
  ae((e) => ({
35
- "4a477a1a": z.value,
36
- "3599ef93": G,
37
- "5b478c92": J
35
+ 69231088: z.value,
36
+ "608a2431": G,
37
+ "2ea5a9b4": J
38
38
  }));
39
- const u = g, B = E, f = se(), I = de(() => u.hiderSider || b.value.length > 0 && H.value.length === 0), {
40
- topMenuItems: b,
39
+ const u = _, B = E, m = se(), I = de(() => u.hiderSider || g.value.length > 0 && H.value.length === 0), {
40
+ topMenuItems: g,
41
41
  siderMenuItems: H,
42
42
  topMenuSelectedKeys: L,
43
43
  siderMenuSelectedKeys: R,
@@ -58,7 +58,7 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
58
58
  r.value = u.siderCollapsed;
59
59
  }, { immediate: !0 }), V(v, () => {
60
60
  B("keepAliveIncludeChange", v.value);
61
- }, { immediate: !0 }), (e, y) => {
61
+ }, { immediate: !0 }), (e, f) => {
62
62
  const A = s("a-typography-title"), K = s("a-space"), D = s("kb-pro-menu"), O = s("a-layout-header"), Q = s("icon-menu-unfold"), U = s("icon-menu-fold"), X = s("a-button"), Y = s("a-layout-sider"), Z = s("kb-pro-reuse-tabs"), x = s("a-affix"), ee = s("kb-pro-keep-alive-router-view"), te = s("a-layout-content"), oe = s("a-layout-footer"), $ = s("a-layout");
63
63
  return l(), i($, {
64
64
  class: a([t, `${t}-${e.layout}`])
@@ -69,17 +69,17 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
69
69
  class: a([`${t}-header`, { [`${t}-header-collapsed`]: r.value }])
70
70
  }, {
71
71
  default: d(() => [
72
- h("div", {
72
+ y("div", {
73
73
  class: a(`${t}-header-left`)
74
74
  }, [
75
- o(f)["header-left"] ? c(e.$slots, "header-left", { key: 0 }) : (l(), m(k, { key: 1 }, [
76
- e.layout !== "side" ? (l(), m("div", {
75
+ o(m)["header-left"] ? c(e.$slots, "header-left", { key: 0 }) : (l(), h(b, { key: 1 }, [
76
+ e.layout !== "side" ? (l(), h("div", {
77
77
  key: 0,
78
78
  class: a(`${t}-header-left-logo`)
79
79
  }, [
80
80
  p(K, null, {
81
81
  default: d(() => [
82
- h("img", {
82
+ y("img", {
83
83
  class: a(`${t}-header-left-logo-img`),
84
84
  alt: "logo",
85
85
  src: e.logo
@@ -100,25 +100,23 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
100
100
  ], 2)) : n("", !0)
101
101
  ], 64))
102
102
  ], 2),
103
- h("div", {
103
+ y("div", {
104
104
  class: a(`${t}-header-center`)
105
105
  }, [
106
- o(f)["header-center-left"] ? c(e.$slots, "header-center-left", { key: 0 }) : n("", !0),
107
- o(b).length > 0 ? (l(), m(k, { key: 1 }, [
108
- o(b).length > 0 ? (l(), i(D, {
109
- key: 0,
110
- mode: "horizontal",
111
- "selected-keys": o(L),
112
- items: o(b),
113
- "menu-props": e.menuProps,
114
- onMenuItemClick: y[0] || (y[0] = (_) => o(S)(o(F).top, _))
115
- }, null, 8, ["selected-keys", "items", "menu-props"])) : n("", !0)
116
- ], 64)) : (l(), m(k, { key: 2 }, [
117
- o(f)["header-center-center"] ? c(e.$slots, "header-center-center", { key: 0 }) : n("", !0)
106
+ o(m)["header-center-left"] ? c(e.$slots, "header-center-left", { key: 0 }) : n("", !0),
107
+ o(g).length > 0 ? (l(), i(D, {
108
+ key: 1,
109
+ mode: "horizontal",
110
+ "selected-keys": o(L),
111
+ items: o(g),
112
+ "menu-props": e.menuProps,
113
+ onMenuItemClick: f[0] || (f[0] = (k) => o(S)(o(F).top, k))
114
+ }, null, 8, ["selected-keys", "items", "menu-props"])) : (l(), h(b, { key: 2 }, [
115
+ o(m)["header-center-center"] ? c(e.$slots, "header-center-center", { key: 0 }) : n("", !0)
118
116
  ], 64)),
119
- o(f)["header-center-right"] ? c(e.$slots, "header-center-right", { key: 3 }) : n("", !0)
117
+ o(m)["header-center-right"] ? c(e.$slots, "header-center-right", { key: 3 }) : n("", !0)
120
118
  ], 2),
121
- h("div", {
119
+ y("div", {
122
120
  class: a(`${t}-header-right`)
123
121
  }, [
124
122
  c(e.$slots, "header-right")
@@ -139,17 +137,17 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
139
137
  onCollapse: W
140
138
  }, {
141
139
  default: d(() => [
142
- h("div", {
140
+ y("div", {
143
141
  class: a(`${t}-sider-content`)
144
142
  }, [
145
- o(f)["sider-top"] ? c(e.$slots, "sider-top", { key: 0 }) : (l(), m(k, { key: 1 }, [
146
- e.layout === "side" ? (l(), m("div", {
143
+ o(m)["sider-top"] ? c(e.$slots, "sider-top", { key: 0 }) : (l(), h(b, { key: 1 }, [
144
+ e.layout === "side" ? (l(), h("div", {
147
145
  key: 0,
148
146
  class: a(`${t}-sider-content-logo`)
149
147
  }, [
150
148
  p(K, null, {
151
149
  default: d(() => [
152
- h("img", {
150
+ y("img", {
153
151
  class: a(`${t}-sider-content-logo-img`),
154
152
  alt: "logo",
155
153
  src: e.logo
@@ -175,13 +173,13 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
175
173
  "selected-keys": o(R),
176
174
  items: o(H),
177
175
  "menu-props": e.menuProps,
178
- onMenuItemClick: y[1] || (y[1] = (_) => o(S)(o(F).side, _))
176
+ onMenuItemClick: f[1] || (f[1] = (k) => o(S)(o(F).side, k))
179
177
  }, null, 8, ["collapsed", "selected-keys", "items", "menu-props"])
180
178
  ], 2),
181
179
  p(X, {
182
180
  class: a(`${t}-sider-collapse-btn`),
183
181
  size: "mini",
184
- onClick: y[2] || (y[2] = (_) => W(!r.value))
182
+ onClick: f[2] || (f[2] = (k) => W(!r.value))
185
183
  }, {
186
184
  icon: d(() => [
187
185
  r.value ? (l(), i(Q, { key: 0 })) : (l(), i(U, { key: 1 }))
@@ -223,8 +221,8 @@ const ue = ["src"], pe = ["src"], t = "keyblade-pro-layout", ce = 48, he = /* @_
223
221
  ]),
224
222
  _: 1
225
223
  }),
226
- e.hideFooter ? n("", !0) : (l(), m(k, { key: 1 }, [
227
- o(f).footer !== void 0 ? c(e.$slots, "footer", { key: 0 }) : (l(), i(oe, {
224
+ e.hideFooter ? n("", !0) : (l(), h(b, { key: 1 }, [
225
+ o(m).footer !== void 0 ? c(e.$slots, "footer", { key: 0 }) : (l(), i(oe, {
228
226
  key: 1,
229
227
  class: a(`${t}-body-footer`)
230
228
  }, {
@@ -1,67 +1,21 @@
1
1
  import { App } from 'vue';
2
2
  declare const ProMenu: {
3
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
4
- mode: {
5
- type: import('vue').PropType<"horizontal" | "vertical">;
6
- required: false;
7
- default: string;
8
- };
9
- collapsed: {
10
- type: import('vue').PropType<boolean>;
11
- required: false;
12
- };
13
- selectedKeys: {
14
- type: import('vue').PropType<string[]>;
15
- required: true;
16
- };
17
- items: {
18
- type: import('vue').PropType<import('./interface').IProMenuItem[]>;
19
- required: true;
20
- };
21
- menuProps: {
22
- type: import('vue').PropType<Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>>;
23
- required: false;
24
- default: () => {};
25
- };
26
- }>> & Readonly<{
27
- "onMenu-item-click"?: ((_item: import('./interface').IProMenuItem) => any) | undefined;
28
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
- "menu-item-click": (_item: import('./interface').IProMenuItem) => void;
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./interface').IProMenuProps> & Readonly<{
4
+ "onMenu-item-click"?: ((item: import('./interface').IProMenuItem) => any) | undefined;
5
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
6
+ "menu-item-click": (item: import('./interface').IProMenuItem) => any;
30
7
  }, import('vue').PublicProps, {
31
8
  mode: "horizontal" | "vertical";
32
9
  menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
33
- }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
10
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
34
11
  P: {};
35
12
  B: {};
36
13
  D: {};
37
14
  C: {};
38
15
  M: {};
39
16
  Defaults: {};
40
- }, Readonly<import('vue').ExtractPropTypes<{
41
- mode: {
42
- type: import('vue').PropType<"horizontal" | "vertical">;
43
- required: false;
44
- default: string;
45
- };
46
- collapsed: {
47
- type: import('vue').PropType<boolean>;
48
- required: false;
49
- };
50
- selectedKeys: {
51
- type: import('vue').PropType<string[]>;
52
- required: true;
53
- };
54
- items: {
55
- type: import('vue').PropType<import('./interface').IProMenuItem[]>;
56
- required: true;
57
- };
58
- menuProps: {
59
- type: import('vue').PropType<Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>>;
60
- required: false;
61
- default: () => {};
62
- };
63
- }>> & Readonly<{
64
- "onMenu-item-click"?: ((_item: import('./interface').IProMenuItem) => any) | undefined;
17
+ }, Readonly<import('./interface').IProMenuProps> & Readonly<{
18
+ "onMenu-item-click"?: ((item: import('./interface').IProMenuItem) => any) | undefined;
65
19
  }>, {}, {}, {}, {}, {
66
20
  mode: "horizontal" | "vertical";
67
21
  menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
@@ -69,33 +23,10 @@ declare const ProMenu: {
69
23
  __isFragment?: never;
70
24
  __isTeleport?: never;
71
25
  __isSuspense?: never;
72
- } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
73
- mode: {
74
- type: import('vue').PropType<"horizontal" | "vertical">;
75
- required: false;
76
- default: string;
77
- };
78
- collapsed: {
79
- type: import('vue').PropType<boolean>;
80
- required: false;
81
- };
82
- selectedKeys: {
83
- type: import('vue').PropType<string[]>;
84
- required: true;
85
- };
86
- items: {
87
- type: import('vue').PropType<import('./interface').IProMenuItem[]>;
88
- required: true;
89
- };
90
- menuProps: {
91
- type: import('vue').PropType<Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>>;
92
- required: false;
93
- default: () => {};
94
- };
95
- }>> & Readonly<{
96
- "onMenu-item-click"?: ((_item: import('./interface').IProMenuItem) => any) | undefined;
97
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
98
- "menu-item-click": (_item: import('./interface').IProMenuItem) => void;
26
+ } & import('vue').ComponentOptionsBase<Readonly<import('./interface').IProMenuProps> & Readonly<{
27
+ "onMenu-item-click"?: ((item: import('./interface').IProMenuItem) => any) | undefined;
28
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
29
+ "menu-item-click": (item: import('./interface').IProMenuItem) => any;
99
30
  }, string, {
100
31
  mode: "horizontal" | "vertical";
101
32
  menuProps: Partial<import('@arco-design/web-vue/es/menu/interface').MenuProps>;
@@ -1,3 +1,4 @@
1
+ import { MenuProps } from '@arco-design/web-vue/es/menu/interface';
1
2
  export interface IProMenuItem {
2
3
  /** 英文名称(唯一标识,不能重复) */
3
4
  name: string;
@@ -48,3 +49,21 @@ export interface IProMenuItem {
48
49
  /** 子菜单 */
49
50
  children?: IProMenuItem[];
50
51
  }
52
+ /**
53
+ * 组件emits
54
+ */
55
+ export interface IProMenuEmits {
56
+ (e: 'menu-item-click', item: IProMenuItem): void;
57
+ }
58
+ export interface IProMenuProps {
59
+ items: IProMenuItem[];
60
+ selectedKeys: string[];
61
+ mode?: 'horizontal' | 'vertical';
62
+ collapsed?: boolean;
63
+ menuProps?: Partial<MenuProps>;
64
+ }
65
+ export type IProMenuItemProps = {
66
+ item: IProMenuItem;
67
+ selectedKeys: string[];
68
+ mode?: 'horizontal' | 'vertical';
69
+ } & Pick<IProMenuProps, 'selectedKeys' | 'mode'>;
@@ -0,0 +1,25 @@
1
+ import { IProMenuItem } from './interface.ts';
2
+ type __VLS_Props = {
3
+ item: IProMenuItem;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ icon?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: any;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
15
+ "menu-item-click": (item: IProMenuItem) => any;
16
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
17
+ "onMenu-item-click"?: ((item: IProMenuItem) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
20
+ export default _default;
21
+ type __VLS_WithTemplateSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,35 @@
1
+ import { defineComponent as s, resolveComponent as l, createBlock as a, openBlock as c, createSlots as p, withCtx as o, createTextVNode as u, toDisplayString as k, renderSlot as d } from "vue";
2
+ const v = /* @__PURE__ */ s({
3
+ __name: "menu-item",
4
+ props: {
5
+ item: {}
6
+ },
7
+ emits: ["menu-item-click"],
8
+ setup(f, { emit: i }) {
9
+ const m = i;
10
+ return (e, t) => {
11
+ var n;
12
+ const r = l("a-menu-item");
13
+ return c(), a(r, {
14
+ key: e.item.name,
15
+ onClick: t[0] || (t[0] = (_) => m("menu-item-click", e.item))
16
+ }, p({
17
+ default: o(() => [
18
+ u(" " + k(e.item.title), 1)
19
+ ]),
20
+ _: 2
21
+ }, [
22
+ (n = e.item) != null && n.icon ? {
23
+ name: "icon",
24
+ fn: o(() => [
25
+ d(e.$slots, "icon")
26
+ ]),
27
+ key: "0"
28
+ } : void 0
29
+ ]), 1024);
30
+ };
31
+ }
32
+ });
33
+ export {
34
+ v as default
35
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./menu-item.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import { IProMenuItem, IProMenuItemProps } from './interface.ts';
2
+ declare const _default: import('vue').DefineComponent<IProMenuItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ "menu-item-click": (item: IProMenuItem) => any;
4
+ }, string, import('vue').PublicProps, Readonly<IProMenuItemProps> & Readonly<{
5
+ "onMenu-item-click"?: ((item: IProMenuItem) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ export default _default;