jky-component-lib 0.0.64 → 0.0.67
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/dist/es/components.d.ts +1 -0
- package/dist/es/components.js +4 -1
- package/dist/es/form/Form.vue.d.ts +10 -6
- package/dist/es/form/Form.vue.js +131 -81
- package/dist/es/form/FormItem.vue.js +55 -3
- package/dist/es/form/SelectTable.vue.d.ts +38 -0
- package/dist/es/form/SelectTable.vue.js +217 -0
- package/dist/es/form/SelectTable.vue3.js +5 -0
- package/dist/es/form/style.css +56 -0
- package/dist/es/index.js +15 -0
- package/dist/es/package.json.js +1 -1
- package/dist/es/page-header/PageHeader.vue.js +2 -2
- package/dist/es/page-header/PopoverMenu.vue.js +2 -2
- package/dist/es/page-layout/PageLayout.vue.js +1 -1
- package/dist/es/page-layout/style.css +2 -0
- package/dist/es/page-table/PageTable.vue.d.ts +44 -28
- package/dist/es/page-table/PageTable.vue.js +91 -25
- package/dist/es/page-table/style.css +9 -1
- package/dist/es/style.css +164 -26
- package/dist/es/styles.css +1 -1
- package/dist/es/tabs/TabContent.vue.d.ts +16 -0
- package/dist/es/tabs/TabContent.vue.js +65 -0
- package/dist/es/tabs/TabContent.vue3.js +5 -0
- package/dist/es/tabs/Tabs.vue.d.ts +46 -0
- package/dist/es/tabs/Tabs.vue.js +275 -0
- package/dist/es/tabs/Tabs.vue3.js +5 -0
- package/dist/es/tabs/index.d.ts +9 -0
- package/dist/es/tabs/index.js +8 -0
- package/dist/es/tabs/routeListener.d.ts +19 -0
- package/dist/es/tabs/routeListener.js +26 -0
- package/dist/es/tabs/style.css +29 -0
- package/dist/es/tabs/useTabs.d.ts +27 -0
- package/dist/es/tabs/useTabs.js +59 -0
- package/dist/es/tabs/useTabsStore.d.ts +53 -0
- package/dist/es/tabs/useTabsStore.js +208 -0
- package/dist/lib/components.d.ts +1 -0
- package/dist/lib/components.js +4 -1
- package/dist/lib/form/Form.vue.d.ts +10 -6
- package/dist/lib/form/Form.vue.js +129 -79
- package/dist/lib/form/FormItem.vue.js +54 -2
- package/dist/lib/form/SelectTable.vue.d.ts +38 -0
- package/dist/lib/form/SelectTable.vue.js +217 -0
- package/dist/lib/form/SelectTable.vue3.js +5 -0
- package/dist/lib/form/style.css +56 -0
- package/dist/lib/index.js +15 -0
- package/dist/lib/package.json.js +1 -1
- package/dist/lib/page-header/PageHeader.vue.js +3 -3
- package/dist/lib/page-header/PopoverMenu.vue.js +2 -2
- package/dist/lib/page-layout/PageLayout.vue.js +1 -1
- package/dist/lib/page-layout/style.css +2 -0
- package/dist/lib/page-table/PageTable.vue.d.ts +44 -28
- package/dist/lib/page-table/PageTable.vue.js +90 -24
- package/dist/lib/page-table/style.css +9 -1
- package/dist/lib/style.css +164 -26
- package/dist/lib/styles.css +1 -1
- package/dist/lib/tabs/TabContent.vue.d.ts +16 -0
- package/dist/lib/tabs/TabContent.vue.js +65 -0
- package/dist/lib/tabs/TabContent.vue3.js +5 -0
- package/dist/lib/tabs/Tabs.vue.d.ts +46 -0
- package/dist/lib/tabs/Tabs.vue.js +275 -0
- package/dist/lib/tabs/Tabs.vue3.js +5 -0
- package/dist/lib/tabs/index.d.ts +9 -0
- package/dist/lib/tabs/index.js +8 -0
- package/dist/lib/tabs/routeListener.d.ts +19 -0
- package/dist/lib/tabs/routeListener.js +26 -0
- package/dist/lib/tabs/style.css +29 -0
- package/dist/lib/tabs/useTabs.d.ts +27 -0
- package/dist/lib/tabs/useTabs.js +59 -0
- package/dist/lib/tabs/useTabsStore.d.ts +53 -0
- package/dist/lib/tabs/useTabsStore.js +208 -0
- package/package.json +10 -2
|
@@ -2,7 +2,6 @@ import { TableColumnCtx } from 'element-plus';
|
|
|
2
2
|
import { PageTableProps, PaginationConfig } from './types';
|
|
3
3
|
type __VLS_Props = PageTableProps;
|
|
4
4
|
type __VLS_PublicProps = {
|
|
5
|
-
'form'?: Record<string, any>;
|
|
6
5
|
'pagination'?: PaginationConfig;
|
|
7
6
|
} & __VLS_Props;
|
|
8
7
|
declare function __VLS_template(): {
|
|
@@ -116,7 +115,7 @@ declare function __VLS_template(): {
|
|
|
116
115
|
validateOnRuleChange: boolean;
|
|
117
116
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
118
117
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
119
|
-
}>, "
|
|
118
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
120
119
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
121
120
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
122
121
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -215,7 +214,7 @@ declare function __VLS_template(): {
|
|
|
215
214
|
validateOnRuleChange: boolean;
|
|
216
215
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
217
216
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
218
|
-
}>, "
|
|
217
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
219
218
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
220
219
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
221
220
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -313,7 +312,7 @@ declare function __VLS_template(): {
|
|
|
313
312
|
validateOnRuleChange: boolean;
|
|
314
313
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
315
314
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
316
|
-
}>, "
|
|
315
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
317
316
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
318
317
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
319
318
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -338,16 +337,20 @@ declare function __VLS_template(): {
|
|
|
338
337
|
}) => any;
|
|
339
338
|
}, import('vue').PublicProps, {
|
|
340
339
|
size: import('element-plus').ComponentSize;
|
|
341
|
-
|
|
340
|
+
grid: import('../form/types').GridConfig;
|
|
341
|
+
inline: boolean;
|
|
342
342
|
labelPosition: "left" | "right" | "top";
|
|
343
|
-
|
|
343
|
+
labelWidth: string | number;
|
|
344
344
|
showTitle: boolean;
|
|
345
345
|
gutter: number;
|
|
346
346
|
defaultSpan: number;
|
|
347
347
|
responsive: boolean;
|
|
348
348
|
watchDeep: boolean;
|
|
349
|
+
showFooter: boolean;
|
|
350
|
+
footerClass: string;
|
|
349
351
|
submitText: string;
|
|
350
352
|
cancelText: string;
|
|
353
|
+
showCount: number;
|
|
351
354
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
352
355
|
formRef: ({
|
|
353
356
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -434,7 +437,7 @@ declare function __VLS_template(): {
|
|
|
434
437
|
validateOnRuleChange: boolean;
|
|
435
438
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
436
439
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
437
|
-
}>, "
|
|
440
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
438
441
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
439
442
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
440
443
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -555,7 +558,7 @@ declare function __VLS_template(): {
|
|
|
555
558
|
validateOnRuleChange: boolean;
|
|
556
559
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
557
560
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
558
|
-
}>, "
|
|
561
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
559
562
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
560
563
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
561
564
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -654,7 +657,7 @@ declare function __VLS_template(): {
|
|
|
654
657
|
validateOnRuleChange: boolean;
|
|
655
658
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
656
659
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
657
|
-
}>, "
|
|
660
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
658
661
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
659
662
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
660
663
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -752,7 +755,7 @@ declare function __VLS_template(): {
|
|
|
752
755
|
validateOnRuleChange: boolean;
|
|
753
756
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
754
757
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
755
|
-
}>, "
|
|
758
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
756
759
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
757
760
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
758
761
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -768,16 +771,20 @@ declare function __VLS_template(): {
|
|
|
768
771
|
}) | undefined>;
|
|
769
772
|
}, {}, {}, {}, {
|
|
770
773
|
size: import('element-plus').ComponentSize;
|
|
771
|
-
|
|
774
|
+
grid: import('../form/types').GridConfig;
|
|
775
|
+
inline: boolean;
|
|
772
776
|
labelPosition: "left" | "right" | "top";
|
|
773
|
-
|
|
777
|
+
labelWidth: string | number;
|
|
774
778
|
showTitle: boolean;
|
|
775
779
|
gutter: number;
|
|
776
780
|
defaultSpan: number;
|
|
777
781
|
responsive: boolean;
|
|
778
782
|
watchDeep: boolean;
|
|
783
|
+
showFooter: boolean;
|
|
784
|
+
footerClass: string;
|
|
779
785
|
submitText: string;
|
|
780
786
|
cancelText: string;
|
|
787
|
+
showCount: number;
|
|
781
788
|
}> | null;
|
|
782
789
|
tableRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
|
|
783
790
|
data: {
|
|
@@ -2903,7 +2910,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
2903
2910
|
formRef: any;
|
|
2904
2911
|
tableRef: any;
|
|
2905
2912
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
2906
|
-
"update:form": (value: Record<string, any>) => any;
|
|
2907
2913
|
"update:pagination": (value: PaginationConfig) => any;
|
|
2908
2914
|
} & {
|
|
2909
2915
|
search: (filterData: Record<string, any>) => any;
|
|
@@ -2913,6 +2919,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
2913
2919
|
currentPage: number;
|
|
2914
2920
|
pageSize: number;
|
|
2915
2921
|
}) => any;
|
|
2922
|
+
"update:form": (form: Record<string, any>) => any;
|
|
2916
2923
|
selectionChange: (selection: any[]) => any;
|
|
2917
2924
|
rowClick: (row: any, column: TableColumnCtx<any>) => any;
|
|
2918
2925
|
rowDblclick: (row: any, column: TableColumnCtx<any>) => any;
|
|
@@ -2929,6 +2936,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
2929
2936
|
currentPage: number;
|
|
2930
2937
|
pageSize: number;
|
|
2931
2938
|
}) => any) | undefined;
|
|
2939
|
+
"onUpdate:form"?: ((form: Record<string, any>) => any) | undefined;
|
|
2932
2940
|
onSelectionChange?: ((selection: any[]) => any) | undefined;
|
|
2933
2941
|
onRowClick?: ((row: any, column: TableColumnCtx<any>) => any) | undefined;
|
|
2934
2942
|
onRowDblclick?: ((row: any, column: TableColumnCtx<any>) => any) | undefined;
|
|
@@ -2937,14 +2945,10 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
2937
2945
|
prop: string;
|
|
2938
2946
|
order: "ascending" | "descending" | null;
|
|
2939
2947
|
}) => any) | undefined;
|
|
2940
|
-
"onUpdate:form"?: ((value: Record<string, any>) => any) | undefined;
|
|
2941
2948
|
"onUpdate:pagination"?: ((value: PaginationConfig) => any) | undefined;
|
|
2942
2949
|
}>, {
|
|
2943
2950
|
title: string;
|
|
2944
2951
|
loading: boolean;
|
|
2945
|
-
emptyText: string;
|
|
2946
|
-
border: boolean;
|
|
2947
|
-
formProps: Partial<import('../form/types').FormProps>;
|
|
2948
2952
|
toolbarButtonLimit: number;
|
|
2949
2953
|
withCard: boolean;
|
|
2950
2954
|
filterItems: import('./types').FilterItemConfig[];
|
|
@@ -2953,9 +2957,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
2953
2957
|
resetText: string;
|
|
2954
2958
|
selection: boolean;
|
|
2955
2959
|
selectedRows: any[];
|
|
2960
|
+
border: boolean;
|
|
2956
2961
|
stripe: boolean;
|
|
2962
|
+
emptyText: string;
|
|
2963
|
+
formProps: Partial<import('../form/types').FormProps>;
|
|
2957
2964
|
tableProps: Partial<import('element-plus').TableProps>;
|
|
2958
2965
|
paginationProps: Partial<import('element-plus').PaginationProps>;
|
|
2966
|
+
autoSearchDelay: number;
|
|
2959
2967
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
2960
2968
|
pageTableRef: HTMLDivElement;
|
|
2961
2969
|
formRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
@@ -3058,7 +3066,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
3058
3066
|
validateOnRuleChange: boolean;
|
|
3059
3067
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
3060
3068
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
3061
|
-
}>, "
|
|
3069
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
3062
3070
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3063
3071
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3064
3072
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -3157,7 +3165,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
3157
3165
|
validateOnRuleChange: boolean;
|
|
3158
3166
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
3159
3167
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
3160
|
-
}>, "
|
|
3168
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
3161
3169
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3162
3170
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3163
3171
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -3255,7 +3263,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
3255
3263
|
validateOnRuleChange: boolean;
|
|
3256
3264
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
3257
3265
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
3258
|
-
}>, "
|
|
3266
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
3259
3267
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3260
3268
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3261
3269
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -3280,16 +3288,20 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
3280
3288
|
}) => any;
|
|
3281
3289
|
}, import('vue').PublicProps, {
|
|
3282
3290
|
size: import('element-plus').ComponentSize;
|
|
3283
|
-
|
|
3291
|
+
grid: import('../form/types').GridConfig;
|
|
3292
|
+
inline: boolean;
|
|
3284
3293
|
labelPosition: "left" | "right" | "top";
|
|
3285
|
-
|
|
3294
|
+
labelWidth: string | number;
|
|
3286
3295
|
showTitle: boolean;
|
|
3287
3296
|
gutter: number;
|
|
3288
3297
|
defaultSpan: number;
|
|
3289
3298
|
responsive: boolean;
|
|
3290
3299
|
watchDeep: boolean;
|
|
3300
|
+
showFooter: boolean;
|
|
3301
|
+
footerClass: string;
|
|
3291
3302
|
submitText: string;
|
|
3292
3303
|
cancelText: string;
|
|
3304
|
+
showCount: number;
|
|
3293
3305
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
3294
3306
|
formRef: ({
|
|
3295
3307
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -3376,7 +3388,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
3376
3388
|
validateOnRuleChange: boolean;
|
|
3377
3389
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
3378
3390
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
3379
|
-
}>, "
|
|
3391
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
3380
3392
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3381
3393
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3382
3394
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -3497,7 +3509,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
3497
3509
|
validateOnRuleChange: boolean;
|
|
3498
3510
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
3499
3511
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
3500
|
-
}>, "
|
|
3512
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
3501
3513
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3502
3514
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3503
3515
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -3596,7 +3608,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
3596
3608
|
validateOnRuleChange: boolean;
|
|
3597
3609
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
3598
3610
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
3599
|
-
}>, "
|
|
3611
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
3600
3612
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3601
3613
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3602
3614
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -3694,7 +3706,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
3694
3706
|
validateOnRuleChange: boolean;
|
|
3695
3707
|
}> & Omit<Readonly<import('element-plus').FormProps> & Readonly<{
|
|
3696
3708
|
onValidate?: ((prop: import('element-plus').FormItemProp, isValid: boolean, message: string) => any) | undefined;
|
|
3697
|
-
}>, "
|
|
3709
|
+
}>, "labelPosition" | "requireAsteriskPosition" | "labelWidth" | "labelSuffix" | "showMessage" | "validateOnRuleChange" | "scrollIntoViewOptions" | "validate" | "validateField" | "resetFields" | "clearValidate" | "scrollToField" | "getField" | "fields" | "setInitialValues"> & import('vue').ShallowUnwrapRef<{
|
|
3698
3710
|
validate: (callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3699
3711
|
validateField: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>, callback?: import('element-plus').FormValidateCallback) => import('element-plus').FormValidationResult;
|
|
3700
3712
|
resetFields: (props?: import('element-plus/es/utils').Arrayable<import('element-plus').FormItemProp>) => void;
|
|
@@ -3710,16 +3722,20 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
3710
3722
|
}) | undefined>;
|
|
3711
3723
|
}, {}, {}, {}, {
|
|
3712
3724
|
size: import('element-plus').ComponentSize;
|
|
3713
|
-
|
|
3725
|
+
grid: import('../form/types').GridConfig;
|
|
3726
|
+
inline: boolean;
|
|
3714
3727
|
labelPosition: "left" | "right" | "top";
|
|
3715
|
-
|
|
3728
|
+
labelWidth: string | number;
|
|
3716
3729
|
showTitle: boolean;
|
|
3717
3730
|
gutter: number;
|
|
3718
3731
|
defaultSpan: number;
|
|
3719
3732
|
responsive: boolean;
|
|
3720
3733
|
watchDeep: boolean;
|
|
3734
|
+
showFooter: boolean;
|
|
3735
|
+
footerClass: string;
|
|
3721
3736
|
submitText: string;
|
|
3722
3737
|
cancelText: string;
|
|
3738
|
+
showCount: number;
|
|
3723
3739
|
}> | null;
|
|
3724
3740
|
tableRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
|
|
3725
3741
|
data: {
|
|
@@ -74,14 +74,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
74
74
|
tableProps: { default: () => ({}) },
|
|
75
75
|
paginationProps: { default: () => ({}) },
|
|
76
76
|
toolbarButtonLimit: { default: 0 },
|
|
77
|
-
toolbarButtons: {}
|
|
77
|
+
toolbarButtons: {},
|
|
78
|
+
autoSearchDelay: { default: 500 }
|
|
78
79
|
}, {
|
|
79
|
-
"form": {
|
|
80
|
-
default: () => ({})
|
|
81
|
-
},
|
|
82
|
-
"formModifiers": {},
|
|
83
80
|
"pagination": {
|
|
84
81
|
default: () => ({
|
|
82
|
+
position: "flex-end",
|
|
85
83
|
currentPage: 1,
|
|
86
84
|
pageSize: 10,
|
|
87
85
|
total: 0
|
|
@@ -89,16 +87,38 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
89
87
|
},
|
|
90
88
|
"paginationModifiers": {}
|
|
91
89
|
}),
|
|
92
|
-
emits: /* @__PURE__ */ vue.mergeModels(["search", "reset", "refresh", "rowClick", "rowDblclick", "selectionChange", "pageChange", "sortChange"], ["update:
|
|
90
|
+
emits: /* @__PURE__ */ vue.mergeModels(["search", "reset", "refresh", "update:form", "rowClick", "rowDblclick", "selectionChange", "pageChange", "sortChange"], ["update:pagination"]),
|
|
93
91
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
94
92
|
const props = __props;
|
|
95
93
|
const emit = __emit;
|
|
96
|
-
const form = vue.
|
|
94
|
+
const form = vue.ref(props.form || {});
|
|
95
|
+
vue.watch(() => props.form, (newVal) => {
|
|
96
|
+
if (newVal) {
|
|
97
|
+
form.value = newVal;
|
|
98
|
+
}
|
|
99
|
+
}, { deep: true });
|
|
100
|
+
vue.watch(
|
|
101
|
+
() => form.value,
|
|
102
|
+
(newVal) => {
|
|
103
|
+
emit("update:form", newVal);
|
|
104
|
+
},
|
|
105
|
+
{ deep: true }
|
|
106
|
+
);
|
|
97
107
|
const pagination = vue.useModel(__props, "pagination");
|
|
98
108
|
const internalData = vue.ref([]);
|
|
99
109
|
const tableRef = vue.ref(null);
|
|
100
110
|
const formRef = vue.ref(null);
|
|
101
111
|
const isLoading = vue.ref(props.loading);
|
|
112
|
+
let debounceTimer = null;
|
|
113
|
+
function _debouncedLoadData() {
|
|
114
|
+
if (debounceTimer)
|
|
115
|
+
clearTimeout(debounceTimer);
|
|
116
|
+
if (props.autoSearchDelay === 0)
|
|
117
|
+
return;
|
|
118
|
+
debounceTimer = setTimeout(() => {
|
|
119
|
+
loadData();
|
|
120
|
+
}, props.autoSearchDelay);
|
|
121
|
+
}
|
|
102
122
|
const pageTableRef = vue.ref(null);
|
|
103
123
|
const { isFullscreen: _isFullscreen, toggle: toggleFullscreen } = core.useFullscreen(pageTableRef);
|
|
104
124
|
function handleRefresh() {
|
|
@@ -131,17 +151,32 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
131
151
|
function getColumnProps(column) {
|
|
132
152
|
return __spreadValues({}, column);
|
|
133
153
|
}
|
|
154
|
+
function buildApiParams() {
|
|
155
|
+
var _a, _b;
|
|
156
|
+
const baseParams = {
|
|
157
|
+
currentPage: pagination.value.currentPage || 1,
|
|
158
|
+
pageSize: pagination.value.pageSize || 10
|
|
159
|
+
};
|
|
160
|
+
if ((_a = props.dataSource) == null ? void 0 : _a.getApiParams) {
|
|
161
|
+
const dynamicParams = props.dataSource.getApiParams(form.value);
|
|
162
|
+
return __spreadValues(__spreadValues(__spreadValues({}, baseParams), form.value), dynamicParams);
|
|
163
|
+
}
|
|
164
|
+
if ((_b = props.dataSource) == null ? void 0 : _b.apiParams) {
|
|
165
|
+
return __spreadValues(__spreadValues(__spreadValues({}, baseParams), form.value), props.dataSource.apiParams);
|
|
166
|
+
}
|
|
167
|
+
return __spreadValues(__spreadValues({}, baseParams), form.value);
|
|
168
|
+
}
|
|
134
169
|
function loadData() {
|
|
135
170
|
return __async(this, null, function* () {
|
|
136
171
|
var _a;
|
|
137
|
-
if (!((_a = props.dataSource) == null ? void 0 : _a.api))
|
|
172
|
+
if (!((_a = props.dataSource) == null ? void 0 : _a.api)) {
|
|
173
|
+
console.warn("PageTable: 没有配置 dataSource.api");
|
|
138
174
|
return;
|
|
175
|
+
}
|
|
139
176
|
isLoading.value = true;
|
|
140
177
|
try {
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
pageSize: pagination.value.pageSize || 10
|
|
144
|
-
}, form.value));
|
|
178
|
+
const apiParams = buildApiParams();
|
|
179
|
+
const result = yield props.dataSource.api(apiParams);
|
|
145
180
|
const responseProps = props.dataSource.responseProps || {};
|
|
146
181
|
const recordsField = responseProps.recordsField || "records";
|
|
147
182
|
const totalField = responseProps.totalField || "total";
|
|
@@ -151,8 +186,25 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
151
186
|
currentPage: pagination.value.currentPage,
|
|
152
187
|
pageSize: pagination.value.pageSize
|
|
153
188
|
});
|
|
189
|
+
if (props.selectedRows && props.selectedRows.length > 0) {
|
|
190
|
+
setTimeout(() => {
|
|
191
|
+
if (tableRef.value) {
|
|
192
|
+
tableRef.value.clearSelection();
|
|
193
|
+
props.selectedRows.forEach((selectedRow) => {
|
|
194
|
+
const rowKey = tableRef.value.props.rowKey || "id";
|
|
195
|
+
const keyValue = selectedRow[rowKey];
|
|
196
|
+
const matchedRow = internalData.value.find(
|
|
197
|
+
(row) => row[rowKey] === keyValue
|
|
198
|
+
);
|
|
199
|
+
if (matchedRow) {
|
|
200
|
+
tableRef.value.toggleRowSelection(matchedRow, true);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
}, 0);
|
|
205
|
+
}
|
|
154
206
|
} catch (error) {
|
|
155
|
-
console.error("加载数据失败:", error);
|
|
207
|
+
console.error("PageTable: 加载数据失败:", error);
|
|
156
208
|
internalData.value = [];
|
|
157
209
|
pagination.value.total = 0;
|
|
158
210
|
} finally {
|
|
@@ -170,8 +222,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
170
222
|
}
|
|
171
223
|
function handleReset() {
|
|
172
224
|
var _a;
|
|
173
|
-
form.value = {};
|
|
174
225
|
emit("reset");
|
|
226
|
+
form.value = {};
|
|
175
227
|
if (formRef.value) {
|
|
176
228
|
formRef.value.resetFields();
|
|
177
229
|
}
|
|
@@ -253,8 +305,18 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
253
305
|
loadData();
|
|
254
306
|
}
|
|
255
307
|
});
|
|
308
|
+
vue.watch(
|
|
309
|
+
() => form.value,
|
|
310
|
+
() => {
|
|
311
|
+
var _a;
|
|
312
|
+
if (!props.showSearchButton && ((_a = props.dataSource) == null ? void 0 : _a.api)) {
|
|
313
|
+
_debouncedLoadData();
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
{ deep: true }
|
|
317
|
+
);
|
|
256
318
|
return (_ctx, _cache) => {
|
|
257
|
-
var _a, _b;
|
|
319
|
+
var _a, _b, _c;
|
|
258
320
|
const _component_ElButton = vue.resolveComponent("ElButton");
|
|
259
321
|
const _directive_loading = vue.resolveDirective("loading");
|
|
260
322
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -269,13 +331,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
269
331
|
default: vue.withCtx(() => [
|
|
270
332
|
vue.createVNode(vue.unref(index.JkyForm), vue.mergeProps({
|
|
271
333
|
ref_key: "formRef",
|
|
272
|
-
ref: formRef
|
|
334
|
+
ref: formRef
|
|
335
|
+
}, __spreadValues({ inline: true }, __props.formProps), {
|
|
273
336
|
modelValue: form.value,
|
|
274
337
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form.value = $event),
|
|
338
|
+
"show-footer": false,
|
|
275
339
|
items: __props.filterItems,
|
|
276
|
-
inline: true,
|
|
277
340
|
disabled: isLoading.value
|
|
278
|
-
}
|
|
341
|
+
}), null, 16, ["modelValue", "items", "disabled"]),
|
|
279
342
|
vue.createElementVNode("div", _hoisted_1, [
|
|
280
343
|
vue.createVNode(_component_ElButton, {
|
|
281
344
|
type: "primary",
|
|
@@ -299,12 +362,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
299
362
|
})) : vue.createCommentVNode("", true),
|
|
300
363
|
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.withCard ? vue.unref(ElementPlus.ElCard) : "div"), { class: "jky-page-table__table-card min-h-0" }, {
|
|
301
364
|
default: vue.withCtx(() => {
|
|
302
|
-
var _a2, _b2,
|
|
365
|
+
var _a2, _b2, _c2, _d, _e, _f, _g;
|
|
303
366
|
return [
|
|
304
367
|
vue.createVNode(Toolbar_vue_vue_type_script_setup_true_lang.default, {
|
|
305
368
|
"left-buttons": ((_a2 = props.toolbarButtons) == null ? void 0 : _a2.left) || [],
|
|
306
369
|
"batch-buttons": ((_b2 = props.toolbarButtons) == null ? void 0 : _b2.batch) || [],
|
|
307
|
-
"right-buttons": ((
|
|
370
|
+
"right-buttons": ((_c2 = props.toolbarButtons) == null ? void 0 : _c2.right) || [],
|
|
308
371
|
"default-buttons": defaultRightButtons.value,
|
|
309
372
|
"selected-count": selectedCount.value,
|
|
310
373
|
"toolbar-button-limit": __props.toolbarButtonLimit,
|
|
@@ -372,12 +435,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
372
435
|
})),
|
|
373
436
|
showPagination.value ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(((_a = pagination.value) == null ? void 0 : _a.withCard) ? vue.unref(ElementPlus.ElCard) : "div"), {
|
|
374
437
|
key: 1,
|
|
375
|
-
class: vue.normalizeClass(["flex flex-end bg-white justify-center mt-4 p-2 z-30 sticky bottom-0 jky-page-table__pagination", [((_b = pagination.value) == null ? void 0 : _b.class) || ""]])
|
|
438
|
+
class: vue.normalizeClass(["flex flex-end bg-white justify-center mt-4 p-2 z-30 sticky bottom-0 jky-page-table__pagination", [((_b = pagination.value) == null ? void 0 : _b.class) || ""]]),
|
|
439
|
+
style: vue.normalizeStyle({
|
|
440
|
+
"--jky-page-table_pagination-position": ((_c = pagination.value) == null ? void 0 : _c.position) || "flex-end"
|
|
441
|
+
})
|
|
376
442
|
}, {
|
|
377
443
|
default: vue.withCtx(() => [
|
|
378
444
|
vue.createVNode(vue.unref(ElementPlus.ElScrollbar), { class: "w-full" }, {
|
|
379
445
|
default: vue.withCtx(() => {
|
|
380
|
-
var _a2, _b2,
|
|
446
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h;
|
|
381
447
|
return [
|
|
382
448
|
vue.createVNode(vue.unref(ElementPlus.ElPagination), vue.mergeProps({
|
|
383
449
|
"current-page": pagination.value.currentPage,
|
|
@@ -387,7 +453,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
387
453
|
total: pagination.value.total,
|
|
388
454
|
"page-sizes": ((_a2 = pagination.value) == null ? void 0 : _a2.pageSizes) || [10, 20, 50, 100],
|
|
389
455
|
layout: ((_b2 = pagination.value) == null ? void 0 : _b2.layout) || "total, sizes, prev, pager, next, jumper",
|
|
390
|
-
"show-size-picker": (_d = (
|
|
456
|
+
"show-size-picker": (_d = (_c2 = pagination.value) == null ? void 0 : _c2.showSizePicker) != null ? _d : true,
|
|
391
457
|
"show-total": (_f = (_e = pagination.value) == null ? void 0 : _e.showTotal) != null ? _f : true,
|
|
392
458
|
"show-jumper": (_h = (_g = pagination.value) == null ? void 0 : _g.showJumper) != null ? _h : true
|
|
393
459
|
}, __props.paginationProps, {
|
|
@@ -400,7 +466,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
400
466
|
})
|
|
401
467
|
]),
|
|
402
468
|
_: 1
|
|
403
|
-
}, 8, ["class"])) : vue.createCommentVNode("", true)
|
|
469
|
+
}, 8, ["class", "style"])) : vue.createCommentVNode("", true)
|
|
404
470
|
], 2);
|
|
405
471
|
};
|
|
406
472
|
}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
/* PageTable 组件样式 */
|
|
2
|
-
.jky-page-table {
|
|
2
|
+
.jky-page-table {
|
|
3
|
+
--jky-page-table_pagination-position: flex-end;
|
|
4
|
+
.jky-page-table__pagination {
|
|
5
|
+
.el-scrollbar__view {
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: var(--jky-page-table_pagination-position);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|