@shaonq/vue 1.1.8 → 1.1.9
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/lib/index.d.ts +157 -59
- package/lib/index.js +1930 -1747
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -7,12 +7,36 @@ import { PublicProps } from 'vue';
|
|
|
7
7
|
import { Ref } from 'vue';
|
|
8
8
|
import { TablePublicMethods } from 'vxe-table';
|
|
9
9
|
import { VxeColumnPropTypes } from 'vxe-table';
|
|
10
|
+
import { VxeTable } from 'vxe-table';
|
|
10
11
|
import { VxeTableDataRow } from 'vxe-table';
|
|
11
12
|
import { VxeTableDefines } from 'vxe-table';
|
|
13
|
+
import { VxeTableEventProps } from 'vxe-table';
|
|
14
|
+
import { VxeTableProps } from 'vxe-table';
|
|
12
15
|
import { VxeTablePropTypes } from 'vxe-table';
|
|
13
16
|
import { VxeToolbarConstructor } from 'vxe-table';
|
|
14
17
|
import { VxeToolbarInstance } from 'vxe-table';
|
|
15
18
|
|
|
19
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
+
|
|
21
|
+
declare type __VLS_Prettify<T> = {
|
|
22
|
+
[K in keyof T]: T[K];
|
|
23
|
+
} & {};
|
|
24
|
+
|
|
25
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
+
} : {
|
|
29
|
+
type: PropType<T[K]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
35
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
36
|
+
default: D[K];
|
|
37
|
+
}> : P[K];
|
|
38
|
+
};
|
|
39
|
+
|
|
16
40
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
17
41
|
new (): {
|
|
18
42
|
$slots: S;
|
|
@@ -25,6 +49,12 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
|
25
49
|
};
|
|
26
50
|
};
|
|
27
51
|
|
|
52
|
+
declare type __VLS_WithTemplateSlots_3<T, S> = T & {
|
|
53
|
+
new (): {
|
|
54
|
+
$slots: S;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
28
58
|
declare interface CssType extends Partial<CSSStyleDeclaration>, RecordAny_2 {
|
|
29
59
|
}
|
|
30
60
|
|
|
@@ -45,7 +75,24 @@ export declare const download: (url: string, fileName?: string) => boolean;
|
|
|
45
75
|
* @param {string} option.className 例 class = 'one-page-pdf' ,大量打印必填
|
|
46
76
|
* @param {string} option.success successCallback worker:any => void
|
|
47
77
|
*/
|
|
48
|
-
export declare function downLoadPdf(name: string, element: HTMLElement, option?:
|
|
78
|
+
export declare function downLoadPdf(name: string, element: HTMLElement, option?: {
|
|
79
|
+
/** `pdf page margin`: `[top, left, bottom, right]` */
|
|
80
|
+
margin?: number[];
|
|
81
|
+
/** 启用 `worker` */
|
|
82
|
+
className?: string;
|
|
83
|
+
/** 缩放比例 */
|
|
84
|
+
scale?: number;
|
|
85
|
+
/** 横向 `landscape` ,竖向 `portrait` */
|
|
86
|
+
letterRendering?: 'landscape' | 'portrait';
|
|
87
|
+
pagebreak?: {
|
|
88
|
+
mode?: any;
|
|
89
|
+
before?: any;
|
|
90
|
+
after?: any;
|
|
91
|
+
avoid?: any;
|
|
92
|
+
};
|
|
93
|
+
html2canvas?: any;
|
|
94
|
+
jsPDF?: any;
|
|
95
|
+
} & RecordAny): Promise<void>;
|
|
49
96
|
|
|
50
97
|
export declare function findObject<T extends RecordAny>(obj: T, keys?: string | string[]): T;
|
|
51
98
|
|
|
@@ -484,11 +531,83 @@ export declare function mergeConfig(defaults: RecordAny, overrides: RecordAny, i
|
|
|
484
531
|
/** omit object */
|
|
485
532
|
export declare function omitObject<T extends RecordAny>(obj: T, keys?: string | string[]): T;
|
|
486
533
|
|
|
487
|
-
export declare const
|
|
534
|
+
export declare const OrcDesign: DefineComponent<{
|
|
535
|
+
readonly: BooleanConstructor;
|
|
536
|
+
data: {
|
|
537
|
+
type: ObjectConstructor;
|
|
538
|
+
default(): {};
|
|
539
|
+
};
|
|
540
|
+
models: {
|
|
541
|
+
type: ObjectConstructor;
|
|
542
|
+
default(): {};
|
|
543
|
+
};
|
|
544
|
+
remoteFuncs: {
|
|
545
|
+
type: ObjectConstructor;
|
|
546
|
+
default(): {};
|
|
547
|
+
};
|
|
548
|
+
moduleConfig: ArrayConstructor;
|
|
549
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
550
|
+
save: (...args: any[]) => void;
|
|
551
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
552
|
+
readonly: BooleanConstructor;
|
|
553
|
+
data: {
|
|
554
|
+
type: ObjectConstructor;
|
|
555
|
+
default(): {};
|
|
556
|
+
};
|
|
557
|
+
models: {
|
|
558
|
+
type: ObjectConstructor;
|
|
559
|
+
default(): {};
|
|
560
|
+
};
|
|
561
|
+
remoteFuncs: {
|
|
562
|
+
type: ObjectConstructor;
|
|
563
|
+
default(): {};
|
|
564
|
+
};
|
|
565
|
+
moduleConfig: ArrayConstructor;
|
|
566
|
+
}>> & {
|
|
567
|
+
onSave?: ((...args: any[]) => any) | undefined;
|
|
568
|
+
}, {
|
|
569
|
+
data: Record<string, any>;
|
|
570
|
+
readonly: boolean;
|
|
571
|
+
models: Record<string, any>;
|
|
572
|
+
remoteFuncs: Record<string, any>;
|
|
573
|
+
}, {}>;
|
|
574
|
+
|
|
575
|
+
export declare const OrcDesignPrint: DefineComponent<{}, {
|
|
488
576
|
getHtml(): any;
|
|
489
577
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{}>>, {}, {}>;
|
|
490
578
|
|
|
491
|
-
export declare const
|
|
579
|
+
export declare const OrcProvider: __VLS_WithTemplateSlots_3< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>>, {}, {}>, {
|
|
580
|
+
default?(_: {}): any;
|
|
581
|
+
}>;
|
|
582
|
+
|
|
583
|
+
export declare const OrcQuill: DefineComponent<{
|
|
584
|
+
modelValue: {
|
|
585
|
+
type: StringConstructor;
|
|
586
|
+
default: string;
|
|
587
|
+
};
|
|
588
|
+
toolbar: {
|
|
589
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
590
|
+
default: string;
|
|
591
|
+
};
|
|
592
|
+
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
593
|
+
"update:modelValue": (...args: any[]) => void;
|
|
594
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
595
|
+
modelValue: {
|
|
596
|
+
type: StringConstructor;
|
|
597
|
+
default: string;
|
|
598
|
+
};
|
|
599
|
+
toolbar: {
|
|
600
|
+
type: (StringConstructor | ArrayConstructor)[];
|
|
601
|
+
default: string;
|
|
602
|
+
};
|
|
603
|
+
}>> & {
|
|
604
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
605
|
+
}, {
|
|
606
|
+
modelValue: string;
|
|
607
|
+
toolbar: string | unknown[];
|
|
608
|
+
}, {}>;
|
|
609
|
+
|
|
610
|
+
export declare const OrcSearch: __VLS_WithTemplateSlots_2< DefineComponent<{
|
|
492
611
|
loading: BooleanConstructor;
|
|
493
612
|
readonly: BooleanConstructor;
|
|
494
613
|
options: {
|
|
@@ -541,27 +660,27 @@ export declare const OrchiskySearch: __VLS_WithTemplateSlots_2< DefineComponent<
|
|
|
541
660
|
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
542
661
|
onOnSearch?: ((...args: any[]) => any) | undefined;
|
|
543
662
|
}, {
|
|
663
|
+
loading: boolean;
|
|
664
|
+
size: string;
|
|
665
|
+
modelValue: Record<string, any>;
|
|
544
666
|
options: TypeSearchItem[];
|
|
545
667
|
readonly: boolean;
|
|
546
|
-
size: string;
|
|
547
668
|
labelWidth: string;
|
|
548
|
-
modelValue: Record<string, any>;
|
|
549
|
-
loading: boolean;
|
|
550
669
|
inputWidth: string;
|
|
551
670
|
}, {}>, {
|
|
552
671
|
head?(_: {}): any;
|
|
553
672
|
default?(_: {}): any;
|
|
554
673
|
}>;
|
|
555
674
|
|
|
556
|
-
export declare const
|
|
675
|
+
export declare const OrcTable: __VLS_WithTemplateSlots< DefineComponent<{
|
|
557
676
|
title: StringConstructor;
|
|
558
677
|
/** auto(铺满父容器,必须确保存在父节点且不允许存在相邻元素 ,), %, px */
|
|
559
|
-
height: (
|
|
678
|
+
height: (StringConstructor | NumberConstructor)[];
|
|
560
679
|
/** 隐藏工具栏 */
|
|
561
680
|
hideToolbar: BooleanConstructor;
|
|
562
681
|
hidePagination: BooleanConstructor;
|
|
563
682
|
size: {
|
|
564
|
-
type: PropType<"
|
|
683
|
+
type: PropType<"medium" | "small" | "mini">;
|
|
565
684
|
default: string;
|
|
566
685
|
};
|
|
567
686
|
/** 用户选择列表 */
|
|
@@ -576,7 +695,7 @@ export declare const OrchiskyTable: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
576
695
|
};
|
|
577
696
|
/** 配置文件 */
|
|
578
697
|
option: {
|
|
579
|
-
type: PropType<
|
|
698
|
+
type: PropType<OrcTableOption>;
|
|
580
699
|
default: () => {
|
|
581
700
|
columns: never[];
|
|
582
701
|
};
|
|
@@ -601,7 +720,7 @@ export declare const OrchiskyTable: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
601
720
|
checkRows(list?: RecordAny_2[] | undefined): Promise<[string, RecordAny_2[]]>;
|
|
602
721
|
getRowSeq(row: any): string | number;
|
|
603
722
|
getRowIndex(row: any): number;
|
|
604
|
-
removerRowIndex(rowIndex: number): void;
|
|
723
|
+
removerRowIndex(rowIndex: number): void;
|
|
605
724
|
loading: Ref<boolean, boolean>;
|
|
606
725
|
setLoading: typeof setLoading;
|
|
607
726
|
/** 执行搜索 ,是否返回第一页 */
|
|
@@ -609,20 +728,20 @@ export declare const OrchiskyTable: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
609
728
|
/** 加载数据 */
|
|
610
729
|
loadData(list: any[]): void;
|
|
611
730
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
612
|
-
change: (...args: any[]) => void;
|
|
613
|
-
onReset: (...args: any[]) => void;
|
|
614
731
|
"update:selectedKeys": (...args: any[]) => void;
|
|
615
732
|
cellClick: (...args: any[]) => void;
|
|
733
|
+
onReset: (...args: any[]) => void;
|
|
734
|
+
change: (...args: any[]) => void;
|
|
616
735
|
confirm: (...args: any[]) => void;
|
|
617
736
|
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
618
737
|
title: StringConstructor;
|
|
619
738
|
/** auto(铺满父容器,必须确保存在父节点且不允许存在相邻元素 ,), %, px */
|
|
620
|
-
height: (
|
|
739
|
+
height: (StringConstructor | NumberConstructor)[];
|
|
621
740
|
/** 隐藏工具栏 */
|
|
622
741
|
hideToolbar: BooleanConstructor;
|
|
623
742
|
hidePagination: BooleanConstructor;
|
|
624
743
|
size: {
|
|
625
|
-
type: PropType<"
|
|
744
|
+
type: PropType<"medium" | "small" | "mini">;
|
|
626
745
|
default: string;
|
|
627
746
|
};
|
|
628
747
|
/** 用户选择列表 */
|
|
@@ -637,7 +756,7 @@ export declare const OrchiskyTable: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
637
756
|
};
|
|
638
757
|
/** 配置文件 */
|
|
639
758
|
option: {
|
|
640
|
-
type: PropType<
|
|
759
|
+
type: PropType<OrcTableOption>;
|
|
641
760
|
default: () => {
|
|
642
761
|
columns: never[];
|
|
643
762
|
};
|
|
@@ -648,15 +767,15 @@ export declare const OrchiskyTable: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
648
767
|
setColumn: (list: RecordAny_2[]) => void;
|
|
649
768
|
}>;
|
|
650
769
|
}>> & {
|
|
651
|
-
onChange?: ((...args: any[]) => any) | undefined;
|
|
652
|
-
onOnReset?: ((...args: any[]) => any) | undefined;
|
|
653
770
|
"onUpdate:selectedKeys"?: ((...args: any[]) => any) | undefined;
|
|
654
771
|
onCellClick?: ((...args: any[]) => any) | undefined;
|
|
772
|
+
onOnReset?: ((...args: any[]) => any) | undefined;
|
|
773
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
655
774
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
656
775
|
}, {
|
|
657
|
-
size: "small" | "mini" | "medium";
|
|
658
776
|
data: unknown[];
|
|
659
|
-
option:
|
|
777
|
+
option: OrcTableOption;
|
|
778
|
+
size: "medium" | "small" | "mini";
|
|
660
779
|
hideToolbar: boolean;
|
|
661
780
|
hidePagination: boolean;
|
|
662
781
|
selectedKeys: unknown[];
|
|
@@ -688,9 +807,10 @@ export declare const OrchiskyTable: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
688
807
|
* }
|
|
689
808
|
* ```
|
|
690
809
|
*/
|
|
691
|
-
export declare interface
|
|
692
|
-
/**
|
|
810
|
+
export declare interface OrcTableOption extends RecordAny_2 {
|
|
811
|
+
/** 可使用 `orc-provider` 全局注入 */
|
|
693
812
|
useErrData?: <T = RecordAny_2>(config: RecordAny_2) => Promise<[boolean, T]>;
|
|
813
|
+
/** 请求地址 */
|
|
694
814
|
url?: string;
|
|
695
815
|
/** 请求类型 */
|
|
696
816
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
@@ -756,40 +876,17 @@ export declare interface OrchiskyTableOptionType extends RecordAny_2 {
|
|
|
756
876
|
skinRowText?: string;
|
|
757
877
|
/** 同 edit-rules , demo : { sex: [ { required: true, message: '性别必须填写' } ] } */
|
|
758
878
|
rules?: VxeTablePropTypes.EditRules;
|
|
759
|
-
/** 数据筛选 {remote:服务器筛选 ,filterMethod :({ options, values, cellValue, row, column }) => boolean } */
|
|
760
|
-
filterConfig?: VxeTablePropTypes.FilterConfig;
|
|
761
879
|
/** 横向虚拟滚动配置 { enabled, gt } */
|
|
762
880
|
scrollX?: VxeTablePropTypes.ScrollX;
|
|
763
881
|
/** 纵向虚拟滚动配置 { enabled, gt } */
|
|
764
882
|
scrollY?: VxeTablePropTypes.ScrollY;
|
|
883
|
+
selectedProps?: any;
|
|
884
|
+
tableProps?: TableInstance['$props'];
|
|
765
885
|
}
|
|
766
886
|
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
default: string;
|
|
771
|
-
};
|
|
772
|
-
toolbar: {
|
|
773
|
-
type: (ArrayConstructor | StringConstructor)[];
|
|
774
|
-
default: string;
|
|
775
|
-
};
|
|
776
|
-
}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
777
|
-
"update:modelValue": (...args: any[]) => void;
|
|
778
|
-
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
779
|
-
modelValue: {
|
|
780
|
-
type: StringConstructor;
|
|
781
|
-
default: string;
|
|
782
|
-
};
|
|
783
|
-
toolbar: {
|
|
784
|
-
type: (ArrayConstructor | StringConstructor)[];
|
|
785
|
-
default: string;
|
|
786
|
-
};
|
|
787
|
-
}>> & {
|
|
788
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
789
|
-
}, {
|
|
790
|
-
modelValue: string;
|
|
791
|
-
toolbar: string | unknown[];
|
|
792
|
-
}, {}>;
|
|
887
|
+
declare interface Props {
|
|
888
|
+
useErrData?: <T = Record<string, any>>(config: Record<string, any>) => Promise<[boolean, T]>;
|
|
889
|
+
}
|
|
793
890
|
|
|
794
891
|
export declare type RecordAny = Record<string, any>;
|
|
795
892
|
|
|
@@ -830,9 +927,7 @@ declare interface TableColumnType extends RecordAny_2 {
|
|
|
830
927
|
style?: CssType | ((record: RecordAny_2) => CssType);
|
|
831
928
|
/** 同 :title-prefix "{ content: '必填', icon: 'vxe-cell--required-icon' }" */
|
|
832
929
|
help?: VxeColumnPropTypes.TitlePrefix;
|
|
833
|
-
|
|
834
|
-
filterMultiple?: VxeColumnPropTypes.FilterMultiple;
|
|
835
|
-
filterMethod?: VxeColumnPropTypes.FilterMethod;
|
|
930
|
+
columnProps?: any;
|
|
836
931
|
}
|
|
837
932
|
|
|
838
933
|
declare interface TableExposeType extends TableGridTwoType {
|
|
@@ -885,6 +980,8 @@ declare interface TableGridTwoType extends RecordAny_2 {
|
|
|
885
980
|
removerRowIndex(rowIndex: number): void;
|
|
886
981
|
}
|
|
887
982
|
|
|
983
|
+
declare type TableInstance = InstanceType<typeof VxeTable>;
|
|
984
|
+
|
|
888
985
|
/** array */
|
|
889
986
|
export declare function toArray<T>(target: T | T[]): T[];
|
|
890
987
|
|
|
@@ -943,7 +1040,7 @@ declare interface TypeSearchItem extends RecordAny {
|
|
|
943
1040
|
* { type: 'date', name: 'd2', label: '日期范围', multiple: true, defaultValue: '2024-07-01,2024-08-07' },
|
|
944
1041
|
* ```
|
|
945
1042
|
*/
|
|
946
|
-
export declare function
|
|
1043
|
+
export declare function useOrcSearch(list: TypeSearchItem[]): readonly [ Ref<{
|
|
947
1044
|
[x: string]: any;
|
|
948
1045
|
type?: string | undefined;
|
|
949
1046
|
name: string;
|
|
@@ -983,7 +1080,7 @@ export declare function useOrchiskySearch(list: TypeSearchItem[]): readonly [ Re
|
|
|
983
1080
|
rules?: RecordAny | RecordAny[] | undefined;
|
|
984
1081
|
}[]>, Ref<RecordAny, RecordAny>];
|
|
985
1082
|
|
|
986
|
-
export declare const
|
|
1083
|
+
export declare const useOrcTable: (option: OrcTableOption) => {
|
|
987
1084
|
tableRef: Ref<{
|
|
988
1085
|
[x: string]: any;
|
|
989
1086
|
loading: boolean;
|
|
@@ -1039,11 +1136,11 @@ export declare const useOrchiskyVxe: (option: OrchiskyTableOptionType) => {
|
|
|
1039
1136
|
columns: TableColumnType[];
|
|
1040
1137
|
pageSize?: number | undefined;
|
|
1041
1138
|
pageSizeOptions?: number[] | undefined;
|
|
1042
|
-
selectedType?: "
|
|
1139
|
+
selectedType?: "checkbox" | "radio" | undefined;
|
|
1043
1140
|
requiredKeys?: string[] | undefined;
|
|
1044
1141
|
firstLoad?: boolean | undefined;
|
|
1045
|
-
tooltip?: boolean | "
|
|
1046
|
-
footerTooltip?: boolean | "
|
|
1142
|
+
tooltip?: boolean | "title" | "tooltip" | "ellipsis" | undefined;
|
|
1143
|
+
footerTooltip?: boolean | "title" | "tooltip" | "ellipsis" | undefined;
|
|
1047
1144
|
headerStyle?: ((record: RecordAny_2 & {
|
|
1048
1145
|
column: {
|
|
1049
1146
|
property: string;
|
|
@@ -1067,9 +1164,10 @@ export declare const useOrchiskyVxe: (option: OrchiskyTableOptionType) => {
|
|
|
1067
1164
|
skinRowStyle?: CssType | undefined;
|
|
1068
1165
|
skinRowText?: string | undefined;
|
|
1069
1166
|
rules?: VxeTablePropTypes<VxeTableDataRow> | undefined;
|
|
1070
|
-
filterConfig?: VxeTablePropTypes<VxeTableDataRow> | undefined;
|
|
1071
1167
|
scrollX?: VxeTablePropTypes | undefined;
|
|
1072
1168
|
scrollY?: VxeTablePropTypes | undefined;
|
|
1169
|
+
selectedProps?: any;
|
|
1170
|
+
tableProps?: ( VxeTableProps<any> & VxeTableEventProps<any>) | undefined;
|
|
1073
1171
|
};
|
|
1074
1172
|
tableUtils: {
|
|
1075
1173
|
getRowKey(): string;
|