@keyblade/pro-components 0.0.11 → 1.0.1

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 (51) hide show
  1. package/es/components.d.ts +2 -1
  2. package/es/index.d.ts +2 -1
  3. package/es/index.js +16 -12
  4. package/es/pro-breadcrumb/index.d.ts +4 -16
  5. package/es/pro-breadcrumb/index.js +1 -0
  6. package/es/pro-breadcrumb/pro-breadcrumb.vue.d.ts +2 -6
  7. package/es/pro-breadcrumb/pro-breadcrumb.vue.js +14 -6
  8. package/es/pro-breadcrumb/pro-breadcrumb.vue2.js +2 -3
  9. package/es/pro-breadcrumb/pro-breadcrumb.vue3.js +5 -0
  10. package/es/pro-drawer-form/index.d.ts +4 -55
  11. package/es/pro-drawer-form/pro-drawer-form.vue.d.ts +2 -19
  12. package/es/pro-drawer-form/pro-drawer-form.vue2.js +1 -2
  13. package/es/pro-keep-alive-router-view/index.d.ts +124 -0
  14. package/es/pro-keep-alive-router-view/index.js +11 -0
  15. package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.d.ts +45 -0
  16. package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue.js +57 -0
  17. package/es/pro-keep-alive-router-view/pro-keep-alive-router-view.vue2.js +4 -0
  18. package/es/pro-layout/hooks.d.ts +3 -2
  19. package/es/pro-layout/hooks.js +38 -8
  20. package/es/pro-layout/index.d.ts +19 -106
  21. package/es/pro-layout/index.js +3 -6
  22. package/es/pro-layout/pro-layout.vue.d.ts +7 -36
  23. package/es/pro-layout/pro-layout.vue.js +34 -59
  24. package/es/pro-layout/pro-layout.vue3.js +1 -2
  25. package/es/pro-menu/index.d.ts +5 -75
  26. package/es/pro-menu/interface.d.ts +5 -9
  27. package/es/pro-menu/pro-menu-item.vue.d.ts +4 -8
  28. package/es/pro-menu/pro-menu-item.vue.js +28 -4
  29. package/es/pro-menu/pro-menu-item.vue2.js +2 -3
  30. package/es/pro-menu/pro-menu-item.vue3.js +5 -0
  31. package/es/pro-menu/pro-menu.vue.d.ts +2 -26
  32. package/es/pro-menu/pro-menu.vue.js +3 -8
  33. package/es/pro-menu/pro-menu.vue2.js +1 -2
  34. package/es/pro-modal-form/index.d.ts +4 -55
  35. package/es/pro-modal-form/pro-modal-form.vue.d.ts +2 -19
  36. package/es/pro-modal-form/pro-modal-form.vue2.js +1 -2
  37. package/es/{pro-page-wrapper → pro-page-container}/index.d.ts +14 -23
  38. package/es/pro-page-container/index.js +14 -0
  39. package/es/{pro-page-wrapper/pro-page-wrapper.vue.d.ts → pro-page-container/pro-page-container.vue.d.ts} +4 -7
  40. package/es/{pro-page-wrapper/pro-page-wrapper.vue.js → pro-page-container/pro-page-container.vue.js} +8 -8
  41. package/es/pro-page-container/pro-page-container.vue2.js +4 -0
  42. package/es/pro-page-container/pro-page-container.vue3.js +5 -0
  43. package/es/pro-reuse-tabs/index.d.ts +4 -25
  44. package/es/pro-reuse-tabs/pro-reuse-tabs.vue.d.ts +2 -9
  45. package/es/pro-reuse-tabs/pro-reuse-tabs.vue3.js +1 -2
  46. package/es/style.css +24 -15
  47. package/package.json +3 -3
  48. package/src/index.ts +7 -3
  49. package/es/pro-page-wrapper/index.js +0 -14
  50. package/es/pro-page-wrapper/pro-page-wrapper.vue2.js +0 -4
  51. package/es/pro-page-wrapper/pro-page-wrapper.vue3.js +0 -6
