@yidun/antd-super-table 0.1.13 → 0.1.14

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.
@@ -1,6 +1,219 @@
1
+ import { UpOutlined, DownOutlined } from '@ant-design/icons-vue';
2
+ import FormFieldItem from './FormFieldItem.vue';
1
3
  import type { PropType } from 'vue';
2
4
  import type { SuperTableFormItem } from '../interface';
3
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ /** 是否传入查询区操作栏扩展插槽(与内置查询/重置等按钮同一区域) */
6
+ declare const hasSearchActionsExtra: import("vue").ComputedRef<boolean>;
7
+ declare const expanded: import("@vueuse/shared").RemovableRef<boolean>;
8
+ /**
9
+ * 是否需要显示展开/收起按钮(根据配置和查询条件数量)
10
+ */
11
+ declare const shouldShowExpandButton: import("vue").ComputedRef<boolean>;
12
+ /**
13
+ * 获取要显示的查询条件列表
14
+ * 未开启展开按钮时始终展示全部条件,避免 localStorage 中 expanded=false 导致无法展开、其余行被隐藏
15
+ */
16
+ declare const displayedFormItems: import("vue").ComputedRef<SuperTableFormItem[]>;
17
+ /**
18
+ * 计算操作按钮的 span
19
+ * 如果剩余空间足够,则在同一行;否则独占一行
20
+ */
21
+ declare const actionsSpan: import("vue").ComputedRef<number>;
22
+ declare const onFormItemChange: (name: string, value: any) => void;
23
+ /**
24
+ * 处理查询操作
25
+ */
26
+ declare const handleSearch: () => void;
27
+ /**
28
+ * 处理重置操作
29
+ */
30
+ declare const handleReset: () => void;
31
+ declare const handleAdvancedFilter: () => void;
32
+ /**
33
+ * 切换展开/收起状态
34
+ */
35
+ declare const toggleExpand: () => void;
36
+ declare const __VLS_ctx: {
37
+ $style: Record<string, string> & __VLS_PrettifyGlobal<{} & {
38
+ "searchParamsWrapper": string;
39
+ } & {
40
+ "hasActions": string;
41
+ } & {
42
+ "searchParams": string;
43
+ } & {
44
+ "searchActionsWrapper": string;
45
+ }>;
46
+ $: import("vue").ComponentInternalInstance;
47
+ $data: {};
48
+ $props: Partial<{
49
+ loading: boolean;
50
+ formConfigMap: Record<string, SuperTableFormItem>;
51
+ formItemColSpan: number;
52
+ enableScene: boolean;
53
+ showExpandButton: boolean;
54
+ showResetButton: boolean;
55
+ showAdvancedFilterButton: boolean;
56
+ }> & Omit<{
57
+ readonly loading: boolean;
58
+ readonly formConfigMap: Record<string, SuperTableFormItem>;
59
+ readonly formItemColSpan: number;
60
+ readonly enableScene: boolean;
61
+ readonly showExpandButton: boolean;
62
+ readonly showResetButton: boolean;
63
+ readonly showAdvancedFilterButton: boolean;
64
+ readonly superTableID: string;
65
+ readonly onSearch?: ((...args: any[]) => any) | undefined;
66
+ readonly onReset?: ((...args: any[]) => any) | undefined;
67
+ readonly "onForm-item-change"?: ((...args: any[]) => any) | undefined;
68
+ readonly "onAdvanced-filter"?: ((...args: any[]) => any) | undefined;
69
+ } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "loading" | "formConfigMap" | "formItemColSpan" | "enableScene" | "showExpandButton" | "showResetButton" | "showAdvancedFilterButton">;
70
+ $attrs: {
71
+ [x: string]: unknown;
72
+ };
73
+ $refs: {
74
+ [x: string]: unknown;
75
+ };
76
+ $slots: Readonly<{
77
+ [name: string]: import("vue").Slot<any> | undefined;
78
+ }>;
79
+ $root: import("vue").ComponentPublicInstance | null;
80
+ $parent: import("vue").ComponentPublicInstance | null;
81
+ $host: Element | null;
82
+ $emit: ((event: "search", ...args: any[]) => void) & ((event: "reset", ...args: any[]) => void) & ((event: "form-item-change", ...args: any[]) => void) & ((event: "advanced-filter", ...args: any[]) => void);
83
+ $el: any;
84
+ $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
85
+ /**
86
+ * 查询条件配置映射表
87
+ * @type {Record<string, SuperTableFormItem>}
88
+ * @default {}
89
+ */
90
+ formConfigMap: {
91
+ type: PropType<Record<string, SuperTableFormItem>>;
92
+ required: true;
93
+ default: () => {};
94
+ };
95
+ /** 查询条件列数 */
96
+ formItemColSpan: {
97
+ type: NumberConstructor;
98
+ default: number;
99
+ };
100
+ /** 是否启用场景,不启用场景时显示查询按钮 */
101
+ enableScene: {
102
+ type: BooleanConstructor;
103
+ default: boolean;
104
+ };
105
+ /** 表格加载状态 */
106
+ loading: {
107
+ type: BooleanConstructor;
108
+ default: boolean;
109
+ };
110
+ /** 是否显示展开/收起按钮 */
111
+ showExpandButton: {
112
+ type: BooleanConstructor;
113
+ default: boolean;
114
+ };
115
+ /** 是否显示重置按钮 */
116
+ showResetButton: {
117
+ type: BooleanConstructor;
118
+ default: boolean;
119
+ };
120
+ /** 是否显示高级筛选按钮 */
121
+ showAdvancedFilterButton: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ /** 表格唯一标识,用于区分不同表格的展开状态 */
126
+ superTableID: {
127
+ type: StringConstructor;
128
+ required: true;
129
+ };
130
+ }>> & Readonly<{
131
+ onSearch?: ((...args: any[]) => any) | undefined;
132
+ onReset?: ((...args: any[]) => any) | undefined;
133
+ "onForm-item-change"?: ((...args: any[]) => any) | undefined;
134
+ "onAdvanced-filter"?: ((...args: any[]) => any) | undefined;
135
+ }>, {
136
+ UpOutlined: typeof UpOutlined;
137
+ DownOutlined: typeof DownOutlined;
138
+ FormFieldItem: typeof FormFieldItem;
139
+ hasSearchActionsExtra: typeof hasSearchActionsExtra;
140
+ expanded: typeof expanded;
141
+ shouldShowExpandButton: typeof shouldShowExpandButton;
142
+ displayedFormItems: typeof displayedFormItems;
143
+ actionsSpan: typeof actionsSpan;
144
+ onFormItemChange: typeof onFormItemChange;
145
+ handleSearch: typeof handleSearch;
146
+ handleReset: typeof handleReset;
147
+ handleAdvancedFilter: typeof handleAdvancedFilter;
148
+ toggleExpand: typeof toggleExpand;
149
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
150
+ search: (...args: any[]) => void;
151
+ reset: (...args: any[]) => void;
152
+ "form-item-change": (...args: any[]) => void;
153
+ "advanced-filter": (...args: any[]) => void;
154
+ }, string, {
155
+ loading: boolean;
156
+ formConfigMap: Record<string, SuperTableFormItem>;
157
+ formItemColSpan: number;
158
+ enableScene: boolean;
159
+ showExpandButton: boolean;
160
+ showResetButton: boolean;
161
+ showAdvancedFilterButton: boolean;
162
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
163
+ beforeCreate?: (() => void) | (() => void)[];
164
+ created?: (() => void) | (() => void)[];
165
+ beforeMount?: (() => void) | (() => void)[];
166
+ mounted?: (() => void) | (() => void)[];
167
+ beforeUpdate?: (() => void) | (() => void)[];
168
+ updated?: (() => void) | (() => void)[];
169
+ activated?: (() => void) | (() => void)[];
170
+ deactivated?: (() => void) | (() => void)[];
171
+ beforeDestroy?: (() => void) | (() => void)[];
172
+ beforeUnmount?: (() => void) | (() => void)[];
173
+ destroyed?: (() => void) | (() => void)[];
174
+ unmounted?: (() => void) | (() => void)[];
175
+ renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
176
+ renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
177
+ errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
178
+ };
179
+ $forceUpdate: () => void;
180
+ $nextTick: typeof import("vue").nextTick;
181
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
182
+ loading: boolean;
183
+ formConfigMap: Record<string, SuperTableFormItem>;
184
+ formItemColSpan: number;
185
+ enableScene: boolean;
186
+ showExpandButton: boolean;
187
+ showResetButton: boolean;
188
+ showAdvancedFilterButton: boolean;
189
+ onSearch?: ((...args: any[]) => any) | undefined;
190
+ onReset?: ((...args: any[]) => any) | undefined;
191
+ "onForm-item-change"?: ((...args: any[]) => any) | undefined;
192
+ superTableID: string;
193
+ "onAdvanced-filter"?: ((...args: any[]) => any) | undefined;
194
+ UpOutlined: typeof UpOutlined;
195
+ DownOutlined: typeof DownOutlined;
196
+ FormFieldItem: typeof FormFieldItem;
197
+ hasSearchActionsExtra: boolean;
198
+ expanded: boolean;
199
+ shouldShowExpandButton: boolean;
200
+ displayedFormItems: SuperTableFormItem[];
201
+ actionsSpan: number;
202
+ onFormItemChange: typeof onFormItemChange;
203
+ handleSearch: typeof handleSearch;
204
+ handleReset: typeof handleReset;
205
+ handleAdvancedFilter: typeof handleAdvancedFilter;
206
+ toggleExpand: typeof toggleExpand;
207
+ };
208
+ declare var __VLS_56: {
209
+ loading: boolean;
210
+ search: () => void;
211
+ reset: () => void;
212
+ };
213
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
214
+ searchActionsExtra?: (props: typeof __VLS_56) => any;
215
+ }>;
216
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
217
  /**
5
218
  * 查询条件配置映射表
6
219
  * @type {Record<string, SuperTableFormItem>}
@@ -111,4 +324,10 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
111
324
  showResetButton: boolean;
112
325
  showAdvancedFilterButton: boolean;
113
326
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
327
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
114
328
  export default _default;
329
+ type __VLS_WithSlots<T, S> = T & {
330
+ new (): {
331
+ $slots: S;
332
+ };
333
+ };