@juzhenfe/page-model 3.12.5 → 3.13.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.
@@ -44,8 +44,9 @@ declare global {
44
44
  ...rest: Parameters<FN>
45
45
  ) => Promise<ReturnType<FN>>)
46
46
 
47
- type FieldType = 'string' | 'number' | 'date'
47
+ type FilterType = 'string' | 'number' | 'date' | 'boolean' | 'select' | 'list'
48
48
 
49
+
49
50
  type InnerFilterItem = {
50
51
  key: string
51
52
  compareFn: (cellValue: string) => boolean
@@ -283,14 +284,27 @@ declare global {
283
284
  * 是否启用过滤
284
285
  */
285
286
  filterable?: boolean
287
+
286
288
  /**
287
- * 过滤函数
289
+ * 过滤类型
288
290
  */
289
- filterFn?: (this: CTX, data: MODEL, query: any) => boolean
290
- // 过滤组件
291
- getCellText?: (this: CTX, data: MODEL) => string
292
- // 过滤的自定义组件配置
293
- filterData?: FormItem<MODEL, CTX>
291
+ filterType?: FilterType
292
+
293
+ /**
294
+ * 复数过滤
295
+ */
296
+ filterMultiple?: boolean
297
+
298
+ /**
299
+ * 过滤表单文本
300
+ */
301
+ filterLabel?: string
302
+
303
+ /**
304
+ * 过滤选项
305
+ */
306
+ filterOptions?: Array<{ label: string; value: string | number | boolean }>
307
+
294
308
  /**
295
309
  * 是否必填
296
310
  */
@@ -329,8 +343,6 @@ declare global {
329
343
  helpText?: string
330
344
  // 显示合计
331
345
  showSummary?: number | string
332
- // 静态过滤类型
333
- fieldType?: FieldType
334
346
  /**
335
347
  * 显示的行数
336
348
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzhenfe/page-model",
3
- "version": "3.12.5",
3
+ "version": "3.13.0",
4
4
  "types": "dist/main.d.ts",
5
5
  "main": "dist/index.umd.js",
6
6
  "keywords": [
@@ -1,158 +0,0 @@
1
- declare const _sfc_main: import("vue").DefineComponent<{
2
- els: {
3
- type: ArrayConstructor;
4
- required: true;
5
- };
6
- context: {
7
- type: any;
8
- required: true;
9
- };
10
- }, {
11
- props: any;
12
- tableManager: import("vue").ComputedRef<any>;
13
- handleClickEditIcon: (column: any, row: any) => void;
14
- onUpdateTableCellModelValue: (row: any, prop: string, value: any) => void;
15
- onSaveEditContent: (row: AnyObject, cellKey: string, column: PageModel.TableBaseItem<any, any>) => Promise<boolean>;
16
- onCellDataChange: (row: AnyObject, cellKey: string, column: PageModel.TableBaseItem<any, any>) => void;
17
- onCancelEditContent: (row: AnyObject, cellKey: string, restoreKey: string) => void;
18
- TableCellRenderer: import("vue").DefineComponent<{
19
- renderFn: {
20
- type: import("vue").PropType<PageModel.RenderFn>;
21
- default: any;
22
- };
23
- context: {
24
- type: import("vue").PropType<any>;
25
- default: any;
26
- };
27
- args: {
28
- type: import("vue").PropType<any[]>;
29
- default: () => any[];
30
- };
31
- pure: {
32
- type: import("vue").PropType<boolean>;
33
- default: boolean;
34
- };
35
- row: {
36
- type: ObjectConstructor;
37
- default: () => void;
38
- };
39
- index: {
40
- type: NumberConstructor;
41
- };
42
- }, () => any, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
43
- renderFn: {
44
- type: import("vue").PropType<PageModel.RenderFn>;
45
- default: any;
46
- };
47
- context: {
48
- type: import("vue").PropType<any>;
49
- default: any;
50
- };
51
- args: {
52
- type: import("vue").PropType<any[]>;
53
- default: () => any[];
54
- };
55
- pure: {
56
- type: import("vue").PropType<boolean>;
57
- default: boolean;
58
- };
59
- row: {
60
- type: ObjectConstructor;
61
- default: () => void;
62
- };
63
- index: {
64
- type: NumberConstructor;
65
- };
66
- }>>, {
67
- context: any;
68
- renderFn: PageModel.RenderFn;
69
- args: any[];
70
- pure: boolean;
71
- row: Record<string, any>;
72
- }, {}>;
73
- FormItemRenderer: import("vue").DefineComponent<{
74
- modelValue: any;
75
- renderFn: {
76
- type: import("vue").PropType<PageModel.RenderFn>;
77
- default: any;
78
- };
79
- change: {
80
- type: import("vue").PropType<(...rest: any[]) => void>;
81
- default: any;
82
- };
83
- options: {
84
- type: import("vue").PropType<any>;
85
- default: () => void;
86
- };
87
- context: {
88
- type: import("vue").PropType<any>;
89
- default: () => void;
90
- };
91
- disabled: {
92
- type: import("vue").PropType<boolean>;
93
- default: any;
94
- };
95
- model: {
96
- type: import("vue").PropType<AnyObject>;
97
- default: () => {};
98
- };
99
- multProps: {
100
- type: import("vue").PropType<string[]>;
101
- default: any;
102
- };
103
- }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
104
- [key: string]: any;
105
- }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
106
- modelValue: any;
107
- renderFn: {
108
- type: import("vue").PropType<PageModel.RenderFn>;
109
- default: any;
110
- };
111
- change: {
112
- type: import("vue").PropType<(...rest: any[]) => void>;
113
- default: any;
114
- };
115
- options: {
116
- type: import("vue").PropType<any>;
117
- default: () => void;
118
- };
119
- context: {
120
- type: import("vue").PropType<any>;
121
- default: () => void;
122
- };
123
- disabled: {
124
- type: import("vue").PropType<boolean>;
125
- default: any;
126
- };
127
- model: {
128
- type: import("vue").PropType<AnyObject>;
129
- default: () => {};
130
- };
131
- multProps: {
132
- type: import("vue").PropType<string[]>;
133
- default: any;
134
- };
135
- }>>, {
136
- context: any;
137
- renderFn: PageModel.RenderFn;
138
- modelValue: any;
139
- change: (...rest: any[]) => void;
140
- disabled: boolean;
141
- options: any;
142
- model: {};
143
- multProps: string[];
144
- }, {}>;
145
- readonly QuestionFilled: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
146
- readonly Loading: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
147
- readonly Edit: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
148
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
149
- els: {
150
- type: ArrayConstructor;
151
- required: true;
152
- };
153
- context: {
154
- type: any;
155
- required: true;
156
- };
157
- }>>, {}, {}>;
158
- export default _sfc_main;