@keyblade/pro-components 1.13.8-alpha.2 → 1.13.8-alpha.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.
@@ -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
+ 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(() => {
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,
@@ -1,151 +1,57 @@
1
1
  import { App } from 'vue';
2
2
  declare const ProPageContainer: {
3
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
4
- hidePageHeader: {
5
- type: import('vue').PropType<boolean>;
6
- required: false;
7
- default: boolean;
8
- };
9
- pageHeader: {
10
- type: import('vue').PropType<{
11
- title?: string;
12
- subTitle?: string;
13
- titlePosition?: "top" | "bottom";
14
- hideTitle?: boolean;
15
- breadcrumbRouterMode?: boolean;
16
- breadcrumbPrefixIcon?: boolean | string;
17
- breadcrumbItems?: {
18
- label: string;
19
- path?: string;
20
- }[];
21
- }>;
22
- required: false;
23
- default: () => {
24
- title: string;
25
- subTitle: string;
26
- titlePosition: string;
27
- hideTitle: boolean;
28
- breadcrumbRouterMode: boolean;
29
- breadcrumbPrefixIcon: string;
30
- breadcrumbItems: never[];
31
- };
32
- };
33
- }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
4
+ hidePageHeader?: boolean;
5
+ showFooterBar?: boolean;
6
+ footerBarOptions?: import('..').ProFooterBarProps;
7
+ pageHeader?: import('./inerface').PageHeaderProps;
8
+ }> & Readonly<{
9
+ onBack?: (() => any) | undefined;
10
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
+ back: () => any;
12
+ }, import('vue').PublicProps, {
34
13
  hidePageHeader: boolean;
35
- pageHeader: {
36
- title?: string;
37
- subTitle?: string;
38
- titlePosition?: "top" | "bottom";
39
- hideTitle?: boolean;
40
- breadcrumbRouterMode?: boolean;
41
- breadcrumbPrefixIcon?: boolean | string;
42
- breadcrumbItems?: {
43
- label: string;
44
- path?: string;
45
- }[];
46
- };
47
- }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
14
+ showFooterBar: boolean;
15
+ pageHeader: import('./inerface').PageHeaderProps;
16
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
48
17
  P: {};
49
18
  B: {};
50
19
  D: {};
51
20
  C: {};
52
21
  M: {};
53
22
  Defaults: {};
54
- }, Readonly<import('vue').ExtractPropTypes<{
55
- hidePageHeader: {
56
- type: import('vue').PropType<boolean>;
57
- required: false;
58
- default: boolean;
59
- };
60
- pageHeader: {
61
- type: import('vue').PropType<{
62
- title?: string;
63
- subTitle?: string;
64
- titlePosition?: "top" | "bottom";
65
- hideTitle?: boolean;
66
- breadcrumbRouterMode?: boolean;
67
- breadcrumbPrefixIcon?: boolean | string;
68
- breadcrumbItems?: {
69
- label: string;
70
- path?: string;
71
- }[];
72
- }>;
73
- required: false;
74
- default: () => {
75
- title: string;
76
- subTitle: string;
77
- titlePosition: string;
78
- hideTitle: boolean;
79
- breadcrumbRouterMode: boolean;
80
- breadcrumbPrefixIcon: string;
81
- breadcrumbItems: never[];
82
- };
83
- };
84
- }>> & Readonly<{}>, {}, {}, {}, {}, {
23
+ }, Readonly<{
24
+ hidePageHeader?: boolean;
25
+ showFooterBar?: boolean;
26
+ footerBarOptions?: import('..').ProFooterBarProps;
27
+ pageHeader?: import('./inerface').PageHeaderProps;
28
+ }> & Readonly<{
29
+ onBack?: (() => any) | undefined;
30
+ }>, {}, {}, {}, {}, {
85
31
  hidePageHeader: boolean;
86
- pageHeader: {
87
- title?: string;
88
- subTitle?: string;
89
- titlePosition?: "top" | "bottom";
90
- hideTitle?: boolean;
91
- breadcrumbRouterMode?: boolean;
92
- breadcrumbPrefixIcon?: boolean | string;
93
- breadcrumbItems?: {
94
- label: string;
95
- path?: string;
96
- }[];
97
- };
32
+ showFooterBar: boolean;
33
+ pageHeader: import('./inerface').PageHeaderProps;
98
34
  }>;
