@chewel611/naive-ui-plus 0.0.19 → 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 (153) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.js +804 -676
  3. package/dist/index.umd.cjs +1 -1
  4. package/dist/style.css +1 -1
  5. package/es/application/PApplication.vue.js +16 -16
  6. package/es/application/index.d.ts +1 -2
  7. package/es/application/index.js +4 -4
  8. package/es/components.d.ts +9 -5
  9. package/es/components.js +20 -9
  10. package/es/error/P403.css +1 -0
  11. package/es/error/P403.d.ts +2 -0
  12. package/es/error/P403.vue.js +19 -0
  13. package/es/error/P404.css +1 -0
  14. package/es/error/P404.d.ts +2 -0
  15. package/es/error/P404.vue.js +19 -0
  16. package/es/error/P500.css +1 -0
  17. package/es/error/P500.d.ts +2 -0
  18. package/es/error/P500.vue.js +19 -0
  19. package/es/error/index.d.ts +39 -0
  20. package/es/error/index.js +10 -0
  21. package/es/iframe/PIframe.css +1 -0
  22. package/es/iframe/PIframe.d.ts +4 -0
  23. package/es/iframe/PIframe.vue.js +7 -0
  24. package/es/iframe/PIframe.vue2.js +46 -0
  25. package/es/iframe/index.d.ts +15 -0
  26. package/es/iframe/index.js +6 -0
  27. package/es/index.d.ts +5 -1
  28. package/es/index.js +34 -21
  29. package/es/languages/PLanguage.vue.js +28 -28
  30. package/es/languages/index.d.ts +3 -4
  31. package/es/languages/index.js +4 -5
  32. package/es/languages/store.d.ts +1 -1
  33. package/es/languages/store.js +1 -1
  34. package/es/layout/PEmptyLayout.d.ts +2 -0
  35. package/es/layout/PEmptyLayout.vue.js +11 -0
  36. package/es/layout/PLayout.css +1 -1
  37. package/es/layout/PLayout.vue.js +1 -1
  38. package/es/layout/PLayout.vue2.js +6 -6
  39. package/es/layout/content/PContent.vue.js +10 -10
  40. package/es/layout/content/PTabs.css +1 -1
  41. package/es/layout/content/PTabs.vue.js +2 -2
  42. package/es/layout/content/PTabs.vue2.js +60 -57
  43. package/es/layout/header/PHeader.css +1 -1
  44. package/es/layout/header/PHeader.vue.js +2 -2
  45. package/es/layout/header/PHeader.vue2.js +10 -17
  46. package/es/layout/index.d.ts +16 -3
  47. package/es/layout/index.js +6 -4
  48. package/es/layout/sider/PLogo.css +1 -1
  49. package/es/layout/sider/PLogo.vue.js +2 -2
  50. package/es/layout/sider/PLogo.vue2.js +5 -5
  51. package/es/layout/sider/PMenus.vue.js +5 -5
  52. package/es/layout/{layout.d.ts → store.d.ts} +236 -251
  53. package/es/layout/{layout.js → store.js} +1 -1
  54. package/es/layout/typing.d.ts +25 -0
  55. package/es/modal/PModal.d.ts +87 -59
  56. package/es/modal/PModal.vue.js +37 -38
  57. package/es/modal/index.d.ts +47 -33
  58. package/es/modal/index.js +4 -4
  59. package/es/modal/typing.d.ts +2 -2
  60. package/es/oidc/POidc.css +1 -0
  61. package/es/oidc/POidc.d.ts +2 -0
  62. package/es/oidc/POidc.vue.js +7 -0
  63. package/es/oidc/POidc.vue2.js +25 -0
  64. package/es/oidc/index.d.ts +15 -0
  65. package/es/oidc/index.js +6 -0
  66. package/es/oidc/store.d.ts +17 -0
  67. package/es/oidc/store.js +24 -0
  68. package/es/oidc/typing.d.ts +5 -0
  69. package/es/redirect/PRedirect.d.ts +2 -0
  70. package/es/redirect/PRedirect.vue.js +19 -0
  71. package/es/redirect/PRedirect.vue2.js +4 -0
  72. package/es/redirect/index.d.ts +13 -0
  73. package/es/redirect/index.js +6 -0
  74. package/es/table/PTable.vue.js +114 -121
  75. package/es/table/index.d.ts +2 -2
  76. package/es/table/index.js +4 -4
  77. package/es/table/typing.d.ts +8 -8
  78. package/lib/application/PApplication.vue.cjs +1 -1
  79. package/lib/application/index.cjs +1 -1
  80. package/lib/application/index.d.ts +1 -2
  81. package/lib/components.cjs +1 -1
  82. package/lib/components.d.ts +9 -5
  83. package/lib/error/P403.css +1 -0
  84. package/lib/error/P403.d.ts +2 -0
  85. package/lib/error/P403.vue.cjs +1 -0
  86. package/lib/error/P404.css +1 -0
  87. package/lib/error/P404.d.ts +2 -0
  88. package/lib/error/P404.vue.cjs +1 -0
  89. package/lib/error/P500.css +1 -0
  90. package/lib/error/P500.d.ts +2 -0
  91. package/lib/error/P500.vue.cjs +1 -0
  92. package/lib/error/index.cjs +1 -0
  93. package/lib/error/index.d.ts +39 -0
  94. package/lib/iframe/PIframe.css +1 -0
  95. package/lib/iframe/PIframe.d.ts +4 -0
  96. package/lib/iframe/PIframe.vue.cjs +1 -0
  97. package/lib/iframe/PIframe.vue2.cjs +1 -0
  98. package/lib/iframe/index.cjs +1 -0
  99. package/lib/iframe/index.d.ts +15 -0
  100. package/lib/index.cjs +1 -1
  101. package/lib/index.d.ts +5 -1
  102. package/lib/languages/PLanguage.vue.cjs +1 -1
  103. package/lib/languages/index.cjs +1 -1
  104. package/lib/languages/index.d.ts +3 -4
  105. package/lib/languages/store.cjs +1 -1
  106. package/lib/languages/store.d.ts +1 -1
  107. package/lib/layout/PEmptyLayout.d.ts +2 -0
  108. package/lib/layout/PEmptyLayout.vue.cjs +1 -0
  109. package/lib/layout/PLayout.css +1 -1
  110. package/lib/layout/PLayout.vue.cjs +1 -1
  111. package/lib/layout/PLayout.vue2.cjs +1 -1
  112. package/lib/layout/content/PContent.vue.cjs +1 -1
  113. package/lib/layout/content/PTabs.css +1 -1
  114. package/lib/layout/content/PTabs.vue.cjs +1 -1
  115. package/lib/layout/content/PTabs.vue2.cjs +1 -1
  116. package/lib/layout/header/PHeader.css +1 -1
  117. package/lib/layout/header/PHeader.vue.cjs +1 -1
  118. package/lib/layout/header/PHeader.vue2.cjs +1 -1
  119. package/lib/layout/index.cjs +1 -1
  120. package/lib/layout/index.d.ts +16 -3
  121. package/lib/layout/sider/PLogo.css +1 -1
  122. package/lib/layout/sider/PLogo.vue.cjs +1 -1
  123. package/lib/layout/sider/PLogo.vue2.cjs +1 -1
  124. package/lib/layout/sider/PMenus.vue.cjs +1 -1
  125. package/lib/layout/{layout.cjs → store.cjs} +1 -1
  126. package/lib/layout/{layout.d.ts → store.d.ts} +236 -251
  127. package/lib/layout/typing.d.ts +25 -0
  128. package/lib/modal/PModal.d.ts +87 -59
  129. package/lib/modal/PModal.vue.cjs +1 -1
  130. package/lib/modal/index.cjs +1 -1
  131. package/lib/modal/index.d.ts +47 -33
  132. package/lib/modal/typing.d.ts +2 -2
  133. package/lib/oidc/POidc.css +1 -0
  134. package/lib/oidc/POidc.d.ts +2 -0
  135. package/lib/oidc/POidc.vue.cjs +1 -0
  136. package/lib/oidc/POidc.vue2.cjs +1 -0
  137. package/lib/oidc/index.cjs +1 -0
  138. package/lib/oidc/index.d.ts +15 -0
  139. package/lib/oidc/store.cjs +1 -0
  140. package/lib/oidc/store.d.ts +17 -0
  141. package/lib/oidc/typing.d.ts +5 -0
  142. package/lib/redirect/PRedirect.d.ts +2 -0
  143. package/lib/redirect/PRedirect.vue.cjs +1 -0
  144. package/lib/redirect/PRedirect.vue2.cjs +1 -0
  145. package/lib/redirect/index.cjs +1 -0
  146. package/lib/redirect/index.d.ts +13 -0
  147. package/lib/table/PTable.vue.cjs +1 -1
  148. package/lib/table/index.cjs +1 -1
  149. package/lib/table/index.d.ts +2 -2
  150. package/lib/table/typing.d.ts +8 -8
  151. package/package.json +21 -24
  152. package/es/typing.d.ts +0 -5
  153. package/lib/typing.d.ts +0 -5
