@qin-ui/antd-vue-pro 1.0.19 → 1.0.20
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/es/index.d.ts +24 -30
- package/es/style.css +2 -2
- package/es/table/index.js +15 -9
- package/package.json +1 -1
package/es/index.d.ts
CHANGED
|
@@ -281,6 +281,7 @@ export declare type ComponentVars = {
|
|
|
281
281
|
proForm?: Record<string, Record<string, any>>;
|
|
282
282
|
proFormItems?: Record<string, Record<string, any>>;
|
|
283
283
|
proFormField?: Partial<Record<keyof typeof INJECT_COMPONENT_PROPS_KEYS, Record<string, any>>>;
|
|
284
|
+
proTable?: Partial<Record<keyof typeof INJECT_COMPONENT_PROPS_KEYS_2, Record<string, any>>>;
|
|
284
285
|
};
|
|
285
286
|
|
|
286
287
|
/**
|
|
@@ -465,7 +466,6 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
465
466
|
rowKey?: string | GetRowKey<any> | undefined;
|
|
466
467
|
pagination?: false | TablePaginationConfig | undefined;
|
|
467
468
|
title?: PanelRender<any> | undefined;
|
|
468
|
-
footer?: PanelRender<any> | undefined;
|
|
469
469
|
table?: ({
|
|
470
470
|
dataSource: Ref<D[]>;
|
|
471
471
|
columns: Ref<Columns<D>>;
|
|
@@ -658,6 +658,7 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
658
658
|
}>>) => void;
|
|
659
659
|
resetQueryParams: () => void;
|
|
660
660
|
}) | undefined;
|
|
661
|
+
footer?: PanelRender<any> | undefined;
|
|
661
662
|
tableLayout?: TableLayout | undefined;
|
|
662
663
|
columns?: ColumnsType<any> | undefined;
|
|
663
664
|
sortDirections?: SortOrder[] | undefined;
|
|
@@ -694,10 +695,7 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
694
695
|
searchContainer?: ContainerComponent | any;
|
|
695
696
|
controlContainer?: ContainerComponent | any;
|
|
696
697
|
tableContainer?: ContainerComponent | any;
|
|
697
|
-
|
|
698
|
-
get(): any;
|
|
699
|
-
set(val: Record<string, any>): void;
|
|
700
|
-
} | undefined;
|
|
698
|
+
paramCache?: ParamCache | undefined;
|
|
701
699
|
onResizeColumn?: ((w: number, col: ColumnType_2<any>) => void) | undefined;
|
|
702
700
|
rowSelection?: TableRowSelection<any> | undefined;
|
|
703
701
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: {
|
|
@@ -910,7 +908,6 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
910
908
|
rowKey?: string | GetRowKey<any> | undefined;
|
|
911
909
|
pagination?: false | TablePaginationConfig | undefined;
|
|
912
910
|
title?: PanelRender<any> | undefined;
|
|
913
|
-
footer?: PanelRender<any> | undefined;
|
|
914
911
|
table?: ({
|
|
915
912
|
dataSource: Ref<D[]>;
|
|
916
913
|
columns: Ref<Columns<D>>;
|
|
@@ -1103,6 +1100,7 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
1103
1100
|
}>>) => void;
|
|
1104
1101
|
resetQueryParams: () => void;
|
|
1105
1102
|
}) | undefined;
|
|
1103
|
+
footer?: PanelRender<any> | undefined;
|
|
1106
1104
|
tableLayout?: TableLayout | undefined;
|
|
1107
1105
|
columns?: ColumnsType<any> | undefined;
|
|
1108
1106
|
sortDirections?: SortOrder[] | undefined;
|
|
@@ -1139,10 +1137,7 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
1139
1137
|
searchContainer?: ContainerComponent | any;
|
|
1140
1138
|
controlContainer?: ContainerComponent | any;
|
|
1141
1139
|
tableContainer?: ContainerComponent | any;
|
|
1142
|
-
|
|
1143
|
-
get(): any;
|
|
1144
|
-
set(val: Record<string, any>): void;
|
|
1145
|
-
} | undefined;
|
|
1140
|
+
paramCache?: ParamCache | undefined;
|
|
1146
1141
|
onResizeColumn?: ((w: number, col: ColumnType_2<any>) => void) | undefined;
|
|
1147
1142
|
rowSelection?: TableRowSelection<any> | undefined;
|
|
1148
1143
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
@@ -1359,7 +1354,6 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
1359
1354
|
rowKey?: string | GetRowKey<any> | undefined;
|
|
1360
1355
|
pagination?: false | TablePaginationConfig | undefined;
|
|
1361
1356
|
title?: PanelRender<any> | undefined;
|
|
1362
|
-
footer?: PanelRender<any> | undefined;
|
|
1363
1357
|
table?: ({
|
|
1364
1358
|
dataSource: Ref<D[]>;
|
|
1365
1359
|
columns: Ref<Columns<D>>;
|
|
@@ -1552,6 +1546,7 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
1552
1546
|
}>>) => void;
|
|
1553
1547
|
resetQueryParams: () => void;
|
|
1554
1548
|
}) | undefined;
|
|
1549
|
+
footer?: PanelRender<any> | undefined;
|
|
1555
1550
|
tableLayout?: TableLayout | undefined;
|
|
1556
1551
|
columns?: ColumnsType<any> | undefined;
|
|
1557
1552
|
sortDirections?: SortOrder[] | undefined;
|
|
@@ -1588,10 +1583,7 @@ declare const _default_3: <D extends Record<string, any>>(__VLS_props: {
|
|
|
1588
1583
|
searchContainer?: ContainerComponent | any;
|
|
1589
1584
|
controlContainer?: ContainerComponent | any;
|
|
1590
1585
|
tableContainer?: ContainerComponent | any;
|
|
1591
|
-
|
|
1592
|
-
get(): any;
|
|
1593
|
-
set(val: Record<string, any>): void;
|
|
1594
|
-
} | undefined;
|
|
1586
|
+
paramCache?: ParamCache | undefined;
|
|
1595
1587
|
onResizeColumn?: ((w: number, col: ColumnType_2<any>) => void) | undefined;
|
|
1596
1588
|
rowSelection?: TableRowSelection<any> | undefined;
|
|
1597
1589
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
@@ -1919,6 +1911,12 @@ export declare const INJECT_COMPONENT_PROPS_KEYS: {
|
|
|
1919
1911
|
transfer: symbol;
|
|
1920
1912
|
};
|
|
1921
1913
|
|
|
1914
|
+
declare const INJECT_COMPONENT_PROPS_KEYS_2: {
|
|
1915
|
+
table: symbol;
|
|
1916
|
+
searchForm: symbol;
|
|
1917
|
+
control: symbol;
|
|
1918
|
+
};
|
|
1919
|
+
|
|
1922
1920
|
declare type InputNumberSlots = FieldSlot<'addonAfter' | 'addonBefore' | 'prefix' | 'upIcon' | 'downIcon'>;
|
|
1923
1921
|
|
|
1924
1922
|
declare type InputSlots = FieldSlot<'addonAfter' | 'addonBefore' | 'clearIcon' | 'prefix' | 'suffix'>;
|
|
@@ -1956,6 +1954,11 @@ declare type Option_2 = {
|
|
|
1956
1954
|
|
|
1957
1955
|
export declare type Options = Array<Option_2>;
|
|
1958
1956
|
|
|
1957
|
+
export declare type ParamCache = {
|
|
1958
|
+
get(): any;
|
|
1959
|
+
set(val: Data | ((v: Data) => Data)): void;
|
|
1960
|
+
};
|
|
1961
|
+
|
|
1959
1962
|
export declare type PrependField = (path: string | undefined, field: Field) => void;
|
|
1960
1963
|
|
|
1961
1964
|
export declare const ProComponentProvider: SFCWithInstall<{
|
|
@@ -3059,7 +3062,6 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
3059
3062
|
rowKey?: string | GetRowKey<any> | undefined;
|
|
3060
3063
|
pagination?: false | TablePaginationConfig | undefined;
|
|
3061
3064
|
title?: PanelRender<any> | undefined;
|
|
3062
|
-
footer?: PanelRender<any> | undefined;
|
|
3063
3065
|
table?: ({
|
|
3064
3066
|
dataSource: Ref<D[]>;
|
|
3065
3067
|
columns: Ref<Columns<D>>;
|
|
@@ -3252,6 +3254,7 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
3252
3254
|
}>>) => void;
|
|
3253
3255
|
resetQueryParams: () => void;
|
|
3254
3256
|
}) | undefined;
|
|
3257
|
+
footer?: PanelRender<any> | undefined;
|
|
3255
3258
|
tableLayout?: TableLayout | undefined;
|
|
3256
3259
|
columns?: TableColumnsType<any> | undefined;
|
|
3257
3260
|
sortDirections?: SortOrder[] | undefined;
|
|
@@ -3288,10 +3291,7 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
3288
3291
|
searchContainer?: any;
|
|
3289
3292
|
controlContainer?: any;
|
|
3290
3293
|
tableContainer?: any;
|
|
3291
|
-
|
|
3292
|
-
get(): any;
|
|
3293
|
-
set(val: Record<string, any>): void;
|
|
3294
|
-
} | undefined;
|
|
3294
|
+
paramCache?: ParamCache | undefined;
|
|
3295
3295
|
onResizeColumn?: ((w: number, col: TableColumnType<any>) => void) | undefined;
|
|
3296
3296
|
rowSelection?: TableRowSelection<any> | undefined;
|
|
3297
3297
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, __VLS_ctx?: {
|
|
@@ -3504,7 +3504,6 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
3504
3504
|
rowKey?: string | GetRowKey<any> | undefined;
|
|
3505
3505
|
pagination?: false | TablePaginationConfig | undefined;
|
|
3506
3506
|
title?: PanelRender<any> | undefined;
|
|
3507
|
-
footer?: PanelRender<any> | undefined;
|
|
3508
3507
|
table?: ({
|
|
3509
3508
|
dataSource: Ref<D[]>;
|
|
3510
3509
|
columns: Ref<Columns<D>>;
|
|
@@ -3697,6 +3696,7 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
3697
3696
|
}>>) => void;
|
|
3698
3697
|
resetQueryParams: () => void;
|
|
3699
3698
|
}) | undefined;
|
|
3699
|
+
footer?: PanelRender<any> | undefined;
|
|
3700
3700
|
tableLayout?: TableLayout | undefined;
|
|
3701
3701
|
columns?: TableColumnsType<any> | undefined;
|
|
3702
3702
|
sortDirections?: SortOrder[] | undefined;
|
|
@@ -3733,10 +3733,7 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
3733
3733
|
searchContainer?: any;
|
|
3734
3734
|
controlContainer?: any;
|
|
3735
3735
|
tableContainer?: any;
|
|
3736
|
-
|
|
3737
|
-
get(): any;
|
|
3738
|
-
set(val: Record<string, any>): void;
|
|
3739
|
-
} | undefined;
|
|
3736
|
+
paramCache?: ParamCache | undefined;
|
|
3740
3737
|
onResizeColumn?: ((w: number, col: TableColumnType<any>) => void) | undefined;
|
|
3741
3738
|
rowSelection?: TableRowSelection<any> | undefined;
|
|
3742
3739
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
@@ -3953,7 +3950,6 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
3953
3950
|
rowKey?: string | GetRowKey<any> | undefined;
|
|
3954
3951
|
pagination?: false | TablePaginationConfig | undefined;
|
|
3955
3952
|
title?: PanelRender<any> | undefined;
|
|
3956
|
-
footer?: PanelRender<any> | undefined;
|
|
3957
3953
|
table?: ({
|
|
3958
3954
|
dataSource: Ref<D[]>;
|
|
3959
3955
|
columns: Ref<Columns<D>>;
|
|
@@ -4146,6 +4142,7 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
4146
4142
|
}>>) => void;
|
|
4147
4143
|
resetQueryParams: () => void;
|
|
4148
4144
|
}) | undefined;
|
|
4145
|
+
footer?: PanelRender<any> | undefined;
|
|
4149
4146
|
tableLayout?: TableLayout | undefined;
|
|
4150
4147
|
columns?: TableColumnsType<any> | undefined;
|
|
4151
4148
|
sortDirections?: SortOrder[] | undefined;
|
|
@@ -4182,10 +4179,7 @@ export declare const ProTable: SFCWithInstall<(<D extends Record<string, any>>(_
|
|
|
4182
4179
|
searchContainer?: any;
|
|
4183
4180
|
controlContainer?: any;
|
|
4184
4181
|
tableContainer?: any;
|
|
4185
|
-
|
|
4186
|
-
get(): any;
|
|
4187
|
-
set(val: Record<string, any>): void;
|
|
4188
|
-
} | undefined;
|
|
4182
|
+
paramCache?: ParamCache | undefined;
|
|
4189
4183
|
onResizeColumn?: ((w: number, col: TableColumnType<any>) => void) | undefined;
|
|
4190
4184
|
rowSelection?: TableRowSelection<any> | undefined;
|
|
4191
4185
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
package/es/style.css
CHANGED
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
padding: 24px 24px 16px;
|
|
42
42
|
background-color: #fff;
|
|
43
43
|
}
|
|
44
|
-
.pro-table[data-v-
|
|
44
|
+
.pro-table[data-v-4ec30d1d] {
|
|
45
45
|
display: flex;
|
|
46
46
|
flex-direction: column;
|
|
47
47
|
min-width: 800px;
|
|
48
48
|
}
|
|
49
|
-
.pro-table[data-v-
|
|
49
|
+
.pro-table[data-v-4ec30d1d] .ant-pagination .ant-pagination-total-text {
|
|
50
50
|
flex: 1;
|
|
51
51
|
}
|
package/es/table/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVNode, defineComponent, ref, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, withCtx, createTextVNode, createBlock, toDisplayString, createCommentVNode, computed, watch, Fragment, renderList, withModifiers, renderSlot, useSlots, useAttrs, onBeforeUnmount, mergeProps, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
1
|
+
import { createVNode, defineComponent, ref, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, withCtx, createTextVNode, createBlock, toDisplayString, createCommentVNode, computed, watch, Fragment, renderList, withModifiers, renderSlot, useSlots, useAttrs, inject, onBeforeUnmount, mergeProps, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
2
2
|
import { Button, Space, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
|
|
3
3
|
import { A as AntdIcon, _ as _sfc_main$6, a as _export_sfc, o as omit, b as _sfc_main$7, u as useForm } from "../form/index-2b6aeb25.js";
|
|
4
4
|
var ColumnHeightOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "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" } }] }, "name": "column-height", "theme": "outlined" };
|
|
@@ -367,6 +367,11 @@ function _sfc_render(_ctx, _cache) {
|
|
|
367
367
|
]);
|
|
368
368
|
}
|
|
369
369
|
const DefaultControlContainer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-1d26ef2f"]]);
|
|
370
|
+
const INJECT_COMPONENT_PROPS_KEYS = {
|
|
371
|
+
"table": Symbol(""),
|
|
372
|
+
"searchForm": Symbol(""),
|
|
373
|
+
"control": Symbol("")
|
|
374
|
+
};
|
|
370
375
|
const _hoisted_1 = {
|
|
371
376
|
key: 0,
|
|
372
377
|
style: { "flex": "1" }
|
|
@@ -385,7 +390,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
385
390
|
searchContainer: { default: DefaultSearchContainer },
|
|
386
391
|
controlContainer: { default: DefaultControlContainer },
|
|
387
392
|
tableContainer: { default: DefaultTableContainer },
|
|
388
|
-
|
|
393
|
+
paramCache: { default: void 0 }
|
|
389
394
|
},
|
|
390
395
|
emits: ["search"],
|
|
391
396
|
setup(__props, { emit: __emit }) {
|
|
@@ -436,18 +441,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
436
441
|
searchParam,
|
|
437
442
|
setSearchParam
|
|
438
443
|
} = table;
|
|
439
|
-
|
|
444
|
+
const cache = props.paramCache ?? inject(INJECT_COMPONENT_PROPS_KEYS.table);
|
|
445
|
+
if (cache) {
|
|
440
446
|
setPagination({
|
|
441
447
|
...unref(pagination),
|
|
442
|
-
...unref(((_e =
|
|
448
|
+
...unref(((_e = cache.get()) == null ? void 0 : _e.pagination) ?? {})
|
|
443
449
|
});
|
|
444
450
|
setSearchParam(void 0, {
|
|
445
451
|
...unref(searchParam),
|
|
446
|
-
...unref(((_f =
|
|
452
|
+
...unref(((_f = cache.get()) == null ? void 0 : _f.searchParam) ?? {})
|
|
447
453
|
});
|
|
448
454
|
onBeforeUnmount(() => {
|
|
449
|
-
|
|
450
|
-
|
|
455
|
+
cache == null ? void 0 : cache.set({
|
|
456
|
+
...(cache == null ? void 0 : cache.get()) || {},
|
|
451
457
|
pagination: unref(pagination),
|
|
452
458
|
searchParam: unref(searchParam)
|
|
453
459
|
});
|
|
@@ -564,8 +570,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
564
570
|
};
|
|
565
571
|
}
|
|
566
572
|
});
|
|
567
|
-
const
|
|
568
|
-
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
573
|
+
const Table_vue_vue_type_style_index_0_scoped_4ec30d1d_lang = "";
|
|
574
|
+
const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4ec30d1d"]]);
|
|
569
575
|
const getDefaultPagination = () => ({ current: 1, pageSize: 10, total: 0 });
|
|
570
576
|
const useTable = ({
|
|
571
577
|
columns: initColumns = [],
|