@@ -2,10 +2,11 @@ declare module 'vue' {
2
2
  interface GlobalComponents {
3
3
  KbProBreadcrumb: typeof import('./index')['ProBreadcrumb'];
4
4
  KbProDrawerForm: typeof import('./index')['ProDrawerForm'];
5
+ KbProKeepAliveRouterView: typeof import('./index')['ProKeepAliveRouterView'];
5
6
  KbProLayout: typeof import('./index')['ProLayout'];
6
7
  KbProMenu: typeof import('./index')['ProMenu'];
7
8
  KbProModalForm: typeof import('./index')['ProModalForm'];
8
- KbProPageWrapper: typeof import('./index')['ProPageWrapper'];
9
+ KbProPageContainer: typeof import('./index')['ProPageContainer'];
9
10
  KbProReuseTabs: typeof import('./index')['ProReuseTabs'];
10
11
  }
11
12
  }
package/es/index.d.ts CHANGED
@@ -5,11 +5,12 @@ declare const _default: {
5
5
  export default _default;
6
6
  export { default as ProBreadcrumb } from './pro-breadcrumb';
7
7
  export { default as ProDrawerForm } from './pro-drawer-form';
8
+ export { default as ProKeepAliveRouterView } from './pro-keep-alive-router-view';
8
9
  export { default as ProLayout } from './pro-layout';
9
10
  export { default as ProMenu } from './pro-menu';
10
11
  export type { IProMenuItem } from './pro-menu';
11
12
  export { default as ProModalForm } from './pro-modal-form';
12
- export { default as ProPageWrapper } from './pro-page-wrapper';
13
+ export { default as ProPageContainer } from './pro-page-container';
13
14
  export { default as ProReuseTabs } from './pro-reuse-tabs';
14
15
  export type { IProTab } from './pro-reuse-tabs';
15
16
  export type {} from './components';
package/es/index.js CHANGED
@@ -2,34 +2,38 @@ import { ProBreadcrumb } from "./pro-breadcrumb/index.js";
2
2
  import { default as default2 } from "./pro-breadcrumb/index.js";
3
3
  import { ProDrawerForm } from "./pro-drawer-form/index.js";
4
4
  import { default as default3 } from "./pro-drawer-form/index.js";
5
+ import { ProKeepAliveRouterView } from "./pro-keep-alive-router-view/index.js";
6
+ import { default as default4 } from "./pro-keep-alive-router-view/index.js";
5
7
  import { ProLayout } from "./pro-layout/index.js";
6
- import { default as default4 } from "./pro-layout/index.js";
8
+ import { default as default5 } from "./pro-layout/index.js";
7
9
  import { ProMenu } from "./pro-menu/index.js";
8
- import { default as default5 } from "./pro-menu/index.js";
10
+ import { default as default6 } from "./pro-menu/index.js";
9
11
  import { ProModalForm } from "./pro-modal-form/index.js";
10
- import { default as default6 } from "./pro-modal-form/index.js";
11
- import { ProPageWrapper } from "./pro-page-wrapper/index.js";
12
- import { default as default7 } from "./pro-page-wrapper/index.js";
12
+ import { default as default7 } from "./pro-modal-form/index.js";
13
+ import { ProPageContainer } from "./pro-page-container/index.js";
14
+ import { default as default8 } from "./pro-page-container/index.js";
13
15
  import { ProReuseTabs } from "./pro-reuse-tabs/index.js";
14
- import { default as default8 } from "./pro-reuse-tabs/index.js";
16
+ import { default as default9 } from "./pro-reuse-tabs/index.js";
15
17
  const index = {
16
18
  install(app) {
17
19
  app.use(ProBreadcrumb);
18
20
  app.use(ProDrawerForm);
21
+ app.use(ProKeepAliveRouterView);
19
22
  app.use(ProLayout);
20
23
  app.use(ProMenu);
21
24
  app.use(ProModalForm);
22
- app.use(ProPageWrapper);
25
+ app.use(ProPageContainer);
23
26
  app.use(ProReuseTabs);
24
27
  }
25
28
  };
26
29
  export {
27
30
  default2 as ProBreadcrumb,
28
31
  default3 as ProDrawerForm,
29
- default4 as ProLayout,
30
- default5 as ProMenu,
31
- default6 as ProModalForm,
32
- default7 as ProPageWrapper,
33
- default8 as ProReuseTabs,
32
+ default4 as ProKeepAliveRouterView,
33
+ default5 as ProLayout,
34
+ default6 as ProMenu,
35
+ default7 as ProModalForm,
36
+ default8 as ProPageContainer,
37
+ default9 as ProReuseTabs,
34
38
  index as default
35
39
  };
@@ -1,4 +1,4 @@
1
- import type { ComponentInternalInstance, ExtractPropTypes, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, Ref, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, App } from 'vue';
1
+ import type { ComponentInternalInstance, ExtractPropTypes, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, App } from 'vue';
2
2
  declare const ProBreadcrumb: {
3
3
  new (...args: any[]): {
4
4
  $: ComponentInternalInstance;
@@ -31,11 +31,7 @@ declare const ProBreadcrumb: {
31
31
  required: false;
32
32
  default: () => never[];
33
33
  };
34
- }>>, {
35
- prefixClsName: string;
36
- props: any;
37
- injectValue: Ref<string[]>;
38
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
34
+ }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
39
35
  items: string[];
40
36
  }, {}, string> & {
41
37
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
@@ -63,11 +59,7 @@ declare const ProBreadcrumb: {
63
59
  required: false;
64
60
  default: () => never[];
65
61
  };
66
- }>> & ShallowUnwrapRef<{
67
- prefixClsName: string;
68
- props: any;
69
- injectValue: Ref<string[]>;
70
- }> & {} & ComponentCustomProperties & {};
62
+ }>> & ShallowUnwrapRef<{}> & {} & ComponentCustomProperties & {};
71
63
  __isFragment?: undefined;
