@wyfex/ivue 0.19.2 → 0.19.3
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/dist/index.es.js +12 -12
- package/dist/index.umd.cjs +12 -12
- package/dist/ivue.css +1 -1
- package/dist/types/UseCrudTable/components/ActionBar.vue.d.ts +20 -0
- package/dist/types/UseCrudTable/hook.d.ts +18 -0
- package/dist/types/UseCrudTable/index.vue.d.ts +1 -0
- package/dist/types/UseCrudTable/types.d.ts +16 -10
- package/dist/types/UseElCheckbox/index.vue.d.ts +1 -1
- package/dist/types/UseElCheckbox/types.d.ts +2 -2
- package/dist/types/UseElDialog/index.vue.d.ts +1 -1
- package/dist/types/UseElDrawer/index.vue.d.ts +2 -2
- package/dist/types/UseElForm/components/QueryForm.vue.d.ts +0 -2
- package/dist/types/UseElForm/components/RowForm.vue.d.ts +0 -2
- package/dist/types/UseElForm/types.d.ts +20 -21
- package/dist/types/UseElInput/index.vue.d.ts +1 -1
- package/dist/types/UseElSelect/index.vue.d.ts +1 -1
- package/dist/types/UseElTable/defaultExtConfig.d.ts +1 -0
- package/dist/types/UseElTable/index.vue.d.ts +18 -0
- package/dist/types/UseElTable/props.d.ts +8 -0
- package/dist/types/UseElTable/types.d.ts +1 -0
- package/dist/types/UseRender/index.vue.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/UseCrudTable/props.ts +3 -3
- package/src/components/UseCrudTable/types.ts +31 -11
- package/src/components/UseElCheckbox/types.ts +2 -2
- package/src/components/UseElForm/types.ts +165 -54
- package/src/components/UseElTable/defaultExtConfig.ts +1 -1
- package/src/components/UseElTable/props.ts +14 -0
- package/src/components/UseElTable/types.ts +8 -1
|
@@ -8,13 +8,13 @@ import type { RenderConfig, UseDict } from '@/types'
|
|
|
8
8
|
export type Props = ExtractPropTypes<typeof componentProps>
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* emits
|
|
11
|
+
* emits类型
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
14
|
-
|
|
13
|
+
export type Emits = {
|
|
14
|
+
/**
|
|
15
|
+
* dictKeys事件
|
|
16
|
+
*/
|
|
15
17
|
(e: 'onDictKeys', value?: string[]): void
|
|
16
|
-
// 更新formModel
|
|
17
|
-
(e: 'update:formModel', value: Record<string, any>): void
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -55,7 +55,7 @@ export interface QueryConfig {
|
|
|
55
55
|
* inputConfig接口
|
|
56
56
|
*/
|
|
57
57
|
export interface InputConfig {
|
|
58
|
-
useRender
|
|
58
|
+
useRender?: boolean | RenderConfig
|
|
59
59
|
type?:
|
|
60
60
|
| 'text'
|
|
61
61
|
| 'textarea'
|
|
@@ -76,78 +76,150 @@ export interface InputConfig {
|
|
|
76
76
|
resize?: string
|
|
77
77
|
showPassword?: boolean
|
|
78
78
|
placeholder?: string
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
/**
|
|
80
|
+
* 默认el-input的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-input宽度
|
|
81
|
+
*/
|
|
82
|
+
width?: string
|
|
83
|
+
/**
|
|
84
|
+
* 为true则对el-input使用v-focus聚焦指令
|
|
85
|
+
*/
|
|
86
|
+
autoFocus?: boolean
|
|
87
|
+
/**
|
|
88
|
+
* el-input头部插槽内容
|
|
89
|
+
*/
|
|
90
|
+
prefixContent?: string | object
|
|
91
|
+
/**
|
|
92
|
+
* el-input尾部插槽内容
|
|
93
|
+
*/
|
|
94
|
+
suffixContent?: string | object
|
|
95
|
+
/**
|
|
96
|
+
* el-input前置插槽内容
|
|
97
|
+
*/
|
|
98
|
+
prependContent?: string | object
|
|
99
|
+
/**
|
|
100
|
+
* el-input后置插槽内容
|
|
101
|
+
*/
|
|
102
|
+
appendContent?: string | object
|
|
103
|
+
/**
|
|
104
|
+
* 在el-input右外部显示单位
|
|
105
|
+
*/
|
|
106
|
+
unit?: string | object
|
|
107
|
+
/**
|
|
108
|
+
* el-input的clear事件
|
|
109
|
+
*/
|
|
110
|
+
onClear?: Function
|
|
111
|
+
/**
|
|
112
|
+
* el-input的input事件
|
|
113
|
+
*/
|
|
114
|
+
inputEvent?: Function
|
|
115
|
+
/**
|
|
116
|
+
* el-input的keyup.enter事件
|
|
117
|
+
*/
|
|
118
|
+
onKeyupEnter?: Function
|
|
89
119
|
}
|
|
90
120
|
|
|
91
121
|
/**
|
|
92
122
|
* inputNumberConfig接口
|
|
93
123
|
*/
|
|
94
124
|
export interface InputNumberConfig {
|
|
95
|
-
useRender
|
|
125
|
+
useRender?: boolean | RenderConfig
|
|
96
126
|
min?: number
|
|
97
127
|
max?: number
|
|
98
128
|
step?: number
|
|
99
129
|
precision?: number
|
|
100
130
|
placeholder?: string
|
|
101
131
|
disabledScientific?: boolean
|
|
102
|
-
|
|
132
|
+
/**
|
|
133
|
+
* 在el-input-number右外部显示单位
|
|
134
|
+
*/
|
|
135
|
+
unit?: string | object
|
|
103
136
|
}
|
|
104
137
|
|
|
105
138
|
/**
|
|
106
139
|
* radioConfig接口
|
|
107
140
|
*/
|
|
108
141
|
export interface RadioConfig {
|
|
109
|
-
useRender
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
142
|
+
useRender?: boolean | RenderConfig
|
|
143
|
+
/**
|
|
144
|
+
* el-radio的选项集
|
|
145
|
+
*/
|
|
146
|
+
options?: Array<{ label: string; value: string | number }>
|
|
147
|
+
/**
|
|
148
|
+
* el-radio的props配置项
|
|
149
|
+
*/
|
|
150
|
+
props?: { value: string; label?: string }
|
|
151
|
+
/**
|
|
152
|
+
* 是否反转单选框和标签的位置
|
|
153
|
+
*/
|
|
154
|
+
reverse?: boolean
|
|
155
|
+
/**
|
|
156
|
+
* el-radio的change事件
|
|
157
|
+
*/
|
|
158
|
+
onChange?: Function
|
|
114
159
|
}
|
|
115
160
|
|
|
116
161
|
/**
|
|
117
162
|
* selectConfig接口
|
|
118
163
|
*/
|
|
119
164
|
export interface SelectConfig {
|
|
120
|
-
useRender
|
|
165
|
+
useRender?: boolean | RenderConfig
|
|
121
166
|
multiple?: boolean
|
|
122
167
|
clearable?: boolean
|
|
123
168
|
filterable?: boolean
|
|
124
169
|
placeholder?: string
|
|
125
170
|
options?: Array<{ label: string; value: string | number }>
|
|
126
171
|
props?: { value: string; label?: string }
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
172
|
+
/**
|
|
173
|
+
* 是否使用v2版本
|
|
174
|
+
*/
|
|
175
|
+
useV2: boolean
|
|
176
|
+
/**
|
|
177
|
+
* 是否反转
|
|
178
|
+
*/
|
|
179
|
+
reverse?: boolean
|
|
180
|
+
/**
|
|
181
|
+
* 是否将值为数组转为以逗号分隔的字符串
|
|
182
|
+
*/
|
|
183
|
+
toJoin?: boolean
|
|
184
|
+
/**
|
|
185
|
+
* 默认el-select的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-select宽度
|
|
186
|
+
*/
|
|
187
|
+
width?: string
|
|
188
|
+
/**
|
|
189
|
+
* el-select的change事件
|
|
190
|
+
*/
|
|
191
|
+
onChange?: Function
|
|
132
192
|
}
|
|
133
193
|
|
|
134
194
|
/**
|
|
135
195
|
* cascaderConfig接口
|
|
136
196
|
*/
|
|
137
197
|
export interface CascaderConfig {
|
|
138
|
-
useRender
|
|
198
|
+
useRender?: boolean | RenderConfig
|
|
139
199
|
clearable?: boolean
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
200
|
+
/**
|
|
201
|
+
* el-cascader的选项集
|
|
202
|
+
*/
|
|
203
|
+
options?: Array<{ label: string; value: string | number }>
|
|
204
|
+
/**
|
|
205
|
+
* el-cascader的props配置项
|
|
206
|
+
*/
|
|
207
|
+
props?: { value: string; label?: string }
|
|
208
|
+
/**
|
|
209
|
+
* 默认el-cascader的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-cascader宽度
|
|
210
|
+
*/
|
|
211
|
+
width?: string
|
|
212
|
+
/**
|
|
213
|
+
* el-select的change事件
|
|
214
|
+
*/
|
|
215
|
+
onChange?: Function
|
|
144
216
|
}
|
|
145
217
|
|
|
146
218
|
/**
|
|
147
219
|
* datePickerConfig接口
|
|
148
220
|
*/
|
|
149
221
|
export interface DatePickerConfig {
|
|
150
|
-
useRender
|
|
222
|
+
useRender?: boolean | RenderConfig
|
|
151
223
|
type?:
|
|
152
224
|
| 'year'
|
|
153
225
|
| 'years'
|
|
@@ -169,17 +241,29 @@ export interface DatePickerConfig {
|
|
|
169
241
|
startPlaceholder?: string
|
|
170
242
|
endPlaceholder?: string
|
|
171
243
|
rangeSeparator?: string
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
244
|
+
/**
|
|
245
|
+
* 默认el-date-picker的width为100% 可设置width为''或具体宽度值,为''则使用默认的el-date-picker宽度
|
|
246
|
+
*/
|
|
247
|
+
width?: string
|
|
248
|
+
/**
|
|
249
|
+
* el-date-picker的calendar-change事件
|
|
250
|
+
*/
|
|
251
|
+
onCalendarChange?: Function
|
|
252
|
+
/**
|
|
253
|
+
* el-date-picker的clear事件
|
|
254
|
+
*/
|
|
255
|
+
onClear?: Function
|
|
256
|
+
/**
|
|
257
|
+
* el-date-picker的change事件
|
|
258
|
+
*/
|
|
259
|
+
onChange?: Function
|
|
176
260
|
}
|
|
177
261
|
|
|
178
262
|
/**
|
|
179
263
|
* timePickerConfig接口
|
|
180
264
|
*/
|
|
181
265
|
export interface TimePickerConfig {
|
|
182
|
-
useRender
|
|
266
|
+
useRender?: boolean | RenderConfig
|
|
183
267
|
startPlaceholder?: string
|
|
184
268
|
endPlaceholder?: string
|
|
185
269
|
rangeSeparator?: string
|
|
@@ -187,38 +271,56 @@ export interface TimePickerConfig {
|
|
|
187
271
|
editable?: boolean
|
|
188
272
|
format?: string
|
|
189
273
|
valueFormat?: string
|
|
190
|
-
|
|
274
|
+
/**
|
|
275
|
+
* el-date-picker的change事件
|
|
276
|
+
*/
|
|
277
|
+
onChange?: Function
|
|
191
278
|
}
|
|
192
279
|
|
|
193
280
|
/**
|
|
194
281
|
* timeSelectConfig接口
|
|
195
282
|
*/
|
|
196
283
|
export interface TimeSelectConfig {
|
|
197
|
-
useRender
|
|
198
|
-
|
|
199
|
-
|
|
284
|
+
useRender?: boolean | RenderConfig
|
|
285
|
+
/**
|
|
286
|
+
* 时间选择范围开始时间在formModel中的属性名
|
|
287
|
+
*/
|
|
288
|
+
startProp: string
|
|
289
|
+
/**
|
|
290
|
+
* 时间选择范围结束时间在formModel中的属性名
|
|
291
|
+
*/
|
|
292
|
+
endProp: string
|
|
200
293
|
}
|
|
201
294
|
|
|
202
295
|
/**
|
|
203
296
|
* switchConfig接口
|
|
204
297
|
*/
|
|
205
298
|
export interface SwitchConfig {
|
|
206
|
-
useRender
|
|
299
|
+
useRender?: boolean | RenderConfig
|
|
207
300
|
activeValue?: string | number | boolean
|
|
208
301
|
inactiveValue?: string | number | boolean
|
|
209
|
-
|
|
302
|
+
/**
|
|
303
|
+
* el-switch的change事件
|
|
304
|
+
*/
|
|
305
|
+
onChange?: Function
|
|
210
306
|
}
|
|
211
307
|
|
|
212
308
|
/**
|
|
213
309
|
* inputRangeConfig接口
|
|
214
310
|
*/
|
|
215
311
|
export interface InputRangeConfig {
|
|
216
|
-
|
|
217
|
-
|
|
312
|
+
/**
|
|
313
|
+
* 输入范围开始值在formModel中的属性名
|
|
314
|
+
*/
|
|
315
|
+
startProp: string
|
|
316
|
+
/**
|
|
317
|
+
* 输入范围结束值在formModel中的属性名
|
|
318
|
+
*/
|
|
319
|
+
endProp: string
|
|
218
320
|
startPlaceholder?: string
|
|
219
321
|
endPlaceholder?: string
|
|
220
322
|
rangeSeparator?: string
|
|
221
|
-
onClear?:
|
|
323
|
+
onClear?: Function
|
|
222
324
|
}
|
|
223
325
|
|
|
224
326
|
/**
|
|
@@ -227,7 +329,10 @@ export interface InputRangeConfig {
|
|
|
227
329
|
export interface TreeSelectConfig {
|
|
228
330
|
useRender?: boolean | RenderConfig
|
|
229
331
|
data: Record<string, unknown>[]
|
|
230
|
-
|
|
332
|
+
/**
|
|
333
|
+
* 是否反转
|
|
334
|
+
*/
|
|
335
|
+
reverse?: boolean
|
|
231
336
|
width?: string
|
|
232
337
|
placeholder?: string
|
|
233
338
|
props?: { value: string; label?: string }
|
|
@@ -238,11 +343,17 @@ export interface TreeSelectConfig {
|
|
|
238
343
|
}
|
|
239
344
|
|
|
240
345
|
export interface IRequired {
|
|
241
|
-
|
|
346
|
+
/**
|
|
347
|
+
* 是否必填
|
|
348
|
+
*/
|
|
242
349
|
isRequired?: boolean
|
|
243
|
-
|
|
350
|
+
/**
|
|
351
|
+
* 内置校验器
|
|
352
|
+
*/
|
|
244
353
|
validator: 'mobile' | 'nonNegativeDecimal'
|
|
245
|
-
|
|
354
|
+
/**
|
|
355
|
+
* 参数
|
|
356
|
+
*/
|
|
246
357
|
parmas?: any
|
|
247
358
|
}
|
|
248
359
|
|
|
@@ -273,7 +384,7 @@ export interface FormColumn {
|
|
|
273
384
|
* 如为IRequired则使用内置必填校验
|
|
274
385
|
* 可传对象数组进行自定义校验
|
|
275
386
|
*/
|
|
276
|
-
required
|
|
387
|
+
required?: boolean | IRequired
|
|
277
388
|
/**
|
|
278
389
|
* 必填项错误消息
|
|
279
390
|
* 如不指定则默认为“请输入xxx”或“请选择xxx”
|
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
},
|
|
13
13
|
mode: { type: 'PAGE' },
|
|
14
14
|
selection: { width: 40, enableRowClick: false, align: 'center', fixed: true },
|
|
15
|
-
index: { width: 55, align: 'center', fixed: true },
|
|
15
|
+
index: { width: 55, align: 'center', fixed: true, isContinuous: true },
|
|
16
16
|
expand: { show: false },
|
|
17
17
|
operation: { width: 128, fixed: 'right' },
|
|
18
18
|
pagination: {
|
|
@@ -51,6 +51,20 @@ export default {
|
|
|
51
51
|
type: Object as PropType<DictProps>,
|
|
52
52
|
default: () => ({})
|
|
53
53
|
},
|
|
54
|
+
/**
|
|
55
|
+
* 当前页数
|
|
56
|
+
*/
|
|
57
|
+
currentPage: {
|
|
58
|
+
type: Number,
|
|
59
|
+
default: 1
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* 当前页码
|
|
63
|
+
*/
|
|
64
|
+
pageSize: {
|
|
65
|
+
type: Number,
|
|
66
|
+
default: 10
|
|
67
|
+
},
|
|
54
68
|
/**
|
|
55
69
|
* 当内容过长被隐藏时是否显示tooltip 默认是
|
|
56
70
|
*/
|
|
@@ -256,9 +256,16 @@ export interface ExtConfig {
|
|
|
256
256
|
/**
|
|
257
257
|
* 序号列配置项
|
|
258
258
|
* label:序号列表头文本 不显式设置则不显示序号列
|
|
259
|
+
* isContinuous:是否连续的,默认是,即第二页的序号根据第一条最后一个序号进行延续
|
|
259
260
|
* width、align、fixed同选择器配置项
|
|
260
261
|
*/
|
|
261
|
-
index?: {
|
|
262
|
+
index?: {
|
|
263
|
+
label?: string
|
|
264
|
+
isContinuous?: boolean
|
|
265
|
+
width?: number
|
|
266
|
+
align?: string
|
|
267
|
+
fixed?: boolean
|
|
268
|
+
}
|
|
262
269
|
/**
|
|
263
270
|
* 展开列配置项
|
|
264
271
|
* show:是否显示展开列
|