@chewel611/naive-ui-plus 0.0.20 → 0.0.21

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 (100) hide show
  1. package/dist/index.js +232 -232
  2. package/dist/index.umd.cjs +1 -1
  3. package/dist/style.css +1 -1
  4. package/es/application/index.d.ts +1 -2
  5. package/es/application/index.js +4 -4
  6. package/es/components.d.ts +9 -9
  7. package/es/components.js +21 -21
  8. package/es/iframe/index.d.ts +1 -2
  9. package/es/iframe/index.js +4 -4
  10. package/es/index.d.ts +5 -1
  11. package/es/index.js +33 -33
  12. package/es/languages/PLanguage.vue.js +1 -1
  13. package/es/languages/index.d.ts +3 -4
  14. package/es/languages/index.js +4 -5
  15. package/es/languages/store.d.ts +1 -1
  16. package/es/languages/store.js +1 -1
  17. package/es/layout/PLayout.css +1 -1
  18. package/es/layout/PLayout.vue.js +1 -1
  19. package/es/layout/PLayout.vue2.js +4 -4
  20. package/es/layout/content/PTabs.css +1 -1
  21. package/es/layout/content/PTabs.vue.js +1 -1
  22. package/es/layout/content/PTabs.vue2.js +3 -3
  23. package/es/layout/header/PHeader.css +1 -1
  24. package/es/layout/header/PHeader.vue.js +2 -2
  25. package/es/layout/header/PHeader.vue2.js +1 -1
  26. package/es/layout/index.d.ts +2 -1
  27. package/es/layout/sider/PLogo.css +1 -1
  28. package/es/layout/sider/PLogo.vue.js +2 -2
  29. package/es/layout/sider/PLogo.vue2.js +1 -1
  30. package/es/layout/sider/PMenus.vue.js +5 -5
  31. package/es/layout/{layout.d.ts → store.d.ts} +2 -26
  32. package/es/layout/{layout.js → store.js} +1 -1
  33. package/es/layout/typing.d.ts +25 -0
  34. package/es/modal/PModal.d.ts +3 -3
  35. package/es/modal/index.d.ts +5 -5
  36. package/es/modal/index.js +4 -4
  37. package/es/modal/typing.d.ts +2 -2
  38. package/es/oidc/POidc.css +1 -1
  39. package/es/oidc/POidc.vue.js +1 -1
  40. package/es/oidc/POidc.vue2.js +1 -1
  41. package/es/oidc/index.d.ts +3 -3
  42. package/es/oidc/index.js +3 -3
  43. package/es/oidc/store.d.ts +1 -5
  44. package/es/oidc/store.js +1 -1
  45. package/es/oidc/typing.d.ts +5 -0
  46. package/es/redirect/index.d.ts +1 -2
  47. package/es/redirect/index.js +3 -3
  48. package/es/table/index.d.ts +2 -2
  49. package/es/table/index.js +4 -4
  50. package/es/table/typing.d.ts +8 -8
  51. package/lib/application/index.cjs +1 -1
  52. package/lib/application/index.d.ts +1 -2
  53. package/lib/components.cjs +1 -1
  54. package/lib/components.d.ts +9 -9
  55. package/lib/iframe/index.cjs +1 -1
  56. package/lib/iframe/index.d.ts +1 -2
  57. package/lib/index.cjs +1 -1
  58. package/lib/index.d.ts +5 -1
  59. package/lib/languages/PLanguage.vue.cjs +1 -1
  60. package/lib/languages/index.cjs +1 -1
  61. package/lib/languages/index.d.ts +3 -4
  62. package/lib/languages/store.cjs +1 -1
  63. package/lib/languages/store.d.ts +1 -1
  64. package/lib/layout/PLayout.css +1 -1
  65. package/lib/layout/PLayout.vue.cjs +1 -1
  66. package/lib/layout/PLayout.vue2.cjs +1 -1
  67. package/lib/layout/content/PTabs.css +1 -1
  68. package/lib/layout/content/PTabs.vue.cjs +1 -1
  69. package/lib/layout/content/PTabs.vue2.cjs +1 -1
  70. package/lib/layout/header/PHeader.css +1 -1
  71. package/lib/layout/header/PHeader.vue.cjs +1 -1
  72. package/lib/layout/header/PHeader.vue2.cjs +1 -1
  73. package/lib/layout/index.d.ts +2 -1
  74. package/lib/layout/sider/PLogo.css +1 -1
  75. package/lib/layout/sider/PLogo.vue.cjs +1 -1
  76. package/lib/layout/sider/PLogo.vue2.cjs +1 -1
  77. package/lib/layout/sider/PMenus.vue.cjs +1 -1
  78. package/lib/layout/{layout.cjs → store.cjs} +1 -1
  79. package/lib/layout/{layout.d.ts → store.d.ts} +2 -26
  80. package/lib/layout/typing.d.ts +25 -0
  81. package/lib/modal/PModal.d.ts +3 -3
  82. package/lib/modal/index.cjs +1 -1
  83. package/lib/modal/index.d.ts +5 -5
  84. package/lib/modal/typing.d.ts +2 -2
  85. package/lib/oidc/POidc.css +1 -1
  86. package/lib/oidc/POidc.vue.cjs +1 -1
  87. package/lib/oidc/POidc.vue2.cjs +1 -1
  88. package/lib/oidc/index.cjs +1 -1
  89. package/lib/oidc/index.d.ts +3 -3
  90. package/lib/oidc/store.cjs +1 -1
  91. package/lib/oidc/store.d.ts +1 -5
  92. package/lib/oidc/typing.d.ts +5 -0
  93. package/lib/redirect/index.cjs +1 -1
  94. package/lib/redirect/index.d.ts +1 -2
  95. package/lib/table/index.cjs +1 -1
  96. package/lib/table/index.d.ts +2 -2
  97. package/lib/table/typing.d.ts +8 -8
  98. package/package.json +1 -1
  99. package/es/typing.d.ts +0 -6
  100. package/lib/typing.d.ts +0 -6
