el-plus 0.0.24 → 0.0.26
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 +12 -0
- package/dist/index.css +1 -1
- package/dist/index.full.js +19 -16
- 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 +19 -16
- package/es/components/buttons/index.d.ts +17 -17
- package/es/components/buttons/src/buttons-vue.d.ts +2 -2
- package/es/components/custom-column/index.d.ts +12 -12
- package/es/components/custom-column/src/custom-column.d.ts +2 -2
- package/es/components/custom-column/src/custom-column.vue.d.ts +6 -6
- package/es/components/form/src/form.vue.d.ts +5 -5
- package/es/components/header/index.d.ts +14 -14
- package/es/components/header/src/header.vue.d.ts +3 -3
- package/es/components/search-list-page/index.d.ts +245 -245
- package/es/components/search-list-page/src/search-list-page.d.ts +4 -4
- package/es/components/search-list-page/src/search-list-page.vue.d.ts +26 -26
- package/es/components/search-list-page/src/use-search-list-page.d.ts +19 -19
- package/es/components/select/index.d.ts +12 -12
- package/es/components/select/src/select.d.ts +4 -4
- package/es/components/select/src/select.vue.d.ts +8 -8
- package/es/components/table/index.d.ts +30 -30
- package/es/components/table/src/table.vue.d.ts +15 -15
- package/es/components/title/index.d.ts +11 -11
- package/es/components/title/src/title.vue.d.ts +1 -1
- package/es/hooks/dialog/use-choose-dialog.d.ts +1 -1
- package/es/hooks/dialog/use-choose-dialog.mjs +5 -5
- package/es/hooks/dialog/use-choose-dialog.mjs.map +1 -1
- package/es/hooks/dialog/use-form-dialog.d.ts +1 -1
- package/es/hooks/use-template-promise.mjs +14 -11
- package/es/hooks/use-template-promise.mjs.map +1 -1
- package/es/package.json.mjs +1 -1
- package/lib/components/buttons/index.d.ts +17 -17
- package/lib/components/buttons/src/buttons-vue.d.ts +2 -2
- package/lib/components/custom-column/index.d.ts +12 -12
- package/lib/components/custom-column/src/custom-column.d.ts +2 -2
- package/lib/components/custom-column/src/custom-column.vue.d.ts +6 -6
- package/lib/components/form/src/form.vue.d.ts +5 -5
- package/lib/components/header/index.d.ts +14 -14
- package/lib/components/header/src/header.vue.d.ts +3 -3
- package/lib/components/search-list-page/index.d.ts +245 -245
- package/lib/components/search-list-page/src/search-list-page.d.ts +4 -4
- package/lib/components/search-list-page/src/search-list-page.vue.d.ts +26 -26
- package/lib/components/search-list-page/src/use-search-list-page.d.ts +19 -19
- package/lib/components/select/index.d.ts +12 -12
- package/lib/components/select/src/select.d.ts +4 -4
- package/lib/components/select/src/select.vue.d.ts +8 -8
- package/lib/components/table/index.d.ts +30 -30
- package/lib/components/table/src/table.vue.d.ts +15 -15
- package/lib/components/title/index.d.ts +11 -11
- package/lib/components/title/src/title.vue.d.ts +1 -1
- package/lib/hooks/dialog/use-choose-dialog.d.ts +1 -1
- package/lib/hooks/dialog/use-choose-dialog.js +4 -4
- package/lib/hooks/dialog/use-choose-dialog.js.map +1 -1
- package/lib/hooks/dialog/use-form-dialog.d.ts +1 -1
- package/lib/hooks/use-template-promise.js +13 -10
- package/lib/hooks/use-template-promise.js.map +1 -1
- package/lib/package.json.js +1 -1
- package/package.json +1 -1
- package/theme-chalk/dialog.css +1 -1
- package/theme-chalk/form.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/dialog.scss +1 -1
- package/theme-chalk/src/form.scss +3 -0
|
@@ -44,7 +44,7 @@ export declare const EpTable: {
|
|
|
44
44
|
type: import("vue").PropType<import("element-plus").TableColumnCtx["selectable"]>;
|
|
45
45
|
};
|
|
46
46
|
readonly paginationProps: {
|
|
47
|
-
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("
|
|
47
|
+
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("el-plus/es/types/utils").WithOnPrefixAndCamelCase<import("element-plus").PaginationEmits>>>;
|
|
48
48
|
default: () => {};
|
|
49
49
|
};
|
|
50
50
|
readonly showPagination: BooleanConstructor;
|
|
@@ -56,7 +56,7 @@ export declare const EpTable: {
|
|
|
56
56
|
permission: string;
|
|
57
57
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
58
58
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
59
|
-
disabled: import("
|
|
59
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
60
60
|
confirm: boolean;
|
|
61
61
|
confirmText: string;
|
|
62
62
|
} & {} & {
|
|
@@ -72,7 +72,7 @@ export declare const EpTable: {
|
|
|
72
72
|
permission: string;
|
|
73
73
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
74
74
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
75
|
-
disabled: import("
|
|
75
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
76
76
|
confirm: boolean;
|
|
77
77
|
confirmText: string;
|
|
78
78
|
} & {} & {
|
|
@@ -89,10 +89,10 @@ export declare const EpTable: {
|
|
|
89
89
|
type: import("vue").PropType<number | string>;
|
|
90
90
|
};
|
|
91
91
|
readonly api: {
|
|
92
|
-
type: import("vue").PropType<import("
|
|
92
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").Api>;
|
|
93
93
|
};
|
|
94
94
|
readonly method: {
|
|
95
|
-
type: import("vue").PropType<import("
|
|
95
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").Method>;
|
|
96
96
|
};
|
|
97
97
|
readonly reqData: {
|
|
98
98
|
type: ObjectConstructor;
|
|
@@ -101,10 +101,10 @@ export declare const EpTable: {
|
|
|
101
101
|
type: ObjectConstructor;
|
|
102
102
|
};
|
|
103
103
|
readonly reqBefore: {
|
|
104
|
-
type: import("vue").PropType<import("
|
|
104
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").ReqBefore>;
|
|
105
105
|
};
|
|
106
106
|
readonly reqAfter: {
|
|
107
|
-
type: import("vue").PropType<import("
|
|
107
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").ReqAfter>;
|
|
108
108
|
};
|
|
109
109
|
readonly size: {
|
|
110
110
|
default: string;
|
|
@@ -867,7 +867,7 @@ export declare const EpTable: {
|
|
|
867
867
|
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;
|
|
868
868
|
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;
|
|
869
869
|
readonly appendSizeTo?: string | undefined;
|
|
870
|
-
} & import("
|
|
870
|
+
} & import("el-plus/es/types/utils").WithOnPrefixAndCamelCase<{
|
|
871
871
|
'update:current-page': (val: number) => boolean;
|
|
872
872
|
'update:page-size': (val: number) => boolean;
|
|
873
873
|
'size-change': (val: number) => boolean;
|
|
@@ -884,7 +884,7 @@ export declare const EpTable: {
|
|
|
884
884
|
permission: string;
|
|
885
885
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
886
886
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
887
|
-
disabled: import("
|
|
887
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
888
888
|
confirm: boolean;
|
|
889
889
|
confirmText: string;
|
|
890
890
|
} & {} & {
|
|
@@ -897,7 +897,7 @@ export declare const EpTable: {
|
|
|
897
897
|
permission: string;
|
|
898
898
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
899
899
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
900
|
-
disabled: import("
|
|
900
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
901
901
|
confirm: boolean;
|
|
902
902
|
confirmText: string;
|
|
903
903
|
} & {} & {
|
|
@@ -972,7 +972,7 @@ export declare const EpTable: {
|
|
|
972
972
|
type: import("vue").PropType<import("element-plus").TableColumnCtx["selectable"]>;
|
|
973
973
|
};
|
|
974
974
|
readonly paginationProps: {
|
|
975
|
-
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("
|
|
975
|
+
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("el-plus/es/types/utils").WithOnPrefixAndCamelCase<import("element-plus").PaginationEmits>>>;
|
|
976
976
|
default: () => {};
|
|
977
977
|
};
|
|
978
978
|
readonly showPagination: BooleanConstructor;
|
|
@@ -984,7 +984,7 @@ export declare const EpTable: {
|
|
|
984
984
|
permission: string;
|
|
985
985
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
986
986
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
987
|
-
disabled: import("
|
|
987
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
988
988
|
confirm: boolean;
|
|
989
989
|
confirmText: string;
|
|
990
990
|
} & {} & {
|
|
@@ -1000,7 +1000,7 @@ export declare const EpTable: {
|
|
|
1000
1000
|
permission: string;
|
|
1001
1001
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
1002
1002
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
1003
|
-
disabled: import("
|
|
1003
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
1004
1004
|
confirm: boolean;
|
|
1005
1005
|
confirmText: string;
|
|
1006
1006
|
} & {} & {
|
|
@@ -1017,10 +1017,10 @@ export declare const EpTable: {
|
|
|
1017
1017
|
type: import("vue").PropType<number | string>;
|
|
1018
1018
|
};
|
|
1019
1019
|
readonly api: {
|
|
1020
|
-
type: import("vue").PropType<import("
|
|
1020
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").Api>;
|
|
1021
1021
|
};
|
|
1022
1022
|
readonly method: {
|
|
1023
|
-
type: import("vue").PropType<import("
|
|
1023
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").Method>;
|
|
1024
1024
|
};
|
|
1025
1025
|
readonly reqData: {
|
|
1026
1026
|
type: ObjectConstructor;
|
|
@@ -1029,10 +1029,10 @@ export declare const EpTable: {
|
|
|
1029
1029
|
type: ObjectConstructor;
|
|
1030
1030
|
};
|
|
1031
1031
|
readonly reqBefore: {
|
|
1032
|
-
type: import("vue").PropType<import("
|
|
1032
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").ReqBefore>;
|
|
1033
1033
|
};
|
|
1034
1034
|
readonly reqAfter: {
|
|
1035
|
-
type: import("vue").PropType<import("
|
|
1035
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").ReqAfter>;
|
|
1036
1036
|
};
|
|
1037
1037
|
readonly size: {
|
|
1038
1038
|
default: string;
|
|
@@ -1795,7 +1795,7 @@ export declare const EpTable: {
|
|
|
1795
1795
|
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;
|
|
1796
1796
|
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;
|
|
1797
1797
|
readonly appendSizeTo?: string | undefined;
|
|
1798
|
-
} & import("
|
|
1798
|
+
} & import("el-plus/es/types/utils").WithOnPrefixAndCamelCase<{
|
|
1799
1799
|
'update:current-page': (val: number) => boolean;
|
|
1800
1800
|
'update:page-size': (val: number) => boolean;
|
|
1801
1801
|
'size-change': (val: number) => boolean;
|
|
@@ -1812,7 +1812,7 @@ export declare const EpTable: {
|
|
|
1812
1812
|
permission: string;
|
|
1813
1813
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
1814
1814
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
1815
|
-
disabled: import("
|
|
1815
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
1816
1816
|
confirm: boolean;
|
|
1817
1817
|
confirmText: string;
|
|
1818
1818
|
} & {} & {
|
|
@@ -1825,7 +1825,7 @@ export declare const EpTable: {
|
|
|
1825
1825
|
permission: string;
|
|
1826
1826
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
1827
1827
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
1828
|
-
disabled: import("
|
|
1828
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
1829
1829
|
confirm: boolean;
|
|
1830
1830
|
confirmText: string;
|
|
1831
1831
|
} & {} & {
|
|
@@ -1884,17 +1884,17 @@ export declare const EpTable: {
|
|
|
1884
1884
|
type: import("vue").PropType<import("element-plus").TableColumnCtx["selectable"]>;
|
|
1885
1885
|
};
|
|
1886
1886
|
readonly paginationProps: {
|
|
1887
|
-
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("
|
|
1887
|
+
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("el-plus/es/types/utils").WithOnPrefixAndCamelCase<import("element-plus").PaginationEmits>>>;
|
|
1888
1888
|
default: () => {};
|
|
1889
1889
|
};
|
|
1890
1890
|
readonly showPagination: BooleanConstructor;
|
|
1891
1891
|
readonly isFrontPage: BooleanConstructor;
|
|
1892
1892
|
readonly actionButtons: {
|
|
1893
|
-
type: import("vue").PropType<import("
|
|
1893
|
+
type: import("vue").PropType<import("el-plus/es/index").ButtonProps[]>;
|
|
1894
1894
|
default: () => never[];
|
|
1895
1895
|
};
|
|
1896
1896
|
readonly formatColumns: {
|
|
1897
|
-
type: import("vue").PropType<import("
|
|
1897
|
+
type: import("vue").PropType<import("el-plus/es/index").ButtonProps[]>;
|
|
1898
1898
|
default: () => never[];
|
|
1899
1899
|
};
|
|
1900
1900
|
readonly isInitSearch: {
|
|
@@ -1905,10 +1905,10 @@ export declare const EpTable: {
|
|
|
1905
1905
|
type: import("vue").PropType<number | string>;
|
|
1906
1906
|
};
|
|
1907
1907
|
readonly api: {
|
|
1908
|
-
type: import("vue").PropType<import("
|
|
1908
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").Api>;
|
|
1909
1909
|
};
|
|
1910
1910
|
readonly method: {
|
|
1911
|
-
type: import("vue").PropType<import("
|
|
1911
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").Method>;
|
|
1912
1912
|
};
|
|
1913
1913
|
readonly reqData: {
|
|
1914
1914
|
type: ObjectConstructor;
|
|
@@ -1917,10 +1917,10 @@ export declare const EpTable: {
|
|
|
1917
1917
|
type: ObjectConstructor;
|
|
1918
1918
|
};
|
|
1919
1919
|
readonly reqBefore: {
|
|
1920
|
-
type: import("vue").PropType<import("
|
|
1920
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").ReqBefore>;
|
|
1921
1921
|
};
|
|
1922
1922
|
readonly reqAfter: {
|
|
1923
|
-
type: import("vue").PropType<import("
|
|
1923
|
+
type: import("vue").PropType<import("el-plus/es/types/axios").ReqAfter>;
|
|
1924
1924
|
};
|
|
1925
1925
|
readonly size: {
|
|
1926
1926
|
default: string;
|
|
@@ -2683,7 +2683,7 @@ export declare const EpTable: {
|
|
|
2683
2683
|
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;
|
|
2684
2684
|
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;
|
|
2685
2685
|
readonly appendSizeTo?: string | undefined;
|
|
2686
|
-
} & import("
|
|
2686
|
+
} & import("el-plus/es/types/utils").WithOnPrefixAndCamelCase<{
|
|
2687
2687
|
'update:current-page': (val: number) => boolean;
|
|
2688
2688
|
'update:page-size': (val: number) => boolean;
|
|
2689
2689
|
'size-change': (val: number) => boolean;
|
|
@@ -2700,7 +2700,7 @@ export declare const EpTable: {
|
|
|
2700
2700
|
permission: string;
|
|
2701
2701
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
2702
2702
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
2703
|
-
disabled: import("
|
|
2703
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
2704
2704
|
confirm: boolean;
|
|
2705
2705
|
confirmText: string;
|
|
2706
2706
|
} & {} & {
|
|
@@ -2713,7 +2713,7 @@ export declare const EpTable: {
|
|
|
2713
2713
|
permission: string;
|
|
2714
2714
|
onClick: (e: MouseEvent | import("./src/table").TableScope) => void;
|
|
2715
2715
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
2716
|
-
disabled: import("
|
|
2716
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
2717
2717
|
confirm: boolean;
|
|
2718
2718
|
confirmText: string;
|
|
2719
2719
|
} & {} & {
|
|
@@ -33,17 +33,17 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
33
33
|
type: import("vue").PropType<import("element-plus").TableColumnCtx["selectable"]>;
|
|
34
34
|
};
|
|
35
35
|
readonly paginationProps: {
|
|
36
|
-
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("
|
|
36
|
+
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("el-plus/es/types").WithOnPrefixAndCamelCase<import("element-plus").PaginationEmits>>>;
|
|
37
37
|
default: () => {};
|
|
38
38
|
};
|
|
39
39
|
readonly showPagination: BooleanConstructor;
|
|
40
40
|
readonly isFrontPage: BooleanConstructor;
|
|
41
41
|
readonly actionButtons: {
|
|
42
|
-
type: import("vue").PropType<import("
|
|
42
|
+
type: import("vue").PropType<import("el-plus/es").ButtonProps[]>;
|
|
43
43
|
default: () => never[];
|
|
44
44
|
};
|
|
45
45
|
readonly formatColumns: {
|
|
46
|
-
type: import("vue").PropType<import("
|
|
46
|
+
type: import("vue").PropType<import("el-plus/es").ButtonProps[]>;
|
|
47
47
|
default: () => never[];
|
|
48
48
|
};
|
|
49
49
|
readonly isInitSearch: {
|
|
@@ -54,10 +54,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
54
54
|
type: import("vue").PropType<number | string>;
|
|
55
55
|
};
|
|
56
56
|
readonly api: {
|
|
57
|
-
type: import("vue").PropType<import("
|
|
57
|
+
type: import("vue").PropType<import("el-plus/es/types").Api>;
|
|
58
58
|
};
|
|
59
59
|
readonly method: {
|
|
60
|
-
type: import("vue").PropType<import("
|
|
60
|
+
type: import("vue").PropType<import("el-plus/es/types").Method>;
|
|
61
61
|
};
|
|
62
62
|
readonly reqData: {
|
|
63
63
|
type: ObjectConstructor;
|
|
@@ -66,10 +66,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
66
66
|
type: ObjectConstructor;
|
|
67
67
|
};
|
|
68
68
|
readonly reqBefore: {
|
|
69
|
-
type: import("vue").PropType<import("
|
|
69
|
+
type: import("vue").PropType<import("el-plus/es/types").ReqBefore>;
|
|
70
70
|
};
|
|
71
71
|
readonly reqAfter: {
|
|
72
|
-
type: import("vue").PropType<import("
|
|
72
|
+
type: import("vue").PropType<import("el-plus/es/types").ReqAfter>;
|
|
73
73
|
};
|
|
74
74
|
readonly size: {
|
|
75
75
|
default: string;
|
|
@@ -810,17 +810,17 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
810
810
|
type: import("vue").PropType<import("element-plus").TableColumnCtx["selectable"]>;
|
|
811
811
|
};
|
|
812
812
|
readonly paginationProps: {
|
|
813
|
-
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("
|
|
813
|
+
type: import("vue").PropType<Partial<import("element-plus").PaginationProps & import("el-plus/es/types").WithOnPrefixAndCamelCase<import("element-plus").PaginationEmits>>>;
|
|
814
814
|
default: () => {};
|
|
815
815
|
};
|
|
816
816
|
readonly showPagination: BooleanConstructor;
|
|
817
817
|
readonly isFrontPage: BooleanConstructor;
|
|
818
818
|
readonly actionButtons: {
|
|
819
|
-
type: import("vue").PropType<import("
|
|
819
|
+
type: import("vue").PropType<import("el-plus/es").ButtonProps[]>;
|
|
820
820
|
default: () => never[];
|
|
821
821
|
};
|
|
822
822
|
readonly formatColumns: {
|
|
823
|
-
type: import("vue").PropType<import("
|
|
823
|
+
type: import("vue").PropType<import("el-plus/es").ButtonProps[]>;
|
|
824
824
|
default: () => never[];
|
|
825
825
|
};
|
|
826
826
|
readonly isInitSearch: {
|
|
@@ -831,10 +831,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
831
831
|
type: import("vue").PropType<number | string>;
|
|
832
832
|
};
|
|
833
833
|
readonly api: {
|
|
834
|
-
type: import("vue").PropType<import("
|
|
834
|
+
type: import("vue").PropType<import("el-plus/es/types").Api>;
|
|
835
835
|
};
|
|
836
836
|
readonly method: {
|
|
837
|
-
type: import("vue").PropType<import("
|
|
837
|
+
type: import("vue").PropType<import("el-plus/es/types").Method>;
|
|
838
838
|
};
|
|
839
839
|
readonly reqData: {
|
|
840
840
|
type: ObjectConstructor;
|
|
@@ -843,10 +843,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
843
843
|
type: ObjectConstructor;
|
|
844
844
|
};
|
|
845
845
|
readonly reqBefore: {
|
|
846
|
-
type: import("vue").PropType<import("
|
|
846
|
+
type: import("vue").PropType<import("el-plus/es/types").ReqBefore>;
|
|
847
847
|
};
|
|
848
848
|
readonly reqAfter: {
|
|
849
|
-
type: import("vue").PropType<import("
|
|
849
|
+
type: import("vue").PropType<import("el-plus/es/types").ReqAfter>;
|
|
850
850
|
};
|
|
851
851
|
readonly size: {
|
|
852
852
|
default: string;
|
|
@@ -1601,7 +1601,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
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;
|
|
1603
1603
|
readonly appendSizeTo?: string | undefined;
|
|
1604
|
-
} & import("
|
|
1604
|
+
} & import("el-plus/es/types").WithOnPrefixAndCamelCase<{
|
|
1605
1605
|
'update:current-page': (val: number) => boolean;
|
|
1606
1606
|
'update:page-size': (val: number) => boolean;
|
|
1607
1607
|
'size-change': (val: number) => boolean;
|
|
@@ -5,9 +5,9 @@ export declare const EpTitle: {
|
|
|
5
5
|
name: string;
|
|
6
6
|
prop: string;
|
|
7
7
|
permission: string;
|
|
8
|
-
onClick: (e: MouseEvent | import("
|
|
8
|
+
onClick: (e: MouseEvent | import("el-plus/es/index").TableScope) => void;
|
|
9
9
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
10
|
-
disabled: import("
|
|
10
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
11
11
|
confirm: boolean;
|
|
12
12
|
confirmText: string;
|
|
13
13
|
} & {} & {
|
|
@@ -30,9 +30,9 @@ export declare const EpTitle: {
|
|
|
30
30
|
name: string;
|
|
31
31
|
prop: string;
|
|
32
32
|
permission: string;
|
|
33
|
-
onClick: (e: MouseEvent | import("
|
|
33
|
+
onClick: (e: MouseEvent | import("el-plus/es/index").TableScope) => void;
|
|
34
34
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
35
|
-
disabled: import("
|
|
35
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
36
36
|
confirm: boolean;
|
|
37
37
|
confirmText: string;
|
|
38
38
|
} & {} & {
|
|
@@ -53,9 +53,9 @@ export declare const EpTitle: {
|
|
|
53
53
|
name: string;
|
|
54
54
|
prop: string;
|
|
55
55
|
permission: string;
|
|
56
|
-
onClick: (e: MouseEvent | import("
|
|
56
|
+
onClick: (e: MouseEvent | import("el-plus/es/index").TableScope) => void;
|
|
57
57
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
58
|
-
disabled: import("
|
|
58
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
59
59
|
confirm: boolean;
|
|
60
60
|
confirmText: string;
|
|
61
61
|
} & {} & {
|
|
@@ -76,9 +76,9 @@ export declare const EpTitle: {
|
|
|
76
76
|
name: string;
|
|
77
77
|
prop: string;
|
|
78
78
|
permission: string;
|
|
79
|
-
onClick: (e: MouseEvent | import("
|
|
79
|
+
onClick: (e: MouseEvent | import("el-plus/es/index").TableScope) => void;
|
|
80
80
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
81
|
-
disabled: import("
|
|
81
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
82
82
|
confirm: boolean;
|
|
83
83
|
confirmText: string;
|
|
84
84
|
} & {} & {
|
|
@@ -92,7 +92,7 @@ export declare const EpTitle: {
|
|
|
92
92
|
__isSuspense?: never;
|
|
93
93
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
94
94
|
readonly buttons: {
|
|
95
|
-
readonly type: import("vue").PropType<import("
|
|
95
|
+
readonly type: import("vue").PropType<import("el-plus/es/index").ButtonProps[]>;
|
|
96
96
|
readonly default: () => never[];
|
|
97
97
|
};
|
|
98
98
|
readonly title: StringConstructor;
|
|
@@ -109,9 +109,9 @@ export declare const EpTitle: {
|
|
|
109
109
|
name: string;
|
|
110
110
|
prop: string;
|
|
111
111
|
permission: string;
|
|
112
|
-
onClick: (e: MouseEvent | import("
|
|
112
|
+
onClick: (e: MouseEvent | import("el-plus/es/index").TableScope) => void;
|
|
113
113
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
114
|
-
disabled: import("
|
|
114
|
+
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
115
115
|
confirm: boolean;
|
|
116
116
|
confirmText: string;
|
|
117
117
|
} & {} & {
|
|
@@ -43,7 +43,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
43
43
|
name: string;
|
|
44
44
|
prop: string;
|
|
45
45
|
permission: string;
|
|
46
|
-
onClick: (e: MouseEvent | import("
|
|
46
|
+
onClick: (e: MouseEvent | import("el-plus/es").TableScope) => void;
|
|
47
47
|
scopedSlots: Record<string, () => import("vue").VNode>;
|
|
48
48
|
disabled: import("el-plus/es/utils/props").IDisabled;
|
|
49
49
|
confirm: boolean;
|
|
@@ -5,5 +5,5 @@ type Options = {
|
|
|
5
5
|
dialogProps?: DialogOptions;
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
} & SearchListPageProps;
|
|
8
|
-
export declare const useChooseDialog: (options?: Options) => import("
|
|
8
|
+
export declare const useChooseDialog: (options?: Options) => import("el-plus/es").TemplatePromise<unknown, []>;
|
|
9
9
|
export {};
|
|
@@ -17,14 +17,14 @@ const useChooseDialog = (options = {}) => {
|
|
|
17
17
|
multiple,
|
|
18
18
|
...rest
|
|
19
19
|
} = options;
|
|
20
|
-
let selections = [];
|
|
20
|
+
let selections = vue.ref([]);
|
|
21
21
|
const showSingleSelectionCol = !multiple;
|
|
22
22
|
const scopedSlots = {};
|
|
23
23
|
if (!showSingleSelectionCol) {
|
|
24
24
|
scopedSlots.footerPrepend = () => {
|
|
25
25
|
return vue.createVNode("span", {
|
|
26
26
|
"class": bem.e("selected-count")
|
|
27
|
-
}, [t("ep.chooseDialog.selected"), selections.length, t("ep.chooseDialog.unit")]);
|
|
27
|
+
}, [t("ep.chooseDialog.selected"), selections.value.length, t("ep.chooseDialog.unit")]);
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
return useDialog.useDialog({
|
|
@@ -52,10 +52,10 @@ const useChooseDialog = (options = {}) => {
|
|
|
52
52
|
tableProps: {
|
|
53
53
|
height: 300,
|
|
54
54
|
onSelectionChange: (newSel) => {
|
|
55
|
-
selections = newSel;
|
|
55
|
+
selections.value = newSel;
|
|
56
56
|
},
|
|
57
57
|
onSingleSelectionChange: (newSel) => {
|
|
58
|
-
selections = newSel;
|
|
58
|
+
selections.value = newSel;
|
|
59
59
|
resolve(vue.toRaw(selections));
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-choose-dialog.js","sources":["../../../../../packages/hooks/dialog/use-choose-dialog.tsx"],"sourcesContent":["import { useDialog } from './use-dialog'\nimport { createNameSpace } from '@el-plus/utils/bem'\nimport { EpSearchListPage } from '@el-plus/components/search-list-page'\nimport type { DialogOptions } from './use-dialog'\nimport type { SearchListPageProps } from '@el-plus/components/search-list-page'\nimport { reactive, ref, toRaw } from 'vue'\nconst bem = createNameSpace('choose-dialog')\nimport { useLocale } from '@el-plus/hooks/use-locale'\n\ntype Options = {\n title?: string\n dialogProps?: DialogOptions\n multiple?: boolean\n} & SearchListPageProps\nexport const useChooseDialog = (options: Options = {}) => {\n const { t } = useLocale()\n const { dialogProps, title, multiple, ...rest } = options\n let selections = []\n const showSingleSelectionCol = !multiple\n const scopedSlots: DialogOptions['scopedSlots'] = {}\n if (!showSingleSelectionCol) {\n scopedSlots.footerPrepend = () => {\n return (\n <span class={bem.e('selected-count')}>\n {t('ep.chooseDialog.selected')}\n {selections.length}\n {t('ep.chooseDialog.unit')}\n </span>\n )\n }\n }\n return useDialog({\n class: bem.b(),\n width: '80%',\n showFooter: !showSingleSelectionCol,\n scopedSlots,\n title,\n onConfirm: (resolve) => {\n resolve(JSON.parse(JSON.stringify(selections)))\n },\n render: ({ resolve }) => {\n const formData = rest.formData || reactive({})\n return (\n <EpSearchListPage\n {...{\n showSelectionCol: multiple,\n showSingleSelectionCol,\n formData,\n ...rest,\n formProps: {\n col: 3,\n ...rest.formProps,\n },\n tableProps: {\n height: 300,\n onSelectionChange: (newSel) => {\n selections = newSel\n },\n onSingleSelectionChange: (newSel) => {\n selections = newSel\n resolve(toRaw(selections))\n },\n },\n }}\n />\n )\n },\n ...dialogProps,\n })\n}\n"],"names":["bem","createNameSpace","useChooseDialog","options","t","useLocale","dialogProps","title","multiple","rest","selections","showSingleSelectionCol","scopedSlots","footerPrepend","_createVNode","e","length","useDialog","class","b","width","showFooter","onConfirm","resolve","JSON","parse","stringify","render","formData","reactive","EpSearchListPage","showSelectionCol","formProps","col","tableProps","height","onSelectionChange","newSel","onSingleSelectionChange","toRaw"],"mappings":";;;;;;;;AAMA,MAAMA,GAAAA,GAAMC,sBAAgB,eAAe,CAAA;AAQpC,MAAMC,eAAAA,GAAkBA,CAACC,OAAAA,GAAmB,EAAC,KAAM;AACxD,EAAA,MAAM;AAAA,IAAEC;AAAAA,MAAMC,mBAAAA,EAAU;AACxB,EAAA,MAAM;AAAA,IAAEC,WAAAA;AAAAA,IAAaC,KAAAA;AAAAA,IAAOC,QAAAA;AAAAA,IAAU,GAAGC;AAAAA,GAAK,GAAIN,OAAAA;AAClD,EAAA,IAAIO,
|
|
1
|
+
{"version":3,"file":"use-choose-dialog.js","sources":["../../../../../packages/hooks/dialog/use-choose-dialog.tsx"],"sourcesContent":["import { useDialog } from './use-dialog'\nimport { createNameSpace } from '@el-plus/utils/bem'\nimport { EpSearchListPage } from '@el-plus/components/search-list-page'\nimport type { DialogOptions } from './use-dialog'\nimport type { SearchListPageProps } from '@el-plus/components/search-list-page'\nimport { reactive, ref, toRaw } from 'vue'\nconst bem = createNameSpace('choose-dialog')\nimport { useLocale } from '@el-plus/hooks/use-locale'\n\ntype Options = {\n title?: string\n dialogProps?: DialogOptions\n multiple?: boolean\n} & SearchListPageProps\nexport const useChooseDialog = (options: Options = {}) => {\n const { t } = useLocale()\n const { dialogProps, title, multiple, ...rest } = options\n let selections = ref([])\n const showSingleSelectionCol = !multiple\n const scopedSlots: DialogOptions['scopedSlots'] = {}\n if (!showSingleSelectionCol) {\n scopedSlots.footerPrepend = () => {\n return (\n <span class={bem.e('selected-count')}>\n {t('ep.chooseDialog.selected')}\n {selections.value.length}\n {t('ep.chooseDialog.unit')}\n </span>\n )\n }\n }\n return useDialog({\n class: bem.b(),\n width: '80%',\n showFooter: !showSingleSelectionCol,\n scopedSlots,\n title,\n onConfirm: (resolve) => {\n resolve(JSON.parse(JSON.stringify(selections)))\n },\n render: ({ resolve }) => {\n const formData = rest.formData || reactive({})\n return (\n <EpSearchListPage\n {...{\n showSelectionCol: multiple,\n showSingleSelectionCol,\n formData,\n ...rest,\n formProps: {\n col: 3,\n ...rest.formProps,\n },\n tableProps: {\n height: 300,\n onSelectionChange: (newSel) => {\n selections.value = newSel\n },\n onSingleSelectionChange: (newSel) => {\n selections.value = newSel\n resolve(toRaw(selections))\n },\n },\n }}\n />\n )\n },\n ...dialogProps,\n })\n}\n"],"names":["bem","createNameSpace","useChooseDialog","options","t","useLocale","dialogProps","title","multiple","rest","selections","ref","showSingleSelectionCol","scopedSlots","footerPrepend","_createVNode","e","value","length","useDialog","class","b","width","showFooter","onConfirm","resolve","JSON","parse","stringify","render","formData","reactive","EpSearchListPage","showSelectionCol","formProps","col","tableProps","height","onSelectionChange","newSel","onSingleSelectionChange","toRaw"],"mappings":";;;;;;;;AAMA,MAAMA,GAAAA,GAAMC,sBAAgB,eAAe,CAAA;AAQpC,MAAMC,eAAAA,GAAkBA,CAACC,OAAAA,GAAmB,EAAC,KAAM;AACxD,EAAA,MAAM;AAAA,IAAEC;AAAAA,MAAMC,mBAAAA,EAAU;AACxB,EAAA,MAAM;AAAA,IAAEC,WAAAA;AAAAA,IAAaC,KAAAA;AAAAA,IAAOC,QAAAA;AAAAA,IAAU,GAAGC;AAAAA,GAAK,GAAIN,OAAAA;AAClD,EAAA,IAAIO,UAAAA,GAAaC,OAAAA,CAAI,EAAE,CAAA;AACvB,EAAA,MAAM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,GAAA;AAAA,UACRC,mBAAoBC,CAAAA,MAAAA,KAAW;AAC7B7B,YAAAA,UAAAA,CAAWO,KAAAA,GAAQsB,MAAAA;AAAAA,UACrB,CAAA;AAAA,UACAC,yBAA0BD,CAAAA,MAAAA,KAAW;AACnC7B,YAAAA,UAAAA,CAAWO,KAAAA,GAAQsB,MAAAA;AACnBd,YAAAA,OAAAA,CAAQgB,SAAAA,CAAM/B,UAAU,CAAC,CAAA;AAAA,UAC3B;AAAA;AACF,SAAC,IAAA,CAAA;AAAA,IAIT,CAAA;AAAA,IACA,GAAGJ;AAAAA,GACJ,CAAA;AACH;;;;"}
|
|
@@ -5,5 +5,5 @@ type Options = {
|
|
|
5
5
|
dialogProps?: DialogOptions;
|
|
6
6
|
formData?: FormProps['model'];
|
|
7
7
|
} & FormProps;
|
|
8
|
-
export declare const useFormDialog: (options?: Options) => import("
|
|
8
|
+
export declare const useFormDialog: (options?: Options) => import("el-plus/es").TemplatePromise<unknown, []>;
|
|
9
9
|
export {};
|
|
@@ -44,22 +44,25 @@ const useTemplatePromise = (options = {}) => {
|
|
|
44
44
|
if (index2 !== -1) instances.value.splice(index2, 1);
|
|
45
45
|
} else {
|
|
46
46
|
props.isVisible = false;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return props.promise;
|
|
50
|
+
};
|
|
51
|
+
const open = (...args) => {
|
|
52
|
+
instances.value = [];
|
|
53
|
+
const com = create(...args);
|
|
54
|
+
vue.nextTick(() => {
|
|
55
|
+
const wrapper = document.querySelector(".ep-template-promise.is-init");
|
|
56
|
+
if (wrapper) {
|
|
51
57
|
const dialog = wrapper?.querySelector(".el-modal-dialog");
|
|
52
58
|
const zIndex = dialog ? dialog.style["z-index"] : "";
|
|
53
59
|
if (zIndex && wrapper) {
|
|
54
60
|
wrapper.style.zIndex = zIndex;
|
|
55
61
|
}
|
|
62
|
+
wrapper.classList.remove("is-init");
|
|
56
63
|
}
|
|
57
64
|
});
|
|
58
|
-
return
|
|
59
|
-
};
|
|
60
|
-
const open = (...args) => {
|
|
61
|
-
instances.value = [];
|
|
62
|
-
return create(...args);
|
|
65
|
+
return com;
|
|
63
66
|
};
|
|
64
67
|
const component = /* @__PURE__ */ vue.defineComponent((_, ctx) => {
|
|
65
68
|
const {
|
|
@@ -68,7 +71,7 @@ const useTemplatePromise = (options = {}) => {
|
|
|
68
71
|
const renderList = () => instances.value.map((props) => {
|
|
69
72
|
return vue.withDirectives(vue.h("div", {
|
|
70
73
|
// key: props.key,
|
|
71
|
-
class: "ep-template-promise"
|
|
74
|
+
class: "ep-template-promise is-init"
|
|
72
75
|
}, render ? render(props, ctx) : slots.default?.(props)), [[vue.vShow, props.isVisible]]);
|
|
73
76
|
});
|
|
74
77
|
if (transition) return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-template-promise.js","sources":["../../../../packages/hooks/use-template-promise.tsx"],"sourcesContent":["// 参考 https://github.com/vueuse/vueuse/blob/main/packages/core/createTemplatePromise/index.ts\n\nimport type {\n DefineComponent,\n Ref,\n TransitionProps,\n VNode,\n SetupContext,\n} from 'vue'\nimport {\n defineComponent,\n ref,\n shallowReactive,\n Transition,\n Fragment,\n h,\n createApp,\n getCurrentInstance,\n render as vRender,\n markRaw,\n withDirectives,\n vShow,\n} from 'vue'\n\nexport interface TemplatePromiseOptions {\n // 过渡\n transition?: TransitionProps\n // 是否销毁\n destroy?: boolean\n // 自定义渲染\n render?: (props, ctx: SetupContext) => VNode\n}\nexport type TemplatePromise<\n Return,\n Args extends any[] = [],\n> = DefineComponent<object> & {\n // new (): {\n // $slots: {\n // default: (_: TemplatePromiseProps<Return, Args>) => any\n // }\n // }\n} & {\n open: (...args: Args) => Promise<Return>\n}\nexport interface TemplatePromiseProps<Return, Args extends any[] = []> {\n promise: Promise<Return> | undefined\n resolve: (v: Return) => void\n reject: (v: any) => void\n args: Args\n options: TemplatePromiseOptions\n isResolving: boolean\n isVisible: boolean\n key: number\n}\nexport const useTemplatePromise = <Return, Args extends any[] = []>(\n options: TemplatePromiseOptions = {},\n): TemplatePromise<Return, Args> => {\n const {\n destroy = false,\n render,\n transition = {\n name: 'fade',\n appear: true,\n },\n } = options\n const instances = ref([]) as Ref<TemplatePromiseProps<Return, Args>[]>\n let index = 0\n\n const create = (...args: Args) => {\n const key = index++\n const props = shallowReactive<TemplatePromiseProps<Return, Args>>({\n key,\n args,\n promise: undefined,\n resolve: () => {},\n reject: () => {},\n isResolving: false,\n isVisible: true,\n options,\n })\n instances.value.push(props)\n props.promise = new Promise<Return>((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true\n return _resolve(v)\n }\n props.reject = _reject\n }).finally(() => {\n if (destroy) {\n props.promise = undefined\n const index = instances.value.indexOf(props)\n if (index !== -1) instances.value.splice(index, 1)\n } else {\n props.isVisible = false\n const wrapper = document.querySelector(\n
|
|
1
|
+
{"version":3,"file":"use-template-promise.js","sources":["../../../../packages/hooks/use-template-promise.tsx"],"sourcesContent":["// 参考 https://github.com/vueuse/vueuse/blob/main/packages/core/createTemplatePromise/index.ts\n\nimport type {\n DefineComponent,\n Ref,\n TransitionProps,\n VNode,\n SetupContext,\n} from 'vue'\nimport {\n defineComponent,\n ref,\n shallowReactive,\n Transition,\n Fragment,\n h,\n createApp,\n getCurrentInstance,\n render as vRender,\n markRaw,\n withDirectives,\n vShow,\n nextTick,\n} from 'vue'\n\nexport interface TemplatePromiseOptions {\n // 过渡\n transition?: TransitionProps\n // 是否销毁\n destroy?: boolean\n // 自定义渲染\n render?: (props, ctx: SetupContext) => VNode\n}\nexport type TemplatePromise<\n Return,\n Args extends any[] = [],\n> = DefineComponent<object> & {\n // new (): {\n // $slots: {\n // default: (_: TemplatePromiseProps<Return, Args>) => any\n // }\n // }\n} & {\n open: (...args: Args) => Promise<Return>\n}\nexport interface TemplatePromiseProps<Return, Args extends any[] = []> {\n promise: Promise<Return> | undefined\n resolve: (v: Return) => void\n reject: (v: any) => void\n args: Args\n options: TemplatePromiseOptions\n isResolving: boolean\n isVisible: boolean\n key: number\n}\nexport const useTemplatePromise = <Return, Args extends any[] = []>(\n options: TemplatePromiseOptions = {},\n): TemplatePromise<Return, Args> => {\n const {\n destroy = false,\n render,\n transition = {\n name: 'fade',\n appear: true,\n },\n } = options\n const instances = ref([]) as Ref<TemplatePromiseProps<Return, Args>[]>\n let index = 0\n\n const create = (...args: Args) => {\n const key = index++\n const props = shallowReactive<TemplatePromiseProps<Return, Args>>({\n key,\n args,\n promise: undefined,\n resolve: () => {},\n reject: () => {},\n isResolving: false,\n isVisible: true,\n options,\n })\n instances.value.push(props)\n props.promise = new Promise<Return>((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true\n return _resolve(v)\n }\n props.reject = _reject\n }).finally(() => {\n if (destroy) {\n props.promise = undefined\n const index = instances.value.indexOf(props)\n if (index !== -1) instances.value.splice(index, 1)\n } else {\n props.isVisible = false\n // const wrapper = document.querySelector(\n // '.ep-template-promise',\n // ) as HTMLElement\n // if (wrapper.style['zIndex']) {\n // return\n // }\n // const dialog = wrapper?.querySelector('.el-modal-dialog') as HTMLElement\n // const zIndex = dialog ? dialog.style['z-index'] : ''\n // if (zIndex && wrapper) {\n // wrapper.style.zIndex = zIndex\n // }\n }\n })\n return props.promise\n }\n const open = (...args: Args) => {\n instances.value = []\n const com = create(...args)\n nextTick(() => {\n const wrapper = document.querySelector(\n '.ep-template-promise.is-init',\n ) as HTMLElement\n if (wrapper) {\n const dialog = wrapper?.querySelector('.el-modal-dialog') as HTMLElement\n const zIndex = dialog ? dialog.style['z-index'] : ''\n if (zIndex && wrapper) {\n wrapper.style.zIndex = zIndex\n }\n // 删除is-init的class\n wrapper.classList.remove('is-init')\n }\n })\n return com\n }\n const component = defineComponent((_, ctx) => {\n const { slots } = ctx\n const renderList = () =>\n instances.value.map((props) => {\n return withDirectives(\n h(\n 'div',\n {\n // key: props.key,\n class: 'ep-template-promise is-init',\n },\n render ? render(props, ctx) : slots.default?.(props),\n ),\n [[vShow, props.isVisible]],\n )\n })\n if (transition)\n return () => <Transition {...transition}>{renderList()}</Transition>\n\n return renderList\n })\n // @ts-expect-error There's a breaking type change in Vue 3.3 <https://github.com/vuejs/core/pull/7963>\n component.open = open\n return markRaw(component as TemplatePromise<Return, Args>)\n}\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","useTemplatePromise","options","destroy","render","transition","name","appear","instances","ref","index","create","args","key","props","shallowReactive","promise","undefined","resolve","reject","isResolving","isVisible","value","push","Promise","_resolve","_reject","v","finally","indexOf","splice","open","com","nextTick","wrapper","document","querySelector","dialog","zIndex","style","classList","remove","component","defineComponent","_","ctx","slots","renderList","map","withDirectives","h","class","default","vShow","_slot","_createVNode","Transition","markRaw"],"mappings":";;;;AAuBY,SAAAA,QAAAC,CAAAA,EAAA;AAAA,EAAA,OAAA,OAAAA,CAAAA,KAAA,UAAA,IAAAC,MAAAA,CAAAC,SAAAA,CAAAC,QAAAA,CAAAC,IAAAA,CAAAJ,CAAA,CAAA,KAAA,iBAAA,IAAA,CAAAK,WAAAA,CAAAL,CAAA,CAAA;AAAA;AAgCL,MAAMM,kBAAAA,GAAqBA,CAChCC,OAAAA,GAAkC,EAAC,KACD;AAClC,EAAA,MAAM;AAAA,IACJC,OAAAA,GAAU,KAAA;AAAA,IACVC,MAAAA;AAAAA,IACAC,UAAAA,GAAa;AAAA,MACXC,IAAAA,EAAM,MAAA;AAAA,MACNC,MAAAA,EAAQ;AAAA;AACV,GACF,GAAIL,OAAAA;AACJ,EAAA,MAAMM,SAAAA,GAAYC,OAAAA,CAAI,EAAE,CAAA;AACxB,EAAA,IAAIC,KAAAA,GAAQ,CAAA;AAEZ,EAAA,MAAMC,MAAAA,GAASA,IAAIC,IAAAA,KAAe;AAChC,IAAA,MAAMC,GAAAA,GAAMH,KAAAA,EAAAA;AACZ,IAAA,MAAMI,QAAQC,mBAAAA,CAAoD;AAAA,MAChEF,GAAAA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OAAAA,CAAA4D,QAAGP,UAAAA,EAAY,IAAAO,KAAAA,GAAA;AAAA,QAAAF,OAAAA,EAAAA,MAAA,CAAAE,KAAA;AAAA,OAAA,CAAA;AAAA,IAAA,CAAA;AAExD,IAAA,OAAOP,UAAAA;AAAAA,EACT,CAAC,CAAA;AAEDL,EAAAA,SAAAA,CAAUX,IAAAA,GAAOA,IAAAA;AACjB,EAAA,OAAO0B,YAAQf,SAA0C,CAAA;AAC3D;;;;"}
|
package/lib/package.json.js
CHANGED
package/package.json
CHANGED
package/theme-chalk/dialog.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ep-template-promise{position:relative}.ep-dialog{padding:20px 25px 40px}.ep-dialog .el-dialog__headerbtn{height:56px}.ep-dialog .el-dialog__headerbtn .el-dialog__close{transform:scale(1.3)}.ep-dialog .el-dialog__header{text-align:center}.ep-dialog .el-dialog__header .el-dialog__title{color:#505050;font-size:16px;font-weight:600;line-height:24px;margin:4px}.ep-dialog .el-dialog__body{padding:25px 0 0}.ep-dialog__footer{padding:14px 0 0}.ep-dialog__footer button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}
|
|
1
|
+
.ep-template-promise{position:relative;z-index:8888888888888888}.ep-dialog{padding:20px 25px 40px}.ep-dialog .el-dialog__headerbtn{height:56px}.ep-dialog .el-dialog__headerbtn .el-dialog__close{transform:scale(1.3)}.ep-dialog .el-dialog__header{text-align:center}.ep-dialog .el-dialog__header .el-dialog__title{color:#505050;font-size:16px;font-weight:600;line-height:24px;margin:4px}.ep-dialog .el-dialog__body{padding:25px 0 0}.ep-dialog__footer{padding:14px 0 0}.ep-dialog__footer button{font-size:12px}.ep-choose-dialog__selected-count{color:#409eff;float:left;font-size:16px;line-height:32px}
|
package/theme-chalk/form.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ep-form{position:relative}.ep-form__fold{bottom:23px;color:#367ef5;cursor:pointer;font-size:14px;position:absolute;right:0;text-align:center;width:70px}.ep-form__fold:hover{text-decoration:underline}.ep-form.is-fold{padding-right:70px}.ep-form .el-form-item--small{margin-bottom:18px}.ep-form .el-form-item--small .el-form-item__label{display:block;height:32px;line-height:32px;overflow:hidden;padding-left:18px;padding-right:6px;text-overflow:ellipsis;white-space:nowrap}.ep-form .el-form-item--small .el-form-item__content{font-size:13px;line-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-input{font-size:13px;height:32px}.ep-form .el-form-item--small .el-form-item__content .el-select__wrapper{font-size:13px;line-height:32px;min-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-date-editor .el-range-input{font-size:13px}
|
|
1
|
+
.ep-form{position:relative}.ep-form__fold{bottom:23px;color:#367ef5;cursor:pointer;font-size:14px;position:absolute;right:0;text-align:center;width:70px}.ep-form__fold:hover{text-decoration:underline}.ep-form.is-fold{padding-right:70px}.ep-form .el-form-item--small{margin-bottom:18px}.ep-form .el-form-item--small .el-form-item__label{display:block;height:32px;line-height:32px;overflow:hidden;padding-left:18px;padding-right:6px;text-overflow:ellipsis;white-space:nowrap}.ep-form .el-form-item--small .el-form-item__content{font-size:13px;line-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-input{font-size:13px;height:32px}.ep-form .el-form-item--small .el-form-item__content .el-textarea__inner{font-size:13px!important}.ep-form .el-form-item--small .el-form-item__content .el-select__wrapper{font-size:13px;line-height:32px;min-height:32px}.ep-form .el-form-item--small .el-form-item__content .el-date-editor .el-range-input{font-size:13px}
|