99
35
  __isFragment?: never;
100
36
  __isTeleport?: never;
101
37
  __isSuspense?: never;
102
- } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
103
- hidePageHeader: {
104
- type: import('vue').PropType<boolean>;
105
- required: false;
106
- default: boolean;
107
- };
108
- pageHeader: {
109
- type: import('vue').PropType<{
110
- title?: string;
111
- subTitle?: string;
112
- titlePosition?: "top" | "bottom";
113
- hideTitle?: boolean;
114
- breadcrumbRouterMode?: boolean;
115
- breadcrumbPrefixIcon?: boolean | string;
116
- breadcrumbItems?: {
117
- label: string;
118
- path?: string;
119
- }[];
120
- }>;
121
- required: false;
122
- default: () => {
123
- title: string;
124
- subTitle: string;
125
- titlePosition: string;
126
- hideTitle: boolean;
127
- breadcrumbRouterMode: boolean;
128
- breadcrumbPrefixIcon: string;
129
- breadcrumbItems: never[];
130
- };
131
- };
132
- }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
38
+ } & import('vue').ComponentOptionsBase<Readonly<{
39
+ hidePageHeader?: boolean;
40
+ showFooterBar?: boolean;
41
+ footerBarOptions?: import('..').ProFooterBarProps;
42
+ pageHeader?: import('./inerface').PageHeaderProps;
43
+ }> & Readonly<{
44
+ onBack?: (() => any) | undefined;
45
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
46
+ back: () => any;
47
+ }, string, {
133
48
  hidePageHeader: boolean;
134
- pageHeader: {
135
- title?: string;
136
- subTitle?: string;
137
- titlePosition?: "top" | "bottom";
138
- hideTitle?: boolean;
139
- breadcrumbRouterMode?: boolean;
140
- breadcrumbPrefixIcon?: boolean | string;
141
- breadcrumbItems?: {
142
- label: string;
143
- path?: string;
144
- }[];
145
- };
49
+ showFooterBar: boolean;
50
+ pageHeader: import('./inerface').PageHeaderProps;
146
51
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
147
52
  $slots: {
148
53
  default?(_: {}): any;
54
+ footerBar?(_: {}): any;
149
55
  };
150
56
  }) & {
151
57
  install: (app: App) => void;
@@ -1,12 +1,13 @@
1
- import e from "./pro-page-container.vue.js";
1
+ import r from "./pro-page-container.vue.js";
2
2
  /* empty css */
3
- import { ProPageHeader as r } from "../pro-page-header/index.js";
4
- const i = Object.assign(e, {
3
+ import { ProPageHeader as e } from "../pro-page-header/index.js";
4
+ import { ProFooterBar as t } from "../pro-footer-bar/index.js";
5
+ const s = Object.assign(r, {
5
6
  install: (o) => {
6
- o.use(r), o.component("KbProPageContainer", e);
7
+ o.use(e), o.use(t), o.component("KbProPageContainer", r);
7
8
  }
8
9
  });
9
10
  export {
10
- i as ProPageContainer,
11
- i as default
11
+ s as ProPageContainer,
12
+ s as default
12
13
  };
@@ -0,0 +1,12 @@
1
+ export interface PageHeaderProps {
2
+ title?: string;
3
+ subTitle?: string;
4
+ titlePosition?: 'top' | 'bottom';
5
+ hideTitle?: boolean;
6
+ breadcrumbRouterMode?: boolean;
7
+ breadcrumbPrefixIcon?: boolean | string;
8
+ breadcrumbItems?: {
9
+ label: string;
10
+ path?: string;
11
+ }[];
12
+ }
@@ -1,92 +1,34 @@
1
- import { PropType } from 'vue';
1
+ import { ProFooterBarProps } from '../pro-footer-bar/inerface';
2
+ import { PageHeaderProps } from './inerface';
3
+ type __VLS_Props = {
4
+ /** 是否隐藏页头 */
5
+ hidePageHeader?: boolean;
6
+ /** 是否显示底部栏 */
7
+ showFooterBar?: boolean;
8
+ /** 底部栏属性 */
9
+ footerBarOptions?: ProFooterBarProps;
10
+ /** 页头属性 */
11
+ pageHeader?: PageHeaderProps;
12
+ };
2
13
  declare function __VLS_template(): {
3
14
  attrs: Partial<{}>;
4
15
  slots: {
5
16
  default?(_: {}): any;
17
+ footerBar?(_: {}): any;
6
18
  };
7
19
  refs: {};
8
20
  rootEl: HTMLDivElement;
9
21
  };
10
22
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
12
- /** 是否隐藏页头 */
13
- hidePageHeader: {
14
- type: PropType<boolean>;
15
- required: false;
16
- default: boolean;
17
- };
18
- /** 页头属性 */
19
- pageHeader: {
20
- type: PropType<{
21
- title?: string;
22
- subTitle?: string;
23
- titlePosition?: "top" | "bottom";
24
- hideTitle?: boolean;
25
- breadcrumbRouterMode?: boolean;
26
- breadcrumbPrefixIcon?: boolean | string;
27
- breadcrumbItems?: {
28
- label: string;
29
- path?: string;
30
- }[];
31
- }>;
32
- required: false;
33
- default: () => {
34
- title: string;
35
- subTitle: string;
36
- titlePosition: string;
37
- hideTitle: boolean;
38
- breadcrumbRouterMode: boolean;
39
- breadcrumbPrefixIcon: string;
40
- breadcrumbItems: never[];
41
- };
42
- };
43
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
44
- /** 是否隐藏页头 */
45
- hidePageHeader: {
46
- type: PropType<boolean>;
47
- required: false;
48
- default: boolean;
49
- };
50
- /** 页头属性 */
51
- pageHeader: {
52
- type: PropType<{
53
- title?: string;
54
- subTitle?: string;
55
- titlePosition?: "top" | "bottom";
56
- hideTitle?: boolean;
57
- breadcrumbRouterMode?: boolean;
58
- breadcrumbPrefixIcon?: boolean | string;
59
- breadcrumbItems?: {
60
- label: string;
61
- path?: string;
62
- }[];
63
- }>;
64
- required: false;
65
- default: () => {
66
- title: string;
67
- subTitle: string;
68
- titlePosition: string;
69
- hideTitle: boolean;
70
- breadcrumbRouterMode: boolean;
71
- breadcrumbPrefixIcon: string;
72
- breadcrumbItems: never[];
73
- };
74
- };
75
- }>> & Readonly<{}>, {
23
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
24
+ back: () => any;
25
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
26
+ onBack?: (() => any) | undefined;
27
+ }>, {
76
28
  hidePageHeader: boolean;
77
- pageHeader: {
78
- title?: string;
79
- subTitle?: string;
80
- titlePosition?: "top" | "bottom";
81
- hideTitle?: boolean;
82
- breadcrumbRouterMode?: boolean;
83
- breadcrumbPrefixIcon?: boolean | string;
84
- breadcrumbItems?: {
85
- label: string;
86
- path?: string;
87
- }[];
88
- };
89
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
29
+ showFooterBar: boolean;
30
+ pageHeader: PageHeaderProps;
31
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
90
32
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
91
33
  export default _default;
92
34
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,54 +1,56 @@
1
- import { defineComponent as l, resolveComponent as c, createElementBlock as n, openBlock as a, normalizeClass as r, createBlock as b, createCommentVNode as u, createElementVNode as m, renderSlot as s } from "vue";
2
- const o = "keyblade-pro-page-container", g = /* @__PURE__ */ l({
1
+ import { defineComponent as k, computed as h, resolveComponent as i, createElementBlock as B, openBlock as o, normalizeClass as s, createBlock as n, createCommentVNode as d, createElementVNode as P, renderSlot as l, mergeProps as H, withCtx as I } from "vue";
2
+ const r = "keyblade-pro-page-container", v = /* @__PURE__ */ k({
3
3
  __name: "pro-page-container",
4
4
  props: {
5
- /** 是否隐藏页头 */
6
- hidePageHeader: {
7
- type: Boolean,
8
- required: !1,
9
- default: !1
10
- },
11
- /** 页头属性 */
12
- pageHeader: {
13
- type: Object,
14
- required: !1,
15
- default: () => ({
16
- title: "",
17
- subTitle: "",
18
- titlePosition: "top",
19
- hideTitle: !1,
20
- breadcrumbRouterMode: !1,
21
- breadcrumbPrefixIcon: "icon-apps",
22
- breadcrumbItems: []
23
- })
24
- }
5
+ hidePageHeader: { type: Boolean, default: !1 },
6
+ showFooterBar: { type: Boolean, default: !1 },
7
+ footerBarOptions: {},
8
+ pageHeader: { default: () => ({
9
+ title: "",
10
+ subTitle: "",
11
+ titlePosition: "top",
12
+ hideTitle: !1,
13
+ breadcrumbRouterMode: !1,
14
+ breadcrumbPrefixIcon: "icon-apps",
15
+ breadcrumbItems: []
16
+ }) }
25
17
  },
26
- setup(e) {
27
- return (d, f) => {
28
- var t;
29
- const i = c("kb-pro-page-header");
30
- return a(), n("div", {
31
- class: r(o)
18
+ emits: ["back"],
19
+ setup(p, { emit: b }) {
20
+ const u = b, m = p, c = h(() => m.showFooterBar ? [r, `${r}-with-footer-bar`] : [r]);
21
+ return (e, t) => {
22
+ var a;
23
+ const f = i("kb-pro-page-header"), g = i("kb-pro-footer-bar");
24
+ return o(), B("div", {
25
+ class: s(c.value)
32
26
  }, [
33
- e.hidePageHeader ? u("", !0) : (a(), b(i, {
27
+ e.hidePageHeader ? d("", !0) : (o(), n(f, {
34
28
  key: 0,
35
29
  title: e.pageHeader.title,
36
30
  subTitle: e.pageHeader.subTitle,
37
31
  titlePosition: e.pageHeader.titlePosition,
38
32
  hideTitle: e.pageHeader.hideTitle,
39
- breadcrumbRouterMode: (t = e.pageHeader) == null ? void 0 : t.breadcrumbRouterMode,
33
+ breadcrumbRouterMode: (a = e.pageHeader) == null ? void 0 : a.breadcrumbRouterMode,
40
34
  breadcrumbPrefixIcon: e.pageHeader.breadcrumbPrefixIcon,
41
35
  breadcrumbItems: e.pageHeader.breadcrumbItems
42
36
  }, null, 8, ["title", "subTitle", "titlePosition", "hideTitle", "breadcrumbRouterMode", "breadcrumbPrefixIcon", "breadcrumbItems"])),
43
- m("div", {
44
- class: r(`${o}-content`)
37
+ P("div", {
38
+ class: s(`${r}-content`)
45
39
  }, [
46
- s(d.$slots, "default")
47
- ], 2)
48
- ]);
40
+ l(e.$slots, "default")
41
+ ], 2),
42
+ e.showFooterBar ? (o(), n(g, H({ key: 1 }, e.footerBarOptions, {
43
+ onBack: t[0] || (t[0] = (T) => u("back"))
44
+ }), {
45
+ default: I(() => [
46
+ l(e.$slots, "footerBar")
47
+ ]),
48
+ _: 3
49
+ }, 16)) : d("", !0)
50
+ ], 2);
49
51
  };
50
52
  }
51
53
  });
52
54
  export {
53
- g as default
55
+ v as default
54
56
  };
@@ -81,7 +81,7 @@ declare const ProTable: {
81
81
  stickyHeader: number | boolean;
82
82
  showEmptyTree: boolean;
83
83
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
84
- $slots: any;
84
+ $slots: Partial<Record<NonNullable<string | number>, (_: any) => any>>;
85
85
  }) & {
86
86
  install: (app: App) => void;
87
87
  };