@@ -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: {
@@ -33,6 +33,10 @@ declare function __VLS_template(): {
33
33
  onBeforeHide: import('vue').PropType<() => void>;
34
34
  onAfterHide: import('vue').PropType<() => void>;
35
35
  onHide: import('vue').PropType<(value: false) => void>;
36
+ unstableShowMask: {
37
+ type: BooleanConstructor;
38
+ default: undefined;
39
+ };
36
40
  icon: import('vue').PropType<() => import('vue').VNodeChild>;
37
41
  type: {
38
42
  readonly type: import('vue').PropType<"info" | "success" | "warning" | "error" | "default">;
@@ -62,6 +66,7 @@ declare function __VLS_template(): {
62
66
  contentStyle: import('vue').PropType<string | import('vue').CSSProperties>;
63
67
  actionClass: import('vue').PropType<string | Array<string | undefined>>;
64
68
  actionStyle: import('vue').PropType<string | import('vue').CSSProperties>;
69
+ closeFocusable: BooleanConstructor;
65
70
  headerClass: StringConstructor;
66
71
  headerStyle: import('vue').PropType<import('vue').CSSProperties | string>;
67
72
  headerExtraClass: StringConstructor;
@@ -87,7 +92,7 @@ declare function __VLS_template(): {
87
92
  footer: import('vue').PropType<() => import('vue').VNodeChild>;
88
93
  headerExtra: import('vue').PropType<() => import('vue').VNodeChild>;
89
94
  show: BooleanConstructor;
90
- unstableShowMask: {
95
+ showMask: {
91
96
  type: BooleanConstructor;
92
97
  default: boolean;
93
98
  };
@@ -1021,28 +1026,30 @@ declare function __VLS_template(): {
1021
1026
  themeClass: import('vue').Ref<string, string> | undefined;
1022
1027
  onRender: (() => void) | undefined;
1023
1028
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
1024
- type: "error" | "default" | "info" | "success" | "warning";
1025
- tag: keyof HTMLElementTagNameMap;
1029
+ type: "default" | "info" | "warning" | "error" | "success";
1026
1030
  size: "small" | "medium" | "large" | "huge";
1027
- show: boolean;
1028
- transformOrigin: "center" | "mouse";
1029
- loading: boolean;
1030
- autoFocus: boolean;
1031
- bordered: boolean;
1032
1031
  showIcon: boolean;
1032
+ bordered: boolean;
1033
1033
  closable: boolean;
1034
- displayDirective: "show" | "if";
1035
- hoverable: boolean;
1034
+ loading: boolean;
1035
+ show: boolean;
1036
+ transformOrigin: "center" | "mouse";
1037
+ tag: keyof HTMLElementTagNameMap;
1036
1038
  embedded: boolean;
1037
1039
  segmented: boolean | import('naive-ui').CardSegmented;
1040
+ hoverable: boolean;
1041
+ closeFocusable: boolean;
1042
+ displayDirective: "show" | "if";
1043
+ blockScroll: boolean;
1044
+ closeOnEsc: boolean;
1045
+ autoFocus: boolean;
1046
+ maskClosable: boolean;
1047
+ showMask: boolean;
1048
+ trapFocus: boolean;
1038
1049
  internalDialog: boolean;
1039
1050
  internalModal: boolean;
1040
1051
  internalAppear: boolean | undefined;
1041
1052
  unstableShowMask: boolean;
1042
- maskClosable: boolean;
1043
- trapFocus: boolean;
1044
- closeOnEsc: boolean;
1045
- blockScroll: boolean;
1046
1053
  }, true, {}, import('vue').SlotsType<import('naive-ui').ModalSlots>, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
1047
1054
  P: {};
1048
1055
  B: {};
@@ -1072,6 +1079,10 @@ declare function __VLS_template(): {
1072
1079
  onBeforeHide: import('vue').PropType<() => void>;
1073
1080
  onAfterHide: import('vue').PropType<() => void>;
1074
1081
  onHide: import('vue').PropType<(value: false) => void>;
1082
+ unstableShowMask: {
1083
+ type: BooleanConstructor;
1084
+ default: undefined;
1085
+ };
1075
1086
  icon: import('vue').PropType<() => import('vue').VNodeChild>;
1076
1087
  type: {
1077
1088
  readonly type: import('vue').PropType<"info" | "success" | "warning" | "error" | "default">;
@@ -1101,6 +1112,7 @@ declare function __VLS_template(): {
1101
1112
  contentStyle: import('vue').PropType<string | import('vue').CSSProperties>;
1102
1113
  actionClass: import('vue').PropType<string | Array<string | undefined>>;
1103
1114
  actionStyle: import('vue').PropType<string | import('vue').CSSProperties>;
1115
+ closeFocusable: BooleanConstructor;
1104
1116
  headerClass: StringConstructor;
1105
1117
  headerStyle: import('vue').PropType<import('vue').CSSProperties | string>;
1106
1118
  headerExtraClass: StringConstructor;
@@ -1126,7 +1138,7 @@ declare function __VLS_template(): {
1126
1138
  footer: import('vue').PropType<() => import('vue').VNodeChild>;
1127
1139
  headerExtra: import('vue').PropType<() => import('vue').VNodeChild>;
1128
1140
  show: BooleanConstructor;
1129
- unstableShowMask: {
1141
+ showMask: {
1130
1142
  type: BooleanConstructor;
1131
1143
  default: boolean;
1132
1144
  };
@@ -2060,40 +2072,42 @@ declare function __VLS_template(): {
2060
2072
  themeClass: import('vue').Ref<string, string> | undefined;
2061
2073
  onRender: (() => void) | undefined;
2062
2074
  }, {}, {}, {}, {
2063
- type: "error" | "default" | "info" | "success" | "warning";
2064
- tag: keyof HTMLElementTagNameMap;
2075
+ type: "default" | "info" | "warning" | "error" | "success";
2065
2076
  size: "small" | "medium" | "large" | "huge";
2066
- show: boolean;
2067
- transformOrigin: "center" | "mouse";
2068
- loading: boolean;
2069
- autoFocus: boolean;
2070
- bordered: boolean;
2071
2077
  showIcon: boolean;
2078
+ bordered: boolean;
2072
2079
  closable: boolean;
2073
- displayDirective: "show" | "if";
2074
- hoverable: boolean;
2080
+ loading: boolean;
2081
+ show: boolean;
2082
+ transformOrigin: "center" | "mouse";
2083
+ tag: keyof HTMLElementTagNameMap;
2075
2084
  embedded: boolean;
2076
2085
  segmented: boolean | import('naive-ui').CardSegmented;
2086
+ hoverable: boolean;
2087
+ closeFocusable: boolean;
2088
+ displayDirective: "show" | "if";
2089
+ blockScroll: boolean;
2090
+ closeOnEsc: boolean;
2091
+ autoFocus: boolean;
2092
+ maskClosable: boolean;
2093
+ showMask: boolean;
2094
+ trapFocus: boolean;
2077
2095
  internalDialog: boolean;
2078
2096
  internalModal: boolean;
2079
2097
  internalAppear: boolean | undefined;
2080
2098
  unstableShowMask: boolean;
2081
- maskClosable: boolean;
2082
- trapFocus: boolean;
2083
- closeOnEsc: boolean;
2084
- blockScroll: boolean;
2085
2099
  }> | null;
2086
2100
  };
2087
2101
  rootEl: any;
2088
2102
  };
2089
2103
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
2090
- declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
2104
+ declare const __VLS_component: import('vue').DefineComponent<ModalProps, {
2091
2105
  open: () => void;
2092
2106
  close: () => void;
2093
2107
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2094
2108
  "update:visible": (...args: any[]) => void;
2095
2109
  "update:loading": (...args: any[]) => void;
2096
- }, string, import('vue').PublicProps, Readonly<PModalProps> & Readonly<{
2110
+ }, string, import('vue').PublicProps, Readonly<ModalProps> & Readonly<{
2097
2111
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
2098
2112
  "onUpdate:loading"?: ((...args: any[]) => any) | undefined;
2099
2113
  }>, {
@@ -2124,6 +2138,10 @@ declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
2124
2138
  onBeforeHide: import('vue').PropType<() => void>;
2125
2139
  onAfterHide: import('vue').PropType<() => void>;
2126
2140
  onHide: import('vue').PropType<(value: false) => void>;
2141
+ unstableShowMask: {
2142
+ type: BooleanConstructor;
2143
+ default: undefined;
2144
+ };
2127
2145
  icon: import('vue').PropType<() => import('vue').VNodeChild>;
2128
2146
  type: {
2129
2147
  readonly type: import('vue').PropType<"info" | "success" | "warning" | "error" | "default">;
@@ -2153,6 +2171,7 @@ declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
2153
2171
  contentStyle: import('vue').PropType<string | import('vue').CSSProperties>;
2154
2172
  actionClass: import('vue').PropType<string | Array<string | undefined>>;
2155
2173
  actionStyle: import('vue').PropType<string | import('vue').CSSProperties>;
2174
+ closeFocusable: BooleanConstructor;
2156
2175
  headerClass: StringConstructor;
2157
2176
  headerStyle: import('vue').PropType<import('vue').CSSProperties | string>;
2158
2177
  headerExtraClass: StringConstructor;
@@ -2178,7 +2197,7 @@ declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
2178
2197
  footer: import('vue').PropType<() => import('vue').VNodeChild>;
2179
2198
  headerExtra: import('vue').PropType<() => import('vue').VNodeChild>;
2180
2199
  show: BooleanConstructor;
2181
- unstableShowMask: {
2200
+ showMask: {
2182
2201
  type: BooleanConstructor;
2183
2202
  default: boolean;
2184
2203
  };
@@ -3112,28 +3131,30 @@ declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
3112
3131
  themeClass: import('vue').Ref<string, string> | undefined;
3113
3132
  onRender: (() => void) | undefined;
3114
3133
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
3115
- type: "error" | "default" | "info" | "success" | "warning";
3116
- tag: keyof HTMLElementTagNameMap;
3134
+ type: "default" | "info" | "warning" | "error" | "success";
3117
3135
  size: "small" | "medium" | "large" | "huge";
3118
- show: boolean;
3119
- transformOrigin: "center" | "mouse";
3120
- loading: boolean;
3121
- autoFocus: boolean;
3122
- bordered: boolean;
3123
3136
  showIcon: boolean;
3137
+ bordered: boolean;
3124
3138
  closable: boolean;
3125
- displayDirective: "show" | "if";
3126
- hoverable: boolean;
3139
+ loading: boolean;
3140
+ show: boolean;
3141
+ transformOrigin: "center" | "mouse";
3142
+ tag: keyof HTMLElementTagNameMap;
3127
3143
  embedded: boolean;
3128
3144
  segmented: boolean | import('naive-ui').CardSegmented;
3145
+ hoverable: boolean;
3146
+ closeFocusable: boolean;
3147
+ displayDirective: "show" | "if";
3148
+ blockScroll: boolean;
3149
+ closeOnEsc: boolean;
3150
+ autoFocus: boolean;
3151
+ maskClosable: boolean;
3152
+ showMask: boolean;
3153
+ trapFocus: boolean;
3129
3154
  internalDialog: boolean;
3130
3155
  internalModal: boolean;
3131
3156
  internalAppear: boolean | undefined;
3132
3157
  unstableShowMask: boolean;
3133
- maskClosable: boolean;
3134
- trapFocus: boolean;
3135
- closeOnEsc: boolean;
3136
- blockScroll: boolean;
3137
3158
  }, true, {}, import('vue').SlotsType<import('naive-ui').ModalSlots>, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
3138
3159
  P: {};
3139
3160
  B: {};
@@ -3163,6 +3184,10 @@ declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
3163
3184
  onBeforeHide: import('vue').PropType<() => void>;
3164
3185
  onAfterHide: import('vue').PropType<() => void>;
3165
3186
  onHide: import('vue').PropType<(value: false) => void>;
3187
+ unstableShowMask: {
3188
+ type: BooleanConstructor;
3189
+ default: undefined;
3190
+ };
3166
3191
  icon: import('vue').PropType<() => import('vue').VNodeChild>;
3167
3192
  type: {
3168
3193
  readonly type: import('vue').PropType<"info" | "success" | "warning" | "error" | "default">;
@@ -3192,6 +3217,7 @@ declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
3192
3217
  contentStyle: import('vue').PropType<string | import('vue').CSSProperties>;
3193
3218
  actionClass: import('vue').PropType<string | Array<string | undefined>>;
3194
3219
  actionStyle: import('vue').PropType<string | import('vue').CSSProperties>;
3220
+ closeFocusable: BooleanConstructor;
3195
3221
  headerClass: StringConstructor;
3196
3222
  headerStyle: import('vue').PropType<import('vue').CSSProperties | string>;
3197
3223
  headerExtraClass: StringConstructor;
@@ -3217,7 +3243,7 @@ declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
3217
3243
  footer: import('vue').PropType<() => import('vue').VNodeChild>;
3218
3244
  headerExtra: import('vue').PropType<() => import('vue').VNodeChild>;
3219
3245
  show: BooleanConstructor;
3220
- unstableShowMask: {
3246
+ showMask: {
3221
3247
  type: BooleanConstructor;
3222
3248
  default: boolean;
3223
3249
  };
@@ -4151,28 +4177,30 @@ declare const __VLS_component: import('vue').DefineComponent<PModalProps, {
4151
4177
  themeClass: import('vue').Ref<string, string> | undefined;
4152
4178
  onRender: (() => void) | undefined;
4153
4179
  }, {}, {}, {}, {
4154
- type: "error" | "default" | "info" | "success" | "warning";
4155
- tag: keyof HTMLElementTagNameMap;
4180
+ type: "default" | "info" | "warning" | "error" | "success";
4156
4181
  size: "small" | "medium" | "large" | "huge";
4157
- show: boolean;
4158
- transformOrigin: "center" | "mouse";
4159
- loading: boolean;
4160
- autoFocus: boolean;
4161
- bordered: boolean;
4162
4182
  showIcon: boolean;
4183
+ bordered: boolean;
4163
4184
  closable: boolean;
4164
- displayDirective: "show" | "if";
4165
- hoverable: boolean;
4185
+ loading: boolean;
4186
+ show: boolean;
4187
+ transformOrigin: "center" | "mouse";
4188
+ tag: keyof HTMLElementTagNameMap;
4166
4189
  embedded: boolean;
4167
4190
  segmented: boolean | import('naive-ui').CardSegmented;
4191
+ hoverable: boolean;
4192
+ closeFocusable: boolean;
4193
+ displayDirective: "show" | "if";
4194
+ blockScroll: boolean;
4195
+ closeOnEsc: boolean;
4196
+ autoFocus: boolean;
4197
+ maskClosable: boolean;
4198
+ showMask: boolean;
4199
+ trapFocus: boolean;
4168
4200
  internalDialog: boolean;
4169
4201
  internalModal: boolean;
4170
4202
  internalAppear: boolean | undefined;
4171
4203
  unstableShowMask: boolean;
4172
- maskClosable: boolean;
4173
- trapFocus: boolean;
4174
- closeOnEsc: boolean;
4175
- blockScroll: boolean;
4176
4204
  }> | null;
4177
4205
  }, any>;
4178
4206
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,6 +1,6 @@
1
- import { useMessage as $, NModal as w, NSpace as B, NButton as N, NText as S } from "naive-ui";
2
- import { defineComponent as _, createBlock as p, openBlock as c, unref as k, mergeProps as T, withCtx as a, createVNode as n, renderSlot as s, createTextVNode as d, toDisplayString as u, createElementVNode as V, normalizeStyle as x, createCommentVNode as M } from "vue";
3
- const E = /* @__PURE__ */ _({
1
+ import { useMessage as $, NModal as w, NSpace as x, NButton as B, NText as N } from "naive-ui";
2
+ import { defineComponent as S, openBlock as u, createBlock as g, unref as k, mergeProps as T, withCtx as a, createVNode as d, createTextVNode as i, toDisplayString as p, renderSlot as s, createElementVNode as V, normalizeStyle as M, createCommentVNode as P } from "vue";
3
+ const H = /* @__PURE__ */ S({
4
4
  __name: "PModal",
5
5
  props: {
6
6
  saveBtnText: { default: "保存" },
@@ -14,55 +14,55 @@ const E = /* @__PURE__ */ _({
14
14
  onClose: {}
15
15
  },
16
16
  emits: ["update:visible", "update:loading"],
17
- setup(g, { expose: m, emit: y }) {
18
- const i = $(), t = g, o = y, h = async () => {
19
- o("update:loading", !0);
17
+ setup(l, { expose: m, emit: y }) {
18
+ const r = $(), o = l, t = y, h = async () => {
19
+ t("update:loading", !0);
20
20
  try {
21
- t.onSave && await t.onSave() && l();
21
+ o.onSave && await o.onSave() && n();
22
22
  } catch (e) {
23
- i.error(e.message);
23
+ r.error(e.message);
24
24
  } finally {
25
- o("update:loading", !1);
25
+ t("update:loading", !1);
26
26
  }
27
- }, l = () => {
28
- o("update:visible", !1), o("update:loading", !1);
27
+ }, n = () => {
28
+ t("update:visible", !1), t("update:loading", !1);
29
29
  }, v = async () => {
30
30
  try {
31
- t.onClose ? await t.onClose() && l() : l();
31
+ o.onClose ? await o.onClose() && n() : n();
32
32
  } catch (e) {
33
- i.error(e.message), o("update:loading", !1);
33
+ r.error(e.message), t("update:loading", !1);
34
34
  }
35
35
  };
36
36
  return m({
37
37
  open: () => {
38
- o("update:visible", !0), o("update:loading", !1);
38
+ t("update:visible", !0), t("update:loading", !1);
39
39
  },
40
40
  close: () => {
41
- o("update:visible", !1), o("update:loading", !1);
41
+ t("update:visible", !1), t("update:loading", !1);
42
42
  }
43
- }), (e, r) => {
44
- const b = S, f = N, C = B;
45
- return c(), p(k(w), T({
43
+ }), (e, c) => {
44
+ const b = N, f = B, C = x;
45
+ return u(), g(k(w), T({
46
46
  ref: "$modal",
47
47
  preset: "card"
48
48
  }, e.$attrs, {
49
49
  "header-class": "bg-gray-50",
50
- show: t.visible,
50
+ show: o.visible,
51
51
  draggable: !0,
52
52
  closable: !1,
53
53
  "close-on-esc": !1,
54
54
  "mask-closable": !1,
55
55
  bordered: !1,
56
- style: { width: `${t.width}px` },
57
- onClose: l
56
+ style: { width: `${o.width}px` },
57
+ onClose: n
58
58
  }), {
59
59
  header: a(() => [
60
- e.$slots.header ? s(e.$slots, "header", { key: 0 }) : t.title ? (c(), p(b, { key: 1 }, {
60
+ e.$slots.header ? s(e.$slots, "header", { key: 0 }) : o.title ? (u(), g(b, { key: 1 }, {
61
61
  default: a(() => [
62
- d(u(e.title), 1)
62
+ i(p(l.title), 1)
63
63
  ]),
64
64
  _: 1
65
- })) : M("", !0)
65
+ })) : P("", !0)
66
66
  ]),
67
67
  "header-extra": a(() => [
68
68
  s(e.$slots, "header-extra")
@@ -70,7 +70,7 @@ const E = /* @__PURE__ */ _({
70
70
  default: a(() => [
71
71
  V("div", {
72
72
  class: "overflow-y-auto overflow-hidden mt-5",
73
- style: x({ maxHeight: `${t.height}px` })
73
+ style: M({ maxHeight: `${o.height}px` })
74
74
  }, [
75
75
  s(e.$slots, "default")
76
76
  ], 4)
@@ -79,28 +79,27 @@ const E = /* @__PURE__ */ _({
79
79
  s(e.$slots, "footer")
80
80
  ]),
81
81
  action: a(() => [
82
- n(C, { justify: "end" }, {
82
+ d(C, { justify: "end" }, {
83
83
  default: a(() => [
84
- n(f, {
84
+ d(f, {
85
85
  type: "primary",
86
- loading: e.loading,
86
+ loading: l.loading,
87
87
  onClick: h
88
88
  }, {
89
89
  default: a(() => [
90
- d(u(e.saveBtnText), 1)
90
+ i(p(l.saveBtnText), 1)
91
91
  ]),
92
92
  _: 1
93
93
  }, 8, ["loading"]),
94
- s(e.$slots, "action-extra", { loading: e.loading }),
95
- n(f, {
94
+ s(e.$slots, "action-extra", { loading: l.loading }),
95
+ d(f, {
96
96
  onClick: v,
97
- loading: e.loading
97
+ loading: l.loading
98
98
  }, {
99
- default: a(() => r[0] || (r[0] = [
100
- d("取消", -1)
101
- ])),
102
- _: 1,
103
- __: [0]
99
+ default: a(() => [...c[0] || (c[0] = [
100
+ i("取消", -1)
101
+ ])]),
102
+ _: 1
104
103
  }, 8, ["loading"])
105
104
  ]),
106
105
  _: 3
@@ -112,5 +111,5 @@ const E = /* @__PURE__ */ _({
112
111
  }
113
112
  });
114
113
  export {
115
- E as default
114
+ H as default
116
115
  };
@@ -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
  }>, {
@@ -36,6 +37,10 @@ declare const _default: {
36
37
  onBeforeHide: import('vue').PropType<() => void>;
37
38
  onAfterHide: import('vue').PropType<() => void>;
38
39
  onHide: import('vue').PropType<(value: false) => void>;
40
+ unstableShowMask: {
41
+ type: BooleanConstructor;
42
+ default: undefined;
43
+ };
39
44
  icon: import('vue').PropType<() => import('vue').VNodeChild>;
40
45
  type: {
41
46
  readonly type: import('vue').PropType<"info" | "success" | "warning" | "error" | "default">;
@@ -65,6 +70,7 @@ declare const _default: {
65
70
  contentStyle: import('vue').PropType<string | import('vue').CSSProperties>;
66
71
  actionClass: import('vue').PropType<string | Array<string | undefined>>;
67
72
  actionStyle: import('vue').PropType<string | import('vue').CSSProperties>;
73
+ closeFocusable: BooleanConstructor;
68
74
  headerClass: StringConstructor;
69
75
  headerStyle: import('vue').PropType<import('vue').CSSProperties | string>;
70
76
  headerExtraClass: StringConstructor;
@@ -90,7 +96,7 @@ declare const _default: {
90
96
  footer: import('vue').PropType<() => import('vue').VNodeChild>;
91
97
  headerExtra: import('vue').PropType<() => import('vue').VNodeChild>;
92
98
  show: BooleanConstructor;
93
- unstableShowMask: {
99
+ showMask: {
94
100
  type: BooleanConstructor;
95
101
  default: boolean;
96
102
  };
@@ -1024,28 +1030,30 @@ declare const _default: {
1024
1030
  themeClass: import('vue').Ref<string, string> | undefined;
1025
1031
  onRender: (() => void) | undefined;
1026
1032
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
1027
- type: "error" | "default" | "info" | "success" | "warning";
1028
- tag: keyof HTMLElementTagNameMap;
1033
+ type: "default" | "info" | "warning" | "error" | "success";
1029
1034
  size: "small" | "medium" | "large" | "huge";
1030
- show: boolean;
1031
- transformOrigin: "center" | "mouse";
1032
- loading: boolean;
1033
- autoFocus: boolean;
1034
- bordered: boolean;
1035
1035
  showIcon: boolean;
1036
+ bordered: boolean;
1036
1037
  closable: boolean;
1037
- displayDirective: "show" | "if";
1038
- hoverable: boolean;
1038
+ loading: boolean;
1039
+ show: boolean;
1040
+ transformOrigin: "center" | "mouse";
1041
+ tag: keyof HTMLElementTagNameMap;
1039
1042
  embedded: boolean;
1040
1043
  segmented: boolean | import('naive-ui').CardSegmented;
1044
+ hoverable: boolean;
1045
+ closeFocusable: boolean;
1046
+ displayDirective: "show" | "if";
1047
+ blockScroll: boolean;
1048
+ closeOnEsc: boolean;
1049
+ autoFocus: boolean;
1050
+ maskClosable: boolean;
1051
+ showMask: boolean;
1052
+ trapFocus: boolean;
1041
1053
  internalDialog: boolean;
1042
1054
  internalModal: boolean;
1043
1055
  internalAppear: boolean | undefined;
1044
1056
  unstableShowMask: boolean;
1045
- maskClosable: boolean;
1046
- trapFocus: boolean;
1047
- closeOnEsc: boolean;
1048
- blockScroll: boolean;
1049
1057
  }, true, {}, import('vue').SlotsType<import('naive-ui').ModalSlots>, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
1050
1058
  P: {};
1051
1059
  B: {};
@@ -1075,6 +1083,10 @@ declare const _default: {
1075
1083
  onBeforeHide: import('vue').PropType<() => void>;
1076
1084
  onAfterHide: import('vue').PropType<() => void>;
1077
1085
  onHide: import('vue').PropType<(value: false) => void>;
1086
+ unstableShowMask: {
1087
+ type: BooleanConstructor;
1088
+ default: undefined;
1089
+ };
1078
1090
  icon: import('vue').PropType<() => import('vue').VNodeChild>;
1079
1091
  type: {
1080
1092
  readonly type: import('vue').PropType<"info" | "success" | "warning" | "error" | "default">;
@@ -1104,6 +1116,7 @@ declare const _default: {
1104
1116
  contentStyle: import('vue').PropType<string | import('vue').CSSProperties>;
1105
1117
  actionClass: import('vue').PropType<string | Array<string | undefined>>;
1106
1118
  actionStyle: import('vue').PropType<string | import('vue').CSSProperties>;
1119
+ closeFocusable: BooleanConstructor;
1107
1120
  headerClass: StringConstructor;
1108
1121
  headerStyle: import('vue').PropType<import('vue').CSSProperties | string>;
1109
1122
  headerExtraClass: StringConstructor;
@@ -1129,7 +1142,7 @@ declare const _default: {
1129
1142
  footer: import('vue').PropType<() => import('vue').VNodeChild>;
1130
1143
  headerExtra: import('vue').PropType<() => import('vue').VNodeChild>;
1131
1144
  show: BooleanConstructor;
1132
- unstableShowMask: {
1145
+ showMask: {
1133
1146
  type: BooleanConstructor;
1134
1147
  default: boolean;
1135
1148
  };
@@ -2063,28 +2076,30 @@ declare const _default: {
2063
2076
  themeClass: import('vue').Ref<string, string> | undefined;
2064
2077
  onRender: (() => void) | undefined;
2065
2078
  }, {}, {}, {}, {
2066
- type: "error" | "default" | "info" | "success" | "warning";
2067
- tag: keyof HTMLElementTagNameMap;
2079
+ type: "default" | "info" | "warning" | "error" | "success";
2068
2080
  size: "small" | "medium" | "large" | "huge";
2069
- show: boolean;
2070
- transformOrigin: "center" | "mouse";
2071
- loading: boolean;
2072
- autoFocus: boolean;
2073
- bordered: boolean;
2074
2081
  showIcon: boolean;
2082
+ bordered: boolean;
2075
2083
  closable: boolean;
2076
- displayDirective: "show" | "if";
2077
- hoverable: boolean;
2084
+ loading: boolean;
2085
+ show: boolean;
2086
+ transformOrigin: "center" | "mouse";
2087
+ tag: keyof HTMLElementTagNameMap;
2078
2088
  embedded: boolean;
2079
2089
  segmented: boolean | import('naive-ui').CardSegmented;
2090
+ hoverable: boolean;
2091
+ closeFocusable: boolean;
2092
+ displayDirective: "show" | "if";
2093
+ blockScroll: boolean;
2094
+ closeOnEsc: boolean;
2095
+ autoFocus: boolean;
2096
+ maskClosable: boolean;
2097
+ showMask: boolean;
2098
+ trapFocus: boolean;
2080
2099
  internalDialog: boolean;
2081
2100
  internalModal: boolean;
2082
2101
  internalAppear: boolean | undefined;
2083
2102
  unstableShowMask: boolean;
2084
- maskClosable: boolean;
2085
- trapFocus: boolean;
2086
- closeOnEsc: boolean;
2087
- blockScroll: boolean;
2088
2103
  }> | null;
2089
2104
  }, any, import('vue').ComponentProvideOptions, {
2090
2105
  P: {};
@@ -2093,7 +2108,7 @@ declare const _default: {
2093
2108
  C: {};
2094
2109
  M: {};
2095
2110
  Defaults: {};
2096
- }, Readonly<import('./typing').PModalProps> & Readonly<{
2111
+ }, Readonly<import('./typing').ModalProps> & Readonly<{
2097
2112
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
2098
2113
  "onUpdate:loading"?: ((...args: any[]) => any) | undefined;
2099
2114
  }>, {
@@ -2108,7 +2123,7 @@ declare const _default: {
2108
2123
  __isFragment?: never;
2109
2124
  __isTeleport?: never;
2110
2125
  __isSuspense?: never;
2111
- } & import('vue').ComponentOptionsBase<Readonly<import('./typing').PModalProps> & Readonly<{
2126
+ } & import('vue').ComponentOptionsBase<Readonly<import('./typing').ModalProps> & Readonly<{
2112
2127
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
2113
2128
  "onUpdate:loading"?: ((...args: any[]) => any) | undefined;
2114
2129
  }>, {
@@ -2133,4 +2148,3 @@ declare const _default: {
2133
2148
  }): any;
2134
2149
  };
2135
2150
  }) & import('vue').Plugin;
2136
- 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
  };