@qin-ui/antd-vue-pro 2.0.9 → 2.0.11
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 +2 -2
- package/es/antd-vue-pro.css +19 -19
- package/es/form/index.js +1 -0
- package/es/index.d.ts +91 -91
- package/es/table/index.js +143 -88
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> 二次封装 ant-design-vue 组件,提供 ProForm 和 ProTable 高级组件。
|
|
4
4
|
|
|
5
|
+
## [使用示例和文档详细内容](https://dufan3715.github.io/pro-components/)
|
|
6
|
+
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## ✨ 特性
|
|
@@ -109,5 +111,3 @@ antd-vue-pro 导出了一个名为 `useTable` 的自定义 Hook,用于处理
|
|
|
109
111
|
| button-bar | 自定义按钮组 |
|
|
110
112
|
| toolbar | 自定义工具栏 |
|
|
111
113
|
| table | 自定义表格 |
|
|
112
|
-
|
|
113
|
-
## [更多使用示例和文档详细内容](https://dufan3715.github.io/pro-components/)
|
package/es/antd-vue-pro.css
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
.search-form[data-v-
|
|
1
|
+
.search-form[data-v-a5f1b551] .ant-form-item {
|
|
2
2
|
margin: 0;
|
|
3
3
|
}
|
|
4
|
-
.expand-toggle-button[data-v-
|
|
4
|
+
.expand-toggle-button[data-v-a5f1b551] {
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
7
|
padding: 0;
|
|
8
8
|
padding-left: 4px;
|
|
9
9
|
}
|
|
10
|
-
.transition[data-v-
|
|
10
|
+
.transition[data-v-a5f1b551] {
|
|
11
11
|
transition: all 0.25s;
|
|
12
12
|
}
|
|
13
|
-
.search-form-container[data-v-
|
|
13
|
+
.search-form-container[data-v-727c8aba] {
|
|
14
14
|
margin-bottom: 24px;
|
|
15
15
|
padding: 24px;
|
|
16
|
-
background-color: #fff;
|
|
17
16
|
}
|
|
18
|
-
.table-container[data-v-
|
|
17
|
+
.table-container[data-v-185690a3] {
|
|
19
18
|
flex: 1;
|
|
20
19
|
padding: 24px 24px 0;
|
|
21
|
-
background-color: #fff;
|
|
22
20
|
}
|
|
23
|
-
.control-
|
|
21
|
+
.size-control-button[data-v-b7eded53] {
|
|
24
22
|
display: flex;
|
|
25
23
|
align-items: center;
|
|
26
|
-
|
|
24
|
+
padding-right: 12px;
|
|
25
|
+
padding-left: 12px;
|
|
27
26
|
}
|
|
28
|
-
.control-
|
|
29
|
-
|
|
27
|
+
.size-control-button[data-v-b7eded53] svg {
|
|
28
|
+
transform: scale(1.3);
|
|
30
29
|
}
|
|
31
|
-
.control-
|
|
30
|
+
.column-control-button[data-v-cdcab425] {
|
|
32
31
|
display: flex;
|
|
33
32
|
align-items: center;
|
|
34
|
-
|
|
33
|
+
padding-right: 12px;
|
|
34
|
+
padding-left: 12px;
|
|
35
35
|
}
|
|
36
|
-
.control-
|
|
37
|
-
|
|
36
|
+
.column-control-button[data-v-cdcab425] svg {
|
|
37
|
+
transform: scale(1.2, 1.4);
|
|
38
38
|
}
|
|
39
|
-
.pro-table .pro-table-header[data-v-
|
|
39
|
+
.pro-table .pro-table-header[data-v-7b0601fa] {
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
42
42
|
justify-content: flex-end;
|
|
43
43
|
}
|
|
44
|
-
.pro-table .pro-table-header[data-v-
|
|
44
|
+
.pro-table .pro-table-header[data-v-7b0601fa]:empty {
|
|
45
45
|
display: none;
|
|
46
46
|
}
|
|
47
|
-
.pro-table .pro-table-header + .pro-table-content[data-v-
|
|
47
|
+
.pro-table .pro-table-header + .pro-table-content[data-v-7b0601fa] {
|
|
48
48
|
margin-top: 16px;
|
|
49
49
|
}
|
|
50
|
-
.pro-table[data-v-
|
|
50
|
+
.pro-table[data-v-7b0601fa] .ant-pagination .ant-pagination-total-text {
|
|
51
51
|
flex: 1;
|
|
52
52
|
}
|
package/es/form/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Form, Input, Textarea, InputSearch, InputPassword, InputNumber, Select, Cascader, DatePicker, RangePicker, TimePicker, CheckboxGroup, RadioGroup, Switch, Slider, TreeSelect, Transfer, Row, Col, FormItem } from "ant-design-vue";
|
|
2
2
|
import "ant-design-vue/es/table";
|
|
3
|
+
import "ant-design-vue/es/config-provider/context";
|
|
3
4
|
import { useProviderDisabled, useInjectDisabled } from "ant-design-vue/es/config-provider/DisabledContext";
|
|
4
5
|
import { colProps } from "ant-design-vue/es/grid/Col";
|
|
5
6
|
import { formItemProps, useInjectFormItemContext } from "ant-design-vue/es/form";
|
package/es/index.d.ts
CHANGED
|
@@ -233,6 +233,10 @@ grid: Grid;
|
|
|
233
233
|
fields: Fields;
|
|
234
234
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
235
235
|
|
|
236
|
+
declare type ButtonProps = {
|
|
237
|
+
onClick: () => void;
|
|
238
|
+
};
|
|
239
|
+
|
|
236
240
|
declare type CascaderSlots = CompSlot<'clearIcon' | 'expandIcon' | 'maxTagPlaceholder' | 'notFoundContent' | 'removeIcon' | 'suffixIcon' | 'tagRender'>;
|
|
237
241
|
|
|
238
242
|
export declare type Column<D extends Data = Data> = Omit<ColumnType, 'dataIndex' | 'key'> & {
|
|
@@ -253,95 +257,6 @@ export declare type ComponentVars = Partial<RequiredComponentVars>;
|
|
|
253
257
|
*/
|
|
254
258
|
declare type CompSlot<T extends string> = Partial<Record<KeyExpandString<T>, SlotComponentType>>;
|
|
255
259
|
|
|
256
|
-
/**
|
|
257
|
-
* @type {CompType} 字段类型集合
|
|
258
|
-
*/
|
|
259
|
-
export declare type CompType = {
|
|
260
|
-
/** 文本框 */
|
|
261
|
-
'input': {
|
|
262
|
-
component: 'input';
|
|
263
|
-
slots?: InputSlots;
|
|
264
|
-
} & InputProps;
|
|
265
|
-
/** 文本域 */
|
|
266
|
-
'textarea': {
|
|
267
|
-
component: 'textarea';
|
|
268
|
-
slots?: InputSlots;
|
|
269
|
-
} & TextAreaProps;
|
|
270
|
-
/** 文本框-密码 */
|
|
271
|
-
'input-password': {
|
|
272
|
-
component: 'input-password';
|
|
273
|
-
slots?: InputSlots;
|
|
274
|
-
} & InputProps;
|
|
275
|
-
/** 文本框-搜索 */
|
|
276
|
-
'input-search': {
|
|
277
|
-
component: 'input-search';
|
|
278
|
-
slots?: InputSlots;
|
|
279
|
-
} & InputProps;
|
|
280
|
-
/** 数字文本框 */
|
|
281
|
-
'input-number': {
|
|
282
|
-
component: 'input-number';
|
|
283
|
-
slots?: InputNumberSlots;
|
|
284
|
-
} & InputNumberProps;
|
|
285
|
-
/** 下拉选择器 */
|
|
286
|
-
'select': {
|
|
287
|
-
component: 'select';
|
|
288
|
-
slots?: SelectSlots;
|
|
289
|
-
} & SelectProps;
|
|
290
|
-
/** 级联选择器 */
|
|
291
|
-
'cascader': {
|
|
292
|
-
component: 'cascader';
|
|
293
|
-
slots?: CascaderSlots;
|
|
294
|
-
} & CascaderProps;
|
|
295
|
-
/** 日期选择器 */
|
|
296
|
-
'date-picker': {
|
|
297
|
-
component: 'date-picker';
|
|
298
|
-
slots?: DatePickerSlots;
|
|
299
|
-
} & DatePickerProps;
|
|
300
|
-
/** 日期选择器-范围 */
|
|
301
|
-
'range-picker': {
|
|
302
|
-
component: 'range-picker';
|
|
303
|
-
slots?: RangePickerSlots;
|
|
304
|
-
} & RangePickerProps;
|
|
305
|
-
/** 时间选择器 */
|
|
306
|
-
'time-picker': {
|
|
307
|
-
component: 'time-picker';
|
|
308
|
-
slots?: TimePickerSlots;
|
|
309
|
-
} & TimePickerProps;
|
|
310
|
-
/** 复选框组 */
|
|
311
|
-
'checkbox-group': {
|
|
312
|
-
component: 'checkbox-group';
|
|
313
|
-
} & CheckboxGroupProps;
|
|
314
|
-
/** 单选框组 */
|
|
315
|
-
'radio-group': {
|
|
316
|
-
component: 'radio-group';
|
|
317
|
-
} & RadioGroupProps;
|
|
318
|
-
/** 开关 */
|
|
319
|
-
'switch': {
|
|
320
|
-
component: 'switch';
|
|
321
|
-
slots?: SwitchSlots;
|
|
322
|
-
} & SwitchProps;
|
|
323
|
-
/** 滑块 */
|
|
324
|
-
'slider': {
|
|
325
|
-
component: 'slider';
|
|
326
|
-
slots?: SliderSlots;
|
|
327
|
-
} & SliderProps;
|
|
328
|
-
/** 树形选择器 */
|
|
329
|
-
'tree-select': {
|
|
330
|
-
component: 'tree-select';
|
|
331
|
-
slots?: TreeSelectSlots;
|
|
332
|
-
} & TreeSelectProps;
|
|
333
|
-
/** 穿梭框 */
|
|
334
|
-
'transfer': {
|
|
335
|
-
component: 'transfer';
|
|
336
|
-
slots?: TransferSlots;
|
|
337
|
-
} & TransferProps;
|
|
338
|
-
/** 自定义组件 */
|
|
339
|
-
'custom': {
|
|
340
|
-
component?: RenderComponentType | Raw<RenderComponentType>;
|
|
341
|
-
slots?: Slots;
|
|
342
|
-
} & Record<string, any>;
|
|
343
|
-
};
|
|
344
|
-
|
|
345
260
|
/**
|
|
346
261
|
* @description 容器组件类型
|
|
347
262
|
*/
|
|
@@ -435,6 +350,10 @@ declare type Expand = {
|
|
|
435
350
|
expandStatus?: boolean;
|
|
436
351
|
};
|
|
437
352
|
|
|
353
|
+
declare type ExpandButtonProps = ButtonProps & {
|
|
354
|
+
expandStatus: boolean;
|
|
355
|
+
};
|
|
356
|
+
|
|
438
357
|
declare type ExtendWithAny<D> = {
|
|
439
358
|
[K in keyof D]: IsRecord<D[K]> extends true ? ExtendWithAny<D[K]> : D[K];
|
|
440
359
|
} & Record<string, any>;
|
|
@@ -443,7 +362,11 @@ declare type ExtendWithAny<D> = {
|
|
|
443
362
|
* @description 字段配置类型,包含所有字段属性和响应式支持
|
|
444
363
|
* @template D - 数据对象类型
|
|
445
364
|
*/
|
|
446
|
-
export declare type Field<D extends Data = Data> =
|
|
365
|
+
export declare type Field<D extends Data = Data> = {
|
|
366
|
+
[K in keyof FieldTypeMap]: {
|
|
367
|
+
component: K extends 'custom' ? FieldTypeMap<D>[K]['component'] : K;
|
|
368
|
+
} & FieldTypeMap<D>[K];
|
|
369
|
+
}[keyof FieldTypeMap];
|
|
447
370
|
|
|
448
371
|
/**
|
|
449
372
|
* @description 字段数组类型
|
|
@@ -451,6 +374,78 @@ export declare type Field<D extends Data = Data> = WithRef<CompType[keyof CompTy
|
|
|
451
374
|
*/
|
|
452
375
|
export declare type Fields<D extends Data = Data> = Array<Field<D>>;
|
|
453
376
|
|
|
377
|
+
/**
|
|
378
|
+
* @type {FieldTypeMap} 字段类型集合
|
|
379
|
+
*/
|
|
380
|
+
export declare type FieldTypeMap<D extends Data = Data> = {
|
|
381
|
+
/** 文本框 */
|
|
382
|
+
'input': WithCommon<{
|
|
383
|
+
slots?: InputSlots;
|
|
384
|
+
} & InputProps, D>;
|
|
385
|
+
/** 文本域 */
|
|
386
|
+
'textarea': WithCommon<{
|
|
387
|
+
slots?: InputSlots;
|
|
388
|
+
} & TextAreaProps, D>;
|
|
389
|
+
/** 文本框-密码 */
|
|
390
|
+
'input-password': WithCommon<{
|
|
391
|
+
slots?: InputSlots;
|
|
392
|
+
} & InputProps, D>;
|
|
393
|
+
/** 文本框-搜索 */
|
|
394
|
+
'input-search': WithCommon<{
|
|
395
|
+
slots?: InputSlots;
|
|
396
|
+
} & InputProps, D>;
|
|
397
|
+
/** 数字文本框 */
|
|
398
|
+
'input-number': WithCommon<{
|
|
399
|
+
slots?: InputNumberSlots;
|
|
400
|
+
} & InputNumberProps, D>;
|
|
401
|
+
/** 下拉选择器 */
|
|
402
|
+
'select': WithCommon<{
|
|
403
|
+
slots?: SelectSlots;
|
|
404
|
+
} & SelectProps, D>;
|
|
405
|
+
/** 级联选择器 */
|
|
406
|
+
'cascader': WithCommon<{
|
|
407
|
+
slots?: CascaderSlots;
|
|
408
|
+
} & CascaderProps, D>;
|
|
409
|
+
/** 日期选择器 */
|
|
410
|
+
'date-picker': WithCommon<{
|
|
411
|
+
slots?: DatePickerSlots;
|
|
412
|
+
} & DatePickerProps, D>;
|
|
413
|
+
/** 日期选择器-范围 */
|
|
414
|
+
'range-picker': WithCommon<{
|
|
415
|
+
slots?: RangePickerSlots;
|
|
416
|
+
} & RangePickerProps, D>;
|
|
417
|
+
/** 时间选择器 */
|
|
418
|
+
'time-picker': WithCommon<{
|
|
419
|
+
slots?: TimePickerSlots;
|
|
420
|
+
} & TimePickerProps, D>;
|
|
421
|
+
/** 复选框组 */
|
|
422
|
+
'checkbox-group': WithCommon<CheckboxGroupProps, D>;
|
|
423
|
+
/** 单选框组 */
|
|
424
|
+
'radio-group': WithCommon<RadioGroupProps, D>;
|
|
425
|
+
/** 开关 */
|
|
426
|
+
'switch': WithCommon<{
|
|
427
|
+
slots?: SwitchSlots;
|
|
428
|
+
} & SwitchProps, D>;
|
|
429
|
+
/** 滑块 */
|
|
430
|
+
'slider': WithCommon<{
|
|
431
|
+
slots?: SliderSlots;
|
|
432
|
+
} & SliderProps, D>;
|
|
433
|
+
/** 树形选择器 */
|
|
434
|
+
'tree-select': WithCommon<{
|
|
435
|
+
slots?: TreeSelectSlots;
|
|
436
|
+
} & TreeSelectProps, D>;
|
|
437
|
+
/** 穿梭框 */
|
|
438
|
+
'transfer': WithCommon<{
|
|
439
|
+
slots?: TransferSlots;
|
|
440
|
+
} & TransferProps, D>;
|
|
441
|
+
/** 自定义组件 */
|
|
442
|
+
'custom': {
|
|
443
|
+
component?: RenderComponentType | Raw<RenderComponentType>;
|
|
444
|
+
} & WithCommon<{
|
|
445
|
+
slots?: Slots;
|
|
446
|
+
} & Record<string, any>, D>;
|
|
447
|
+
};
|
|
448
|
+
|
|
454
449
|
declare type FindBy<D extends Data> = (field: Readonly<Field<D>>) => boolean;
|
|
455
450
|
|
|
456
451
|
declare type FindBy_2<D extends Data> = (column: Readonly<Column<D>>) => boolean;
|
|
@@ -502,7 +497,7 @@ declare type MaybeRefOrComputedRef<T = any> = MaybeRef<T> | ComputedRef<T>;
|
|
|
502
497
|
/**
|
|
503
498
|
* @description 不支持响应式的属性名
|
|
504
499
|
*/
|
|
505
|
-
declare type NotSupportedRefOrGetterProps = 'container' | 'componentContainer' | 'valueFormatter' | 'fields' | 'slots' | 'modelName';
|
|
500
|
+
declare type NotSupportedRefOrGetterProps = 'component' | 'container' | 'componentContainer' | 'valueFormatter' | 'fields' | 'slots' | 'modelName';
|
|
506
501
|
|
|
507
502
|
declare type Option_2 = {
|
|
508
503
|
label: string;
|
|
@@ -761,6 +756,9 @@ declare type SearchFormProps = {
|
|
|
761
756
|
form: Form;
|
|
762
757
|
layout?: 'grid' | 'inline';
|
|
763
758
|
expand?: boolean | Expand;
|
|
759
|
+
searchButton?: Component<ButtonProps> | DefineComponent<ButtonProps>;
|
|
760
|
+
resetButton?: Component<ButtonProps> | DefineComponent<ButtonProps>;
|
|
761
|
+
expandButton?: Component<ExpandButtonProps> | DefineComponent<ExpandButtonProps>;
|
|
764
762
|
} & /* @vue-ignore */ _FormProps & AllowedComponentProps;
|
|
765
763
|
|
|
766
764
|
declare type SelectSlots = CompSlot<keyof InstanceType<typeof Select>['$slots']>;
|
|
@@ -969,6 +967,8 @@ export declare type WithAdditionalMethodsGetter<T> = T & {
|
|
|
969
967
|
}>;
|
|
970
968
|
};
|
|
971
969
|
|
|
970
|
+
declare type WithCommon<T, D extends Data = Data> = WithRef<T & Omit<FormItemProps, 'label'> & ColProps & Base<D>>;
|
|
971
|
+
|
|
972
972
|
/**
|
|
973
973
|
* @description 为对象属性添加响应式支持的类型
|
|
974
974
|
* @template T - 原始类型
|
package/es/table/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { createElementBlock, openBlock, createElementVNode, defineComponent, ref, computed, watch, watchEffect, createBlock, unref, mergeProps, withCtx, createVNode,
|
|
1
|
+
import { createElementBlock, openBlock, createElementVNode, defineComponent, ref, computed, watch, watchEffect, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, resolveDynamicComponent, createTextVNode, createCommentVNode, Fragment, toDisplayString, normalizeStyle, toValue, useAttrs, renderList, withModifiers, inject, useSlots, onMounted, normalizeClass, isRef, createSlots, normalizeProps, guardReactiveProps, nextTick, reactive } from "vue";
|
|
2
2
|
import { I as INJECT_CONFIG, g as getObject, c as camelizeProperties } from "../component-provider/index-DXPHmG1H.js";
|
|
3
3
|
import _sfc_main$9, { ContainerFragment as _sfc_main$a, useForm } from "../form/index.js";
|
|
4
|
-
import { Space, Button, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
|
|
4
|
+
import { Space, Button, theme, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
|
|
5
5
|
import { p as pick, c as cloneDeep } from "../vendor/utils/lodash-es-B2uQdS28.js";
|
|
6
|
+
import { useConfigContextInject } from "ant-design-vue/es/config-provider/context";
|
|
6
7
|
import { tableProps } from "ant-design-vue/es/table";
|
|
7
8
|
const _export_sfc = (sfc, props) => {
|
|
8
9
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -12,7 +13,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
12
13
|
return target;
|
|
13
14
|
};
|
|
14
15
|
const _sfc_main$8 = {};
|
|
15
|
-
const _hoisted_1$
|
|
16
|
+
const _hoisted_1$3 = {
|
|
16
17
|
focusable: "false",
|
|
17
18
|
"data-icon": "down",
|
|
18
19
|
width: "1em",
|
|
@@ -21,12 +22,12 @@ const _hoisted_1$7 = {
|
|
|
21
22
|
"aria-hidden": "true",
|
|
22
23
|
viewBox: "64 64 896 896"
|
|
23
24
|
};
|
|
24
|
-
function _sfc_render$
|
|
25
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
25
|
+
function _sfc_render$2(_ctx, _cache) {
|
|
26
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$3, _cache[0] || (_cache[0] = [
|
|
26
27
|
createElementVNode("path", { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" }, null, -1)
|
|
27
28
|
]));
|
|
28
29
|
}
|
|
29
|
-
const DownOutlined = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$
|
|
30
|
+
const DownOutlined = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$2]]);
|
|
30
31
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
31
32
|
...{ name: "SearchForm" },
|
|
32
33
|
__name: "SearchForm",
|
|
@@ -34,6 +35,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
34
35
|
form: {},
|
|
35
36
|
layout: { default: "grid" },
|
|
36
37
|
expand: { type: [Boolean, Object], default: true },
|
|
38
|
+
searchButton: { default: void 0 },
|
|
39
|
+
resetButton: { default: void 0 },
|
|
40
|
+
expandButton: { default: void 0 },
|
|
37
41
|
class: {},
|
|
38
42
|
style: {}
|
|
39
43
|
},
|
|
@@ -111,7 +115,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
111
115
|
minExpandRows * rowHeight + (minExpandRows - 1) * rowGap,
|
|
112
116
|
+proFormHeight.value
|
|
113
117
|
);
|
|
114
|
-
showExpandToggle.value = +proFormHeight.value
|
|
118
|
+
showExpandToggle.value = +proFormHeight.value - collapseHeight.value > 1;
|
|
115
119
|
if (showExpandToggle.value) {
|
|
116
120
|
setInitExpandStatus();
|
|
117
121
|
}
|
|
@@ -138,6 +142,12 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
138
142
|
grid: false
|
|
139
143
|
}
|
|
140
144
|
);
|
|
145
|
+
const onReset = () => {
|
|
146
|
+
emit("reset");
|
|
147
|
+
};
|
|
148
|
+
const onSearch = () => {
|
|
149
|
+
emit("search");
|
|
150
|
+
};
|
|
141
151
|
return (_ctx, _cache) => {
|
|
142
152
|
return openBlock(), createBlock(unref(_sfc_main$9), mergeProps(layoutProps.value, {
|
|
143
153
|
form: _ctx.form,
|
|
@@ -146,51 +156,71 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
146
156
|
default: withCtx(() => [
|
|
147
157
|
createVNode(unref(Space), { align: "start" }, {
|
|
148
158
|
default: withCtx(() => [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
159
|
+
renderSlot(_ctx.$slots, "reset-button", { onClick: onReset }, () => [
|
|
160
|
+
_ctx.resetButton ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.resetButton), {
|
|
161
|
+
key: 0,
|
|
162
|
+
onClick: onReset
|
|
163
|
+
})) : (openBlock(), createBlock(unref(Button), {
|
|
164
|
+
key: 1,
|
|
165
|
+
onClick: onReset
|
|
166
|
+
}, {
|
|
167
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
168
|
+
createTextVNode("重置", -1)
|
|
169
|
+
])),
|
|
170
|
+
_: 1,
|
|
171
|
+
__: [0]
|
|
172
|
+
}))
|
|
173
|
+
], true),
|
|
174
|
+
renderSlot(_ctx.$slots, "search-button", { onClick: onSearch }, () => [
|
|
175
|
+
_ctx.searchButton ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.searchButton), {
|
|
176
|
+
key: 0,
|
|
177
|
+
onClick: onSearch
|
|
178
|
+
})) : (openBlock(), createBlock(unref(Button), {
|
|
179
|
+
key: 1,
|
|
180
|
+
type: "primary",
|
|
181
|
+
"html-type": "submit",
|
|
182
|
+
onClick: onSearch
|
|
183
|
+
}, {
|
|
184
|
+
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
185
|
+
createTextVNode(" 查询 ", -1)
|
|
186
|
+
])),
|
|
187
|
+
_: 1,
|
|
188
|
+
__: [1]
|
|
189
|
+
}))
|
|
190
|
+
], true),
|
|
191
|
+
renderSlot(_ctx.$slots, "expand-button", { onClick: changeExpandStatus }, () => [
|
|
192
|
+
showExpandToggle.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
193
|
+
_ctx.expandButton ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.expandButton), {
|
|
194
|
+
key: 0,
|
|
195
|
+
"expand-status": expandStatus.value,
|
|
196
|
+
onClick: changeExpandStatus
|
|
197
|
+
}, null, 8, ["expand-status"])) : (openBlock(), createBlock(unref(Button), {
|
|
198
|
+
key: 1,
|
|
199
|
+
type: "link",
|
|
200
|
+
class: "expand-toggle-button",
|
|
201
|
+
onClick: changeExpandStatus
|
|
202
|
+
}, {
|
|
203
|
+
default: withCtx(() => [
|
|
204
|
+
createTextVNode(toDisplayString(expandStatus.value ? "收起" : "展开") + " ", 1),
|
|
205
|
+
createVNode(DownOutlined, {
|
|
206
|
+
class: "transition",
|
|
207
|
+
style: normalizeStyle([{ "margin-left": "4px" }, { transform: `rotate(${expandStatus.value ? -180 : 0}deg)` }])
|
|
208
|
+
}, null, 8, ["style"])
|
|
209
|
+
]),
|
|
210
|
+
_: 1
|
|
211
|
+
}))
|
|
212
|
+
], 64)) : createCommentVNode("", true)
|
|
213
|
+
], true)
|
|
184
214
|
]),
|
|
185
|
-
_:
|
|
215
|
+
_: 3
|
|
186
216
|
})
|
|
187
217
|
]),
|
|
188
|
-
_:
|
|
218
|
+
_: 3
|
|
189
219
|
}, 16, ["form"]);
|
|
190
220
|
};
|
|
191
221
|
}
|
|
192
222
|
});
|
|
193
|
-
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
223
|
+
const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-a5f1b551"]]);
|
|
194
224
|
function useModel(props, name, options) {
|
|
195
225
|
const eventName = `onUpdate:${name}`;
|
|
196
226
|
const emitUpdate = props[eventName];
|
|
@@ -204,24 +234,38 @@ function useModel(props, name, options) {
|
|
|
204
234
|
});
|
|
205
235
|
return modelValue;
|
|
206
236
|
}
|
|
207
|
-
const _sfc_main$6 = {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
const
|
|
237
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
238
|
+
__name: "DefaultSearchFormContainer",
|
|
239
|
+
setup(__props) {
|
|
240
|
+
const { token } = theme.useToken();
|
|
241
|
+
return (_ctx, _cache) => {
|
|
242
|
+
return openBlock(), createElementBlock("div", {
|
|
243
|
+
class: "search-form-container",
|
|
244
|
+
style: normalizeStyle({ backgroundColor: unref(token).colorBgContainer })
|
|
245
|
+
}, [
|
|
246
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
247
|
+
], 4);
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
const DefaultSearchFormContainer = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-727c8aba"]]);
|
|
252
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
253
|
+
__name: "DefaultTableContainer",
|
|
254
|
+
setup(__props) {
|
|
255
|
+
const { token } = theme.useToken();
|
|
256
|
+
return (_ctx, _cache) => {
|
|
257
|
+
return openBlock(), createElementBlock("div", {
|
|
258
|
+
class: "table-container",
|
|
259
|
+
style: normalizeStyle({ backgroundColor: unref(token).colorBgContainer })
|
|
260
|
+
}, [
|
|
261
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
262
|
+
], 4);
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
const DefaultTableContainer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-185690a3"]]);
|
|
223
267
|
const _sfc_main$4 = {};
|
|
224
|
-
const _hoisted_1$
|
|
268
|
+
const _hoisted_1$2 = {
|
|
225
269
|
focusable: "false",
|
|
226
270
|
"data-icon": "column-height",
|
|
227
271
|
width: "1em",
|
|
@@ -231,17 +275,20 @@ const _hoisted_1$4 = {
|
|
|
231
275
|
viewBox: "64 64 896 896"
|
|
232
276
|
};
|
|
233
277
|
function _sfc_render$1(_ctx, _cache) {
|
|
234
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
278
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [
|
|
235
279
|
createElementVNode("path", { d: "M840 836H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm0-724H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM610.8 378c6 0 9.4-7 5.7-11.7L515.7 238.7a7.14 7.14 0 00-11.3 0L403.6 366.3a7.23 7.23 0 005.7 11.7H476v268h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V378h62.8z" }, null, -1)
|
|
236
280
|
]));
|
|
237
281
|
}
|
|
238
282
|
const ColumnHeightOutlined = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$1]]);
|
|
239
|
-
const _hoisted_1$3 = { class: "control-icon" };
|
|
240
283
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
241
284
|
__name: "SizeControl",
|
|
242
285
|
setup(__props) {
|
|
286
|
+
var _a;
|
|
243
287
|
const attrs = useAttrs();
|
|
244
|
-
const
|
|
288
|
+
const configContext = useConfigContextInject();
|
|
289
|
+
const size = useModel(attrs, "size", {
|
|
290
|
+
default: ((_a = configContext.componentSize) == null ? void 0 : _a.value) ?? "large"
|
|
291
|
+
});
|
|
245
292
|
const onSizeChange = (val) => {
|
|
246
293
|
size.value = val.key;
|
|
247
294
|
};
|
|
@@ -264,18 +311,24 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
264
311
|
}, null, 8, ["selected-keys", "items"])
|
|
265
312
|
]),
|
|
266
313
|
default: withCtx(() => [
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
314
|
+
createVNode(unref(Button), {
|
|
315
|
+
type: "text",
|
|
316
|
+
class: "size-control-button"
|
|
317
|
+
}, {
|
|
318
|
+
default: withCtx(() => [
|
|
319
|
+
createVNode(ColumnHeightOutlined)
|
|
320
|
+
]),
|
|
321
|
+
_: 1
|
|
322
|
+
})
|
|
270
323
|
]),
|
|
271
324
|
_: 1
|
|
272
325
|
});
|
|
273
326
|
};
|
|
274
327
|
}
|
|
275
328
|
});
|
|
276
|
-
const SizeControl = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-
|
|
329
|
+
const SizeControl = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-b7eded53"]]);
|
|
277
330
|
const _sfc_main$2 = {};
|
|
278
|
-
const _hoisted_1$
|
|
331
|
+
const _hoisted_1$1 = {
|
|
279
332
|
focusable: "false",
|
|
280
333
|
"data-icon": "filter",
|
|
281
334
|
width: "1em",
|
|
@@ -285,12 +338,11 @@ const _hoisted_1$2 = {
|
|
|
285
338
|
viewBox: "64 64 896 896"
|
|
286
339
|
};
|
|
287
340
|
function _sfc_render(_ctx, _cache) {
|
|
288
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
341
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [
|
|
289
342
|
createElementVNode("path", { d: "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z" }, null, -1)
|
|
290
343
|
]));
|
|
291
344
|
}
|
|
292
345
|
const FilterOutlined = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render]]);
|
|
293
|
-
const _hoisted_1$1 = { class: "control-icon" };
|
|
294
346
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
295
347
|
__name: "ColumnControl",
|
|
296
348
|
props: {
|
|
@@ -299,6 +351,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
299
351
|
},
|
|
300
352
|
setup(__props) {
|
|
301
353
|
const props = __props;
|
|
354
|
+
const open = ref(false);
|
|
302
355
|
const checkAll = ref(false);
|
|
303
356
|
const indeterminate = ref(false);
|
|
304
357
|
const checkedColumnsOptions = computed(
|
|
@@ -349,6 +402,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
349
402
|
);
|
|
350
403
|
return (_ctx, _cache) => {
|
|
351
404
|
return openBlock(), createBlock(unref(Dropdown), {
|
|
405
|
+
open: open.value,
|
|
406
|
+
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => open.value = $event),
|
|
352
407
|
arrow: "",
|
|
353
408
|
placement: "bottomRight"
|
|
354
409
|
}, {
|
|
@@ -367,11 +422,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
367
422
|
indeterminate: indeterminate.value,
|
|
368
423
|
onChange: onCheckAllChange
|
|
369
424
|
}, {
|
|
370
|
-
default: withCtx(() => _cache[
|
|
425
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
371
426
|
createTextVNode(" 全选 ", -1)
|
|
372
427
|
])),
|
|
373
428
|
_: 1,
|
|
374
|
-
__: [
|
|
429
|
+
__: [2]
|
|
375
430
|
}, 8, ["checked", "indeterminate"])
|
|
376
431
|
])
|
|
377
432
|
]),
|
|
@@ -405,16 +460,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
405
460
|
])
|
|
406
461
|
]),
|
|
407
462
|
default: withCtx(() => [
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
463
|
+
createVNode(unref(Button), {
|
|
464
|
+
type: "text",
|
|
465
|
+
class: "column-control-button"
|
|
466
|
+
}, {
|
|
467
|
+
default: withCtx(() => [
|
|
468
|
+
createVNode(FilterOutlined)
|
|
469
|
+
]),
|
|
470
|
+
_: 1
|
|
471
|
+
})
|
|
411
472
|
]),
|
|
412
473
|
_: 1
|
|
413
|
-
});
|
|
474
|
+
}, 8, ["open"]);
|
|
414
475
|
};
|
|
415
476
|
}
|
|
416
477
|
});
|
|
417
|
-
const ColumnControl = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
478
|
+
const ColumnControl = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-cdcab425"]]);
|
|
418
479
|
const _hoisted_1 = { class: "pro-table-header" };
|
|
419
480
|
const _hoisted_2 = {
|
|
420
481
|
key: 0,
|
|
@@ -424,14 +485,8 @@ const _hoisted_3 = {
|
|
|
424
485
|
key: 1,
|
|
425
486
|
style: { "margin-left": "12px" }
|
|
426
487
|
};
|
|
427
|
-
const _hoisted_4 = {
|
|
428
|
-
|
|
429
|
-
style: { "margin-left": "12px" }
|
|
430
|
-
};
|
|
431
|
-
const _hoisted_5 = {
|
|
432
|
-
key: 3,
|
|
433
|
-
style: { "margin-left": "12px" }
|
|
434
|
-
};
|
|
488
|
+
const _hoisted_4 = { key: 2 };
|
|
489
|
+
const _hoisted_5 = { key: 3 };
|
|
435
490
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
436
491
|
...{ name: "ProTable", inheritAttrs: false },
|
|
437
492
|
__name: "BaseTable",
|
|
@@ -620,7 +675,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
620
675
|
};
|
|
621
676
|
}
|
|
622
677
|
});
|
|
623
|
-
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
678
|
+
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7b0601fa"]]);
|
|
624
679
|
const getDefaultPageParam = () => ({ current: 1, pageSize: 10, total: 0 });
|
|
625
680
|
const pageParamProperty = ["current", "pageSize", "total"];
|
|
626
681
|
const useTable = (params) => {
|