@zy-frontend/business 1.0.145 → 1.1.0
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/README.md +184 -22
- package/dist/business.css +1 -1
- package/dist/index.es.d.ts +251 -6
- package/dist/index.es.js +6483 -80829
- package/package.json +8 -6
package/dist/index.es.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AxiosInstance } from 'axios';
|
|
|
2
2
|
import { ButtonType } from 'element-plus';
|
|
3
3
|
import { ComponentOptionsMixin } from 'vue';
|
|
4
4
|
import { ComponentProvideOptions } from 'vue';
|
|
5
|
+
import { ComputedRef } from 'vue';
|
|
5
6
|
import { DefineComponent } from 'vue';
|
|
6
7
|
import { ElTableColumn } from 'element-plus';
|
|
7
8
|
import { ExtractPropTypes } from 'vue';
|
|
@@ -12,6 +13,7 @@ import { Plugin as Plugin_2 } from 'vue';
|
|
|
12
13
|
import { Plus } from '@element-plus/icons-vue';
|
|
13
14
|
import { PropType } from 'vue';
|
|
14
15
|
import { PublicProps } from 'vue';
|
|
16
|
+
import { Ref } from 'vue';
|
|
15
17
|
import { RendererElement } from 'vue';
|
|
16
18
|
import { RendererNode } from 'vue';
|
|
17
19
|
import { TableProps } from 'element-plus';
|
|
@@ -145,7 +147,63 @@ customize: boolean;
|
|
|
145
147
|
foldMinRowNum: number;
|
|
146
148
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
147
149
|
|
|
148
|
-
declare const __VLS_component_11: DefineComponent<ExtractPropTypes<
|
|
150
|
+
declare const __VLS_component_11: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_7<__VLS_TypePropsToRuntimeProps_14<ZYSplitterProps>, {
|
|
151
|
+
direction: string;
|
|
152
|
+
barSize: number;
|
|
153
|
+
showCollapseButton: string;
|
|
154
|
+
disabled: boolean;
|
|
155
|
+
}>>, {
|
|
156
|
+
collapse: (index: number) => void;
|
|
157
|
+
resize: (index: number, size: SplitterSize) => void;
|
|
158
|
+
getSizes: () => SplitterSize[];
|
|
159
|
+
getCollapsed: () => boolean[];
|
|
160
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
161
|
+
resize: (...args: any[]) => void;
|
|
162
|
+
"update:modelValue": (...args: any[]) => void;
|
|
163
|
+
collapse: (...args: any[]) => void;
|
|
164
|
+
dragstart: (...args: any[]) => void;
|
|
165
|
+
dragend: (...args: any[]) => void;
|
|
166
|
+
"update:collapsed": (...args: any[]) => void;
|
|
167
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_7<__VLS_TypePropsToRuntimeProps_14<ZYSplitterProps>, {
|
|
168
|
+
direction: string;
|
|
169
|
+
barSize: number;
|
|
170
|
+
showCollapseButton: string;
|
|
171
|
+
disabled: boolean;
|
|
172
|
+
}>>> & Readonly<{
|
|
173
|
+
onResize?: ((...args: any[]) => any) | undefined;
|
|
174
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
175
|
+
onCollapse?: ((...args: any[]) => any) | undefined;
|
|
176
|
+
onDragstart?: ((...args: any[]) => any) | undefined;
|
|
177
|
+
onDragend?: ((...args: any[]) => any) | undefined;
|
|
178
|
+
"onUpdate:collapsed"?: ((...args: any[]) => any) | undefined;
|
|
179
|
+
}>, {
|
|
180
|
+
disabled: boolean;
|
|
181
|
+
direction: SplitterDirection;
|
|
182
|
+
barSize: number;
|
|
183
|
+
showCollapseButton: CollapseButtonDisplay;
|
|
184
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
185
|
+
|
|
186
|
+
declare const __VLS_component_12: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_8<__VLS_TypePropsToRuntimeProps_15<ZYSplitterPanelProps>, {
|
|
187
|
+
size: undefined;
|
|
188
|
+
min: number;
|
|
189
|
+
max: undefined;
|
|
190
|
+
collapsible: boolean;
|
|
191
|
+
resizable: boolean;
|
|
192
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_8<__VLS_TypePropsToRuntimeProps_15<ZYSplitterPanelProps>, {
|
|
193
|
+
size: undefined;
|
|
194
|
+
min: number;
|
|
195
|
+
max: undefined;
|
|
196
|
+
collapsible: boolean;
|
|
197
|
+
resizable: boolean;
|
|
198
|
+
}>>> & Readonly<{}>, {
|
|
199
|
+
size: SplitterSize;
|
|
200
|
+
max: SplitterSize;
|
|
201
|
+
min: SplitterSize;
|
|
202
|
+
resizable: boolean;
|
|
203
|
+
collapsible: boolean;
|
|
204
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
205
|
+
|
|
206
|
+
declare const __VLS_component_13: DefineComponent<ExtractPropTypes< {
|
|
149
207
|
modelValue: PropType<ZYTableData>;
|
|
150
208
|
isLoading: PropType<boolean>;
|
|
151
209
|
selections: PropType<Record<string, any>[]>;
|
|
@@ -582,6 +640,10 @@ declare type __VLS_NonUndefinedable_13<T> = T extends undefined ? never : T;
|
|
|
582
640
|
|
|
583
641
|
declare type __VLS_NonUndefinedable_14<T> = T extends undefined ? never : T;
|
|
584
642
|
|
|
643
|
+
declare type __VLS_NonUndefinedable_15<T> = T extends undefined ? never : T;
|
|
644
|
+
|
|
645
|
+
declare type __VLS_NonUndefinedable_16<T> = T extends undefined ? never : T;
|
|
646
|
+
|
|
585
647
|
declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
|
|
586
648
|
|
|
587
649
|
declare type __VLS_NonUndefinedable_3<T> = T extends undefined ? never : T;
|
|
@@ -626,6 +688,14 @@ declare type __VLS_Prettify_7<T> = {
|
|
|
626
688
|
[K in keyof T]: T[K];
|
|
627
689
|
} & {};
|
|
628
690
|
|
|
691
|
+
declare type __VLS_Prettify_8<T> = {
|
|
692
|
+
[K in keyof T]: T[K];
|
|
693
|
+
} & {};
|
|
694
|
+
|
|
695
|
+
declare type __VLS_Prettify_9<T> = {
|
|
696
|
+
[K in keyof T]: T[K];
|
|
697
|
+
} & {};
|
|
698
|
+
|
|
629
699
|
declare function __VLS_template(): {
|
|
630
700
|
"extra-action"?(_: {}): any;
|
|
631
701
|
};
|
|
@@ -634,7 +704,30 @@ declare function __VLS_template_10(): {
|
|
|
634
704
|
"extra-action"?(_: {}): any;
|
|
635
705
|
};
|
|
636
706
|
|
|
637
|
-
declare function __VLS_template_11():
|
|
707
|
+
declare function __VLS_template_11(): {
|
|
708
|
+
default?(_: {}): any;
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
declare function __VLS_template_12(): {
|
|
712
|
+
default?(_: {}): any;
|
|
713
|
+
"collapse-self"?(_: {
|
|
714
|
+
index: number;
|
|
715
|
+
collapsed: boolean;
|
|
716
|
+
}): any;
|
|
717
|
+
"collapse-next"?(_: {
|
|
718
|
+
index: number;
|
|
719
|
+
nextIndex: number;
|
|
720
|
+
collapsed: boolean;
|
|
721
|
+
}): any;
|
|
722
|
+
"bar-extra"?(_: {
|
|
723
|
+
index: number;
|
|
724
|
+
direction: SplitterDirection;
|
|
725
|
+
selfCollapsed: boolean;
|
|
726
|
+
nextCollapsed: boolean;
|
|
727
|
+
}): any;
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
declare function __VLS_template_13(): Partial<Record<NonNullable<string | number>, (_: {
|
|
638
731
|
row: any;
|
|
639
732
|
prop: string;
|
|
640
733
|
index: any;
|
|
@@ -748,6 +841,24 @@ declare type __VLS_TypePropsToRuntimeProps_14<T> = {
|
|
|
748
841
|
};
|
|
749
842
|
};
|
|
750
843
|
|
|
844
|
+
declare type __VLS_TypePropsToRuntimeProps_15<T> = {
|
|
845
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
846
|
+
type: PropType<__VLS_NonUndefinedable_15<T[K]>>;
|
|
847
|
+
} : {
|
|
848
|
+
type: PropType<T[K]>;
|
|
849
|
+
required: true;
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
|
|
853
|
+
declare type __VLS_TypePropsToRuntimeProps_16<T> = {
|
|
854
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
855
|
+
type: PropType<__VLS_NonUndefinedable_16<T[K]>>;
|
|
856
|
+
} : {
|
|
857
|
+
type: PropType<T[K]>;
|
|
858
|
+
required: true;
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
|
|
751
862
|
declare type __VLS_TypePropsToRuntimeProps_2<T> = {
|
|
752
863
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
753
864
|
type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
|
|
@@ -862,6 +973,18 @@ declare type __VLS_WithDefaults_7<P, D> = {
|
|
|
862
973
|
}> : P[K];
|
|
863
974
|
};
|
|
864
975
|
|
|
976
|
+
declare type __VLS_WithDefaults_8<P, D> = {
|
|
977
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_8<P[K] & {
|
|
978
|
+
default: D[K];
|
|
979
|
+
}> : P[K];
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
declare type __VLS_WithDefaults_9<P, D> = {
|
|
983
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_9<P[K] & {
|
|
984
|
+
default: D[K];
|
|
985
|
+
}> : P[K];
|
|
986
|
+
};
|
|
987
|
+
|
|
865
988
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
866
989
|
new (): {
|
|
867
990
|
$slots: S;
|
|
@@ -880,6 +1003,18 @@ declare type __VLS_WithTemplateSlots_11<T, S> = T & {
|
|
|
880
1003
|
};
|
|
881
1004
|
};
|
|
882
1005
|
|
|
1006
|
+
declare type __VLS_WithTemplateSlots_12<T, S> = T & {
|
|
1007
|
+
new (): {
|
|
1008
|
+
$slots: S;
|
|
1009
|
+
};
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1012
|
+
declare type __VLS_WithTemplateSlots_13<T, S> = T & {
|
|
1013
|
+
new (): {
|
|
1014
|
+
$slots: S;
|
|
1015
|
+
};
|
|
1016
|
+
};
|
|
1017
|
+
|
|
883
1018
|
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
884
1019
|
new (): {
|
|
885
1020
|
$slots: S;
|
|
@@ -928,6 +1063,8 @@ declare type __VLS_WithTemplateSlots_9<T, S> = T & {
|
|
|
928
1063
|
};
|
|
929
1064
|
};
|
|
930
1065
|
|
|
1066
|
+
export declare type CollapseButtonDisplay = 'hover' | 'persistent' | 'never';
|
|
1067
|
+
|
|
931
1068
|
export declare const componentEventIdKey: InjectionKey<string | number | undefined>;
|
|
932
1069
|
|
|
933
1070
|
export declare const componentProjectIdKey: InjectionKey<string | number | undefined>;
|
|
@@ -968,6 +1105,41 @@ export declare const sortTableData: (data: Record<string, any>[], prop: string,
|
|
|
968
1105
|
index: number;
|
|
969
1106
|
}[] | undefined;
|
|
970
1107
|
|
|
1108
|
+
/** ZYSplitter 与 ZYSplitterPanel 之间的 provide/inject 契约 */
|
|
1109
|
+
export declare interface SplitterContext {
|
|
1110
|
+
panels: Ref<SplitterPanelConfig[]>;
|
|
1111
|
+
collapsed: Ref<boolean[]>;
|
|
1112
|
+
draggingIndex: Ref<number>;
|
|
1113
|
+
isDragging: Ref<boolean>;
|
|
1114
|
+
direction: ComputedRef<SplitterDirection>;
|
|
1115
|
+
barSize: ComputedRef<number>;
|
|
1116
|
+
barClass: ComputedRef<string | undefined>;
|
|
1117
|
+
showCollapseButton: ComputedRef<CollapseButtonDisplay>;
|
|
1118
|
+
registerPanel: (config: Omit<SplitterPanelConfig, 'id'>) => symbol;
|
|
1119
|
+
unregisterPanel: (id: symbol) => void;
|
|
1120
|
+
updatePanel: (id: symbol, patch: Partial<Omit<SplitterPanelConfig, 'id'>>) => void;
|
|
1121
|
+
onBarPointerDown: (e: PointerEvent, leftIndex: number) => void;
|
|
1122
|
+
collapse: (index: number) => void;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
export declare type SplitterDirection = 'horizontal' | 'vertical';
|
|
1126
|
+
|
|
1127
|
+
export declare const splitterInjectionKey: InjectionKey<SplitterContext>;
|
|
1128
|
+
|
|
1129
|
+
/** 注册时收集的内部 panel 配置 */
|
|
1130
|
+
export declare interface SplitterPanelConfig {
|
|
1131
|
+
/** 稳定 id,作为更新/反注册的句柄 */
|
|
1132
|
+
id: symbol;
|
|
1133
|
+
size: SplitterSize | undefined;
|
|
1134
|
+
min: SplitterSize | undefined;
|
|
1135
|
+
max: SplitterSize | undefined;
|
|
1136
|
+
collapsible: boolean;
|
|
1137
|
+
resizable: boolean;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
/** number => px;以 '%' 结尾的字符串 => 百分比 */
|
|
1141
|
+
export declare type SplitterSize = number | string;
|
|
1142
|
+
|
|
971
1143
|
declare type TableColumnProps = Partial<Parameters<Exclude<(typeof ElTableColumn)['setup'], undefined>>[0]>;
|
|
972
1144
|
|
|
973
1145
|
export declare function transferSearchConfigToSearchFormConfig(searchConfig: Record<string, any>[]): any[];
|
|
@@ -1482,7 +1654,7 @@ export declare type ZYRequest = AxiosInstance;
|
|
|
1482
1654
|
|
|
1483
1655
|
export declare interface ZYResponse {
|
|
1484
1656
|
data: any;
|
|
1485
|
-
success?:
|
|
1657
|
+
success?: boolean;
|
|
1486
1658
|
code: number;
|
|
1487
1659
|
message: string;
|
|
1488
1660
|
}
|
|
@@ -1691,7 +1863,7 @@ export declare enum ZYSearchFormTimeType {
|
|
|
1691
1863
|
DateRange = "date-range"
|
|
1692
1864
|
}
|
|
1693
1865
|
|
|
1694
|
-
export declare const ZYSimpleTable: DefineComponent<ExtractPropTypes<
|
|
1866
|
+
export declare const ZYSimpleTable: DefineComponent<ExtractPropTypes<__VLS_WithDefaults_9<__VLS_TypePropsToRuntimeProps_16<ZYSimpleTableProps>, {
|
|
1695
1867
|
data: () => never[];
|
|
1696
1868
|
columns: () => never[];
|
|
1697
1869
|
height: number;
|
|
@@ -1702,7 +1874,7 @@ horizontalWidth: () => {
|
|
|
1702
1874
|
header: number;
|
|
1703
1875
|
content: number;
|
|
1704
1876
|
};
|
|
1705
|
-
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<
|
|
1877
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_9<__VLS_TypePropsToRuntimeProps_16<ZYSimpleTableProps>, {
|
|
1706
1878
|
data: () => never[];
|
|
1707
1879
|
columns: () => never[];
|
|
1708
1880
|
height: number;
|
|
@@ -1779,12 +1951,85 @@ type: PropType<Record<string, any>[]>;
|
|
|
1779
1951
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
1780
1952
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1781
1953
|
|
|
1954
|
+
export declare const ZYSplitter: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, ReturnType<typeof __VLS_template_11>>;
|
|
1955
|
+
|
|
1956
|
+
export declare interface ZYSplitterCollapseEvent {
|
|
1957
|
+
index: number;
|
|
1958
|
+
collapsed: boolean[];
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
/** 事件签名(仅供参考;SFC 内部用字符串数组声明 emits) */
|
|
1962
|
+
export declare interface ZYSplitterEmits {
|
|
1963
|
+
'update:modelValue': (value: SplitterSize[]) => void;
|
|
1964
|
+
'update:collapsed': (value: boolean[]) => void;
|
|
1965
|
+
resize: (payload: ZYSplitterResizeEvent) => void;
|
|
1966
|
+
collapse: (payload: ZYSplitterCollapseEvent) => void;
|
|
1967
|
+
dragstart: (payload: {
|
|
1968
|
+
index: number;
|
|
1969
|
+
}) => void;
|
|
1970
|
+
dragend: (payload: {
|
|
1971
|
+
index: number;
|
|
1972
|
+
}) => void;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
export declare interface ZYSplitterExposed {
|
|
1976
|
+
/** 切换第 i 个 panel 的折叠状态 */
|
|
1977
|
+
collapse: (index: number) => void;
|
|
1978
|
+
/** 编程式设置第 i 个 panel 的尺寸(px 或 '%');拖拽进行中会被忽略 */
|
|
1979
|
+
resize: (index: number, size: SplitterSize) => void;
|
|
1980
|
+
/** 获取当前所有 panel 的尺寸快照(按各自声明的单位返回) */
|
|
1981
|
+
getSizes: () => SplitterSize[];
|
|
1982
|
+
/** 获取当前所有 panel 的折叠状态快照 */
|
|
1983
|
+
getCollapsed: () => boolean[];
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
export declare const ZYSplitterPanel: __VLS_WithTemplateSlots_12<typeof __VLS_component_12, ReturnType<typeof __VLS_template_12>>;
|
|
1987
|
+
|
|
1988
|
+
export declare interface ZYSplitterPanelProps {
|
|
1989
|
+
/** 初始/目标尺寸:number 为 px,'NN%' 为百分比 */
|
|
1990
|
+
size?: SplitterSize;
|
|
1991
|
+
/** 最小尺寸:number 为 px,'NN%' 为百分比 */
|
|
1992
|
+
min?: SplitterSize;
|
|
1993
|
+
/** 最大尺寸:number 为 px,'NN%' 为百分比;默认无上限 */
|
|
1994
|
+
max?: SplitterSize;
|
|
1995
|
+
/** 是否允许通过 API 或折叠按钮收起 */
|
|
1996
|
+
collapsible?: boolean;
|
|
1997
|
+
/** 是否允许通过拖拽调整尺寸 */
|
|
1998
|
+
resizable?: boolean;
|
|
1999
|
+
class?: string;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
export declare interface ZYSplitterProps {
|
|
2003
|
+
/** 布局方向 */
|
|
2004
|
+
direction?: SplitterDirection;
|
|
2005
|
+
/** 分隔条厚度(px) */
|
|
2006
|
+
barSize?: number;
|
|
2007
|
+
/** 自定义分隔条类名 */
|
|
2008
|
+
barClass?: string;
|
|
2009
|
+
/** v-model:每个 panel 的尺寸,按 DOM 顺序对应 */
|
|
2010
|
+
modelValue?: SplitterSize[];
|
|
2011
|
+
/** v-model:collapsed:每个 panel 的折叠状态 */
|
|
2012
|
+
collapsed?: boolean[];
|
|
2013
|
+
/** 折叠按钮显示策略,默认 'hover' */
|
|
2014
|
+
showCollapseButton?: CollapseButtonDisplay;
|
|
2015
|
+
/** 是否禁用所有交互 */
|
|
2016
|
+
disabled?: boolean;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
export declare interface ZYSplitterResizeEvent {
|
|
2020
|
+
/** 触发拖拽的 bar 左侧 panel 索引 */
|
|
2021
|
+
index: number;
|
|
2022
|
+
/** 本次拖拽实际被反向调整的邻居 panel 索引;编程式 resize 为 -1 */
|
|
2023
|
+
rightIndex: number;
|
|
2024
|
+
sizes: SplitterSize[];
|
|
2025
|
+
}
|
|
2026
|
+
|
|
1782
2027
|
export declare enum ZYStatWay {
|
|
1783
2028
|
FIRST = "first",
|
|
1784
2029
|
LAST = "last"
|
|
1785
2030
|
}
|
|
1786
2031
|
|
|
1787
|
-
export declare const ZYTable:
|
|
2032
|
+
export declare const ZYTable: __VLS_WithTemplateSlots_13<typeof __VLS_component_13, ReturnType<typeof __VLS_template_13>>;
|
|
1788
2033
|
|
|
1789
2034
|
export declare type ZYTableActionFunction<T> = (row: ZYTableData[number], index: number, tableData: ZYTableData) => T;
|
|
1790
2035
|
|