ele-admin-plus 1.1.3 → 1.1.4-beta.1
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/ele-alert/index.d.ts +10 -10
- package/es/ele-alert/props.d.ts +6 -6
- package/es/ele-app/style/message.scss +1 -0
- package/es/ele-app/style/overwrite.scss +79 -3
- package/es/ele-app/types/index.d.ts +7 -6
- package/es/ele-avatar-group/index.d.ts +7 -8
- package/es/ele-avatar-group/props.d.ts +3 -4
- package/es/ele-basic-select/style/index.scss +4 -6
- package/es/ele-bottom-bar/index.d.ts +4 -4
- package/es/ele-bottom-bar/props.d.ts +2 -3
- package/es/ele-card/index.d.ts +6 -6
- package/es/ele-card/props.d.ts +3 -4
- package/es/ele-check-card/components/card-item.d.ts +2 -3
- package/es/ele-check-card/index.d.ts +4 -4
- package/es/ele-check-card/props.d.ts +3 -3
- package/es/ele-config-provider/receiver.d.ts +1 -1
- package/es/ele-config-provider/receiver.js +29 -29
- package/es/ele-copyable/index.d.ts +8 -8
- package/es/ele-copyable/index.js +5 -4
- package/es/ele-copyable/props.d.ts +5 -5
- package/es/ele-copyable/style/index.scss +4 -0
- package/es/ele-cropper/index.js +2 -2
- package/es/ele-dashboard/index.d.ts +1 -2
- package/es/ele-drawer/index.d.ts +16 -10
- package/es/ele-drawer/props.d.ts +7 -6
- package/es/ele-dropdown/index.d.ts +2 -2
- package/es/ele-dropdown/props.d.ts +1 -2
- package/es/ele-edit-tag/index.d.ts +4 -4
- package/es/ele-edit-tag/props.d.ts +2 -3
- package/es/ele-ellipsis/index.d.ts +4 -5
- package/es/ele-ellipsis/props.d.ts +1 -1
- package/es/ele-ellipsis/style/index.scss +4 -0
- package/es/ele-file-list/index.d.ts +2 -7
- package/es/ele-file-list/index.js +2 -2
- package/es/ele-file-list/types/index.d.ts +0 -4
- package/es/ele-icon-select/components/icon-grid.d.ts +5 -5
- package/es/ele-icon-select/components/icon-popper.d.ts +15 -15
- package/es/ele-icon-select/index.d.ts +15 -16
- package/es/ele-icon-select/props.d.ts +8 -8
- package/es/ele-loading/index.d.ts +26 -1
- package/es/ele-loading/index.js +53 -11
- package/es/ele-loading/props.d.ts +11 -1
- package/es/ele-loading/props.js +16 -1
- package/es/ele-loading/style/css-var.scss +7 -0
- package/es/ele-loading/style/index.js +1 -0
- package/es/ele-loading/style/index.scss +90 -0
- package/es/ele-loading/types/index.d.ts +17 -0
- package/es/ele-map-picker/components/map-view.d.ts +2 -2
- package/es/ele-map-picker/index.d.ts +2 -2
- package/es/ele-map-picker/props.d.ts +3 -3
- package/es/ele-menus/index.d.ts +2 -0
- package/es/ele-menus/index.js +11 -5
- package/es/ele-menus/props.d.ts +10 -0
- package/es/ele-menus/props.js +7 -1
- package/es/ele-menus/style/index.scss +18 -18
- package/es/ele-menus/types/index.d.ts +4 -0
- package/es/ele-menus/util.d.ts +4 -3
- package/es/ele-menus/util.js +23 -12
- package/es/ele-modal/index.d.ts +19 -13
- package/es/ele-modal/props.d.ts +8 -7
- package/es/ele-modal/util.js +2 -2
- package/es/ele-pagination/index.d.ts +1 -1
- package/es/ele-popconfirm/index.d.ts +10 -10
- package/es/ele-popconfirm/index.js +8 -2
- package/es/ele-popconfirm/props.d.ts +6 -6
- package/es/ele-popover/index.d.ts +6 -6
- package/es/ele-popover/props.d.ts +3 -4
- package/es/ele-printer/index.d.ts +6 -6
- package/es/ele-printer/props.d.ts +3 -4
- package/es/ele-pro-layout/components/pro-header.d.ts +7 -2
- package/es/ele-pro-layout/components/pro-header.js +15 -5
- package/es/ele-pro-layout/components/pro-iframe.js +10 -7
- package/es/ele-pro-layout/components/pro-sidebar.d.ts +7 -2
- package/es/ele-pro-layout/components/pro-sidebar.js +14 -5
- package/es/ele-pro-layout/components/pro-sidebox.d.ts +11 -4
- package/es/ele-pro-layout/components/pro-sidebox.js +16 -5
- package/es/ele-pro-layout/components/tab-dropdown.js +1 -4
- package/es/ele-pro-layout/index.d.ts +17 -3
- package/es/ele-pro-layout/index.js +208 -105
- package/es/ele-pro-layout/props.d.ts +6 -1
- package/es/ele-pro-layout/props.js +10 -0
- package/es/ele-pro-layout/style/collapse.scss +9 -10
- package/es/ele-pro-layout/style/index.js +0 -1
- package/es/ele-pro-layout/types/index.d.ts +9 -0
- package/es/ele-pro-layout/util.d.ts +4 -2
- package/es/ele-pro-layout/util.js +20 -17
- package/es/ele-pro-table/components/table-view.d.ts +9 -3
- package/es/ele-pro-table/components/table-view.js +27 -24
- package/es/ele-pro-table/components/tool-column.d.ts +2 -1
- package/es/ele-pro-table/components/tool-column.js +26 -18
- package/es/ele-pro-table/index.d.ts +46 -25
- package/es/ele-pro-table/index.js +182 -196
- package/es/ele-pro-table/props.d.ts +27 -15
- package/es/ele-pro-table/props.js +15 -3
- package/es/ele-pro-table/style/index.js +1 -1
- package/es/ele-pro-table/style/index.scss +64 -8
- package/es/ele-pro-table/types/index.d.ts +39 -5
- package/es/ele-pro-table/util.d.ts +84 -49
- package/es/ele-pro-table/util.js +193 -78
- package/es/ele-qr-code/index.d.ts +3 -3
- package/es/ele-qr-code/props.d.ts +1 -2
- package/es/ele-qr-code-svg/index.d.ts +3 -3
- package/es/ele-split-panel/index.d.ts +6 -6
- package/es/ele-split-panel/props.d.ts +3 -4
- package/es/ele-table/style/index.scss +1 -0
- package/es/ele-tabs/index.js +3 -3
- package/es/ele-tabs/types/index.d.ts +3 -0
- package/es/ele-text/index.d.ts +3 -3
- package/es/ele-text/props.d.ts +2 -2
- package/es/ele-toolbar/index.d.ts +6 -6
- package/es/ele-toolbar/props.d.ts +3 -4
- package/es/ele-tooltip/index.d.ts +3 -3
- package/es/ele-tooltip/props.d.ts +1 -2
- package/es/ele-tour/index.d.ts +2 -3
- package/es/ele-tour/style/index.scss +1 -1
- package/es/ele-tour/util.js +3 -3
- package/es/ele-upload-list/index.d.ts +8 -7
- package/es/ele-upload-list/index.js +18 -11
- package/es/ele-upload-list/props.d.ts +4 -4
- package/es/ele-upload-list/props.js +1 -1
- package/es/ele-watermark/index.d.ts +16 -8
- package/es/ele-watermark/index.js +18 -12
- package/es/ele-watermark/props.d.ts +3 -1
- package/es/ele-watermark/props.js +5 -1
- package/es/ele-watermark/util.js +1 -1
- package/es/style/index.scss +1 -0
- package/es/style/nprogress.scss +2 -2
- package/es/style/themes/default.scss +36 -12
- package/es/style/themes/rounded.scss +4 -2
- package/es/style/themes/theme-util.scss +2 -0
- package/es/utils/core.d.ts +1 -1
- package/es/utils/core.js +17 -15
- package/es/utils/resolvers.js +2 -2
- package/lib/ele-alert/index.d.ts +10 -10
- package/lib/ele-alert/props.d.ts +6 -6
- package/lib/ele-app/style/message.scss +1 -0
- package/lib/ele-app/style/overwrite.scss +79 -3
- package/lib/ele-app/types/index.d.ts +7 -6
- package/lib/ele-avatar-group/index.d.ts +7 -8
- package/lib/ele-avatar-group/props.d.ts +3 -4
- package/lib/ele-basic-select/style/index.scss +4 -6
- package/lib/ele-bottom-bar/index.d.ts +4 -4
- package/lib/ele-bottom-bar/props.d.ts +2 -3
- package/lib/ele-card/index.d.ts +6 -6
- package/lib/ele-card/props.d.ts +3 -4
- package/lib/ele-check-card/components/card-item.d.ts +2 -3
- package/lib/ele-check-card/index.d.ts +4 -4
- package/lib/ele-check-card/props.d.ts +3 -3
- package/lib/ele-config-provider/receiver.d.ts +1 -1
- package/lib/ele-config-provider/receiver.js +2 -2
- package/lib/ele-copyable/index.d.ts +8 -8
- package/lib/ele-copyable/index.js +4 -3
- package/lib/ele-copyable/props.d.ts +5 -5
- package/lib/ele-copyable/style/index.scss +4 -0
- package/lib/ele-cropper/index.js +2 -2
- package/lib/ele-dashboard/index.d.ts +1 -2
- package/lib/ele-drawer/index.d.ts +16 -10
- package/lib/ele-drawer/props.d.ts +7 -6
- package/lib/ele-dropdown/index.d.ts +2 -2
- package/lib/ele-dropdown/props.d.ts +1 -2
- package/lib/ele-edit-tag/index.d.ts +4 -4
- package/lib/ele-edit-tag/props.d.ts +2 -3
- package/lib/ele-ellipsis/index.d.ts +4 -5
- package/lib/ele-ellipsis/props.d.ts +1 -1
- package/lib/ele-ellipsis/style/index.scss +4 -0
- package/lib/ele-file-list/index.d.ts +2 -7
- package/lib/ele-file-list/index.js +2 -2
- package/lib/ele-file-list/types/index.d.ts +0 -4
- package/lib/ele-icon-select/components/icon-grid.d.ts +5 -5
- package/lib/ele-icon-select/components/icon-popper.d.ts +15 -15
- package/lib/ele-icon-select/index.d.ts +15 -16
- package/lib/ele-icon-select/props.d.ts +8 -8
- package/lib/ele-loading/index.d.ts +26 -1
- package/lib/ele-loading/index.js +52 -10
- package/lib/ele-loading/props.d.ts +11 -1
- package/lib/ele-loading/props.js +16 -1
- package/lib/ele-loading/style/css-var.scss +7 -0
- package/lib/ele-loading/style/index.js +1 -0
- package/lib/ele-loading/style/index.scss +90 -0
- package/lib/ele-loading/types/index.d.ts +17 -0
- package/lib/ele-map-picker/components/map-view.d.ts +2 -2
- package/lib/ele-map-picker/index.d.ts +2 -2
- package/lib/ele-map-picker/props.d.ts +3 -3
- package/lib/ele-menus/index.d.ts +2 -0
- package/lib/ele-menus/index.js +9 -3
- package/lib/ele-menus/props.d.ts +10 -0
- package/lib/ele-menus/props.js +6 -0
- package/lib/ele-menus/style/index.scss +18 -18
- package/lib/ele-menus/types/index.d.ts +4 -0
- package/lib/ele-menus/util.d.ts +4 -3
- package/lib/ele-menus/util.js +23 -12
- package/lib/ele-modal/index.d.ts +19 -13
- package/lib/ele-modal/props.d.ts +8 -7
- package/lib/ele-modal/util.js +2 -2
- package/lib/ele-pagination/index.d.ts +1 -1
- package/lib/ele-popconfirm/index.d.ts +10 -10
- package/lib/ele-popconfirm/index.js +8 -2
- package/lib/ele-popconfirm/props.d.ts +6 -6
- package/lib/ele-popover/index.d.ts +6 -6
- package/lib/ele-popover/props.d.ts +3 -4
- package/lib/ele-printer/index.d.ts +6 -6
- package/lib/ele-printer/props.d.ts +3 -4
- package/lib/ele-pro-layout/components/pro-header.d.ts +7 -2
- package/lib/ele-pro-layout/components/pro-header.js +15 -5
- package/lib/ele-pro-layout/components/pro-iframe.js +10 -7
- package/lib/ele-pro-layout/components/pro-sidebar.d.ts +7 -2
- package/lib/ele-pro-layout/components/pro-sidebar.js +14 -5
- package/lib/ele-pro-layout/components/pro-sidebox.d.ts +11 -4
- package/lib/ele-pro-layout/components/pro-sidebox.js +16 -5
- package/lib/ele-pro-layout/components/tab-dropdown.js +1 -4
- package/lib/ele-pro-layout/index.d.ts +17 -3
- package/lib/ele-pro-layout/index.js +205 -102
- package/lib/ele-pro-layout/props.d.ts +6 -1
- package/lib/ele-pro-layout/props.js +10 -0
- package/lib/ele-pro-layout/style/collapse.scss +9 -10
- package/lib/ele-pro-layout/style/index.js +0 -1
- package/lib/ele-pro-layout/types/index.d.ts +9 -0
- package/lib/ele-pro-layout/util.d.ts +4 -2
- package/lib/ele-pro-layout/util.js +19 -16
- package/lib/ele-pro-table/components/table-view.d.ts +9 -3
- package/lib/ele-pro-table/components/table-view.js +25 -22
- package/lib/ele-pro-table/components/tool-column.d.ts +2 -1
- package/lib/ele-pro-table/components/tool-column.js +25 -17
- package/lib/ele-pro-table/index.d.ts +46 -25
- package/lib/ele-pro-table/index.js +180 -194
- package/lib/ele-pro-table/props.d.ts +27 -15
- package/lib/ele-pro-table/props.js +15 -3
- package/lib/ele-pro-table/style/index.js +1 -1
- package/lib/ele-pro-table/style/index.scss +64 -8
- package/lib/ele-pro-table/types/index.d.ts +39 -5
- package/lib/ele-pro-table/util.d.ts +84 -49
- package/lib/ele-pro-table/util.js +192 -77
- package/lib/ele-qr-code/index.d.ts +3 -3
- package/lib/ele-qr-code/props.d.ts +1 -2
- package/lib/ele-qr-code-svg/index.d.ts +3 -3
- package/lib/ele-split-panel/index.d.ts +6 -6
- package/lib/ele-split-panel/props.d.ts +3 -4
- package/lib/ele-table/style/index.scss +1 -0
- package/lib/ele-tabs/index.js +3 -3
- package/lib/ele-tabs/types/index.d.ts +3 -0
- package/lib/ele-text/index.d.ts +3 -3
- package/lib/ele-text/props.d.ts +2 -2
- package/lib/ele-toolbar/index.d.ts +6 -6
- package/lib/ele-toolbar/props.d.ts +3 -4
- package/lib/ele-tooltip/index.d.ts +3 -3
- package/lib/ele-tooltip/props.d.ts +1 -2
- package/lib/ele-tour/index.d.ts +2 -3
- package/lib/ele-tour/style/index.scss +1 -1
- package/lib/ele-tour/util.js +3 -3
- package/lib/ele-upload-list/index.d.ts +8 -7
- package/lib/ele-upload-list/index.js +17 -10
- package/lib/ele-upload-list/props.d.ts +4 -4
- package/lib/ele-upload-list/props.js +1 -1
- package/lib/ele-watermark/index.d.ts +16 -8
- package/lib/ele-watermark/index.js +17 -11
- package/lib/ele-watermark/props.d.ts +3 -1
- package/lib/ele-watermark/props.js +5 -1
- package/lib/ele-watermark/util.js +1 -1
- package/lib/style/index.scss +1 -0
- package/lib/style/nprogress.scss +2 -2
- package/lib/style/themes/default.scss +36 -12
- package/lib/style/themes/rounded.scss +4 -2
- package/lib/style/themes/theme-util.scss +2 -0
- package/lib/utils/core.d.ts +1 -1
- package/lib/utils/core.js +17 -15
- package/lib/utils/resolvers.js +2 -2
- package/package.json +26 -24
- package/es/ele-alert/types/index.d.ts +0 -0
- package/lib/ele-alert/types/index.d.ts +0 -0
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, onMounted, nextTick, resolveComponent, openBlock,
|
|
1
|
+
import { defineComponent, ref, computed, watch, onMounted, onBeforeUnmount, nextTick, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, mergeProps as mergeProps$1, renderSlot, createCommentVNode, createSlots, renderList, createElementBlock, normalizeStyle } from "vue";
|
|
2
2
|
import { ElEmpty } from "element-plus";
|
|
3
3
|
import { pick, eachTree } from "../utils/core";
|
|
4
4
|
import { useLicense, useGlobalProps } from "../ele-config-provider/receiver";
|
|
5
5
|
import ElePagination from "../ele-pagination/index";
|
|
6
|
+
import EleLoading from "../ele-loading/index";
|
|
6
7
|
import EleToolbar from "../ele-toolbar/index";
|
|
7
8
|
import TableTools from "./components/table-tools";
|
|
8
9
|
import TableView from "./components/table-view";
|
|
9
|
-
import { useTableMethods, useTableEvents, getTablePage, getTableLimit, getTableSize, getPaginationProps, mergeProps, getInitCacheColumns, getRequestFilters, reloadData, getResponseName, isAutoAmend,
|
|
10
|
+
import { useTableMethods, useTableEvents, getDefaultFilter, getTablePage, getTableLimit, getTableSize, getPaginationProps, mergeProps, getInitCacheColumns, getRequestOrders, getRequestFilters, getResponseResult, reloadData, getResponseName, isAutoAmend, getTableState, isDisableRow, getTableFilter, selectionIsChange, getValue, sortData } from "./util";
|
|
10
11
|
import { proTableProps, proTableEmits, tablePropKeys } from "./props";
|
|
11
12
|
const _sfc_main = defineComponent({
|
|
12
13
|
name: "EleProTable",
|
|
13
|
-
components: {
|
|
14
|
+
components: {
|
|
15
|
+
ElEmpty,
|
|
16
|
+
ElePagination,
|
|
17
|
+
EleLoading,
|
|
18
|
+
EleToolbar,
|
|
19
|
+
TableTools,
|
|
20
|
+
TableView
|
|
21
|
+
},
|
|
14
22
|
props: proTableProps,
|
|
15
23
|
emits: proTableEmits,
|
|
16
24
|
setup(props, { emit }) {
|
|
17
25
|
const { authenticated } = useLicense();
|
|
18
26
|
const globalProps = useGlobalProps("table");
|
|
19
|
-
const tableIns = useTableMethods(() =>
|
|
20
|
-
var _a;
|
|
21
|
-
return (_a = tableViewRef.value) == null ? void 0 : _a.tableRef;
|
|
22
|
-
});
|
|
27
|
+
const tableIns = useTableMethods(() => getTableRef());
|
|
23
28
|
const tableEvents = useTableEvents(emit);
|
|
24
|
-
const current = {
|
|
29
|
+
const current = {
|
|
30
|
+
sorter: props.defaultSort ?? {},
|
|
31
|
+
filter: getDefaultFilter(props.columns),
|
|
32
|
+
where: props.where ?? {}
|
|
33
|
+
};
|
|
25
34
|
const tableViewRef = ref(null);
|
|
26
35
|
const tableData = ref([]);
|
|
27
36
|
const tablePage = ref(
|
|
@@ -64,20 +73,19 @@ const _sfc_main = defineComponent({
|
|
|
64
73
|
border: props.border ?? globalProps.value.border ?? false,
|
|
65
74
|
size: tableSize.value,
|
|
66
75
|
load: tableLoad,
|
|
76
|
+
emptyText: errorText.value || props.emptyText,
|
|
67
77
|
columns: tableCols.value,
|
|
68
78
|
pageIndex: tableIndex.value,
|
|
69
|
-
loading: tableLoading.value,
|
|
70
79
|
headerEllipsis: props.headerEllipsis,
|
|
71
|
-
|
|
80
|
+
slotNormalize: props.slotNormalize
|
|
72
81
|
};
|
|
73
82
|
return Object.assign(pick(props, tablePropKeys), opt);
|
|
74
83
|
});
|
|
75
|
-
const
|
|
84
|
+
const tableZIndex = computed(() => {
|
|
76
85
|
if (!tableMaximized.value) {
|
|
77
|
-
return
|
|
86
|
+
return;
|
|
78
87
|
}
|
|
79
|
-
|
|
80
|
-
return { zIndex };
|
|
88
|
+
return props.maximizedIndex ?? globalProps.value.maximizedIndex;
|
|
81
89
|
});
|
|
82
90
|
const tableTools = computed(() => {
|
|
83
91
|
const tools = props.tools ?? globalProps.value.tools ?? true;
|
|
@@ -92,6 +100,20 @@ const _sfc_main = defineComponent({
|
|
|
92
100
|
globalProps.value.emptyProps
|
|
93
101
|
);
|
|
94
102
|
});
|
|
103
|
+
const rootProps = computed(() => {
|
|
104
|
+
const opt = {
|
|
105
|
+
...props.loadingProps || {},
|
|
106
|
+
loading: tableLoading.value,
|
|
107
|
+
class: [
|
|
108
|
+
"ele-pro-table",
|
|
109
|
+
{ "is-sticky": props.sticky },
|
|
110
|
+
{ "is-maximized": tableMaximized.value },
|
|
111
|
+
{ "hide-bottom-line": !props.bottomLine }
|
|
112
|
+
],
|
|
113
|
+
style: { zIndex: tableZIndex.value }
|
|
114
|
+
};
|
|
115
|
+
return opt;
|
|
116
|
+
});
|
|
95
117
|
const reload = (option, parent, resolve) => {
|
|
96
118
|
if (!authenticated.value) {
|
|
97
119
|
return;
|
|
@@ -114,17 +136,22 @@ const _sfc_main = defineComponent({
|
|
|
114
136
|
}
|
|
115
137
|
}
|
|
116
138
|
errorText.value = "";
|
|
117
|
-
const sorter = current.sorter
|
|
139
|
+
const sorter = current.sorter;
|
|
118
140
|
if (typeof props.datasource === "function") {
|
|
119
141
|
if (!parent) {
|
|
120
142
|
tableLoading.value = true;
|
|
121
143
|
}
|
|
122
|
-
const filter = current.filter
|
|
144
|
+
const filter = current.filter;
|
|
145
|
+
const orders = getRequestOrders(
|
|
146
|
+
sorter,
|
|
147
|
+
props.request,
|
|
148
|
+
globalProps.value.request
|
|
149
|
+
);
|
|
123
150
|
props.datasource({
|
|
124
151
|
page: tablePage.value,
|
|
125
152
|
limit: tableLimit.value,
|
|
126
|
-
where: {
|
|
127
|
-
orders
|
|
153
|
+
where: Object.assign({}, current.where),
|
|
154
|
+
orders,
|
|
128
155
|
filters: getRequestFilters(filter),
|
|
129
156
|
sorter,
|
|
130
157
|
filter,
|
|
@@ -132,7 +159,13 @@ const _sfc_main = defineComponent({
|
|
|
132
159
|
}).then((response) => {
|
|
133
160
|
const parseData = props.parseData ?? globalProps.value.parseData;
|
|
134
161
|
const result = parseData ? parseData(response) : response;
|
|
135
|
-
const { data, total } = getResponseResult(
|
|
162
|
+
const { data, total } = getResponseResult(
|
|
163
|
+
result,
|
|
164
|
+
props.response,
|
|
165
|
+
globalProps.value.response,
|
|
166
|
+
props.lazy,
|
|
167
|
+
props.treeProps
|
|
168
|
+
);
|
|
136
169
|
requestCallback(data, total, parent, result, resolve);
|
|
137
170
|
}).catch((e) => {
|
|
138
171
|
requestCallback(e == null ? void 0 : e.message);
|
|
@@ -141,7 +174,6 @@ const _sfc_main = defineComponent({
|
|
|
141
174
|
return;
|
|
142
175
|
}
|
|
143
176
|
if (Array.isArray(props.datasource)) {
|
|
144
|
-
tableLoading.value = true;
|
|
145
177
|
const { data, page, total } = reloadData(
|
|
146
178
|
props.datasource,
|
|
147
179
|
sorter,
|
|
@@ -151,7 +183,6 @@ const _sfc_main = defineComponent({
|
|
|
151
183
|
tableData.value = data;
|
|
152
184
|
tablePage.value = page;
|
|
153
185
|
tableTotal.value = total;
|
|
154
|
-
tableLoading.value = false;
|
|
155
186
|
onDone({ data, page, total, response: props.datasource });
|
|
156
187
|
}
|
|
157
188
|
};
|
|
@@ -195,68 +226,7 @@ const _sfc_main = defineComponent({
|
|
|
195
226
|
};
|
|
196
227
|
onDone(result, parent);
|
|
197
228
|
};
|
|
198
|
-
const getRequestOrders = (sorter) => {
|
|
199
|
-
const orders = {};
|
|
200
|
-
const { sortName, orderName, ascValue, descValue } = getRequestName(
|
|
201
|
-
globalProps.value.request,
|
|
202
|
-
props.request
|
|
203
|
-
);
|
|
204
|
-
if (!sortName || !orderName) {
|
|
205
|
-
return orders;
|
|
206
|
-
}
|
|
207
|
-
const items = getOrderItems(sorter);
|
|
208
|
-
if (items.length === 1) {
|
|
209
|
-
orders[sortName] = items[0].field;
|
|
210
|
-
orders[orderName] = items[0].descend ? descValue : ascValue;
|
|
211
|
-
} else if (items.length) {
|
|
212
|
-
orders[sortName] = items.map((d) => [d.field, d.descend ? descValue : ascValue].join(" ")).join(",");
|
|
213
|
-
}
|
|
214
|
-
return orders;
|
|
215
|
-
};
|
|
216
|
-
const getResponseResult = (data) => {
|
|
217
|
-
if (!data || Array.isArray(data)) {
|
|
218
|
-
return { data: getResponseData(data) };
|
|
219
|
-
}
|
|
220
|
-
const { dataName, countName } = getResponseName(
|
|
221
|
-
globalProps.value.response,
|
|
222
|
-
props.response
|
|
223
|
-
);
|
|
224
|
-
if (!dataName) {
|
|
225
|
-
return {};
|
|
226
|
-
}
|
|
227
|
-
return {
|
|
228
|
-
data: getResponseData(getValue(data, dataName)),
|
|
229
|
-
total: (countName ? getValue(data, countName) : void 0) ?? 0
|
|
230
|
-
};
|
|
231
|
-
};
|
|
232
|
-
const getResponseData = (data) => {
|
|
233
|
-
var _a;
|
|
234
|
-
if (!data || !props.lazy) {
|
|
235
|
-
return data;
|
|
236
|
-
}
|
|
237
|
-
const name = ((_a = props.treeProps) == null ? void 0 : _a.hasChildren) ?? "hasChildren";
|
|
238
|
-
return data.map((d) => {
|
|
239
|
-
const temp = { ...d };
|
|
240
|
-
temp[name] = temp[name] ?? true;
|
|
241
|
-
return temp;
|
|
242
|
-
});
|
|
243
|
-
};
|
|
244
|
-
const getDefaultSorter = () => {
|
|
245
|
-
return props.defaultSort ?? {};
|
|
246
|
-
};
|
|
247
|
-
const getDefaultFilter = () => {
|
|
248
|
-
const filter = {};
|
|
249
|
-
eachTree(props.columns, (d) => {
|
|
250
|
-
if (typeof d.columnKey === "string" && d.columnKey.length && d.filteredValue) {
|
|
251
|
-
filter[d.columnKey] = d.filteredValue;
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
return filter;
|
|
255
|
-
};
|
|
256
229
|
const onDone = (result, parent) => {
|
|
257
|
-
nextTick(() => {
|
|
258
|
-
tableIns.doLayout();
|
|
259
|
-
});
|
|
260
230
|
emit("done", result, parent);
|
|
261
231
|
};
|
|
262
232
|
const tableLoad = (row, treeNode, resolve) => {
|
|
@@ -275,23 +245,21 @@ const _sfc_main = defineComponent({
|
|
|
275
245
|
};
|
|
276
246
|
const onSizeChange = (size) => {
|
|
277
247
|
tableSize.value = size;
|
|
278
|
-
nextTick(() => {
|
|
279
|
-
tableIns.doLayout();
|
|
280
|
-
});
|
|
281
248
|
emit("sizeChange", size);
|
|
282
249
|
};
|
|
283
250
|
const onColumnsChange = (columns) => {
|
|
284
|
-
|
|
251
|
+
const { cols, sorter } = getTableState(columns, current);
|
|
252
|
+
tableCols.value = cols;
|
|
285
253
|
nextTick(() => {
|
|
286
254
|
tableIns.doLayout();
|
|
255
|
+
if (sorter) {
|
|
256
|
+
tableIns.sort(sorter.prop, sorter.order || "ascending");
|
|
257
|
+
}
|
|
287
258
|
});
|
|
288
259
|
emit("columnsChange", columns);
|
|
289
260
|
};
|
|
290
261
|
const onMaximizedChange = (maximized) => {
|
|
291
262
|
tableMaximized.value = maximized;
|
|
292
|
-
nextTick(() => {
|
|
293
|
-
tableIns.doLayout();
|
|
294
|
-
});
|
|
295
263
|
emit("maximizedChange", maximized);
|
|
296
264
|
};
|
|
297
265
|
const onPageSizeChange = (limit) => {
|
|
@@ -320,6 +288,10 @@ const _sfc_main = defineComponent({
|
|
|
320
288
|
emit("selectionChange", selection);
|
|
321
289
|
};
|
|
322
290
|
const onSortChange = (sorter) => {
|
|
291
|
+
const temp = current.sorter;
|
|
292
|
+
if (temp && sorter.prop === temp.prop && sorter.order === temp.order) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
323
295
|
if (props.loadOnChanged) {
|
|
324
296
|
current.sorter = sorter;
|
|
325
297
|
reload();
|
|
@@ -328,17 +300,21 @@ const _sfc_main = defineComponent({
|
|
|
328
300
|
};
|
|
329
301
|
const onFilterChange = (filter) => {
|
|
330
302
|
if (props.loadOnChanged) {
|
|
331
|
-
|
|
303
|
+
const temp = getTableFilter(getTableRef()) ?? filter;
|
|
304
|
+
current.filter = temp;
|
|
332
305
|
reload();
|
|
333
306
|
}
|
|
334
307
|
emit("filterChange", filter);
|
|
335
308
|
};
|
|
336
309
|
const onCurrentChange = (currentRow, oldCurrentRow) => {
|
|
337
310
|
if (props.current !== currentRow) {
|
|
338
|
-
|
|
311
|
+
updateCurrent(currentRow);
|
|
339
312
|
}
|
|
340
313
|
emit("currentChange", currentRow, oldCurrentRow);
|
|
341
314
|
};
|
|
315
|
+
const updateCurrent = (currentRow) => {
|
|
316
|
+
emit("update:current", currentRow);
|
|
317
|
+
};
|
|
342
318
|
const updateSelections = (selection) => {
|
|
343
319
|
emit("update:selections", selection);
|
|
344
320
|
};
|
|
@@ -351,6 +327,10 @@ const _sfc_main = defineComponent({
|
|
|
351
327
|
});
|
|
352
328
|
});
|
|
353
329
|
};
|
|
330
|
+
const getTableRef = () => {
|
|
331
|
+
var _a;
|
|
332
|
+
return (_a = tableViewRef.value) == null ? void 0 : _a.tableRef;
|
|
333
|
+
};
|
|
354
334
|
const getData = () => {
|
|
355
335
|
return tableData.value;
|
|
356
336
|
};
|
|
@@ -394,8 +374,7 @@ const _sfc_main = defineComponent({
|
|
|
394
374
|
if (!props.rowKey || !paginationProps.value || tableLimit.value == null || !Array.isArray(props.datasource)) {
|
|
395
375
|
return;
|
|
396
376
|
}
|
|
397
|
-
const
|
|
398
|
-
const data = sortData(props.datasource, sorter);
|
|
377
|
+
const data = sortData(props.datasource, current.sorter);
|
|
399
378
|
const index2 = data.findIndex((d) => getValue(d, props.rowKey) === key);
|
|
400
379
|
const page = Math.floor(index2 / tableLimit.value) + 1;
|
|
401
380
|
if (tablePage.value !== page) {
|
|
@@ -403,13 +382,17 @@ const _sfc_main = defineComponent({
|
|
|
403
382
|
}
|
|
404
383
|
};
|
|
405
384
|
const fetch = (callback) => {
|
|
406
|
-
const sorter = current
|
|
407
|
-
const
|
|
385
|
+
const { sorter, filter } = current;
|
|
386
|
+
const orders = getRequestOrders(
|
|
387
|
+
sorter,
|
|
388
|
+
props.request,
|
|
389
|
+
globalProps.value.request
|
|
390
|
+
);
|
|
408
391
|
callback({
|
|
409
392
|
page: tablePage.value,
|
|
410
393
|
limit: tableLimit.value,
|
|
411
|
-
where: {
|
|
412
|
-
orders
|
|
394
|
+
where: Object.assign({}, current.where),
|
|
395
|
+
orders,
|
|
413
396
|
filters: getRequestFilters(filter),
|
|
414
397
|
sorter,
|
|
415
398
|
filter
|
|
@@ -465,9 +448,13 @@ const _sfc_main = defineComponent({
|
|
|
465
448
|
);
|
|
466
449
|
onMounted(() => {
|
|
467
450
|
if (props.loadOnCreated) {
|
|
468
|
-
reload(
|
|
451
|
+
reload();
|
|
469
452
|
}
|
|
470
453
|
});
|
|
454
|
+
onBeforeUnmount(() => {
|
|
455
|
+
updateSelections([]);
|
|
456
|
+
updateCurrent(null);
|
|
457
|
+
});
|
|
471
458
|
return {
|
|
472
459
|
...tableIns,
|
|
473
460
|
tableEvents,
|
|
@@ -482,9 +469,10 @@ const _sfc_main = defineComponent({
|
|
|
482
469
|
tableIndex,
|
|
483
470
|
paginationProps,
|
|
484
471
|
tableProps,
|
|
485
|
-
|
|
472
|
+
tableZIndex,
|
|
486
473
|
tableTools,
|
|
487
474
|
tableEmptyProps,
|
|
475
|
+
rootProps,
|
|
488
476
|
tableLoad,
|
|
489
477
|
onRefresh,
|
|
490
478
|
onSizeChange,
|
|
@@ -499,6 +487,7 @@ const _sfc_main = defineComponent({
|
|
|
499
487
|
onCurrentChange,
|
|
500
488
|
reload,
|
|
501
489
|
reloadTable,
|
|
490
|
+
getTableRef,
|
|
502
491
|
getData,
|
|
503
492
|
setData,
|
|
504
493
|
setSelectedRows,
|
|
@@ -522,111 +511,108 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
522
511
|
const _component_ElEmpty = resolveComponent("ElEmpty");
|
|
523
512
|
const _component_TableView = resolveComponent("TableView");
|
|
524
513
|
const _component_ElePagination = resolveComponent("ElePagination");
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
{
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
locale:
|
|
546
|
-
onReload: _ctx.onRefresh,
|
|
547
|
-
"onUpdate:size": _ctx.onSizeChange,
|
|
548
|
-
"onUpdate:columns": _ctx.onColumnsChange,
|
|
549
|
-
"onUpdate:maximized": _ctx.onMaximizedChange
|
|
550
|
-
}, null, 8, ["size", "columns", "tools", "columnSortable", "columnFixed", "maximized", "cacheKey", "locale", "onReload", "onUpdate:size", "onUpdate:columns", "onUpdate:maximized"])) : createCommentVNode("", true)
|
|
551
|
-
]),
|
|
552
|
-
default: withCtx(() => [
|
|
553
|
-
renderSlot(_ctx.$slots, "toolbar")
|
|
554
|
-
]),
|
|
555
|
-
_: 3
|
|
556
|
-
}, 16)) : createCommentVNode("", true),
|
|
557
|
-
renderSlot(_ctx.$slots, "default"),
|
|
558
|
-
!_ctx.destroyed ? (openBlock(), createBlock(_component_TableView, mergeProps$1({ key: 1 }, _ctx.tableProps, {
|
|
559
|
-
ref: "tableViewRef",
|
|
560
|
-
style: _ctx.tableStyle,
|
|
561
|
-
onSelect: _ctx.tableEvents.onSelect,
|
|
562
|
-
onSelectAll: _ctx.tableEvents.onSelectAll,
|
|
563
|
-
onCellMouseEnter: _ctx.tableEvents.onCellMouseEnter,
|
|
564
|
-
onCellMouseLeave: _ctx.tableEvents.onCellMouseLeave,
|
|
565
|
-
onCellClick: _ctx.tableEvents.onCellClick,
|
|
566
|
-
onCellDblclick: _ctx.tableEvents.onCellDblclick,
|
|
567
|
-
onCellContextmenu: _ctx.tableEvents.onCellContextmenu,
|
|
568
|
-
onRowContextmenu: _ctx.tableEvents.onRowContextmenu,
|
|
569
|
-
onRowDblclick: _ctx.tableEvents.onRowDblclick,
|
|
570
|
-
onHeaderClick: _ctx.tableEvents.onHeaderClick,
|
|
571
|
-
onHeaderContextmenu: _ctx.tableEvents.onHeaderContextmenu,
|
|
572
|
-
onHeaderDragend: _ctx.tableEvents.onHeaderDragend,
|
|
573
|
-
onExpandChange: _ctx.tableEvents.onExpandChange,
|
|
574
|
-
onRowClick: _ctx.onRowClick,
|
|
575
|
-
onSelectionChange: _ctx.onSelectionChange,
|
|
576
|
-
onSortChange: _ctx.onSortChange,
|
|
577
|
-
onFilterChange: _ctx.onFilterChange,
|
|
578
|
-
onCurrentChange: _ctx.onCurrentChange
|
|
579
|
-
}), createSlots({ _: 2 }, [
|
|
580
|
-
renderList(Object.keys(_ctx.$slots).filter(
|
|
581
|
-
(k) => "default" !== k && "empty" !== k
|
|
582
|
-
), (name) => {
|
|
583
|
-
return {
|
|
584
|
-
name,
|
|
585
|
-
fn: withCtx((slotProps) => [
|
|
586
|
-
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
587
|
-
])
|
|
588
|
-
};
|
|
589
|
-
}),
|
|
590
|
-
_ctx.tableEmptyProps || _ctx.$slots.empty ? {
|
|
591
|
-
name: "empty",
|
|
592
|
-
fn: withCtx(() => [
|
|
593
|
-
renderSlot(_ctx.$slots, "empty", {
|
|
594
|
-
text: _ctx.emptyText,
|
|
595
|
-
error: _ctx.errorText
|
|
596
|
-
}, () => [
|
|
597
|
-
_ctx.tableEmptyProps ? (openBlock(), createBlock(_component_ElEmpty, mergeProps$1({
|
|
598
|
-
key: 0,
|
|
599
|
-
imageSize: 68
|
|
600
|
-
}, _ctx.tableEmptyProps === true ? {} : _ctx.emptyProps, {
|
|
601
|
-
class: "ele-table-empty",
|
|
602
|
-
description: _ctx.errorText || _ctx.emptyText
|
|
603
|
-
}), null, 16, ["description"])) : createCommentVNode("", true)
|
|
604
|
-
])
|
|
514
|
+
const _component_EleLoading = resolveComponent("EleLoading");
|
|
515
|
+
return openBlock(), createBlock(_component_EleLoading, normalizeProps(guardReactiveProps(_ctx.rootProps)), {
|
|
516
|
+
default: withCtx(() => [
|
|
517
|
+
_ctx.toolbar ? (openBlock(), createBlock(_component_EleToolbar, normalizeProps(mergeProps$1({ key: 0 }, _ctx.toolbar === true ? {} : _ctx.toolbar)), {
|
|
518
|
+
tools: withCtx(() => [
|
|
519
|
+
renderSlot(_ctx.$slots, "tools"),
|
|
520
|
+
_ctx.tableTools && _ctx.tableTools.length ? (openBlock(), createBlock(_component_TableTools, {
|
|
521
|
+
key: 0,
|
|
522
|
+
size: _ctx.tableSize,
|
|
523
|
+
columns: _ctx.columns,
|
|
524
|
+
tools: _ctx.tableTools,
|
|
525
|
+
columnSortable: _ctx.columnSortable,
|
|
526
|
+
columnFixed: _ctx.columnFixed,
|
|
527
|
+
maximized: _ctx.tableMaximized,
|
|
528
|
+
cacheKey: _ctx.cacheKey,
|
|
529
|
+
locale: _ctx.locale,
|
|
530
|
+
onReload: _ctx.onRefresh,
|
|
531
|
+
"onUpdate:size": _ctx.onSizeChange,
|
|
532
|
+
"onUpdate:columns": _ctx.onColumnsChange,
|
|
533
|
+
"onUpdate:maximized": _ctx.onMaximizedChange
|
|
534
|
+
}, null, 8, ["size", "columns", "tools", "columnSortable", "columnFixed", "maximized", "cacheKey", "locale", "onReload", "onUpdate:size", "onUpdate:columns", "onUpdate:maximized"])) : createCommentVNode("", true)
|
|
605
535
|
]),
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
536
|
+
default: withCtx(() => [
|
|
537
|
+
renderSlot(_ctx.$slots, "toolbar")
|
|
538
|
+
]),
|
|
539
|
+
_: 3
|
|
540
|
+
}, 16)) : createCommentVNode("", true),
|
|
541
|
+
renderSlot(_ctx.$slots, "default"),
|
|
542
|
+
!_ctx.destroyed ? (openBlock(), createBlock(_component_TableView, mergeProps$1({ key: 1 }, _ctx.tableProps, {
|
|
543
|
+
ref: "tableViewRef",
|
|
544
|
+
style: _ctx.tableStyle,
|
|
545
|
+
onSelect: _ctx.tableEvents.onSelect,
|
|
546
|
+
onSelectAll: _ctx.tableEvents.onSelectAll,
|
|
547
|
+
onCellMouseEnter: _ctx.tableEvents.onCellMouseEnter,
|
|
548
|
+
onCellMouseLeave: _ctx.tableEvents.onCellMouseLeave,
|
|
549
|
+
onCellClick: _ctx.tableEvents.onCellClick,
|
|
550
|
+
onCellDblclick: _ctx.tableEvents.onCellDblclick,
|
|
551
|
+
onCellContextmenu: _ctx.tableEvents.onCellContextmenu,
|
|
552
|
+
onRowContextmenu: _ctx.tableEvents.onRowContextmenu,
|
|
553
|
+
onRowDblclick: _ctx.tableEvents.onRowDblclick,
|
|
554
|
+
onHeaderClick: _ctx.tableEvents.onHeaderClick,
|
|
555
|
+
onHeaderContextmenu: _ctx.tableEvents.onHeaderContextmenu,
|
|
556
|
+
onHeaderDragend: _ctx.tableEvents.onHeaderDragend,
|
|
557
|
+
onExpandChange: _ctx.tableEvents.onExpandChange,
|
|
558
|
+
onRowClick: _ctx.onRowClick,
|
|
559
|
+
onSelectionChange: _ctx.onSelectionChange,
|
|
560
|
+
onSortChange: _ctx.onSortChange,
|
|
561
|
+
onFilterChange: _ctx.onFilterChange,
|
|
562
|
+
onCurrentChange: _ctx.onCurrentChange
|
|
618
563
|
}), createSlots({ _: 2 }, [
|
|
619
|
-
renderList(Object.keys(_ctx.$slots).filter(
|
|
564
|
+
renderList(Object.keys(_ctx.$slots).filter(
|
|
565
|
+
(k) => "default" !== k && "empty" !== k
|
|
566
|
+
), (name) => {
|
|
620
567
|
return {
|
|
621
568
|
name,
|
|
622
569
|
fn: withCtx((slotProps) => [
|
|
623
570
|
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
624
571
|
])
|
|
625
572
|
};
|
|
626
|
-
})
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
573
|
+
}),
|
|
574
|
+
_ctx.tableEmptyProps || _ctx.$slots.empty ? {
|
|
575
|
+
name: "empty",
|
|
576
|
+
fn: withCtx(() => [
|
|
577
|
+
renderSlot(_ctx.$slots, "empty", {
|
|
578
|
+
text: _ctx.emptyText,
|
|
579
|
+
error: _ctx.errorText
|
|
580
|
+
}, () => [
|
|
581
|
+
_ctx.tableEmptyProps ? (openBlock(), createBlock(_component_ElEmpty, mergeProps$1({
|
|
582
|
+
key: 0,
|
|
583
|
+
imageSize: 68
|
|
584
|
+
}, _ctx.tableEmptyProps === true ? {} : _ctx.emptyProps, {
|
|
585
|
+
class: "ele-table-empty",
|
|
586
|
+
description: _ctx.errorText || _ctx.emptyText
|
|
587
|
+
}), null, 16, ["description"])) : createCommentVNode("", true)
|
|
588
|
+
])
|
|
589
|
+
]),
|
|
590
|
+
key: "0"
|
|
591
|
+
} : void 0
|
|
592
|
+
]), 1040, ["style", "onSelect", "onSelectAll", "onCellMouseEnter", "onCellMouseLeave", "onCellClick", "onCellDblclick", "onCellContextmenu", "onRowContextmenu", "onRowDblclick", "onHeaderClick", "onHeaderContextmenu", "onHeaderDragend", "onExpandChange", "onRowClick", "onSelectionChange", "onSortChange", "onFilterChange", "onCurrentChange"])) : createCommentVNode("", true),
|
|
593
|
+
_ctx.paginationProps || _ctx.$slots.footer ? (openBlock(), createElementBlock("div", {
|
|
594
|
+
key: 2,
|
|
595
|
+
class: "ele-pro-table-footer",
|
|
596
|
+
style: normalizeStyle(_ctx.footerStyle)
|
|
597
|
+
}, [
|
|
598
|
+
renderSlot(_ctx.$slots, "footer"),
|
|
599
|
+
_ctx.paginationProps && _ctx.paginationProps.total ? (openBlock(), createBlock(_component_ElePagination, mergeProps$1({ key: 0 }, _ctx.paginationProps, {
|
|
600
|
+
"onUpdate:currentPage": _ctx.onPageCurrentChange,
|
|
601
|
+
"onUpdate:pageSize": _ctx.onPageSizeChange
|
|
602
|
+
}), createSlots({ _: 2 }, [
|
|
603
|
+
renderList(Object.keys(_ctx.$slots).filter((k) => "default" !== k), (name) => {
|
|
604
|
+
return {
|
|
605
|
+
name,
|
|
606
|
+
fn: withCtx((slotProps) => [
|
|
607
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
608
|
+
])
|
|
609
|
+
};
|
|
610
|
+
})
|
|
611
|
+
]), 1040, ["onUpdate:currentPage", "onUpdate:pageSize"])) : createCommentVNode("", true)
|
|
612
|
+
], 4)) : createCommentVNode("", true)
|
|
613
|
+
]),
|
|
614
|
+
_: 3
|
|
615
|
+
}, 16);
|
|
630
616
|
}
|
|
631
617
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
632
618
|
export {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ElEmptyProps } from '../ele-app/types';
|
|
3
|
+
import type { LoadingProps } from '../ele-loading/props';
|
|
3
4
|
import type { Column, Columns, DataItem, Where, Datasource, RequestOption, ResponseOption, ParseData, Sorter, Filter, DoneParams, TablePagination, TableToolbar, TableTool, TableSize, RowClickChecked, TableLocale } from './types';
|
|
4
5
|
declare const tableProps: Omit<{
|
|
5
6
|
data: {
|
|
6
7
|
type: PropType<any[]>;
|
|
7
8
|
default: () => never[];
|
|
8
|
-
};
|
|
9
|
+
};
|
|
9
10
|
size: {
|
|
10
11
|
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
11
12
|
readonly required: false;
|
|
@@ -21,7 +22,7 @@ declare const tableProps: Omit<{
|
|
|
21
22
|
};
|
|
22
23
|
stripe: BooleanConstructor;
|
|
23
24
|
border: BooleanConstructor;
|
|
24
|
-
rowKey: PropType<string | ((row: any) => string) | undefined>;
|
|
25
|
+
rowKey: PropType<string | ((row: any) => string) | undefined>; /** 表格最大化切换事件 */
|
|
25
26
|
showHeader: {
|
|
26
27
|
type: BooleanConstructor;
|
|
27
28
|
default: boolean;
|
|
@@ -101,12 +102,15 @@ export declare const tableViewProps: {
|
|
|
101
102
|
type: PropType<Columns>;
|
|
102
103
|
required: boolean;
|
|
103
104
|
};
|
|
104
|
-
loading: BooleanConstructor;
|
|
105
105
|
pageIndex: NumberConstructor;
|
|
106
106
|
headerEllipsis: {
|
|
107
107
|
type: BooleanConstructor;
|
|
108
108
|
default: boolean;
|
|
109
109
|
};
|
|
110
|
+
slotNormalize: {
|
|
111
|
+
type: BooleanConstructor;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
110
114
|
size: {
|
|
111
115
|
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
112
116
|
readonly required: false;
|
|
@@ -206,6 +210,7 @@ export declare const proTableProps: {
|
|
|
206
210
|
type: BooleanConstructor;
|
|
207
211
|
default: null;
|
|
208
212
|
};
|
|
213
|
+
loading: BooleanConstructor;
|
|
209
214
|
datasource: {
|
|
210
215
|
type: PropType<Datasource>;
|
|
211
216
|
required: boolean;
|
|
@@ -243,8 +248,8 @@ export declare const proTableProps: {
|
|
|
243
248
|
maximizedIndex: NumberConstructor;
|
|
244
249
|
maximizedHeight: (StringConstructor | NumberConstructor)[];
|
|
245
250
|
rowClickChecked: PropType<RowClickChecked>;
|
|
246
|
-
tableStyle: PropType<
|
|
247
|
-
footerStyle: PropType<
|
|
251
|
+
tableStyle: PropType<Partial<import("vue").CSSProperties>>;
|
|
252
|
+
footerStyle: PropType<Partial<import("vue").CSSProperties>>;
|
|
248
253
|
pagination: {
|
|
249
254
|
type: PropType<boolean | TablePagination>;
|
|
250
255
|
default: () => null;
|
|
@@ -254,18 +259,13 @@ export declare const proTableProps: {
|
|
|
254
259
|
default: () => null;
|
|
255
260
|
};
|
|
256
261
|
sticky: BooleanConstructor;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
columns: {
|
|
260
|
-
type: PropType<Columns>;
|
|
261
|
-
required: boolean;
|
|
262
|
-
};
|
|
263
|
-
loading: BooleanConstructor;
|
|
264
|
-
pageIndex: NumberConstructor;
|
|
265
|
-
headerEllipsis: {
|
|
262
|
+
loadingProps: PropType<Partial<LoadingProps>>;
|
|
263
|
+
bottomLine: {
|
|
266
264
|
type: BooleanConstructor;
|
|
267
265
|
default: boolean;
|
|
268
266
|
};
|
|
267
|
+
cacheKey: StringConstructor;
|
|
268
|
+
locale: PropType<Partial<TableLocale>>;
|
|
269
269
|
size: {
|
|
270
270
|
readonly type: PropType<import("element-plus/es/utils").EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
271
271
|
readonly required: false;
|
|
@@ -350,6 +350,18 @@ export declare const proTableProps: {
|
|
|
350
350
|
default: boolean;
|
|
351
351
|
};
|
|
352
352
|
flexible: BooleanConstructor;
|
|
353
|
+
columns: {
|
|
354
|
+
type: PropType<Columns>;
|
|
355
|
+
required: boolean;
|
|
356
|
+
};
|
|
357
|
+
headerEllipsis: {
|
|
358
|
+
type: BooleanConstructor;
|
|
359
|
+
default: boolean;
|
|
360
|
+
};
|
|
361
|
+
slotNormalize: {
|
|
362
|
+
type: BooleanConstructor;
|
|
363
|
+
default: boolean;
|
|
364
|
+
};
|
|
353
365
|
};
|
|
354
366
|
export type ProTableProps = ExtractPropTypes<typeof proTableProps>;
|
|
355
367
|
export type TableViewProps = ExtractPropTypes<typeof tableViewProps>;
|