ele-admin-plus 1.1.3 → 1.1.4-beta.2
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 +84 -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-count-up/index.d.ts +2 -2
- package/es/ele-count-up/index.js +2 -1
- package/es/ele-count-up/props.d.ts +1 -1
- 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/types/index.d.ts +9 -0
- package/es/ele-modal/util.js +45 -32
- 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 +7 -6
- package/es/ele-printer/index.js +11 -4
- 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/style/layout-mobile.scss +1 -0
- 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 +4 -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/ele-xg-player/index.js +1 -0
- 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 +84 -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-count-up/index.d.ts +2 -2
- package/lib/ele-count-up/index.js +2 -1
- package/lib/ele-count-up/props.d.ts +1 -1
- 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/types/index.d.ts +9 -0
- package/lib/ele-modal/util.js +45 -32
- 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 +7 -6
- package/lib/ele-printer/index.js +10 -3
- 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/style/layout-mobile.scss +1 -0
- 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 +4 -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/ele-xg-player/index.js +1 -0
- 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 +25 -23
- package/typings/global.d.ts +52 -52
- package/es/ele-alert/types/index.d.ts +0 -0
- package/lib/ele-alert/types/index.d.ts +0 -0
|
@@ -10,18 +10,21 @@ const tableViewProps = {
|
|
|
10
10
|
type: Array,
|
|
11
11
|
required: true
|
|
12
12
|
},
|
|
13
|
-
// 数据请求状态
|
|
14
|
-
loading: Boolean,
|
|
15
13
|
// 起始编号
|
|
16
14
|
pageIndex: Number,
|
|
17
15
|
// 表头内容超出省略
|
|
18
16
|
headerEllipsis: {
|
|
19
17
|
type: Boolean,
|
|
20
18
|
default: true
|
|
19
|
+
},
|
|
20
|
+
// 插槽不渲染非正常的调用
|
|
21
|
+
slotNormalize: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
21
24
|
}
|
|
22
25
|
};
|
|
23
26
|
const proTableProps = {
|
|
24
|
-
...tableViewProps,
|
|
27
|
+
...core.omit(tableViewProps, ["pageIndex"]),
|
|
25
28
|
stripe: {
|
|
26
29
|
type: Boolean,
|
|
27
30
|
default: null
|
|
@@ -30,6 +33,8 @@ const proTableProps = {
|
|
|
30
33
|
type: Boolean,
|
|
31
34
|
default: null
|
|
32
35
|
},
|
|
36
|
+
// 数据请求状态
|
|
37
|
+
loading: Boolean,
|
|
33
38
|
// 数据源
|
|
34
39
|
datasource: {
|
|
35
40
|
type: [Array, Function],
|
|
@@ -105,6 +110,13 @@ const proTableProps = {
|
|
|
105
110
|
},
|
|
106
111
|
// 设置粘性头部
|
|
107
112
|
sticky: Boolean,
|
|
113
|
+
// 自定义加载组件属性
|
|
114
|
+
loadingProps: Object,
|
|
115
|
+
// 是否显示下边框线
|
|
116
|
+
bottomLine: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: true
|
|
119
|
+
},
|
|
108
120
|
// 列配置缓存名称
|
|
109
121
|
cacheKey: String,
|
|
110
122
|
// 国际化
|
|
@@ -6,11 +6,11 @@ require("element-plus/es/components/link/style/index");
|
|
|
6
6
|
require("element-plus/es/components/table/style/index");
|
|
7
7
|
require("element-plus/es/components/table-column/style/index");
|
|
8
8
|
require("element-plus/es/components/empty/style/index");
|
|
9
|
-
require("element-plus/es/components/loading/style/index");
|
|
10
9
|
require("../../ele-tooltip/style/index");
|
|
11
10
|
require("../../ele-popover/style/index");
|
|
12
11
|
require("../../ele-dropdown/style/index");
|
|
13
12
|
require("../../ele-pagination/style/index");
|
|
13
|
+
require("../../ele-loading/style/index");
|
|
14
14
|
require("../../ele-toolbar/style/index");
|
|
15
15
|
require("../../ele-tool/style/index");
|
|
16
16
|
require("./index.scss");
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
#{elVarName('text-color', 'placeholder')}: #{$color};
|
|
91
91
|
width: 14px;
|
|
92
92
|
overflow: visible;
|
|
93
|
+
flex-shrink: 0;
|
|
93
94
|
|
|
94
95
|
.ascending {
|
|
95
96
|
left: 4px;
|
|
@@ -133,6 +134,8 @@
|
|
|
133
134
|
.ele-cell-title {
|
|
134
135
|
flex: 1;
|
|
135
136
|
position: relative;
|
|
137
|
+
text-overflow: ellipsis;
|
|
138
|
+
overflow: hidden;
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
// 行高
|
|
@@ -150,16 +153,29 @@
|
|
|
150
153
|
}
|
|
151
154
|
}
|
|
152
155
|
|
|
156
|
+
// 复选框
|
|
157
|
+
.ele-table-head-tr > .el-table-column--selection > .cell,
|
|
158
|
+
.ele-table-tr > .el-table-column--selection > .cell {
|
|
159
|
+
height: auto;
|
|
160
|
+
vertical-align: middle;
|
|
161
|
+
overflow: visible;
|
|
162
|
+
}
|
|
163
|
+
|
|
153
164
|
// 边框线
|
|
154
165
|
& > .el-table--border::after,
|
|
155
166
|
& > .el-table--border::before,
|
|
156
167
|
& > .el-table > .el-table__inner-wrapper > .el-table__border-left-patch {
|
|
157
|
-
width:
|
|
168
|
+
width: eleVar('table', 'fix-border');
|
|
158
169
|
}
|
|
159
170
|
|
|
160
171
|
& > .el-table > .el-table__inner-wrapper::before,
|
|
161
172
|
& > .el-table--border > .el-table__inner-wrapper::after {
|
|
162
|
-
height:
|
|
173
|
+
height: eleVar('table', 'fix-border');
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// 隐藏下边框
|
|
177
|
+
&.hide-bottom-line > .el-table > .el-table__inner-wrapper::before {
|
|
178
|
+
display: none;
|
|
163
179
|
}
|
|
164
180
|
|
|
165
181
|
// 圆角
|
|
@@ -199,6 +215,8 @@
|
|
|
199
215
|
|
|
200
216
|
// 合计行
|
|
201
217
|
& > .el-table__inner-wrapper > .el-table__footer-wrapper {
|
|
218
|
+
margin-top: calc(0px - eleVar('table', 'fix-height'));
|
|
219
|
+
|
|
202
220
|
& > table > tbody > tr:last-child > td {
|
|
203
221
|
border-bottom-color: transparent;
|
|
204
222
|
}
|
|
@@ -239,6 +257,14 @@
|
|
|
239
257
|
display: none;
|
|
240
258
|
}
|
|
241
259
|
|
|
260
|
+
// 滚动条
|
|
261
|
+
& > .el-table > .el-table__inner-wrapper > .el-table__body-wrapper {
|
|
262
|
+
& > .el-scrollbar > .el-scrollbar__wrap {
|
|
263
|
+
padding-bottom: eleVar('table', 'fix-height');
|
|
264
|
+
box-sizing: border-box;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
242
268
|
// loading
|
|
243
269
|
& > .el-table--border > .el-loading-mask {
|
|
244
270
|
top: 1px;
|
|
@@ -247,6 +273,10 @@
|
|
|
247
273
|
bottom: 1px;
|
|
248
274
|
}
|
|
249
275
|
|
|
276
|
+
& > .ele-loading-spinner {
|
|
277
|
+
background: transparent;
|
|
278
|
+
}
|
|
279
|
+
|
|
250
280
|
// 空状态
|
|
251
281
|
.ele-table-empty {
|
|
252
282
|
padding: 58px 0;
|
|
@@ -311,9 +341,30 @@ body .ele-popper.el-popper.ele-tooltip.ele-table-tooltip {
|
|
|
311
341
|
height: auto;
|
|
312
342
|
}
|
|
313
343
|
|
|
344
|
+
/* Link */
|
|
345
|
+
.ele-table-tr .el-link,
|
|
346
|
+
.ele-table-head-tr .el-link {
|
|
347
|
+
display: inline;
|
|
348
|
+
font-size: inherit;
|
|
349
|
+
|
|
350
|
+
& > .el-link__inner {
|
|
351
|
+
display: inline;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
& > .el-icon {
|
|
355
|
+
vertical-align: -1.7px;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// 超出隐藏
|
|
360
|
+
.ele-table-tr > .el-table__cell > .cell.el-tooltip > div {
|
|
361
|
+
overflow: hidden;
|
|
362
|
+
text-overflow: ellipsis;
|
|
363
|
+
}
|
|
364
|
+
|
|
314
365
|
/* 底栏 */
|
|
315
366
|
.ele-pro-table-footer {
|
|
316
|
-
padding-top:
|
|
367
|
+
padding-top: 4px;
|
|
317
368
|
box-sizing: border-box;
|
|
318
369
|
display: flex;
|
|
319
370
|
align-items: center;
|
|
@@ -428,17 +479,22 @@ body .ele-popper.el-popper.ele-tooltip.ele-table-tooltip {
|
|
|
428
479
|
.ele-tool-fixed-item {
|
|
429
480
|
display: flex;
|
|
430
481
|
font-size: 12px;
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
482
|
+
color: eleVar('tool-column', 'btn-color');
|
|
483
|
+
padding: eleVar('tool-column', 'btn-padding');
|
|
484
|
+
margin-left: eleVar('tool-column', 'btn-space');
|
|
485
|
+
border-radius: eleVar('tool-column', 'btn-radius');
|
|
486
|
+
transition: (color $ele-transition, background-color $ele-transition);
|
|
487
|
+
box-sizing: border-box;
|
|
434
488
|
cursor: pointer;
|
|
435
489
|
|
|
436
490
|
&:hover {
|
|
437
|
-
color:
|
|
491
|
+
color: eleVar('tool-column', 'btn-hover-color');
|
|
492
|
+
background: eleVar('tool-column', 'btn-hover-bg');
|
|
438
493
|
}
|
|
439
494
|
|
|
440
495
|
&.is-active {
|
|
441
|
-
color:
|
|
496
|
+
color: eleVar('tool-column', 'btn-active-color');
|
|
497
|
+
background: eleVar('tool-column', 'btn-active-bg');
|
|
442
498
|
}
|
|
443
499
|
}
|
|
444
500
|
}
|
|
@@ -136,7 +136,7 @@ export type TableColumn = Partial<ElColumnProps>;
|
|
|
136
136
|
*/
|
|
137
137
|
export interface Column extends TableColumn {
|
|
138
138
|
/** 唯一标识 */
|
|
139
|
-
|
|
139
|
+
uid?: string;
|
|
140
140
|
/** 插槽名称 */
|
|
141
141
|
slot?: string;
|
|
142
142
|
/** 表头插槽名称 */
|
|
@@ -199,7 +199,7 @@ export type TableTool = 'reload' | 'size' | 'columns' | 'maximized';
|
|
|
199
199
|
*/
|
|
200
200
|
export interface ColItem {
|
|
201
201
|
/** 列配置标识 */
|
|
202
|
-
|
|
202
|
+
uid: string;
|
|
203
203
|
/** 字段名称 */
|
|
204
204
|
prop?: string;
|
|
205
205
|
/** 列数据标识 */
|
|
@@ -263,7 +263,7 @@ export type RowClickChecked = boolean | 'smart';
|
|
|
263
263
|
/**
|
|
264
264
|
* 获取插槽方法
|
|
265
265
|
*/
|
|
266
|
-
export type GetSlotFunc = (name
|
|
266
|
+
export type GetSlotFunc = (name?: string) => Slot | undefined;
|
|
267
267
|
/**
|
|
268
268
|
* showOverflowTooltip 属性
|
|
269
269
|
*/
|
|
@@ -272,17 +272,51 @@ export type ShowOverflowTooltip = Column['showOverflowTooltip'];
|
|
|
272
272
|
* 复合属性类型
|
|
273
273
|
*/
|
|
274
274
|
export type ProProps<T extends Record<keyof any, any>> = boolean | T;
|
|
275
|
+
/**
|
|
276
|
+
* 表格的 treeProps 属性
|
|
277
|
+
*/
|
|
278
|
+
export interface TreeProps {
|
|
279
|
+
hasChildren?: string;
|
|
280
|
+
children?: string;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* 获取含表格状态的列配置的返回结果
|
|
284
|
+
*/
|
|
285
|
+
export interface TableState {
|
|
286
|
+
/** 含筛选状态的列配置 */
|
|
287
|
+
cols: Columns;
|
|
288
|
+
/** 排序状态 */
|
|
289
|
+
sorter?: Sorter | null;
|
|
290
|
+
}
|
|
275
291
|
/**
|
|
276
292
|
* 表格实例数据
|
|
277
293
|
*/
|
|
278
294
|
export interface TableCurrent {
|
|
279
295
|
/** 当前排序参数 */
|
|
280
|
-
sorter: Sorter
|
|
296
|
+
sorter: Sorter;
|
|
281
297
|
/** 当前筛选参数 */
|
|
282
|
-
filter: Filter
|
|
298
|
+
filter: Filter;
|
|
283
299
|
/** 当前搜索参数 */
|
|
284
300
|
where: Where;
|
|
285
301
|
}
|
|
302
|
+
/**
|
|
303
|
+
* 表格实例方法
|
|
304
|
+
*/
|
|
305
|
+
export interface TableIns {
|
|
306
|
+
clearSelection: () => void;
|
|
307
|
+
getSelectionRows: () => DataItem[] | undefined;
|
|
308
|
+
toggleRowSelection: (row: DataItem, selected?: boolean) => void;
|
|
309
|
+
toggleAllSelection: () => void;
|
|
310
|
+
toggleRowExpansion: (row: DataItem, expanded?: boolean) => void;
|
|
311
|
+
setCurrentRow: (row?: DataItem | null) => void;
|
|
312
|
+
clearSort: () => void;
|
|
313
|
+
clearFilter: (columnKeys?: string[]) => void;
|
|
314
|
+
doLayout: () => void;
|
|
315
|
+
sort: (prop: string, order: string) => void;
|
|
316
|
+
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
|
|
317
|
+
setScrollTop: (top?: number) => void;
|
|
318
|
+
setScrollLeft: (left?: number) => void;
|
|
319
|
+
}
|
|
286
320
|
/**
|
|
287
321
|
* 国际化
|
|
288
322
|
*/
|
|
@@ -2,7 +2,19 @@ import type { SetupContext } from 'vue';
|
|
|
2
2
|
import type { ElTableInstance } from '../ele-app/types';
|
|
3
3
|
import type { PaginationProps } from '../ele-pagination/props';
|
|
4
4
|
import type { tableEmits } from './props';
|
|
5
|
-
import type { DataItem, Column, Columns, Sorter, Filter, Filters, OrderItem, RequestOption, ResponseOption, TablePagination, ReloadDataResult, TableSize, ColItem, CacheResult, ProProps } from './types';
|
|
5
|
+
import type { DataItem, Column, Columns, Sorter, Orders, Filter, Filters, OrderItem, RequestOption, ResponseOption, TablePagination, DatasourceResult, ResponseResult, ReloadDataResult, TableSize, ColItem, CacheResult, ProProps, TreeProps, TableCurrent, TableIns, TableState } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* 合并复合属性
|
|
8
|
+
* @param props 属性
|
|
9
|
+
* @param globalProps 全局属性
|
|
10
|
+
*/
|
|
11
|
+
export declare function mergeProps<T extends Record<keyof any, any>>(props?: ProProps<T> | null, globalProps?: ProProps<T> | null): ProProps<T>;
|
|
12
|
+
/**
|
|
13
|
+
* 获取数据某字段值
|
|
14
|
+
* @param data 数据
|
|
15
|
+
* @param field 字段, 可嵌套a.b.c
|
|
16
|
+
*/
|
|
17
|
+
export declare function getValue<T>(data: unknown, field?: string | ((d: unknown) => T)): T | undefined;
|
|
6
18
|
/**
|
|
7
19
|
* 获取默认页码
|
|
8
20
|
* @param pagination 分页组件属性
|
|
@@ -23,18 +35,24 @@ export declare function getTableLimit(pagination: boolean | TablePagination | un
|
|
|
23
35
|
* @param pageProps 分页相关的属性
|
|
24
36
|
*/
|
|
25
37
|
export declare function getPaginationProps(size: TableSize, pagination: boolean | TablePagination | undefined, globalPagination: boolean | TablePagination | undefined, pageProps?: Pick<PaginationProps, 'total' | 'pageSize' | 'currentPage'>): Partial<PaginationProps> | null;
|
|
26
|
-
/**
|
|
27
|
-
* 合并复合属性
|
|
28
|
-
* @param props 属性
|
|
29
|
-
* @param globalProps 全局属性
|
|
30
|
-
*/
|
|
31
|
-
export declare function mergeProps<T extends Record<keyof any, any>>(props?: ProProps<T> | null, globalProps?: ProProps<T> | null): ProProps<T>;
|
|
32
38
|
/**
|
|
33
39
|
* 获取是否开启自动修正页码
|
|
34
40
|
* @param pagination 分页组件属性
|
|
35
41
|
* @param globalPagination 全局配置分页组件属性
|
|
36
42
|
*/
|
|
37
43
|
export declare function isAutoAmend(pagination: boolean | TablePagination | undefined, globalPagination: boolean | TablePagination | undefined): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 获取表格默认尺寸
|
|
46
|
+
* @param cacheKey 本地缓存的键名
|
|
47
|
+
* @param size 表格尺寸
|
|
48
|
+
* @param globalSize 全局配置尺寸
|
|
49
|
+
*/
|
|
50
|
+
export declare function getTableSize(cacheKey?: string, size?: TableSize, globalSize?: TableSize): TableSize;
|
|
51
|
+
/**
|
|
52
|
+
* 获取默认筛选条件
|
|
53
|
+
* @param columns 表格的列
|
|
54
|
+
*/
|
|
55
|
+
export declare function getDefaultFilter(columns?: Columns): Filter;
|
|
38
56
|
/**
|
|
39
57
|
* 获取请求参数名称
|
|
40
58
|
* @param globalRequest 全局配置
|
|
@@ -43,28 +61,43 @@ export declare function isAutoAmend(pagination: boolean | TablePagination | unde
|
|
|
43
61
|
export declare function getRequestName(globalRequest?: RequestOption, request?: RequestOption): RequestOption;
|
|
44
62
|
/**
|
|
45
63
|
* 获取响应参数名称
|
|
46
|
-
* @param globalRequest
|
|
47
|
-
* @param request
|
|
64
|
+
* @param globalRequest 全局响应参数配置
|
|
65
|
+
* @param request 响应参数配置
|
|
48
66
|
*/
|
|
49
67
|
export declare function getResponseName(globalResponse?: ResponseOption, response?: ResponseOption): ResponseOption;
|
|
50
68
|
/**
|
|
51
|
-
*
|
|
52
|
-
* @param
|
|
53
|
-
* @param size 表格尺寸
|
|
54
|
-
* @param globalSize 全局配置尺寸
|
|
69
|
+
* 获取排序方式封装
|
|
70
|
+
* @param sorter 排序方式
|
|
55
71
|
*/
|
|
56
|
-
export declare function
|
|
72
|
+
export declare function getOrderItems(sorter?: Sorter): OrderItem[];
|
|
57
73
|
/**
|
|
58
|
-
*
|
|
59
|
-
* @param
|
|
60
|
-
* @param
|
|
74
|
+
* 生成请求的排序参数
|
|
75
|
+
* @param sorter 排序方式
|
|
76
|
+
* @param request 请求参数配置
|
|
77
|
+
* @param globalRequest 全局请求参数配置
|
|
61
78
|
*/
|
|
62
|
-
export declare function
|
|
79
|
+
export declare function getRequestOrders(sorter?: Sorter, request?: RequestOption, globalRequest?: RequestOption): Orders;
|
|
63
80
|
/**
|
|
64
|
-
*
|
|
65
|
-
* @param
|
|
81
|
+
* 生成请求的筛选参数
|
|
82
|
+
* @param filter 筛选条件
|
|
66
83
|
*/
|
|
67
|
-
export declare function
|
|
84
|
+
export declare function getRequestFilters(filter?: Filter): Filters;
|
|
85
|
+
/**
|
|
86
|
+
* 获取数据源请求结果
|
|
87
|
+
* @param data 数据源请求的原始数据
|
|
88
|
+
* @param response 响应参数配置
|
|
89
|
+
* @param globalResponse 全局响应参数配置
|
|
90
|
+
* @param lazy 表格是否开启懒加载
|
|
91
|
+
* @param treeOpt 树形表格字段名配置
|
|
92
|
+
*/
|
|
93
|
+
export declare function getResponseResult(data: DatasourceResult, response?: ResponseOption, globalResponse?: ResponseOption, lazy?: boolean, treeOpt?: TreeProps): ResponseResult;
|
|
94
|
+
/**
|
|
95
|
+
* 树形懒加载时数据增加可展开的字段标识
|
|
96
|
+
* @param data 请求数据
|
|
97
|
+
* @param lazy 表格是否开启懒加载
|
|
98
|
+
* @param treeProps 树形表格字段名配置
|
|
99
|
+
*/
|
|
100
|
+
export declare function getResponseData(data?: DataItem[], lazy?: boolean, treeProps?: TreeProps): DataItem[] | undefined;
|
|
68
101
|
/**
|
|
69
102
|
* 前端分页排序
|
|
70
103
|
* @param datasource 数据源
|
|
@@ -72,24 +105,13 @@ export declare function getOrderItems(sorter: Sorter): OrderItem[];
|
|
|
72
105
|
* @param page 页码
|
|
73
106
|
* @param limit 每页数量
|
|
74
107
|
*/
|
|
75
|
-
export declare function reloadData(datasource: DataItem[], sorter
|
|
108
|
+
export declare function reloadData(datasource: DataItem[], sorter?: Sorter, page?: number, limit?: number): ReloadDataResult;
|
|
76
109
|
/**
|
|
77
110
|
* 排序数据
|
|
78
111
|
* @param datasource 数据源
|
|
79
112
|
* @param sorter 排序方式
|
|
80
113
|
*/
|
|
81
|
-
export declare function sortData(datasource: DataItem[], sorter
|
|
82
|
-
/**
|
|
83
|
-
* 生成请求的筛选参数
|
|
84
|
-
* @param filter 筛选条件
|
|
85
|
-
*/
|
|
86
|
-
export declare function getRequestFilters(filter: Filter): Filters;
|
|
87
|
-
/**
|
|
88
|
-
* 判断选中的数据是否改变
|
|
89
|
-
* @param rows 选中的数据
|
|
90
|
-
* @param selections 当前选中的数据
|
|
91
|
-
*/
|
|
92
|
-
export declare function selectionIsChange(rows: DataItem[], selections?: DataItem[]): boolean;
|
|
114
|
+
export declare function sortData(datasource: DataItem[], sorter?: Sorter): DataItem[];
|
|
93
115
|
/**
|
|
94
116
|
* 获取列配置标识
|
|
95
117
|
* @param column 列数据
|
|
@@ -122,6 +144,16 @@ export declare function getCheckedColumns(columns: Columns | undefined, cols: Co
|
|
|
122
144
|
* @param cacheKey 缓存的名称
|
|
123
145
|
*/
|
|
124
146
|
export declare function getSettingCols(columns?: Columns, untitledText?: string, cacheKey?: string): CacheResult;
|
|
147
|
+
/**
|
|
148
|
+
* 获取列配置数据
|
|
149
|
+
* @param cols 列配置
|
|
150
|
+
*/
|
|
151
|
+
export declare function getColsResult(cols: ColItem[]): CacheResult;
|
|
152
|
+
/**
|
|
153
|
+
* 排序列配置数据
|
|
154
|
+
* @param cols 列配置数据
|
|
155
|
+
*/
|
|
156
|
+
export declare function sortCols(cols: ColItem[]): ColItem[];
|
|
125
157
|
/**
|
|
126
158
|
* 获取缓存的列配置下拉列表数据
|
|
127
159
|
* @param cacheKey 缓存的名称
|
|
@@ -140,6 +172,12 @@ export declare function getSizeCacheKey(cacheKey: string): string;
|
|
|
140
172
|
* @param cacheKey 缓存的名称
|
|
141
173
|
*/
|
|
142
174
|
export declare function getCacheSize(cacheKey?: string): TableSize;
|
|
175
|
+
/**
|
|
176
|
+
* 判断选中的数据是否改变
|
|
177
|
+
* @param rows 选中的数据
|
|
178
|
+
* @param selections 当前选中的数据
|
|
179
|
+
*/
|
|
180
|
+
export declare function selectionIsChange(rows: DataItem[], selections?: DataItem[]): boolean;
|
|
143
181
|
/**
|
|
144
182
|
* 判断行是否被禁用
|
|
145
183
|
* @param row 行数据
|
|
@@ -147,25 +185,22 @@ export declare function getCacheSize(cacheKey?: string): TableSize;
|
|
|
147
185
|
* @param columns 列配置
|
|
148
186
|
*/
|
|
149
187
|
export declare function isDisableRow(row: DataItem, index: number, columns?: Columns): boolean;
|
|
188
|
+
/**
|
|
189
|
+
* 获取表格筛选值
|
|
190
|
+
* @param tableRef 表格实例
|
|
191
|
+
*/
|
|
192
|
+
export declare function getTableFilter(tableRef?: ElTableInstance): Filter | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* 获取含表格状态的列配置
|
|
195
|
+
* @param cols 表格的列
|
|
196
|
+
* @param data 表格实例数据
|
|
197
|
+
*/
|
|
198
|
+
export declare function getTableState(cols: Columns, data: TableCurrent): TableState;
|
|
150
199
|
/**
|
|
151
200
|
* 表格默认实例方法
|
|
152
201
|
* @param getIns 获取表格实例
|
|
153
202
|
*/
|
|
154
|
-
export declare function useTableMethods(getIns: () => ElTableInstance | undefined):
|
|
155
|
-
clearSelection: () => void;
|
|
156
|
-
getSelectionRows: () => DataItem[] | undefined;
|
|
157
|
-
toggleRowSelection: (row: DataItem, selected?: boolean) => void;
|
|
158
|
-
toggleAllSelection: () => void;
|
|
159
|
-
toggleRowExpansion: (row: DataItem, expanded?: boolean) => void;
|
|
160
|
-
setCurrentRow: (row?: DataItem | null) => void;
|
|
161
|
-
clearSort: () => void;
|
|
162
|
-
clearFilter: (columnKeys?: string[]) => void;
|
|
163
|
-
doLayout: () => void;
|
|
164
|
-
sort: (prop: string, order: string) => void;
|
|
165
|
-
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
|
|
166
|
-
setScrollTop: (top?: number) => void;
|
|
167
|
-
setScrollLeft: (left?: number) => void;
|
|
168
|
-
};
|
|
203
|
+
export declare function useTableMethods(getIns: () => ElTableInstance | undefined): TableIns;
|
|
169
204
|
/**
|
|
170
205
|
* 表格默认事件
|
|
171
206
|
* @param emit 事件触发对象
|