72
64
  __isTeleport?: undefined;
73
65
  __isSuspense?: undefined;
@@ -77,11 +69,7 @@ declare const ProBreadcrumb: {
77
69
  required: false;
78
70
  default: () => never[];
79
71
  };
80
- }>>, {
81
- prefixClsName: string;
82
- props: any;
83
- injectValue: Ref<string[]>;
84
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
72
+ }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
85
73
  items: string[];
86
74
  }, {}, string> & VNodeProps & AllowedComponentProps & ComponentCustomProps & {
87
75
  install: (app: App) => void;
@@ -1,4 +1,5 @@
1
1
  import _sfc_main from "./pro-breadcrumb.vue.js";
2
+ import "./pro-breadcrumb.vue2.js";
2
3
  import { Breadcrumb } from "@arco-design/web-vue";
3
4
  const ProBreadcrumb = Object.assign(_sfc_main, {
4
5
  install: (app) => {
@@ -1,15 +1,11 @@
1
- import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, type PropType, type Ref } from 'vue';
1
+ import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, type PropType } from 'vue';
2
2
  declare const _sfc_main: DefineComponent<{
3
3
  items: {
4
4
  type: PropType<string[]>;
5
5
  required: false;
6
6
  default: () => never[];
7
7
  };
8
- }, {
9
- prefixClsName: string;
10
- props: any;
11
- injectValue: Ref<string[]>;
12
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
8
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
13
9
  items: {
14
10
  type: PropType<string[]>;
15
11
  required: false;
@@ -1,4 +1,4 @@
1
- import { defineComponent, inject, resolveComponent, unref, openBlock, createBlock, normalizeClass, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
1
+ import { defineComponent, inject, computed, resolveComponent, unref, openBlock, createBlock, normalizeClass, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  const _sfc_main = /* @__PURE__ */ defineComponent({
3
3
  __name: "pro-breadcrumb",
4
4
  props: {
@@ -11,23 +11,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  setup(__props) {
12
12
  const props = __props;
13
13
  const prefixClsName = "keyblade-pro-breadcrumb";
14
- const injectValue = inject("ProBreadcrumbItems", []);
14
+ const proBreadcrumbItems = inject("ProBreadcrumbItems", []);
15
+ const breadcrumbItems = computed(() => {
16
+ if (props.items instanceof Array && props.items.length === 0 || !props.items) {
17
+ return proBreadcrumbItems.value;
18
+ }
19
+ return props.items || [];
20
+ });
15
21
  return (_ctx, _cache) => {
16
22
  const _component_icon_apps = resolveComponent("icon-apps");
17
23
  const _component_a_breadcrumb_item = resolveComponent("a-breadcrumb-item");
18
24
  const _component_a_breadcrumb = resolveComponent("a-breadcrumb");
19
- return (props.items.length > 0 ? props.items : unref(injectValue)).length > 0 ? (openBlock(), createBlock(_component_a_breadcrumb, {
25
+ return unref(breadcrumbItems) ? (openBlock(), createBlock(_component_a_breadcrumb, {
20
26
  key: 0,
21
27
  class: normalizeClass(prefixClsName)
22
28
  }, {
23
29
  default: withCtx(() => [
24
- createVNode(_component_a_breadcrumb_item, null, {
30
+ createVNode(_component_a_breadcrumb_item, {
31
+ class: normalizeClass(`${prefixClsName}-icon-item`)
32
+ }, {
25
33
  default: withCtx(() => [
26
34
  createVNode(_component_icon_apps)
27
35
  ]),
28
36
  _: 1
29
- }),
30
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.items.length > 0 ? props.items : unref(injectValue), (item, index) => {
37
+ }, 8, ["class"]),
38
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(breadcrumbItems), (item, index) => {
31
39
  return openBlock(), createBlock(_component_a_breadcrumb_item, {
32
40
  key: `${item}-${index}`
33
41
  }, {
@@ -1,5 +1,4 @@
1
- import _sfc_main from "./pro-breadcrumb.vue.js";
2
- import { default as default2 } from "./pro-breadcrumb.vue.js";
1
+ const proBreadcrumb_vue_vue_type_style_index_0_lang = "";
3
2
  export {
4
- default2 as default
3
+ proBreadcrumb_vue_vue_type_style_index_0_lang as default
5
4
  };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./pro-breadcrumb.vue.js";
2
+ import "./pro-breadcrumb.vue2.js";
3
+ export {
4
+ _sfc_main as default
5
+ };
@@ -1,6 +1,6 @@
1
1
  import type { FieldData } from '@arco-design/web-vue/es/form/interface';
2
2
  import type { FieldRule, ValidatedError } from '@arco-design/web-vue';
3
- import type { ComponentInternalInstance, ExtractPropTypes, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, Ref, App } from 'vue';
3
+ import type { ComponentInternalInstance, ExtractPropTypes, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, App } from 'vue';
4
4
  declare const ProDrawerForm: {
5
5
  new (...args: any[]): {
6
6
  $: ComponentInternalInstance;
@@ -443,24 +443,7 @@ declare const ProDrawerForm: {
443
443
  }>> & {
444
444
  onFinish?: ((...args: any[]) => any) | undefined;
445
445
  onFailed?: ((...args: any[]) => any) | undefined;
446
- }, {
447
- attrs: {
448
- onCancel: () => void;
449
- 'unmount-on-close': boolean | "";
450
- };
451
- slots: Readonly<{
452
- [name: string]: Slot | undefined;
453
- }>;
454
- props: any;
455
- emit: {
456
- (event: "finish", callback: (success: boolean) => void): void;
457
- (event: "failed", errors: Record<string, ValidatedError>): void;
458
- };
459
- okLoading: Ref<boolean>;
460
- onOk: () => void;
461
- onBeforeCancel: () => boolean;
462
- onCancel: () => void;
463
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("finish" | "failed")[], string, {}, {}, string> & {
446
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("finish" | "failed")[], string, {}, {}, string> & {
464
447
  beforeCreate?: ((() => void) | (() => void)[]) | undefined;
465
448
  created?: ((() => void) | (() => void)[]) | undefined;
466
449
  beforeMount?: ((() => void) | (() => void)[]) | undefined;
@@ -692,24 +675,7 @@ declare const ProDrawerForm: {
692
675
  }>> & {
693
676
  onFinish?: ((...args: any[]) => any) | undefined;
694
677
  onFailed?: ((...args: any[]) => any) | undefined;
695
- } & ShallowUnwrapRef<{
696
- attrs: {
697
- onCancel: () => void;
698
- 'unmount-on-close': boolean | "";
699
- };
700
- slots: Readonly<{
701
- [name: string]: Slot | undefined;
702
- }>;
703
- props: any;
704
- emit: {
705
- (event: "finish", callback: (success: boolean) => void): void;
706
- (event: "failed", errors: Record<string, ValidatedError>): void;
707
- };
708
- okLoading: Ref<boolean>;
709
- onOk: () => void;
710
- onBeforeCancel: () => boolean;
711
- onCancel: () => void;
712
- }> & {} & ComponentCustomProperties & {};
678
+ } & ShallowUnwrapRef<{}> & {} & ComponentCustomProperties & {};
713
679
  __isFragment?: undefined;
714
680
  __isTeleport?: undefined;
715
681
  __isSuspense?: undefined;
@@ -925,24 +891,7 @@ declare const ProDrawerForm: {
925
891
  }>> & {
926
892
  onFinish?: ((...args: any[]) => any) | undefined;
927
893
  onFailed?: ((...args: any[]) => any) | undefined;
928
- }, {
929
- attrs: {
930
- onCancel: () => void;
931
- 'unmount-on-close': boolean | "";
932
- };
933
- slots: Readonly<{
934
- [name: string]: Slot | undefined;
935
- }>;
936
- props: any;
937
- emit: {
938
- (event: "finish", callback: (success: boolean) => void): void;
939
- (event: "failed", errors: Record<string, ValidatedError>): void;
940
- };
941
- okLoading: Ref<boolean>;
942
- onOk: () => void;
943
- onBeforeCancel: () => boolean;
944
- onCancel: () => void;
945
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("finish" | "failed")[], "finish" | "failed", {}, {}, string> & VNodeProps & AllowedComponentProps & ComponentCustomProps & {
894
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("finish" | "failed")[], "finish" | "failed", {}, {}, string> & VNodeProps & AllowedComponentProps & ComponentCustomProps & {
946
895
  install: (app: App) => void;
947
896
  };
948
897
  export { ProDrawerForm };
@@ -1,5 +1,5 @@
1
1
  import type { FieldData } from '@arco-design/web-vue/es/form/interface';
2
- import type { DefineComponent, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, Ref, ExtractPropTypes, type PropType } from 'vue';
2
+ import type { DefineComponent, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComputedRef, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, ExtractPropTypes, type PropType } from 'vue';
3
3
  import type { FieldRule, ValidatedError } from '@arco-design/web-vue';
4
4
  declare const _sfc_main: DefineComponent<{
5
5
  form: {
@@ -210,24 +210,7 @@ declare const _sfc_main: DefineComponent<{
210
210
  } & ComponentCustomProperties & {}>;
211
211
  required: false;
212
212
  };
213
- }, {
214
- attrs: {
215
- onCancel: () => void;
216
- 'unmount-on-close': '' | boolean;
217
- };
218
- slots: Readonly<{
219
- [name: string]: Slot | undefined;
220
- }>;
221
- props: any;
222
- emit: {
223
- (event: 'finish', callback: (success: boolean) => void): void;
224
- (event: 'failed', errors: Record<string, ValidatedError>): void;
225
- };
226
- okLoading: Ref<boolean>;
227
- onOk: () => void;
228
- onBeforeCancel: () => boolean;
229
- onCancel: () => void;
230
- }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("finish" | "failed")[], "finish" | "failed", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
213
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("finish" | "failed")[], "finish" | "failed", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
231
214
  form: {
232
215
  type: PropType<{
233
216
  $: ComponentInternalInstance;
@@ -1,5 +1,4 @@
1
1
  import _sfc_main from "./pro-drawer-form.vue.js";
2
- import { default as default2 } from "./pro-drawer-form.vue.js";
3
2
  export {
4
- default2 as default
3
+ _sfc_main as default
5
4
  };
@@ -0,0 +1,124 @@
1
+ import type { ComponentInternalInstance, ExtractPropTypes, PropType, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, App } from 'vue';
2
+ declare const ProKeepAliveRouterView: {
3
+ new (...args: any[]): {
4
+ $: ComponentInternalInstance;
5
+ $data: {};
6
+ $props: Partial<{
7
+ keepAliveInclude: string[];
8
+ keepAliveExclude: string[];
9
+ keepAliveMax: number;
10
+ }> & Omit<Readonly<ExtractPropTypes<{
11
+ keepAliveInclude: {
12
+ type: PropType<string[]>;
13
+ required: false;
14
+ default: () => never[];
15
+ };
16
+ keepAliveExclude: {
17
+ type: PropType<string[]>;
18
+ required: false;
19
+ default: () => never[];
20
+ };
21
+ keepAliveMax: {
22
+ type: PropType<number>;
23
+ required: false;
24
+ default: number;
25
+ };
26
+ }>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, "keepAliveInclude" | "keepAliveExclude" | "keepAliveMax">;
27
+ $attrs: {
28
+ [x: string]: unknown;
29
+ };
30
+ $refs: {
31
+ [x: string]: unknown;
32
+ };
33
+ $slots: Readonly<{
34
+ [name: string]: Slot | undefined;
35
+ }>;
36
+ $root: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
37
+ $parent: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
38
+ $emit: (event: string, ...args: any[]) => void;
39
+ $el: any;
40
+ $options: ComponentOptionsBase<Readonly<ExtractPropTypes<{
41
+ keepAliveInclude: {
42
+ type: PropType<string[]>;
43
+ required: false;
44
+ default: () => never[];
45
+ };
46
+ keepAliveExclude: {
47
+ type: PropType<string[]>;
48
+ required: false;
49
+ default: () => never[];
50
+ };
51
+ keepAliveMax: {
52
+ type: PropType<number>;
53
+ required: false;
54
+ default: number;
55
+ };
56
+ }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
57
+ keepAliveInclude: string[];
58
+ keepAliveExclude: string[];
59
+ keepAliveMax: number;
60
+ }, {}, string> & {
61
+ beforeCreate?: ((() => void) | (() => void)[]) | undefined;
62
+ created?: ((() => void) | (() => void)[]) | undefined;
63
+ beforeMount?: ((() => void) | (() => void)[]) | undefined;
64
+ mounted?: ((() => void) | (() => void)[]) | undefined;
65
+ beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
66
+ updated?: ((() => void) | (() => void)[]) | undefined;
67
+ activated?: ((() => void) | (() => void)[]) | undefined;
68
+ deactivated?: ((() => void) | (() => void)[]) | undefined;
69
+ beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
70
+ beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
71
+ destroyed?: ((() => void) | (() => void)[]) | undefined;
72
+ unmounted?: ((() => void) | (() => void)[]) | undefined;
73
+ renderTracked?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
74
+ renderTriggered?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
75
+ errorCaptured?: (((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
76
+ };
77
+ $forceUpdate: () => void;
78
+ $nextTick: typeof nextTick;
79
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
80
+ } & Readonly<ExtractPropTypes<{
81
+ keepAliveInclude: {
82
+ type: PropType<string[]>;
83
+ required: false;
84
+ default: () => never[];
85
+ };
86
+ keepAliveExclude: {
87
+ type: PropType<string[]>;
88
+ required: false;
89
+ default: () => never[];
90
+ };
91
+ keepAliveMax: {
92
+ type: PropType<number>;
93
+ required: false;
94
+ default: number;
95
+ };
96
+ }>> & ShallowUnwrapRef<{}> & {} & ComponentCustomProperties & {};
97
+ __isFragment?: undefined;
98
+ __isTeleport?: undefined;
99
+ __isSuspense?: undefined;
100
+ } & ComponentOptionsBase<Readonly<ExtractPropTypes<{
101
+ keepAliveInclude: {
102
+ type: PropType<string[]>;
103
+ required: false;
104
+ default: () => never[];
105
+ };
106
+ keepAliveExclude: {
107
+ type: PropType<string[]>;
108
+ required: false;
109
+ default: () => never[];
110
+ };
111
+ keepAliveMax: {
112
+ type: PropType<number>;
113
+ required: false;
114
+ default: number;
115
+ };
116
+ }>>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
117
+ keepAliveInclude: string[];
118
+ keepAliveExclude: string[];
119
+ keepAliveMax: number;
120
+ }, {}, string> & VNodeProps & AllowedComponentProps & ComponentCustomProps & {
121
+ install: (app: App) => void;
122
+ };
123
+ export { ProKeepAliveRouterView };
124
+ export default ProKeepAliveRouterView;
@@ -0,0 +1,11 @@
1
+ import _sfc_main from "./pro-keep-alive-router-view.vue.js";
2
+ const ProKeepAliveRouterView = Object.assign(_sfc_main, {
3
+ install: (app) => {
4
+ app.component("KbProKeepAliveRouterView", _sfc_main);
5
+ }
6
+ });
7
+ const ProKeepAliveRouterView$1 = ProKeepAliveRouterView;
8
+ export {
9
+ ProKeepAliveRouterView,
10
+ ProKeepAliveRouterView$1 as default
11
+ };
@@ -0,0 +1,45 @@
1
+ import type { DefineComponent, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, type PropType } from 'vue';
2
+ declare const _sfc_main: DefineComponent<{
3
+ /** 包含 */
4
+ keepAliveInclude: {
5
+ type: PropType<string[]>;
6
+ required: false;
7
+ default: () => never[];
8
+ };
9
+ /** 排除(ProLayout里一般不会用) */
10
+ keepAliveExclude: {
11
+ type: PropType<string[]>;
12
+ required: false;
13
+ default: () => never[];
14
+ };
15
+ /** 最大数(ProLayout里一般不会用) */
16
+ keepAliveMax: {
17
+ type: PropType<number>;
18
+ required: false;
19
+ default: number;
20
+ };
21
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes<{
22
+ /** 包含 */
23
+ keepAliveInclude: {
24
+ type: PropType<string[]>;
25
+ required: false;
26
+ default: () => never[];
27
+ };
28
+ /** 排除(ProLayout里一般不会用) */
29
+ keepAliveExclude: {
30
+ type: PropType<string[]>;
31
+ required: false;
32
+ default: () => never[];
33
+ };
34
+ /** 最大数(ProLayout里一般不会用) */
35
+ keepAliveMax: {
36
+ type: PropType<number>;
37
+ required: false;
38
+ default: number;
39
+ };
40
+ }>>, {
41
+ keepAliveInclude: string[];
42
+ keepAliveExclude: string[];
43
+ keepAliveMax: number;
44
+ }>;
45
+ export default _sfc_main;
@@ -0,0 +1,57 @@
1
+ import { defineComponent, inject, computed, resolveComponent, openBlock, createBlock, withCtx, KeepAlive, unref, resolveDynamicComponent } from "vue";
2
+ const _sfc_main = /* @__PURE__ */ defineComponent({
3
+ __name: "pro-keep-alive-router-view",
4
+ props: {
5
+ /** 包含 */
6
+ keepAliveInclude: {
7
+ type: Array,
8
+ required: false,
9
+ default: () => []
10
+ },
11
+ /** 排除(ProLayout里一般不会用) */
12
+ keepAliveExclude: {
13
+ type: Array,
14
+ required: false,
15
+ default: () => []
16
+ },
17
+ /** 最大数(ProLayout里一般不会用) */
18
+ keepAliveMax: {
19
+ type: Number,
20
+ required: false,
21
+ default: 9999
22
+ }
23
+ },
24
+ setup(__props) {
25
+ const props = __props;
26
+ const proKeepAliveInclude = inject("ProKeepAliveInclude", []);
27
+ const include = computed(() => {
28
+ if (props.keepAliveInclude instanceof Array && props.keepAliveInclude.length === 0 || !props.keepAliveInclude) {
29
+ return proKeepAliveInclude.value;
30
+ }
31
+ return props.keepAliveInclude || [];
32
+ });
33
+ const exclude = computed(() => {
34
+ return props.keepAliveExclude || [];
35
+ });
36
+ return (_ctx, _cache) => {
37
+ const _component_router_view = resolveComponent("router-view");
38
+ return openBlock(), createBlock(_component_router_view, null, {
39
+ default: withCtx(({ Component, route }) => [
40
+ (openBlock(), createBlock(KeepAlive, {
41
+ include: unref(include),
42
+ exclude: unref(exclude),
43
+ max: __props.keepAliveMax
44
+ }, [
45
+ (openBlock(), createBlock(resolveDynamicComponent(Component), {
46
+ key: route.fullPath
47
+ }))
48
+ ], 1032, ["include", "exclude", "max"]))
49
+ ]),
50
+ _: 1
51
+ });
52
+ };
53
+ }
54
+ });
55
+ export {
56
+ _sfc_main as default
57
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./pro-keep-alive-router-view.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
@@ -1,10 +1,9 @@
1
1
  import { type Ref } from 'vue';
2
2
  import type { IProMenuItem } from '../pro-menu';
3
3
  export declare function useHooks(menuItems: Ref<IProMenuItem[]>, options: {
4
- tabsMode: boolean;
4
+ showTabs: boolean;
5
5
  }): {
6
6
  menuSelectedKeys: Ref<string[]>;
7
- onMenuItemClick: (key: string) => void;
8
7
  activeMenuItem: Ref<IProMenuItem | undefined>;
9
8
  menuItemMap: Ref<Record<string, IProMenuItem>>;
10
9
  breadcrumbItems: Ref<string[]>;
@@ -15,6 +14,8 @@ export declare function useHooks(menuItems: Ref<IProMenuItem[]>, options: {
15
14
  fullPath: string;
16
15
  active: boolean;
17
16
  }[]>;
17
+ keepAliveInclude: Ref<string[]>;
18
+ onMenuItemClick: (key: string) => void;
18
19
  onTabClick: (key: string) => void;
19
20
  onTabDelete: (key: string) => void;
20
21
  };