@@ -1,4 +1,5 @@
1
- export { usePLayoutStore } from './layout';
1
+ export type * from './typing';
2
+ export { useLayoutStore } from './store';
2
3
  export declare const PEmptyLayoutPlugin: {
3
4
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
4
5
  P: {};
@@ -1 +1 @@
1
- .logo[data-v-c9496d2e]{display:flex;align-items:center;justify-content:start;padding-left:16px;height:64px;line-height:64px;overflow:hidden;white-space:nowrap}.logo-size[data-v-c9496d2e]{font-size:20px}
1
+ .logo[data-v-e48aeefa]{display:flex;align-items:center;justify-content:start;padding-left:16px;height:64px;line-height:64px;overflow:hidden;white-space:nowrap}.logo-size[data-v-e48aeefa]{font-size:20px}
@@ -1,7 +1,7 @@
1
1
  import o from "./PLogo.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c9496d2e"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e48aeefa"]]);
5
5
  export {
6
- _ as default
6
+ f as default
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as t, openBlock as s, createElementBlock as r, createVNode as l, unref as o, normalizeClass as a, withDirectives as c, createElementVNode as n, toDisplayString as i, vShow as m } from "vue";
2
- import { usePLayoutStore as p } from "../layout.js";
2
+ import { useLayoutStore as p } from "../store.js";
3
3
  import { NAvatar as _ } from "naive-ui";
4
4
  const d = { class: "logo" }, N = /* @__PURE__ */ t({
5
5
  __name: "PLogo",
@@ -1,7 +1,7 @@
1
- import { defineComponent as k, ref as d, watch as B, onMounted as P, openBlock as S, createBlock as y, unref as v } from "vue";
2
- import { NMenu as O } from "naive-ui";
1
+ import { defineComponent as k, ref as d, watch as B, onMounted as S, openBlock as y, createBlock as O, unref as v } from "vue";
2
+ import { NMenu as P } from "naive-ui";
3
3
  import { useRoute as U, useRouter as b } from "vue-router";
4
- import { usePLayoutStore as z } from "../layout.js";
4
+ import { useLayoutStore as z } from "../store.js";
5
5
  const j = /* @__PURE__ */ k({
6
6
  __name: "PMenus",
7
7
  setup(C) {
@@ -67,9 +67,9 @@ const j = /* @__PURE__ */ k({
67
67
  () => {
68
68
  p();
69
69
  }
70
- ), P(() => {
70
+ ), S(() => {
71
71
  w(), p();
72
- }), (t, n) => (S(), y(v(O), {
72
+ }), (t, n) => (y(), O(v(P), {
73
73
  class: "h-full",
74
74
  inverted: "",
75
75
  mode: "vertical",
@@ -1,29 +1,5 @@
1
- import { RouteLocationNormalized } from 'vue-router';
2
- export type RouteItem = Partial<RouteLocationNormalized> & {
3
- fullPath: string;
4
- path: string;
5
- name: string;
6
- hash: string;
7
- meta: object;
8
- params: object;
9
- query: object;
10
- };
11
- export interface PLayoutState {
12
- title: string;
13
- logo: string;
14
- uid: string;
15
- uname: string;
16
- avatar: string;
17
- collapsed: boolean;
18
- tabs: RouteItem[];
19
- cacheTabs: boolean;
20
- settingPages?: {
21
- route: string;
22
- title: string;
23
- }[];
24
- logout?: () => Promise<void>;
25
- }
26
- export declare const usePLayoutStore: import('pinia').StoreDefinition<"p-layout", Pick<{
1
+ import { RouteItem } from './typing';
2
+ export declare const useLayoutStore: import('pinia').StoreDefinition<"p-layout", Pick<{
27
3
  state: {
28
4
  title: string;
29
5
  logo: string;
@@ -70,5 +70,5 @@ const n = ["Redirect", "RedirectSon", "login"], R = o("p-layout", () => {
70
70
  };
71
71
  });
72
72
  export {
73
- R as usePLayoutStore
73
+ R as useLayoutStore
74
74
  };
@@ -0,0 +1,25 @@
1
+ import { RouteLocationNormalized } from 'vue-router';
2
+ export type RouteItem = Partial<RouteLocationNormalized> & {
3
+ fullPath: string;
4
+ path: string;
5
+ name: string;
6
+ hash: string;
7
+ meta: object;
8
+ params: object;
9
+ query: object;
10
+ };
11
+ export type LayoutState = {
12
+ title: string;
13
+ logo: string;
14
+ uid: string;
15
+ uname: string;
16
+ avatar: string;
17
+ collapsed: boolean;
18
+ tabs: RouteItem[];
19
+ cacheTabs: boolean;
20
+ settingPages?: {
21
+ route: string;
22
+ title: string;
23
+ }[];
24
+ logout?: () => Promise<void>;
25
+ };
@@ -1,4 +1,4 @@
1
- import { PModalProps } from './typing';
1
+ import { ModalProps } from './typing';
2
2
  declare function __VLS_template(): {
3
3
  attrs: Partial<{}>;
4
4
  slots: {
@@ -2101,13 +2101,13 @@ declare function __VLS_template(): {
2101
2101
  rootEl: any;
2102
2102
  };
2103
2103
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
2104
- declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
2104
+ declare const __VLS_component: import('vue').DefineComponent<ModalProps, {
2105
2105
  open: () => void;
2106
2106
  close: () => void;
2107
2107
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2108
2108
  "update:visible": (...args: any[]) => void;
2109
2109
  "update:loading": (...args: any[]) => void;
2110
- }, string, import('vue').PublicProps, Readonly<PModalProps> & Readonly<{
2110
+ }, string, import('vue').PublicProps, Readonly<ModalProps> & Readonly<{
2111
2111
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
2112
2112
  "onUpdate:loading"?: ((...args: any[]) => any) | undefined;
2113
2113
  }>, {
@@ -1,5 +1,6 @@
1
- declare const _default: {
2
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./typing').PModalProps> & Readonly<{
1
+ export type * from './typing';
2
+ export declare const PModalPlugin: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./typing').ModalProps> & Readonly<{
3
4
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
4
5
  "onUpdate:loading"?: ((...args: any[]) => any) | undefined;
5
6
  }>, {
@@ -2107,7 +2108,7 @@ declare const _default: {
2107
2108
  C: {};
2108
2109
  M: {};
2109
2110
  Defaults: {};
2110
- }, Readonly<import('./typing').PModalProps> & Readonly<{
2111
+ }, Readonly<import('./typing').ModalProps> & Readonly<{
2111
2112
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
2112
2113
  "onUpdate:loading"?: ((...args: any[]) => any) | undefined;
2113
2114
  }>, {
@@ -2122,7 +2123,7 @@ declare const _default: {
2122
2123
  __isFragment?: never;
2123
2124
  __isTeleport?: never;
2124
2125
  __isSuspense?: never;
2125
- } & import('vue').ComponentOptionsBase<Readonly<import('./typing').PModalProps> & Readonly<{
2126
+ } & import('vue').ComponentOptionsBase<Readonly<import('./typing').ModalProps> & Readonly<{
2126
2127
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
2127
2128
  "onUpdate:loading"?: ((...args: any[]) => any) | undefined;
2128
2129
  }>, {
@@ -2147,4 +2148,3 @@ declare const _default: {
2147
2148
  }): any;
2148
2149
  };
2149
2150
  }) & import('vue').Plugin;
2150
- export default _default;
package/es/modal/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import t from "./PModal.vue.js";
2
- import { withInstall as o } from "../utils/install.js";
3
- const r = o(t);
1
+ import o from "./PModal.vue.js";
2
+ import { withInstall as t } from "../utils/install.js";
3
+ const r = t(o);
4
4
  export {
5
- r as default
5
+ r as PModalPlugin
6
6
  };
@@ -1,4 +1,4 @@
1
- export type PModalProps = {
1
+ export type ModalProps = {
2
2
  saveBtnText?: string;
3
3
  closable?: boolean;
4
4
  title?: string;
@@ -9,7 +9,7 @@ export type PModalProps = {
9
9
  onSave?: () => Promise<boolean> | boolean;
10
10
  onClose?: () => Promise<boolean> | boolean;
11
11
  };
12
- export type PModalMethods = {
12
+ export type ModalMethods = {
13
13
  open: () => void;
14
14
  close: () => void;
15
15
  };
package/es/oidc/POidc.css CHANGED
@@ -1 +1 @@
1
- .view-auth-callback[data-v-6cac61e4]{display:flex;flex-direction:column;height:100vh;overflow:auto}.view-auth-callback-content[data-v-6cac61e4]{flex:1;padding:32px 12px;display:flex;justify-content:center;align-items:center}.view-auth-callback-spinner[data-v-6cac61e4]{display:flex;justify-content:center;align-items:center;height:100px}
1
+ .view-auth-callback[data-v-71eae482]{display:flex;flex-direction:column;height:100vh;overflow:auto}.view-auth-callback-content[data-v-71eae482]{flex:1;padding:32px 12px;display:flex;justify-content:center;align-items:center}.view-auth-callback-spinner[data-v-71eae482]{display:flex;justify-content:center;align-items:center;height:100px}
@@ -1,7 +1,7 @@
1
1
  import o from "./POidc.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6cac61e4"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-71eae482"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as n, onMounted as l, openBlock as s, createElementBlock as i, createElementVNode as o } from "vue";
2
2
  import { useRouter as u } from "vue-router";
3
- import { usePOidcStore as m } from "./store.js";
3
+ import { useOidcStore as m } from "./store.js";
4
4
  const p = { class: "view-auth-callback" }, v = /* @__PURE__ */ n({
5
5
  __name: "POidc",
6
6
  setup(d) {
@@ -1,5 +1,6 @@
1
- export { usePOidcStore } from './store';
2
- declare const _default: {
1
+ export type * from './typing';
2
+ export { useOidcStore } from './store';
3
+ export declare const POidcPlugin: {
3
4
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
4
5
  P: {};
5
6
  B: {};
@@ -12,4 +13,3 @@ declare const _default: {
12
13
  __isTeleport?: never;
13
14
  __isSuspense?: never;
14
15
  } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
15
- export default _default;
package/es/oidc/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { withInstall as t } from "../utils/install.js";
1
+ import { withInstall as i } from "../utils/install.js";
2
2
  import o from "./POidc.vue.js";
3
- const m = t(o);
3
+ const m = i(o);
4
4
  export {
5
- m as default
5
+ m as POidcPlugin
6
6
  };
@@ -1,9 +1,5 @@
1
1
  import { Router } from 'vue-router';
2
- export type POidcState = {
3
- error?: (router: Router, error: Error) => void;
4
- callback?: () => Promise<void>;
5
- };
6
- export declare const usePOidcStore: import('pinia').StoreDefinition<"oidc", Pick<{
2
+ export declare const useOidcStore: import('pinia').StoreDefinition<"oidc", Pick<{
7
3
  setCallback: (callback: () => Promise<void>) => void;
8
4
  callCallback: () => Promise<void>;
9
5
  setError: (error: (router: Router) => void) => void;
package/es/oidc/store.js CHANGED
@@ -20,5 +20,5 @@ const k = l("oidc", () => {
20
20
  };
21
21
  });
22
22
  export {
23
- k as usePOidcStore
23
+ k as useOidcStore
24
24
  };
@@ -0,0 +1,5 @@
1
+ import { Router } from 'vue-router';
2
+ export type OidcState = {
3
+ error?: (router: Router, error: Error) => void;
4
+ callback?: () => Promise<void>;
5
+ };
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ export declare const PRedirectPlugin: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
3
3
  P: {};
4
4
  B: {};
@@ -11,4 +11,3 @@ declare const _default: {
11
11
  __isTeleport?: never;
12
12
  __isSuspense?: never;
13
13
  } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
14
- export default _default;
@@ -1,6 +1,6 @@
1
1
  import { withInstall as t } from "../utils/install.js";
2
- import o from "./PRedirect.vue.js";
3
- const r = t(o);
2
+ import i from "./PRedirect.vue.js";
3
+ const m = t(i);
4
4
  export {
5
- r as default
5
+ m as PRedirectPlugin
6
6
  };
@@ -1,4 +1,5 @@
1
- declare const _default: {
1
+ export type * from './typing';
2
+ export declare const PTablePlugin: {
2
3
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./typing').DataTableProps> & Readonly<{}>, {
3
4
  refreshData: () => Promise<void>;
4
5
  getData: <T>() => T[];
@@ -61,4 +62,3 @@ declare const _default: {
61
62
  editModal?(_: {}): any;
62
63
  };
63
64
  }) & import('vue').Plugin;
64
- export default _default;
package/es/table/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import t from "./PTable.vue.js";
2
- import { withInstall as o } from "../utils/install.js";
3
- const r = o(t);
1
+ import o from "./PTable.vue.js";
2
+ import { withInstall as t } from "../utils/install.js";
3
+ const r = t(o);
4
4
  export {
5
- r as default
5
+ r as PTablePlugin
6
6
  };
@@ -1,11 +1,11 @@
1
1
  import { VNodeChild } from 'vue';
2
- export interface DataTableColumnActionDefine {
2
+ export type DataTableColumnActionDefine = {
3
3
  name: string;
4
4
  key: string;
5
5
  icon?: string;
6
6
  action: (row: any) => void;
7
- }
8
- export interface DataTableColumnDefine {
7
+ };
8
+ export type DataTableColumnDefine = {
9
9
  title: string;
10
10
  key: string;
11
11
  width?: number;
@@ -13,8 +13,8 @@ export interface DataTableColumnDefine {
13
13
  ellipsis?: boolean;
14
14
  action?: DataTableColumnActionDefine[];
15
15
  render?: (data: any, index: number) => VNodeChild;
16
- }
17
- export interface DataTableProps {
16
+ };
17
+ export type DataTableProps = {
18
18
  idField?: string;
19
19
  item?: any;
20
20
  columns: DataTableColumnDefine[];
@@ -31,12 +31,12 @@ export interface DataTableProps {
31
31
  onCloseModal?: (item?: any) => void;
32
32
  onSave?: (id?: string | number, row?: any) => Promise<boolean> | boolean;
33
33
  onDelete?: (rows: any[]) => Promise<boolean> | boolean;
34
- }
35
- export interface DataTableMethods {
34
+ };
35
+ export type DataTableMethods = {
36
36
  refreshData: () => Promise<void>;
37
37
  getData: <T>() => T[];
38
38
  getSelectedRows: <T>() => T[];
39
39
  closeModal: () => void;
40
40
  resetPage: () => void;
41
41
  getSelectedRow: <T>() => T;
42
- }
42
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./PApplication.vue.cjs"),t=require("../utils/install.cjs"),u=t.withInstall(e.default);exports.default=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../utils/install.cjs"),e=require("./PApplication.vue.cjs"),i=t.withInstall(e.default);exports.PApplicationPlugin=i;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ export declare const PApplicationPlugin: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
3
  theme?: any;
4
4
  themeOverrides?: any;
@@ -30,4 +30,3 @@ declare const _default: {
30
30
  default?(_: {}): any;
31
31
  };
32
32
  }) & import('vue').Plugin;
33
- export default _default;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./table/index.cjs"),i=require("./layout/index.cjs"),n=require("./application/index.cjs"),t=require("./modal/index.cjs"),P=require("./languages/index.cjs"),r=require("./redirect/index.cjs"),l=require("./iframe/index.cjs"),e=require("./error/index.cjs"),a=require("./oidc/index.cjs");exports.PTable=u.default;exports.PEmptyLayoutPlugin=i.PEmptyLayoutPlugin;exports.PLayoutPlugin=i.PLayoutPlugin;exports.PApplication=n.default;exports.PModal=t.default;exports.PLanguage=P.PLanguageSwitch;exports.PRedirect=r.default;exports.PIframe=l.default;exports.P403Plugin=e.P403Plugin;exports.P404Plugin=e.P404Plugin;exports.P500Plugin=e.P500Plugin;exports.POidc=a.default;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./table/index.cjs"),i=require("./layout/index.cjs"),n=require("./application/index.cjs"),u=require("./modal/index.cjs"),r=require("./languages/index.cjs"),t=require("./redirect/index.cjs"),l=require("./iframe/index.cjs"),e=require("./error/index.cjs"),o=require("./oidc/index.cjs");exports.PTable=P.PTablePlugin;exports.PEmptyLayout=i.PEmptyLayoutPlugin;exports.PLayout=i.PLayoutPlugin;exports.PApplication=n.PApplicationPlugin;exports.PModal=u.PModalPlugin;exports.PLanguage=r.PLanguagePlugin;exports.PRedirect=t.PRedirectPlugin;exports.PIframe=l.PIframePlugin;exports.P403=e.P403Plugin;exports.P404=e.P404Plugin;exports.P500=e.P500Plugin;exports.POidc=o.POidcPlugin;
@@ -1,9 +1,9 @@
1
- export { default as PTable } from './table';
2
- export { PLayoutPlugin, PEmptyLayoutPlugin } from './layout';
3
- export { default as PApplication } from './application';
4
- export { default as PModal } from './modal';
5
- export { default as PLanguage } from './languages';
6
- export { default as PRedirect } from './redirect';
7
- export { default as PIframe } from './iframe';
8
- export { P500Plugin, P404Plugin, P403Plugin } from './error';
9
- export { default as POidc } from './oidc';
1
+ export { PTablePlugin as PTable } from './table';
2
+ export { PLayoutPlugin as PLayout, PEmptyLayoutPlugin as PEmptyLayout, } from './layout';
3
+ export { PApplicationPlugin as PApplication } from './application';
4
+ export { PModalPlugin as PModal } from './modal';
5
+ export { PLanguagePlugin as PLanguage } from './languages';
6
+ export { PRedirectPlugin as PRedirect } from './redirect';
7
+ export { PIframePlugin as PIframe } from './iframe';
8
+ export { P500Plugin as P500, P404Plugin as P404, P403Plugin as P403, } from './error';
9
+ export { POidcPlugin as POidc } from './oidc';
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../utils/install.cjs"),t=require("./PIframe.vue.cjs"),l=e.withInstall(t.default);exports.default=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../utils/install.cjs"),t=require("./PIframe.vue.cjs"),r=e.withInstall(t.default);exports.PIframePlugin=r;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ export declare const PIframePlugin: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
3
3
  frameRef: HTMLIFrameElement;
4
4
  }, any, import('vue').ComponentProvideOptions, {
@@ -13,4 +13,3 @@ declare const _default: {
13
13
  __isTeleport?: never;
14
14
  __isSuspense?: never;
15
15
  } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
16
- export default _default;
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./components.cjs"),P=require("./languages/index.cjs"),e=require("./error/index.cjs"),a=require("./application/index.cjs"),i=require("./layout/index.cjs"),l=require("./iframe/index.cjs"),s=require("./modal/index.cjs"),c=require("./oidc/index.cjs"),d=require("./redirect/index.cjs"),g=require("./table/index.cjs"),q=require("./languages/store.cjs"),f=require("./layout/layout.cjs"),x=require("./oidc/store.cjs"),n=(u,r)=>(Object.values(o).forEach(t=>{t.install&&u.use(t)}),r?.(),u),y={install:n};exports.PLanguage=P.PLanguageSwitch;exports.P403Plugin=e.P403Plugin;exports.P404Plugin=e.P404Plugin;exports.P500Plugin=e.P500Plugin;exports.PApplication=a.default;exports.PEmptyLayoutPlugin=i.PEmptyLayoutPlugin;exports.PLayoutPlugin=i.PLayoutPlugin;exports.PIframe=l.default;exports.PModal=s.default;exports.POidc=c.default;exports.PRedirect=d.default;exports.PTable=g.default;exports.usePLanguageStore=q.usePLanguageStore;exports.usePLayoutStore=f.usePLayoutStore;exports.usePOidcStore=x.usePOidcStore;exports.default=y;exports.install=n;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./components.cjs"),u=require("./layout/index.cjs"),P=require("./languages/index.cjs"),s=require("./oidc/index.cjs"),e=require("./error/index.cjs"),l=require("./application/index.cjs"),a=require("./iframe/index.cjs"),c=require("./modal/index.cjs"),d=require("./redirect/index.cjs"),g=require("./table/index.cjs"),q=require("./languages/store.cjs"),$=require("./layout/store.cjs"),x=require("./oidc/store.cjs"),t=(i,r)=>(Object.values(o).forEach(n=>{n.install&&i.use(n)}),r?.(),i),L={install:t};exports.PEmptyLayout=u.PEmptyLayoutPlugin;exports.PLayout=u.PLayoutPlugin;exports.PLanguage=P.PLanguagePlugin;exports.POidc=s.POidcPlugin;exports.P403=e.P403Plugin;exports.P404=e.P404Plugin;exports.P500=e.P500Plugin;exports.PApplication=l.PApplicationPlugin;exports.PIframe=a.PIframePlugin;exports.PModal=c.PModalPlugin;exports.PRedirect=d.PRedirectPlugin;exports.PTable=g.PTablePlugin;exports.useLanguageStore=q.useLanguageStore;exports.useLayoutStore=$.useLayoutStore;exports.useOidcStore=x.useOidcStore;exports.default=L;exports.install=t;
package/lib/index.d.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import { App } from 'vue';
2
2
  export * from './components';
3
- export * from './typing';
3
+ export { useLayoutStore, type LayoutState, type RouteItem } from './layout';
4
+ export { useLanguageStore, type LanguageOption, type LanguageState, } from './languages';
5
+ export { useOidcStore, type OidcState } from './oidc';
6
+ export type { ModalProps, ModalMethods } from './modal';
7
+ export type { DataTableColumnActionDefine, DataTableColumnDefine, DataTableProps, DataTableMethods, } from './table';
4
8
  export type { NaivePlusUIResolver } from './utils/resolver';
5
9
  export declare const install: (app: App, callback?: () => void) => App<any>;
6
10
  declare const _default: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("naive-ui"),e=require("vue"),f=require("./store.cjs"),d={key:1},_=e.defineComponent({__name:"PLanguage",setup(w){const r=t=>s(t),{select:s,getLanguages:a,getCurrentLanguage:l,getDefaultLanguage:i,getTranslationApiUrl:c}=f.usePLanguageStore(),u=()=>{const t=window.translate;t&&(t.selectLanguageTag.show=!1,t.selectLanguageTag.languages=a().map(n=>n.key).join(","),t.ignore.class.push("ignore-translate-flag"),t.ignore.id.push("ignore-translation"),t.language.setLocal(i()),t.request.api.translate="api/v1/translation",t.request.api.connectTest="api/v1/translation/connect-test",t.request.api.init="api/v1/translation/init",t.request.api.language="api/v1/translation/language",t.request.setHost(c()),t.request.listener.start(),t.listener.start(),t.whole.enableAll(),t.execute())};return e.onMounted(async()=>await e.nextTick(()=>u())),(t,n)=>{const g=o.NIcon,p=o.NButton;return e.unref(a)().length>0?(e.openBlock(),e.createBlock(e.unref(o.NDropdown),{key:0,id:"ignore-translation",placement:"bottom-start",trigger:"hover",class:"flex flex-col justify-center h-full ignore",onSelect:r,options:e.unref(a)()},{default:e.withCtx(()=>[e.createVNode(p,{quaternary:"",type:"info"},{default:e.withCtx(()=>[e.unref(l)()?(e.openBlock(),e.createElementBlock("label",d,e.toDisplayString(e.unref(l)()?.label),1)):(e.openBlock(),e.createBlock(g,{key:0,size:"18"},{default:e.withCtx(()=>[...n[0]||(n[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{d:"M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z",fill:"currentColor"}),e.createElementVNode("path",{d:"M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z",fill:"currentColor"})],-1)])]),_:1}))]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)}}});exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("naive-ui"),e=require("vue"),f=require("./store.cjs"),d={key:1},_=e.defineComponent({__name:"PLanguage",setup(w){const r=t=>s(t),{select:s,getLanguages:a,getCurrentLanguage:l,getDefaultLanguage:i,getTranslationApiUrl:c}=f.useLanguageStore(),u=()=>{const t=window.translate;t&&(t.selectLanguageTag.show=!1,t.selectLanguageTag.languages=a().map(n=>n.key).join(","),t.ignore.class.push("ignore-translate-flag"),t.ignore.id.push("ignore-translation"),t.language.setLocal(i()),t.request.api.translate="api/v1/translation",t.request.api.connectTest="api/v1/translation/connect-test",t.request.api.init="api/v1/translation/init",t.request.api.language="api/v1/translation/language",t.request.setHost(c()),t.request.listener.start(),t.listener.start(),t.whole.enableAll(),t.execute())};return e.onMounted(async()=>await e.nextTick(()=>u())),(t,n)=>{const g=o.NIcon,p=o.NButton;return e.unref(a)().length>0?(e.openBlock(),e.createBlock(e.unref(o.NDropdown),{key:0,id:"ignore-translation",placement:"bottom-start",trigger:"hover",class:"flex flex-col justify-center h-full ignore",onSelect:r,options:e.unref(a)()},{default:e.withCtx(()=>[e.createVNode(p,{quaternary:"",type:"info"},{default:e.withCtx(()=>[e.unref(l)()?(e.openBlock(),e.createElementBlock("label",d,e.toDisplayString(e.unref(l)()?.label),1)):(e.openBlock(),e.createBlock(g,{key:0,size:"18"},{default:e.withCtx(()=>[...n[0]||(n[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},[e.createElementVNode("path",{d:"M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z",fill:"currentColor"}),e.createElementVNode("path",{d:"M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z",fill:"currentColor"})],-1)])]),_:1}))]),_:1})]),_:1},8,["options"])):e.createCommentVNode("",!0)}}});exports.default=_;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../utils/install.cjs"),u=require("./PLanguage.vue.cjs"),e=t.withInstall(u.default);exports.PLanguageSwitch=e;exports.default=e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../utils/install.cjs"),t=require("./PLanguage.vue.cjs"),u=e.withInstall(t.default);exports.PLanguagePlugin=u;
@@ -1,6 +1,6 @@
1
- export type { LanguageOption, LanguageState } from './typing';
2
- export { usePLanguageStore } from './store';
3
- export declare const PLanguageSwitch: {
1
+ export type * from './typing';
2
+ export { useLanguageStore } from './store';
3
+ export declare const PLanguagePlugin: {
4
4
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
5
5
  P: {};
6
6
  B: {};
@@ -13,4 +13,3 @@ export declare const PLanguageSwitch: {
13
13
  __isTeleport?: never;
14
14
  __isSuspense?: never;
15
15
  } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
16
- export default PLanguageSwitch;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("pinia"),n=require("vue"),p={translationApiUrl:"https://translate.zvo.cn/api",defaultLanguage:"chinese",currentLanguage:"",options:[],selectCallback:e=>{},initLanguage:e=>{}},d=L.defineStore("language",()=>{const e=n.ref(p),u=a=>{a.forEach(t=>{(t.key==="Chinese"||t.key==="chinese")&&(t.key="chinese_simplified")}),e.value.options=[...a]},i=()=>e.value.options,r=a=>{if(e.value.currentLanguage===a)return;const t=e.value.options.find(v=>v.key===a);t&&(e.value.currentLanguage=t.key,e.value.selectCallback(t))},l=()=>{if(e.value.currentLanguage)return e.value.options.find(a=>a.key===e.value.currentLanguage)},s=a=>{e.value.selectCallback=a},o=()=>e.value.translationApiUrl,c=a=>{e.value.translationApiUrl=a},g=a=>{(a==="Chinese"||a==="chinese")&&(a="chinese_simplified"),e.value.defaultLanguage=a},f=()=>e.value.defaultLanguage?e.value.defaultLanguage:"chinese_simplified";return n.onMounted(()=>{e.value.initLanguage(e.value)}),{state:e,select:r,setLanguages:u,getLanguages:i,getCurrentLanguage:l,setSelectCallback:s,setTranslationApiUrl:c,getTranslationApiUrl:o,setDefaultLanguage:g,getDefaultLanguage:f}});exports.usePLanguageStore=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("pinia"),n=require("vue"),p={translationApiUrl:"https://translate.zvo.cn/api",defaultLanguage:"chinese",currentLanguage:"",options:[],selectCallback:e=>{},initLanguage:e=>{}},d=L.defineStore("language",()=>{const e=n.ref(p),u=a=>{a.forEach(t=>{(t.key==="Chinese"||t.key==="chinese")&&(t.key="chinese_simplified")}),e.value.options=[...a]},i=()=>e.value.options,r=a=>{if(e.value.currentLanguage===a)return;const t=e.value.options.find(v=>v.key===a);t&&(e.value.currentLanguage=t.key,e.value.selectCallback(t))},l=()=>{if(e.value.currentLanguage)return e.value.options.find(a=>a.key===e.value.currentLanguage)},s=a=>{e.value.selectCallback=a},o=()=>e.value.translationApiUrl,c=a=>{e.value.translationApiUrl=a},g=a=>{(a==="Chinese"||a==="chinese")&&(a="chinese_simplified"),e.value.defaultLanguage=a},f=()=>e.value.defaultLanguage?e.value.defaultLanguage:"chinese_simplified";return n.onMounted(()=>{e.value.initLanguage(e.value)}),{state:e,select:r,setLanguages:u,getLanguages:i,getCurrentLanguage:l,setSelectCallback:s,setTranslationApiUrl:c,getTranslationApiUrl:o,setDefaultLanguage:g,getDefaultLanguage:f}});exports.useLanguageStore=d;
@@ -1,5 +1,5 @@
1
1
  import { LanguageOption, LanguageState } from './typing';
2
- export declare const usePLanguageStore: import('pinia').StoreDefinition<"language", Pick<{
2
+ export declare const useLanguageStore: import('pinia').StoreDefinition<"language", Pick<{
3
3
  state: import('vue').Ref<{
4
4
  translationApiUrl: string;
5
5
  defaultLanguage: string;
@@ -1 +1 @@
1
- .layout[data-v-87dcb433]{display:flex;flex-direction:row;flex:auto}.layout-default-background[data-v-87dcb433]{background:#f5f7f9}.layout .layout-sider[data-v-87dcb433]{min-height:100vh;box-shadow:2px 0 8px #1d23290d;position:relative;z-index:13;transition:all .2s ease-in-out}.layout .layout-sider-fix[data-v-87dcb433]{position:fixed;top:0;left:0}.layout .ant-layout[data-v-87dcb433]{overflow:hidden}.layout .layout-right-fix[data-v-87dcb433]{overflow-x:hidden;padding-left:200px;min-height:100vh;transition:all .2s ease-in-out}.layout .layout-content[data-v-87dcb433]{flex:auto;min-height:100vh}.layout .n-layout-header.n-layout-header--absolute-positioned[data-v-87dcb433]{z-index:11}.layout-content-main[data-v-87dcb433]{margin:0 10px 10px;position:relative;padding-top:64px}.layout-content-main-fix[data-v-87dcb433]{padding-top:64px}.main-view-fix[data-v-87dcb433]{padding-top:44px}
1
+ .layout[data-v-8d20e006]{display:flex;flex-direction:row;flex:auto}.layout-default-background[data-v-8d20e006]{background:#f5f7f9}.layout .layout-sider[data-v-8d20e006]{min-height:100vh;box-shadow:2px 0 8px #1d23290d;position:relative;z-index:13;transition:all .2s ease-in-out}.layout .layout-sider-fix[data-v-8d20e006]{position:fixed;top:0;left:0}.layout .ant-layout[data-v-8d20e006]{overflow:hidden}.layout .layout-right-fix[data-v-8d20e006]{overflow-x:hidden;padding-left:200px;min-height:100vh;transition:all .2s ease-in-out}.layout .layout-content[data-v-8d20e006]{flex:auto;min-height:100vh}.layout .n-layout-header.n-layout-header--absolute-positioned[data-v-8d20e006]{z-index:11}.layout-content-main[data-v-8d20e006]{margin:0 10px 10px;position:relative;padding-top:64px}.layout-content-main-fix[data-v-8d20e006]{padding-top:64px}.main-view-fix[data-v-8d20e006]{padding-top:44px}
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./PLayout.vue2.cjs");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-87dcb433"]]);exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./PLayout.vue2.cjs");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-8d20e006"]]);exports.default=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("naive-ui"),e=require("vue"),r=require("./sider/PLogo.vue.cjs"),u=require("./header/PHeader.vue.cjs"),s=require("./content/PContent.vue.cjs"),c=require("./content/PTabs.vue.cjs"),i=require("./sider/PMenus.vue.cjs"),d=require("./layout.cjs"),_={class:"layout-content-main layout-content-main-fix"},f={class:"main-view main-view-fix"},p=e.defineComponent({__name:"PLayout",setup(N){const o=d.usePLayoutStore(),a=e.ref(!1),l=()=>{a.value=!0,e.nextTick(()=>a.value=!1)};return e.provide("reloadPage",l),(v,y)=>{const n=t.NBackTop;return e.openBlock(),e.createBlock(e.unref(t.NLayout),{"has-sider":"",class:"layout",position:"absolute"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.NLayoutSider),{class:"layout-sider",inverted:"","show-trigger":"bar",position:"absolute","collapse-mode":"width",collapsed:e.unref(o).state.collapsed,"native-scrollbar":!1,"collapsed-width":64,onCollapse:e.unref(o).collapse,onExpand:e.unref(o).collapse},{default:e.withCtx(()=>[e.createVNode(e.unref(t.NFlex),{vertical:""},{default:e.withCtx(()=>[e.createVNode(r.default),e.createVNode(i.default)]),_:1})]),_:1},8,["collapsed","onCollapse","onExpand"]),e.createVNode(e.unref(t.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t.NLayoutHeader),{position:"absolute"},{default:e.withCtx(()=>[e.createVNode(u.default)]),_:1}),e.createVNode(e.unref(t.NLayoutContent),{class:"layout-content layout-default-background"},{default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(c.default),e.createElementVNode("div",f,[e.createVNode(s.default,{loading:a.value},null,8,["loading"])])])]),_:1}),e.createVNode(n,{right:20,class:"z-50"})]),_:1})]),_:1})}}});exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("naive-ui"),e=require("vue"),r=require("./sider/PLogo.vue.cjs"),u=require("./header/PHeader.vue.cjs"),s=require("./content/PContent.vue.cjs"),c=require("./content/PTabs.vue.cjs"),i=require("./sider/PMenus.vue.cjs"),d=require("./store.cjs"),_={class:"layout-content-main layout-content-main-fix"},f={class:"main-view main-view-fix"},p=e.defineComponent({__name:"PLayout",setup(N){const o=d.useLayoutStore(),a=e.ref(!1),l=()=>{a.value=!0,e.nextTick(()=>a.value=!1)};return e.provide("reloadPage",l),(v,y)=>{const n=t.NBackTop;return e.openBlock(),e.createBlock(e.unref(t.NLayout),{"has-sider":"",class:"layout",position:"absolute"},{default:e.withCtx(()=>[e.createVNode(e.unref(t.NLayoutSider),{class:"layout-sider",inverted:"","show-trigger":"bar",position:"absolute","collapse-mode":"width",collapsed:e.unref(o).state.collapsed,"native-scrollbar":!1,"collapsed-width":64,onCollapse:e.unref(o).collapse,onExpand:e.unref(o).collapse},{default:e.withCtx(()=>[e.createVNode(e.unref(t.NFlex),{vertical:""},{default:e.withCtx(()=>[e.createVNode(r.default),e.createVNode(i.default)]),_:1})]),_:1},8,["collapsed","onCollapse","onExpand"]),e.createVNode(e.unref(t.NLayout),null,{default:e.withCtx(()=>[e.createVNode(e.unref(t.NLayoutHeader),{position:"absolute"},{default:e.withCtx(()=>[e.createVNode(u.default)]),_:1}),e.createVNode(e.unref(t.NLayoutContent),{class:"layout-content layout-default-background"},{default:e.withCtx(()=>[e.createElementVNode("div",_,[e.createVNode(c.default),e.createElementVNode("div",f,[e.createVNode(s.default,{loading:a.value},null,8,["loading"])])])]),_:1}),e.createVNode(n,{right:20,class:"z-50"})]),_:1})]),_:1})}}});exports.default=p;
@@ -1 +1 @@
1
- .tabs-view[data-v-8148d6d3]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-8148d6d3]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-8148d6d3]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-8148d6d3],.tabs-view-main .tabs-card .tabs-card-next[data-v-8148d6d3]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-8148d6d3],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-8148d6d3]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-8148d6d3]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-8148d6d3]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-8148d6d3],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-8148d6d3]{display:none}.tabs-view-main .tabs-card-scroll[data-v-8148d6d3]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-8148d6d3]{background:var(--v1ffa5f5e);color:var(--db4d15a0);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-8148d6d3]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-8148d6d3]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-8148d6d3]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-8148d6d3]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-8148d6d3]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-8148d6d3]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-8148d6d3]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-8148d6d3]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-8148d6d3]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-8148d6d3]{background:#f5f7f9}.tabs-view-dark-background[data-v-8148d6d3]{background:#101014}.tabs-view-fix[data-v-8148d6d3]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-8148d6d3]{top:0}
1
+ .tabs-view[data-v-48b3be2d]{width:100%;padding:6px 0;display:flex;transition:all .2s ease-in-out}.tabs-view-main[data-v-48b3be2d]{height:32px;display:flex;max-width:100%;min-width:100%}.tabs-view-main .tabs-card[data-v-48b3be2d]{-webkit-box-flex:1;flex-grow:1;flex-shrink:1;overflow:hidden;position:relative}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{width:32px;text-align:center;position:absolute;line-height:32px;cursor:pointer}.tabs-view-main .tabs-card .tabs-card-prev .n-icon[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-next .n-icon[data-v-48b3be2d]{display:flex;align-items:center;justify-content:center;height:32px;width:32px}.tabs-view-main .tabs-card .tabs-card-prev[data-v-48b3be2d]{left:0}.tabs-view-main .tabs-card .tabs-card-next[data-v-48b3be2d]{right:0}.tabs-view-main .tabs-card .tabs-card-next-hide[data-v-48b3be2d],.tabs-view-main .tabs-card .tabs-card-prev-hide[data-v-48b3be2d]{display:none}.tabs-view-main .tabs-card-scroll[data-v-48b3be2d]{white-space:nowrap;overflow:hidden}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]{background:var(--v141ddb06);color:var(--cf709148);height:32px;padding:6px 16px 4px;border-radius:3px;margin-right:6px;cursor:pointer;display:inline-block;position:relative;flex:0 0 auto}.tabs-view-main .tabs-card-scroll-item span[data-v-48b3be2d]{float:left;vertical-align:middle}.tabs-view-main .tabs-card-scroll-item[data-v-48b3be2d]:hover{color:#515a6e}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]{height:22px;width:21px;margin-right:-6px;position:relative;vertical-align:middle;text-align:center;color:#808695}.tabs-view-main .tabs-card-scroll-item .n-icon[data-v-48b3be2d]:hover{color:#515a6e!important}.tabs-view-main .tabs-card-scroll-item .n-icon svg[data-v-48b3be2d]{height:21px;display:inline-block}.tabs-view-main .tabs-card-scroll .active-item[data-v-48b3be2d]{color:#2d8cf0}.tabs-view-main .tabs-card-scrollable[data-v-48b3be2d]{padding:0 32px;overflow:hidden}.tabs-view .tabs-close[data-v-48b3be2d]{min-width:32px;width:32px;height:32px;line-height:32px;text-align:center;background:var(--color);border-radius:2px;cursor:pointer}.tabs-view .tabs-close-btn[data-v-48b3be2d]{color:var(--color);height:100%;display:flex;align-items:center;justify-content:center}.tabs-view-default-background[data-v-48b3be2d]{background:#f5f7f9}.tabs-view-dark-background[data-v-48b3be2d]{background:#101014}.tabs-view-fix[data-v-48b3be2d]{position:fixed;z-index:5;padding:6px 10px;left:200px}.tabs-view-fixed-header[data-v-48b3be2d]{top:0}
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./PTabs.vue2.cjs");;/* empty css */const t=require("../../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-8148d6d3"]]);exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./PTabs.vue2.cjs");;/* empty css */const t=require("../../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-48b3be2d"]]);exports.default=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("element-resize-detector"),U=require("vuedraggable"),u=require("@vicons/antd"),y=require("vue-router"),r=require("naive-ui"),X=require("../layout.cjs"),H={class:"tabs-view-main"},J=["id","onClick","onContextmenu"],G={class:"tabs-close"},Q={class:"tabs-close-btn"},Z=e.defineComponent({__name:"PTabs",setup(ee){e.useCssVars(t=>({v1ffa5f5e:x.value,db4d15a0:T.value}));const p=r.useThemeVars(),x=e.computed(()=>p.value.cardColor),T=e.computed(()=>p.value.textColor1),k=r.useMessage(),c=y.useRoute(),m=y.useRouter(),s=e.ref(null),b=e.ref(null),w=e.ref(!1),i=X.usePLayoutStore(),d=e.computed(()=>i.state.tabs),n=e.reactive({activeKey:c.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),_=["Login","Redirect","ErrorPage"],g=t=>{const{fullPath:o,hash:l,meta:a,name:f,params:$,path:j,query:Y}=t;return{fullPath:o,hash:l,meta:a,name:f,params:$,path:j,query:Y}},V=e.computed(()=>{const l=i.state.collapsed?"64px":"272px";return{left:l,width:`calc(100% - ${l})`}}),C=e.computed(()=>{const t=d.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:w.value||t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.MinusOutlined)})}]}),P=()=>{let t=[];const o=g(c);try{if(i.state.cacheTabs){const l=localStorage.getItem("TABS_ROUTES");t=l?JSON.parse(l):[o]}}catch{t=[o]}finally{return t}},E=t=>{const o=m.getRoutes();t.forEach(l=>{const a=o.find(f=>f.path===l.path);a&&(l.meta=a.meta||l.meta,l.name=a.name||l.name)}),i.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(t))},O=()=>{const t=P();E(t),i.initTabs(t)},h=async t=>{if(await e.nextTick(),!s.value)return;const o=s.value.offsetWidth,l=s.value.scrollWidth;o<l?(n.scrollable=!0,t&&[...s.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(f=>{f.id===`tag${n.activeKey.split("/").join("/")}`&&f.scrollIntoView&&f.scrollIntoView()})):n.scrollable=!1},W=t=>!(t.draggedContext.element.meta.affix||t.relatedContext.element.meta.affix),M=()=>{let t;t=F(),t.listenTo(b.value,()=>h(!0))},I=t=>{const{fullPath:o}=t;if(o===c.fullPath||(n.activeKey=o,!t))return;const{replace:l}=m;toString.call(t),l(t).catch(console.error)},R=(t,o)=>{t.preventDefault(),w.value=o.path==="/home",n.showDropdown=!1,e.nextTick().then(()=>{n.showDropdown=!0,n.dropdownX=t.clientX,n.dropdownY=t.clientY})},D=()=>{if(c.meta.keepAlive){var t=m.currentRoute.value.matched.find(o=>o.name==c.name);t&&t.components?.default?.name}},N=t=>{if(d.value.length===1)return k.warning("这已经是最后一页,不能再关闭了!");if(D(),i.closeCurrentTab(t),n.activeKey===t.fullPath){const o=d.value[Math.max(0,d.value.length-1)];n.activeKey=o.fullPath,m.push(o)}h()},L=t=>{const{fullPath:o}=t,l=d.value.find(a=>a.fullPath==o);N(l)},z=t=>{i.closeOtherTabs(t),n.activeKey=t.fullPath,m.replace(t.fullPath),h()},q=()=>{i.closeAllTabs(),h()},A=e.inject("reloadPage"),S=t=>{switch(t){case"1":A();break;case"2":N(c);break;case"3":z(c);break;case"4":q();break}h(),n.showDropdown=!1},v=(t,o)=>{const l=s.value.scrollLeft,a=o>0&&l+o>=t||o<0&&l+o<=t?t:l+o;if(s.value&&s.value.scrollTo(a,0),a!==t)return window.requestAnimationFrame(()=>v(t,o))},K=()=>{const t=s.value.offsetWidth,o=s.value.scrollLeft;if(!o)return;const l=o>t?o-t:0;v(l,(l-o)/20)},B=()=>{const t=s.value.offsetWidth,o=s.value.scrollWidth,l=s.value.scrollLeft;if(o-l<=t)return;const a=o-l>t*2?l+t:o-t;v(a,(a-l)/20)};return window.addEventListener("beforeunload",()=>{localStorage.setItem("TABS_ROUTES",JSON.stringify(d.value))}),window.addEventListener("scroll",t=>{let o=t.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;n.isMultiHeaderFixed=o>=64},!0),e.watch(()=>c.fullPath,t=>{_.includes(c.name)||(n.activeKey=t,i.addTab(g(c)),h(!0))},{immediate:!0}),O(),e.onMounted(()=>M()),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(V.value)},[e.createElementVNode("div",H,[e.createElementVNode("div",{ref_key:"navWrap",ref:b,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":n.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!n.scrollable}]),onClick:K},[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!n.scrollable}]),onClick:B},[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:s,class:"tabs-card-scroll"},[e.createVNode(e.unref(U),{list:d.value,animation:"300","item-key":"fullPath",class:"flex",move:W},{item:e.withCtx(({element:l})=>[e.createElementVNode("div",{id:`tag${l.fullPath.split("/").join("/")}`,class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":n.activeKey===l.fullPath}]),onClick:e.withModifiers(a=>I(l),["stop"]),onContextmenu:a=>R(a,l)},[e.createElementVNode("span",null,e.toDisplayString(l.meta.title),1),l.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r.NIcon),{key:0,size:"14",onClick:e.withModifiers(a=>L(l),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(u.CloseOutlined))]),_:1},8,["onClick"]))],42,J)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",G,[e.createVNode(e.unref(r.NDropdown),{trigger:"hover",onSelect:S,placement:"bottom-end",options:C.value},{default:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(r.NDropdown),{show:n.showDropdown,x:n.dropdownX,y:n.dropdownY,onClickoutside:o[0]||(o[0]=l=>n.showDropdown=!1),placement:"bottom-start",onSelect:S,options:C.value},null,8,["show","x","y","options"])])],4))}});exports.default=Z;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("element-resize-detector"),U=require("vuedraggable"),u=require("@vicons/antd"),y=require("vue-router"),r=require("naive-ui"),X=require("../store.cjs"),H={class:"tabs-view-main"},J=["id","onClick","onContextmenu"],G={class:"tabs-close"},Q={class:"tabs-close-btn"},Z=e.defineComponent({__name:"PTabs",setup(ee){e.useCssVars(t=>({v141ddb06:x.value,cf709148:T.value}));const p=r.useThemeVars(),x=e.computed(()=>p.value.cardColor),T=e.computed(()=>p.value.textColor1),k=r.useMessage(),c=y.useRoute(),m=y.useRouter(),s=e.ref(null),b=e.ref(null),w=e.ref(!1),i=X.useLayoutStore(),d=e.computed(()=>i.state.tabs),n=e.reactive({activeKey:c.fullPath,scrollable:!0,dropdownX:0,dropdownY:0,showDropdown:!1,isMultiHeaderFixed:!0,multiTabsSetting:!0}),_=["Login","Redirect","ErrorPage"],g=t=>{const{fullPath:o,hash:l,meta:a,name:f,params:B,path:j,query:Y}=t;return{fullPath:o,hash:l,meta:a,name:f,params:B,path:j,query:Y}},V=e.computed(()=>{const l=i.state.collapsed?"64px":"272px";return{left:l,width:`calc(100% - ${l})`}}),C=e.computed(()=>{const t=d.value.length<=1;return[{label:"刷新当前",key:"1",icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.ReloadOutlined)})},{label:"关闭当前",key:"2",disabled:w.value||t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.CloseOutlined)})},{label:"关闭其他",key:"3",disabled:t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.ColumnWidthOutlined)})},{label:"关闭全部",key:"4",disabled:t,icon:()=>e.h(r.NIcon,null,{default:()=>e.h(u.MinusOutlined)})}]}),P=()=>{let t=[];const o=g(c);try{if(i.state.cacheTabs){const l=localStorage.getItem("TABS_ROUTES");t=l?JSON.parse(l):[o]}}catch{t=[o]}finally{return t}},E=t=>{const o=m.getRoutes();t.forEach(l=>{const a=o.find(f=>f.path===l.path);a&&(l.meta=a.meta||l.meta,l.name=a.name||l.name)}),i.state.cacheTabs&&localStorage.setItem("TABS_ROUTES",JSON.stringify(t))},O=()=>{const t=P();E(t),i.initTabs(t)},h=async t=>{if(await e.nextTick(),!s.value)return;const o=s.value.offsetWidth,l=s.value.scrollWidth;o<l?(n.scrollable=!0,t&&[...s.value.querySelectorAll(".tabs-card-scroll-item")||[]].forEach(f=>{f.id===`tag${n.activeKey.split("/").join("/")}`&&f.scrollIntoView&&f.scrollIntoView()})):n.scrollable=!1},W=t=>!(t.draggedContext.element.meta.affix||t.relatedContext.element.meta.affix),M=()=>{let t;t=F(),t.listenTo(b.value,()=>h(!0))},I=t=>{const{fullPath:o}=t;if(o===c.fullPath||(n.activeKey=o,!t))return;const{replace:l}=m;toString.call(t),l(t).catch(console.error)},R=(t,o)=>{t.preventDefault(),w.value=o.path==="/home",n.showDropdown=!1,e.nextTick().then(()=>{n.showDropdown=!0,n.dropdownX=t.clientX,n.dropdownY=t.clientY})},D=()=>{if(c.meta.keepAlive){var t=m.currentRoute.value.matched.find(o=>o.name==c.name);t&&t.components?.default?.name}},N=t=>{if(d.value.length===1)return k.warning("这已经是最后一页,不能再关闭了!");if(D(),i.closeCurrentTab(t),n.activeKey===t.fullPath){const o=d.value[Math.max(0,d.value.length-1)];n.activeKey=o.fullPath,m.push(o)}h()},L=t=>{const{fullPath:o}=t,l=d.value.find(a=>a.fullPath==o);N(l)},z=t=>{i.closeOtherTabs(t),n.activeKey=t.fullPath,m.replace(t.fullPath),h()},q=()=>{i.closeAllTabs(),h()},A=e.inject("reloadPage"),S=t=>{switch(t){case"1":A();break;case"2":N(c);break;case"3":z(c);break;case"4":q();break}h(),n.showDropdown=!1},v=(t,o)=>{const l=s.value.scrollLeft,a=o>0&&l+o>=t||o<0&&l+o<=t?t:l+o;if(s.value&&s.value.scrollTo(a,0),a!==t)return window.requestAnimationFrame(()=>v(t,o))},K=()=>{const t=s.value.offsetWidth,o=s.value.scrollLeft;if(!o)return;const l=o>t?o-t:0;v(l,(l-o)/20)},$=()=>{const t=s.value.offsetWidth,o=s.value.scrollWidth,l=s.value.scrollLeft;if(o-l<=t)return;const a=o-l>t*2?l+t:o-t;v(a,(a-l)/20)};return window.addEventListener("beforeunload",()=>{localStorage.setItem("TABS_ROUTES",JSON.stringify(d.value))}),window.addEventListener("scroll",t=>{let o=t.target.scrollTop||document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop;n.isMultiHeaderFixed=o>=64},!0),e.watch(()=>c.fullPath,t=>{_.includes(c.name)||(n.activeKey=t,i.addTab(g(c)),h(!0))},{immediate:!0}),O(),e.onMounted(()=>M()),(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:"box-border tabs-view tabs-view-fix tabs-view-default-background",style:e.normalizeStyle(V.value)},[e.createElementVNode("div",H,[e.createElementVNode("div",{ref_key:"navWrap",ref:b,class:e.normalizeClass(["tabs-card",{"tabs-card-scrollable":n.scrollable}])},[e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-prev",{"tabs-card-prev-hide":!n.scrollable}]),onClick:K},[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.LeftOutlined))]),_:1})],2),e.createElementVNode("span",{class:e.normalizeClass(["tabs-card-next",{"tabs-card-next-hide":!n.scrollable}]),onClick:$},[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.RightOutlined))]),_:1})],2),e.createElementVNode("div",{ref_key:"navScroll",ref:s,class:"tabs-card-scroll"},[e.createVNode(e.unref(U),{list:d.value,animation:"300","item-key":"fullPath",class:"flex",move:W},{item:e.withCtx(({element:l})=>[e.createElementVNode("div",{id:`tag${l.fullPath.split("/").join("/")}`,class:e.normalizeClass(["tabs-card-scroll-item",{"active-item":n.activeKey===l.fullPath}]),onClick:e.withModifiers(a=>I(l),["stop"]),onContextmenu:a=>R(a,l)},[e.createElementVNode("span",null,e.toDisplayString(l.meta.title),1),l.meta.affix?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r.NIcon),{key:0,size:"14",onClick:e.withModifiers(a=>L(l),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(u.CloseOutlined))]),_:1},8,["onClick"]))],42,J)]),_:1},8,["list"])],512)],2),e.createElementVNode("div",G,[e.createVNode(e.unref(r.NDropdown),{trigger:"hover",onSelect:S,placement:"bottom-end",options:C.value},{default:e.withCtx(()=>[e.createElementVNode("div",Q,[e.createVNode(e.unref(r.NIcon),{size:"16",color:"#515a6e"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.DownOutlined))]),_:1})])]),_:1},8,["options"])]),e.createVNode(e.unref(r.NDropdown),{show:n.showDropdown,x:n.dropdownX,y:n.dropdownY,onClickoutside:o[0]||(o[0]=l=>n.showDropdown=!1),placement:"bottom-start",onSelect:S,options:C.value},null,8,["show","x","y","options"])])],4))}});exports.default=Z;