@gx-design-vue/pro-table 0.2.0-alpha.11 → 0.2.0-alpha.12
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/ProTable.js +12 -16
- package/dist/components/ScrollBar/Thumb.js +1 -1
- package/dist/components/SearchForm/FormItemWrapper.d.ts +1 -1
- package/dist/components/SearchForm/SearchForm.d.ts +2 -2
- package/dist/components/Toolbar/ListToolBar.d.ts +8 -8
- package/dist/components/Toolbar/index.d.ts +5 -5
- package/dist/pro-table.esm.js +487 -492
- package/dist/pro-table.js +1 -1
- package/package.json +5 -6
package/dist/ProTable.js
CHANGED
|
@@ -19,7 +19,7 @@ import { useTableSize } from "./hooks/useTableSize.js";
|
|
|
19
19
|
import "./hooks/index.js";
|
|
20
20
|
import style_default from "./style/index.js";
|
|
21
21
|
import { Fragment, Teleport, computed, createVNode, defineComponent, mergeDefaults, mergeProps, ref, toRef, watch } from "vue";
|
|
22
|
-
import {
|
|
22
|
+
import { useProConfigContext } from "@gx-design-vue/pro-provider";
|
|
23
23
|
import { classNames, getSlotVNode } from "@gx-design-vue/pro-utils";
|
|
24
24
|
import { useFullscreen } from "@vueuse/core";
|
|
25
25
|
import { Pagination, Spin, Table } from "antdv-next";
|
|
@@ -65,7 +65,7 @@ const ForwardProTable = /* @__PURE__ */ defineComponent((props, { attrs, slots,
|
|
|
65
65
|
const { prefixCls } = useBaseConfig("pro-table", props);
|
|
66
66
|
const rootCls = useCSSVarCls(prefixCls);
|
|
67
67
|
const [hashId, cssVarCls] = style_default(prefixCls, rootCls);
|
|
68
|
-
const
|
|
68
|
+
const configContext = useProConfigContext();
|
|
69
69
|
const rootEl = ref();
|
|
70
70
|
const { toggle: toggleFullscreen, isFullscreen } = useFullscreen(rootEl);
|
|
71
71
|
watch(isFullscreen, (val) => {
|
|
@@ -224,7 +224,7 @@ const ForwardProTable = /* @__PURE__ */ defineComponent((props, { attrs, slots,
|
|
|
224
224
|
props,
|
|
225
225
|
key: "emptyText"
|
|
226
226
|
});
|
|
227
|
-
if (emptyTextSlot
|
|
227
|
+
if (emptyTextSlot && configContext?.renderEmpty?.value) return emptyTextSlot || configContext?.renderEmpty?.value?.();
|
|
228
228
|
return null;
|
|
229
229
|
}
|
|
230
230
|
function onCustomPaginationChange(currentPage, currentPageSize) {
|
|
@@ -283,7 +283,7 @@ const ForwardProTable = /* @__PURE__ */ defineComponent((props, { attrs, slots,
|
|
|
283
283
|
props,
|
|
284
284
|
key: "emptyText"
|
|
285
285
|
});
|
|
286
|
-
if (emptyTextRender ||
|
|
286
|
+
if (emptyTextRender || configContext?.renderEmpty?.value) result.emptyText = () => emptyTextRender || configContext?.renderEmpty?.value?.();
|
|
287
287
|
return result;
|
|
288
288
|
});
|
|
289
289
|
expose({
|
|
@@ -567,12 +567,11 @@ const ForwardProTable = /* @__PURE__ */ defineComponent((props, { attrs, slots,
|
|
|
567
567
|
emptyText: {
|
|
568
568
|
type: [
|
|
569
569
|
Function,
|
|
570
|
-
Object,
|
|
571
570
|
String,
|
|
572
571
|
Number,
|
|
573
|
-
Boolean,
|
|
574
572
|
null,
|
|
575
|
-
|
|
573
|
+
Object,
|
|
574
|
+
Boolean
|
|
576
575
|
],
|
|
577
576
|
required: false,
|
|
578
577
|
default: void 0
|
|
@@ -580,12 +579,11 @@ const ForwardProTable = /* @__PURE__ */ defineComponent((props, { attrs, slots,
|
|
|
580
579
|
headerTitle: {
|
|
581
580
|
type: [
|
|
582
581
|
Function,
|
|
583
|
-
Object,
|
|
584
582
|
String,
|
|
585
583
|
Number,
|
|
586
|
-
Boolean,
|
|
587
584
|
null,
|
|
588
|
-
|
|
585
|
+
Object,
|
|
586
|
+
Boolean
|
|
589
587
|
],
|
|
590
588
|
required: false,
|
|
591
589
|
default: void 0
|
|
@@ -593,12 +591,11 @@ const ForwardProTable = /* @__PURE__ */ defineComponent((props, { attrs, slots,
|
|
|
593
591
|
headerTitleTip: {
|
|
594
592
|
type: [
|
|
595
593
|
Function,
|
|
596
|
-
Object,
|
|
597
594
|
String,
|
|
598
595
|
Number,
|
|
599
|
-
Boolean,
|
|
600
596
|
null,
|
|
601
|
-
|
|
597
|
+
Object,
|
|
598
|
+
Boolean
|
|
602
599
|
],
|
|
603
600
|
required: false,
|
|
604
601
|
default: void 0
|
|
@@ -606,12 +603,11 @@ const ForwardProTable = /* @__PURE__ */ defineComponent((props, { attrs, slots,
|
|
|
606
603
|
listToolAfter: {
|
|
607
604
|
type: [
|
|
608
605
|
Function,
|
|
609
|
-
Object,
|
|
610
606
|
String,
|
|
611
607
|
Number,
|
|
612
|
-
Boolean,
|
|
613
608
|
null,
|
|
614
|
-
|
|
609
|
+
Object,
|
|
610
|
+
Boolean
|
|
615
611
|
],
|
|
616
612
|
required: false,
|
|
617
613
|
default: void 0
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useInjectScrollBarContext } from "./context.js";
|
|
2
2
|
import { BAR_MAP, renderThumbStyle } from "./util.js";
|
|
3
3
|
import { computed, createVNode, defineComponent, onBeforeUnmount, ref } from "vue";
|
|
4
|
-
import { useEventListener } from "@vueuse/core";
|
|
5
4
|
import { unit } from "@gx-design-vue/pro-provider";
|
|
5
|
+
import { useEventListener } from "@vueuse/core";
|
|
6
6
|
//#region src/components/ScrollBar/Thumb.tsx
|
|
7
7
|
const thumbProps = {
|
|
8
8
|
vertical: Boolean,
|
|
@@ -72,7 +72,7 @@ declare const FormItemWrapper: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
72
72
|
}>> & Readonly<{}>, {
|
|
73
73
|
label: any;
|
|
74
74
|
labelWidth: string | number;
|
|
75
|
-
labelAlign: "left" | "
|
|
75
|
+
labelAlign: "left" | "center" | "right";
|
|
76
76
|
colon: boolean;
|
|
77
77
|
hashId: string;
|
|
78
78
|
formItemStyle: CSSProperties;
|
|
@@ -112,8 +112,6 @@ declare const ProTableSearchForm: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
112
112
|
};
|
|
113
113
|
}>> & Readonly<{}>, {
|
|
114
114
|
onReset: (params: Record<string, any>) => void;
|
|
115
|
-
proClasses: Record<string, string>;
|
|
116
|
-
proStyles: Record<string, any>;
|
|
117
115
|
formColumns: ProSearchMap<"text", string>[];
|
|
118
116
|
formConfig: FormConfig;
|
|
119
117
|
formAutoRequest: boolean;
|
|
@@ -125,6 +123,8 @@ declare const ProTableSearchForm: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
125
123
|
};
|
|
126
124
|
loading: any;
|
|
127
125
|
cardBordered: boolean;
|
|
126
|
+
proClasses: Record<string, string>;
|
|
127
|
+
proStyles: Record<string, any>;
|
|
128
128
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
129
129
|
//#endregion
|
|
130
130
|
export { ProTableSearchForm as default };
|
|
@@ -93,19 +93,19 @@ declare const ListToolBar: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
93
93
|
default: () => {};
|
|
94
94
|
};
|
|
95
95
|
}>> & Readonly<{}>, {
|
|
96
|
-
headerTitle: any;
|
|
97
|
-
headerTitleTip: any;
|
|
98
|
-
titleTipText: string;
|
|
99
|
-
settings: VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
100
|
-
[key: string]: any;
|
|
101
|
-
}>[];
|
|
102
96
|
actions: VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
103
97
|
[key: string]: any;
|
|
104
98
|
}>[];
|
|
105
|
-
actionsPlacement: ToolbarPlacement;
|
|
106
|
-
listToolAfter: any;
|
|
107
99
|
proClasses: Record<string, any>;
|
|
108
100
|
proStyles: Record<string, any>;
|
|
101
|
+
titleTipText: string;
|
|
102
|
+
actionsPlacement: ToolbarPlacement;
|
|
103
|
+
headerTitle: any;
|
|
104
|
+
listToolAfter: any;
|
|
105
|
+
headerTitleTip: any;
|
|
106
|
+
settings: VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
107
|
+
[key: string]: any;
|
|
108
|
+
}>[];
|
|
109
109
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
110
110
|
//#endregion
|
|
111
111
|
export { ListToolBar, ListToolBarSetting };
|
|
@@ -87,17 +87,17 @@ declare const Toolbar: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
|
|
|
87
87
|
default: () => {};
|
|
88
88
|
};
|
|
89
89
|
}>> & Readonly<{}>, {
|
|
90
|
-
headerTitle: any;
|
|
91
|
-
headerTitleTip: any;
|
|
92
|
-
titleTipText: string;
|
|
93
90
|
actions: VNode<_$vue.RendererNode, _$vue.RendererElement, {
|
|
94
91
|
[key: string]: any;
|
|
95
92
|
}>[];
|
|
96
|
-
actionsPlacement: ToolbarPlacement;
|
|
97
|
-
listToolAfter: any;
|
|
98
93
|
proClasses: Record<string, any>;
|
|
99
94
|
proStyles: Record<string, any>;
|
|
100
95
|
options: any;
|
|
96
|
+
titleTipText: string;
|
|
97
|
+
actionsPlacement: ToolbarPlacement;
|
|
98
|
+
headerTitle: any;
|
|
99
|
+
listToolAfter: any;
|
|
100
|
+
headerTitleTip: any;
|
|
101
101
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { Toolbar, Toolbar as default };
|