el-plus 0.0.55 → 0.0.56
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.
- package/CHANGELOG.md +6 -0
- package/dist/index.full.js +154 -13
- package/dist/index.full.min.js +1 -1
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +1 -1
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +154 -13
- package/es/components/buttons/index.d.ts +6 -6
- package/es/components/buttons/src/buttons-vue.d.ts +2 -2
- package/es/components/date-picker-range/index.d.ts +3 -3
- package/es/components/date-picker-range/src/date-picker-range.vue.d.ts +1 -1
- package/es/components/input/index.d.ts +3 -3
- package/es/components/input/src/input.vue.d.ts +1 -1
- package/es/components/search-list-page/index.d.ts +30 -30
- package/es/components/search-list-page/src/search-list-page.vue.d.ts +10 -10
- package/es/components/search-list-page/src/use-search-list-page.d.ts +10 -10
- package/es/components/table/index.d.ts +6 -6
- package/es/components/table/src/table.vue.d.ts +2 -2
- package/es/components/table/src/use-table.d.ts +2 -2
- package/es/hooks/use-locale.d.ts +2 -1
- package/es/hooks/use-locale.mjs +50 -11
- package/es/hooks/use-locale.mjs.map +1 -1
- package/es/package.json.mjs +1 -1
- package/lib/components/buttons/index.d.ts +6 -6
- package/lib/components/buttons/src/buttons-vue.d.ts +2 -2
- package/lib/components/date-picker-range/index.d.ts +3 -3
- package/lib/components/date-picker-range/src/date-picker-range.vue.d.ts +1 -1
- package/lib/components/input/index.d.ts +3 -3
- package/lib/components/input/src/input.vue.d.ts +1 -1
- package/lib/components/search-list-page/index.d.ts +30 -30
- package/lib/components/search-list-page/src/search-list-page.vue.d.ts +10 -10
- package/lib/components/search-list-page/src/use-search-list-page.d.ts +10 -10
- package/lib/components/table/index.d.ts +6 -6
- package/lib/components/table/src/table.vue.d.ts +2 -2
- package/lib/components/table/src/use-table.d.ts +2 -2
- package/lib/hooks/use-locale.d.ts +2 -1
- package/lib/hooks/use-locale.js +50 -11
- package/lib/hooks/use-locale.js.map +1 -1
- package/lib/package.json.js +1 -1
- package/package.json +1 -1
|
@@ -123,13 +123,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
123
123
|
readonly nextText: string;
|
|
124
124
|
readonly hideOnSinglePage: boolean;
|
|
125
125
|
} & {
|
|
126
|
+
readonly total?: number | undefined;
|
|
127
|
+
readonly currentPage?: number | undefined;
|
|
126
128
|
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
127
129
|
readonly popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
128
130
|
readonly pageSize?: number | undefined;
|
|
129
131
|
readonly defaultPageSize?: number | undefined;
|
|
130
|
-
readonly total?: number | undefined;
|
|
131
132
|
readonly pageCount?: number | undefined;
|
|
132
|
-
readonly currentPage?: number | undefined;
|
|
133
133
|
readonly defaultCurrentPage?: number | undefined;
|
|
134
134
|
readonly prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
135
135
|
readonly nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -231,13 +231,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
231
231
|
readonly nextText: string;
|
|
232
232
|
readonly hideOnSinglePage: boolean;
|
|
233
233
|
} & {
|
|
234
|
+
readonly total?: number | undefined;
|
|
235
|
+
readonly currentPage?: number | undefined;
|
|
234
236
|
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
235
237
|
readonly popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
236
238
|
readonly pageSize?: number | undefined;
|
|
237
239
|
readonly defaultPageSize?: number | undefined;
|
|
238
|
-
readonly total?: number | undefined;
|
|
239
240
|
readonly pageCount?: number | undefined;
|
|
240
|
-
readonly currentPage?: number | undefined;
|
|
241
241
|
readonly defaultCurrentPage?: number | undefined;
|
|
242
242
|
readonly prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
243
243
|
readonly nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -297,6 +297,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
297
297
|
readonly allowDragLastColumn: boolean;
|
|
298
298
|
readonly preserveExpandedContent: boolean;
|
|
299
299
|
readonly nativeScrollbar: boolean;
|
|
300
|
+
readonly emptyText?: string | undefined;
|
|
301
|
+
readonly sumText?: string | undefined;
|
|
300
302
|
readonly method?: import("axios").Method | undefined;
|
|
301
303
|
readonly load?: ((row: any, treeNode: import("element-plus").TreeNode, resolve: (data: any[]) => void) => void) | undefined;
|
|
302
304
|
readonly width?: string | number | undefined;
|
|
@@ -334,9 +336,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
334
336
|
readonly customColumnModule?: string | number | undefined;
|
|
335
337
|
readonly height?: string | number | undefined;
|
|
336
338
|
readonly maxHeight?: string | number | undefined;
|
|
337
|
-
readonly sumText?: string | undefined;
|
|
338
339
|
readonly currentRowKey?: string | number | undefined;
|
|
339
|
-
readonly emptyText?: string | undefined;
|
|
340
340
|
readonly tooltipEffect?: string | undefined;
|
|
341
341
|
readonly appendFilterPanelTo?: string | undefined;
|
|
342
342
|
readonly scrollbarTabindex?: string | number | undefined;
|
|
@@ -1174,13 +1174,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
1174
1174
|
readonly nextText: string;
|
|
1175
1175
|
readonly hideOnSinglePage: boolean;
|
|
1176
1176
|
} & {
|
|
1177
|
+
readonly total?: number | undefined;
|
|
1178
|
+
readonly currentPage?: number | undefined;
|
|
1177
1179
|
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
1178
1180
|
readonly popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
1179
1181
|
readonly pageSize?: number | undefined;
|
|
1180
1182
|
readonly defaultPageSize?: number | undefined;
|
|
1181
|
-
readonly total?: number | undefined;
|
|
1182
1183
|
readonly pageCount?: number | undefined;
|
|
1183
|
-
readonly currentPage?: number | undefined;
|
|
1184
1184
|
readonly defaultCurrentPage?: number | undefined;
|
|
1185
1185
|
readonly prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
1186
1186
|
readonly nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -1302,13 +1302,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
1302
1302
|
readonly nextText: string;
|
|
1303
1303
|
readonly hideOnSinglePage: boolean;
|
|
1304
1304
|
} & {
|
|
1305
|
+
readonly total?: number | undefined;
|
|
1306
|
+
readonly currentPage?: number | undefined;
|
|
1305
1307
|
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
1306
1308
|
readonly popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
1307
1309
|
readonly pageSize?: number | undefined;
|
|
1308
1310
|
readonly defaultPageSize?: number | undefined;
|
|
1309
|
-
readonly total?: number | undefined;
|
|
1310
1311
|
readonly pageCount?: number | undefined;
|
|
1311
|
-
readonly currentPage?: number | undefined;
|
|
1312
1312
|
readonly defaultCurrentPage?: number | undefined;
|
|
1313
1313
|
readonly prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
1314
1314
|
readonly nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -126,13 +126,13 @@ export declare const useSearchListPage: (props: SearchListPageProps, config?: {}
|
|
|
126
126
|
readonly nextText: string;
|
|
127
127
|
readonly hideOnSinglePage: boolean;
|
|
128
128
|
} & {
|
|
129
|
+
readonly total?: number | undefined;
|
|
130
|
+
readonly currentPage?: number | undefined;
|
|
129
131
|
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
130
132
|
readonly popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
131
133
|
readonly pageSize?: number | undefined;
|
|
132
134
|
readonly defaultPageSize?: number | undefined;
|
|
133
|
-
readonly total?: number | undefined;
|
|
134
135
|
readonly pageCount?: number | undefined;
|
|
135
|
-
readonly currentPage?: number | undefined;
|
|
136
136
|
readonly defaultCurrentPage?: number | undefined;
|
|
137
137
|
readonly prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
138
138
|
readonly nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -234,13 +234,13 @@ export declare const useSearchListPage: (props: SearchListPageProps, config?: {}
|
|
|
234
234
|
readonly nextText: string;
|
|
235
235
|
readonly hideOnSinglePage: boolean;
|
|
236
236
|
} & {
|
|
237
|
+
readonly total?: number | undefined;
|
|
238
|
+
readonly currentPage?: number | undefined;
|
|
237
239
|
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
238
240
|
readonly popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
239
241
|
readonly pageSize?: number | undefined;
|
|
240
242
|
readonly defaultPageSize?: number | undefined;
|
|
241
|
-
readonly total?: number | undefined;
|
|
242
243
|
readonly pageCount?: number | undefined;
|
|
243
|
-
readonly currentPage?: number | undefined;
|
|
244
244
|
readonly defaultCurrentPage?: number | undefined;
|
|
245
245
|
readonly prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
246
246
|
readonly nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -300,6 +300,8 @@ export declare const useSearchListPage: (props: SearchListPageProps, config?: {}
|
|
|
300
300
|
readonly allowDragLastColumn: boolean;
|
|
301
301
|
readonly preserveExpandedContent: boolean;
|
|
302
302
|
readonly nativeScrollbar: boolean;
|
|
303
|
+
readonly emptyText?: string | undefined;
|
|
304
|
+
readonly sumText?: string | undefined;
|
|
303
305
|
readonly method?: import("axios").Method | undefined;
|
|
304
306
|
readonly load?: ((row: any, treeNode: import("element-plus").TreeNode, resolve: (data: any[]) => void) => void) | undefined;
|
|
305
307
|
readonly width?: string | number | undefined;
|
|
@@ -337,9 +339,7 @@ export declare const useSearchListPage: (props: SearchListPageProps, config?: {}
|
|
|
337
339
|
readonly customColumnModule?: string | number | undefined;
|
|
338
340
|
readonly height?: string | number | undefined;
|
|
339
341
|
readonly maxHeight?: string | number | undefined;
|
|
340
|
-
readonly sumText?: string | undefined;
|
|
341
342
|
readonly currentRowKey?: string | number | undefined;
|
|
342
|
-
readonly emptyText?: string | undefined;
|
|
343
343
|
readonly tooltipEffect?: string | undefined;
|
|
344
344
|
readonly appendFilterPanelTo?: string | undefined;
|
|
345
345
|
readonly scrollbarTabindex?: string | number | undefined;
|
|
@@ -1177,13 +1177,13 @@ export declare const useSearchListPage: (props: SearchListPageProps, config?: {}
|
|
|
1177
1177
|
readonly nextText: string;
|
|
1178
1178
|
readonly hideOnSinglePage: boolean;
|
|
1179
1179
|
} & {
|
|
1180
|
+
readonly total?: number | undefined;
|
|
1181
|
+
readonly currentPage?: number | undefined;
|
|
1180
1182
|
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
1181
1183
|
readonly popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
1182
1184
|
readonly pageSize?: number | undefined;
|
|
1183
1185
|
readonly defaultPageSize?: number | undefined;
|
|
1184
|
-
readonly total?: number | undefined;
|
|
1185
1186
|
readonly pageCount?: number | undefined;
|
|
1186
|
-
readonly currentPage?: number | undefined;
|
|
1187
1187
|
readonly defaultCurrentPage?: number | undefined;
|
|
1188
1188
|
readonly prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
1189
1189
|
readonly nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -1305,13 +1305,13 @@ export declare const useSearchListPage: (props: SearchListPageProps, config?: {}
|
|
|
1305
1305
|
readonly nextText: string;
|
|
1306
1306
|
readonly hideOnSinglePage: boolean;
|
|
1307
1307
|
} & {
|
|
1308
|
+
readonly total?: number | undefined;
|
|
1309
|
+
readonly currentPage?: number | undefined;
|
|
1308
1310
|
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
1309
1311
|
readonly popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
1310
1312
|
readonly pageSize?: number | undefined;
|
|
1311
1313
|
readonly defaultPageSize?: number | undefined;
|
|
1312
|
-
readonly total?: number | undefined;
|
|
1313
1314
|
readonly pageCount?: number | undefined;
|
|
1314
|
-
readonly currentPage?: number | undefined;
|
|
1315
1315
|
readonly defaultCurrentPage?: number | undefined;
|
|
1316
1316
|
readonly prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
1317
1317
|
readonly nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -857,13 +857,13 @@ export declare const EpTable: {
|
|
|
857
857
|
readonly nextText: string;
|
|
858
858
|
readonly hideOnSinglePage: boolean;
|
|
859
859
|
} & {
|
|
860
|
+
readonly total?: number | undefined;
|
|
861
|
+
readonly currentPage?: number | undefined;
|
|
860
862
|
readonly size?: import("element-plus/es/utils/index.js").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
861
863
|
readonly popperStyle?: import("element-plus/es/utils/index.js").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
862
864
|
readonly pageSize?: number | undefined;
|
|
863
865
|
readonly defaultPageSize?: number | undefined;
|
|
864
|
-
readonly total?: number | undefined;
|
|
865
866
|
readonly pageCount?: number | undefined;
|
|
866
|
-
readonly currentPage?: number | undefined;
|
|
867
867
|
readonly defaultCurrentPage?: number | undefined;
|
|
868
868
|
readonly prevIcon?: import("element-plus/es/utils/index.js").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
869
869
|
readonly nextIcon?: import("element-plus/es/utils/index.js").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -1788,13 +1788,13 @@ export declare const EpTable: {
|
|
|
1788
1788
|
readonly nextText: string;
|
|
1789
1789
|
readonly hideOnSinglePage: boolean;
|
|
1790
1790
|
} & {
|
|
1791
|
+
readonly total?: number | undefined;
|
|
1792
|
+
readonly currentPage?: number | undefined;
|
|
1791
1793
|
readonly size?: import("element-plus/es/utils/index.js").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
1792
1794
|
readonly popperStyle?: import("element-plus/es/utils/index.js").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
1793
1795
|
readonly pageSize?: number | undefined;
|
|
1794
1796
|
readonly defaultPageSize?: number | undefined;
|
|
1795
|
-
readonly total?: number | undefined;
|
|
1796
1797
|
readonly pageCount?: number | undefined;
|
|
1797
|
-
readonly currentPage?: number | undefined;
|
|
1798
1798
|
readonly defaultCurrentPage?: number | undefined;
|
|
1799
1799
|
readonly prevIcon?: import("element-plus/es/utils/index.js").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
1800
1800
|
readonly nextIcon?: import("element-plus/es/utils/index.js").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -2678,13 +2678,13 @@ export declare const EpTable: {
|
|
|
2678
2678
|
readonly nextText: string;
|
|
2679
2679
|
readonly hideOnSinglePage: boolean;
|
|
2680
2680
|
} & {
|
|
2681
|
+
readonly total?: number | undefined;
|
|
2682
|
+
readonly currentPage?: number | undefined;
|
|
2681
2683
|
readonly size?: import("element-plus/es/utils/index.js").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
2682
2684
|
readonly popperStyle?: import("element-plus/es/utils/index.js").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
2683
2685
|
readonly pageSize?: number | undefined;
|
|
2684
2686
|
readonly defaultPageSize?: number | undefined;
|
|
2685
|
-
readonly total?: number | undefined;
|
|
2686
2687
|
readonly pageCount?: number | undefined;
|
|
2687
|
-
readonly currentPage?: number | undefined;
|
|
2688
2688
|
readonly defaultCurrentPage?: number | undefined;
|
|
2689
2689
|
readonly prevIcon?: import("element-plus/es/utils/index.js").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
2690
2690
|
readonly nextIcon?: import("element-plus/es/utils/index.js").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -1590,13 +1590,13 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
1590
1590
|
readonly nextText: string;
|
|
1591
1591
|
readonly hideOnSinglePage: boolean;
|
|
1592
1592
|
} & {
|
|
1593
|
+
readonly total?: number | undefined;
|
|
1594
|
+
readonly currentPage?: number | undefined;
|
|
1593
1595
|
readonly size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
1594
1596
|
readonly popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
1595
1597
|
readonly pageSize?: number | undefined;
|
|
1596
1598
|
readonly defaultPageSize?: number | undefined;
|
|
1597
|
-
readonly total?: number | undefined;
|
|
1598
1599
|
readonly pageCount?: number | undefined;
|
|
1599
|
-
readonly currentPage?: number | undefined;
|
|
1600
1600
|
readonly defaultCurrentPage?: number | undefined;
|
|
1601
1601
|
readonly prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
1602
1602
|
readonly nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -26,13 +26,13 @@ export declare const useTable: (props: TableProps) => {
|
|
|
26
26
|
prevText?: string | undefined;
|
|
27
27
|
nextText?: string | undefined;
|
|
28
28
|
hideOnSinglePage?: boolean | undefined;
|
|
29
|
+
total?: number | undefined;
|
|
30
|
+
currentPage?: number | undefined;
|
|
29
31
|
size?: import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never> | undefined;
|
|
30
32
|
popperStyle?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties) | ((new (...args: any[]) => string | import("vue").CSSProperties) | (() => string | import("vue").CSSProperties))[], unknown, unknown> | undefined;
|
|
31
33
|
pageSize?: number | undefined;
|
|
32
34
|
defaultPageSize?: number | undefined;
|
|
33
|
-
total?: number | undefined;
|
|
34
35
|
pageCount?: number | undefined;
|
|
35
|
-
currentPage?: number | undefined;
|
|
36
36
|
defaultCurrentPage?: number | undefined;
|
|
37
37
|
prevIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
38
38
|
nextIcon?: import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type App } from 'vue';
|
|
2
|
+
import type { Language } from 'element-plus/es/locale';
|
|
2
3
|
export type Translater = (key: string) => string;
|
|
3
4
|
export declare const useLocale: () => {
|
|
4
5
|
loadLocale: (app?: App) => void | Promise<void>;
|
|
5
|
-
loadElLocale: () => Promise<
|
|
6
|
+
loadElLocale: () => Promise<Language>;
|
|
6
7
|
t: (key: any) => any;
|
|
7
8
|
};
|
package/lib/hooks/use-locale.js
CHANGED
|
@@ -31,11 +31,28 @@ const useLocale = () => {
|
|
|
31
31
|
const provideFn = inSetup2 ? vue.provide : app.provide;
|
|
32
32
|
return new Promise(async (resolve) => {
|
|
33
33
|
try {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
let locale = zhCn.default;
|
|
35
|
+
try {
|
|
36
|
+
const epLocalePath = `../locale/lang/${localeLang}.ts`;
|
|
37
|
+
const { default: lang } = await import(
|
|
38
|
+
/* @vite-ignore */
|
|
39
|
+
epLocalePath
|
|
40
|
+
);
|
|
41
|
+
locale = lang;
|
|
42
|
+
} catch (e) {
|
|
43
|
+
try {
|
|
44
|
+
const { default: en } = await Promise.resolve().then(function () { return require(
|
|
45
|
+
/* @vite-ignore */
|
|
46
|
+
'../locale/lang/en.js'
|
|
47
|
+
); });
|
|
48
|
+
locale = en;
|
|
49
|
+
} catch (enError) {
|
|
50
|
+
console.error(
|
|
51
|
+
"Failed to load both specified locale and English locale, using Chinese locale as fallback:",
|
|
52
|
+
enError
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
39
56
|
const { t } = elementPlus.useLocale(vue.ref(locale));
|
|
40
57
|
provideFn(TRANSLATER_KEY, t);
|
|
41
58
|
resolve();
|
|
@@ -46,12 +63,34 @@ const useLocale = () => {
|
|
|
46
63
|
});
|
|
47
64
|
};
|
|
48
65
|
const loadElLocale = async () => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
66
|
+
try {
|
|
67
|
+
let elLocale = zhCn.default;
|
|
68
|
+
try {
|
|
69
|
+
const elLocalePath = `element-plus/es/locale/lang/${localeLang}.mjs`;
|
|
70
|
+
const { default: lang } = await import(
|
|
71
|
+
/* @vite-ignore */
|
|
72
|
+
elLocalePath
|
|
73
|
+
);
|
|
74
|
+
elLocale = lang;
|
|
75
|
+
} catch (e) {
|
|
76
|
+
try {
|
|
77
|
+
const { default: en } = await import(
|
|
78
|
+
/* @vite-ignore */
|
|
79
|
+
'element-plus/es/locale/lang/en'
|
|
80
|
+
);
|
|
81
|
+
elLocale = en;
|
|
82
|
+
} catch (enError) {
|
|
83
|
+
console.error(
|
|
84
|
+
"Failed to load both specified locale and English locale, using Chinese locale as fallback:",
|
|
85
|
+
enError
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return elLocale;
|
|
90
|
+
} catch (error) {
|
|
91
|
+
console.error(error);
|
|
92
|
+
return zhCn.default;
|
|
93
|
+
}
|
|
55
94
|
};
|
|
56
95
|
return {
|
|
57
96
|
loadLocale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-locale.js","sources":["../../../../packages/hooks/use-locale.ts"],"sourcesContent":["import {\n ref,\n inject,\n provide,\n getCurrentInstance,\n type App,\n nextTick,\n} from 'vue'\nimport { useLocale as useElLocale } from 'element-plus'\nimport type { Language } from 'element-plus/es/locale'\nimport zhCn from '@el-plus/locale/lang/zh-cn'\nconst TRANSLATER_KEY = Symbol('TRANSLATER_KEY')\nexport type Translater = (key: string) => string\nlet cachedTranslater: Translater | null = null\nexport const useLocale = () => {\n const localeLang = window.hxlang?.toLocaleLowerCase().split('_').join('-')\n const addLangClass = async (lang: string) => {\n await nextTick()\n const el = document.querySelector('html')\n const langclass = 'no-cn'\n if (el && lang !== 'ZH_CN') {\n el.classList.add(langclass)\n }\n }\n const inSetup = !!getCurrentInstance()\n const translater = inSetup ? inject<Translater>(TRANSLATER_KEY) : null\n if (translater) {\n cachedTranslater = translater\n }\n const loadLocale = (app?: App) => {\n const inSetup = !!getCurrentInstance()\n if (!inSetup && !app) {\n return console.error(\n 'app is required when useLocale is called outside of setup',\n )\n }\n const provideFn = inSetup ? provide : app!.provide\n // eslint-disable-next-line no-async-promise-executor\n return new Promise<void>(async (resolve) => {\n try {\n
|
|
1
|
+
{"version":3,"file":"use-locale.js","sources":["../../../../packages/hooks/use-locale.ts"],"sourcesContent":["import {\n ref,\n inject,\n provide,\n getCurrentInstance,\n type App,\n nextTick,\n} from 'vue'\nimport { useLocale as useElLocale } from 'element-plus'\nimport type { Language } from 'element-plus/es/locale'\nimport zhCn from '@el-plus/locale/lang/zh-cn'\n\nconst TRANSLATER_KEY = Symbol('TRANSLATER_KEY')\nexport type Translater = (key: string) => string\nlet cachedTranslater: Translater | null = null\nexport const useLocale = () => {\n const localeLang = window.hxlang?.toLocaleLowerCase().split('_').join('-')\n const addLangClass = async (lang: string) => {\n await nextTick()\n const el = document.querySelector('html')\n const langclass = 'no-cn'\n if (el && lang !== 'ZH_CN') {\n el.classList.add(langclass)\n }\n }\n const inSetup = !!getCurrentInstance()\n const translater = inSetup ? inject<Translater>(TRANSLATER_KEY) : null\n if (translater) {\n cachedTranslater = translater\n }\n const loadLocale = (app?: App) => {\n const inSetup = !!getCurrentInstance()\n if (!inSetup && !app) {\n return console.error(\n 'app is required when useLocale is called outside of setup',\n )\n }\n const provideFn = inSetup ? provide : app!.provide\n // eslint-disable-next-line no-async-promise-executor\n return new Promise<void>(async (resolve) => {\n try {\n let locale = zhCn\n try {\n const epLocalePath = `../locale/lang/${localeLang}.ts`\n const { default: lang } = await import(\n /* @vite-ignore */ epLocalePath\n )\n locale = lang\n } catch (e) {\n // 如果指定语言包不存在,尝试加载英文包\n try {\n const { default: en } = await import(\n /* @vite-ignore */ '../locale/lang/en'\n )\n locale = en\n } catch (enError) {\n // 如果英文包也不存在,使用中文包兜底\n console.error(\n 'Failed to load both specified locale and English locale, using Chinese locale as fallback:',\n enError,\n )\n }\n }\n const { t } = useElLocale(ref(locale as unknown as Language))\n provideFn(TRANSLATER_KEY, t)\n resolve()\n addLangClass(window.hxlang!)\n } catch (error) {\n console.error(error)\n }\n })\n }\n const loadElLocale = async () => {\n try {\n let elLocale: Language = zhCn as unknown as Language\n try {\n const elLocalePath = `element-plus/es/locale/lang/${localeLang}.mjs`\n const { default: lang } = await import(/* @vite-ignore */ elLocalePath)\n elLocale = lang\n } catch (e) {\n // 如果指定语言包不存在,尝试加载英文包\n try {\n const { default: en } = await import(\n /* @vite-ignore */ 'element-plus/es/locale/lang/en'\n )\n elLocale = en\n } catch (enError) {\n // 如果英文包也不存在,使用中文包兜底\n console.error(\n 'Failed to load both specified locale and English locale, using Chinese locale as fallback:',\n enError,\n )\n }\n }\n return elLocale\n } catch (error) {\n console.error(error)\n return zhCn as unknown as Language\n }\n }\n return {\n loadLocale,\n loadElLocale,\n t: (key) => {\n // // 如果已经有缓存的 translater,直接使用\n if (cachedTranslater) {\n return cachedTranslater(key)\n }\n // const translater = inject<Translater>(TRANSLATER_KEY)\n if (translater) {\n // cachedTranslater = translater // 缓存起来\n return translater(key)\n }\n return key\n },\n }\n}\n"],"names":["nextTick","getCurrentInstance","inject","inSetup","provide","zhCn","useElLocale","ref"],"mappings":";;;;;;AAYA,MAAM,cAAA,0BAAwB,gBAAgB,CAAA;AAE9C,IAAI,gBAAA,GAAsC,IAAA;AACnC,MAAM,YAAY,MAAM;AAC7B,EAAA,MAAM,UAAA,GAAa,OAAO,MAAA,EAAQ,iBAAA,GAAoB,KAAA,CAAM,GAAG,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AACzE,EAAA,MAAM,YAAA,GAAe,OAAO,IAAA,KAAiB;AAC3C,IAAA,MAAMA,YAAA,EAAS;AACf,IAAA,MAAM,EAAA,GAAK,QAAA,CAAS,aAAA,CAAc,MAAM,CAAA;AACxC,IAAA,MAAM,SAAA,GAAY,OAAA;AAClB,IAAA,IAAI,EAAA,IAAM,SAAS,OAAA,EAAS;AAC1B,MAAA,EAAA,CAAG,SAAA,CAAU,IAAI,SAAS,CAAA;AAAA,IAC5B;AAAA,EACF,CAAA;AACA,EAAA,MAAM,OAAA,GAAU,CAAC,CAACC,sBAAA,EAAmB;AACrC,EAAA,MAAM,UAAA,GAAa,OAAA,GAAUC,UAAA,CAAmB,cAAc,CAAA,GAAI,IAAA;AAClE,EAAA,IAA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