@aloudata/aloudata-design 2.6.1 → 2.6.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.
|
@@ -66,23 +66,7 @@
|
|
|
66
66
|
|
|
67
67
|
&.ald-switch-disabled {
|
|
68
68
|
cursor: initial;
|
|
69
|
-
|
|
70
|
-
.ald-switch-btn {
|
|
71
|
-
cursor: initial;
|
|
72
|
-
background-color: @switch-btn-disabled-bgc;
|
|
73
|
-
|
|
74
|
-
&:hover {
|
|
75
|
-
background-color: @switch-btn-disabled-bgc;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&:active {
|
|
79
|
-
background-color: @switch-btn-disabled-bgc;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
* {
|
|
83
|
-
cursor: initial;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
69
|
+
pointer-events: none;
|
|
86
70
|
|
|
87
71
|
.ald-switch-text {
|
|
88
72
|
opacity: 0.5;
|
|
@@ -12,7 +12,7 @@ export default function useScroll(props: IProps): {
|
|
|
12
12
|
onBodyScroll: (e: React.UIEvent<HTMLDivElement>) => void;
|
|
13
13
|
isPingLeft: boolean;
|
|
14
14
|
isPingRight: boolean;
|
|
15
|
-
scrollbarWidth:
|
|
15
|
+
scrollbarWidth: number;
|
|
16
16
|
};
|
|
17
17
|
interface IProps {
|
|
18
18
|
scroll: IScroll;
|
package/dist/Table/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import useFixed from "./hooks/useFixed";
|
|
|
24
24
|
import useScroll from "./hooks/useScroll";
|
|
25
25
|
var HEADER_HEIGHT = 41;
|
|
26
26
|
function Table(props, ref) {
|
|
27
|
-
var _classnames, _classnames6;
|
|
27
|
+
var _classnames, _classnames5, _classnames6;
|
|
28
28
|
var columns = props.columns,
|
|
29
29
|
data = props.data,
|
|
30
30
|
rowKey = props.rowKey,
|
|
@@ -161,6 +161,7 @@ function Table(props, ref) {
|
|
|
161
161
|
// 空态切换 size 的阈值
|
|
162
162
|
var EMPTY_SMALL_SIZE_HEIGHT = 288;
|
|
163
163
|
var isSmallEmpty = totalSize && totalSize.height < EMPTY_SMALL_SIZE_HEIGHT;
|
|
164
|
+
var isEmpty = rows.length === 0 && !loading;
|
|
164
165
|
|
|
165
166
|
// 渲染 body
|
|
166
167
|
var bodyContent = /*#__PURE__*/React.createElement("div", {
|
|
@@ -168,7 +169,7 @@ function Table(props, ref) {
|
|
|
168
169
|
style: {
|
|
169
170
|
width: realWidth
|
|
170
171
|
}
|
|
171
|
-
},
|
|
172
|
+
}, isEmpty ? emptyComponent || /*#__PURE__*/React.createElement("div", {
|
|
172
173
|
className: classnames(prefixCls('empty'), _defineProperty({}, prefixCls('empty-small'), isSmallEmpty))
|
|
173
174
|
}, /*#__PURE__*/React.createElement(Empty, {
|
|
174
175
|
image: isSmallEmpty ? null : Empty.PRESENTED_IMAGE_SEARCH,
|
|
@@ -205,7 +206,7 @@ function Table(props, ref) {
|
|
|
205
206
|
style: {
|
|
206
207
|
height: y && totalSize ? totalSize.height - HEADER_HEIGHT : 'auto'
|
|
207
208
|
},
|
|
208
|
-
className: classnames(prefixCls('body-scroll'),
|
|
209
|
+
className: classnames(prefixCls('body-scroll'), (_classnames5 = {}, _defineProperty(_classnames5, prefixCls('scroll-y'), y !== undefined), _defineProperty(_classnames5, prefixCls('scroll-hidden'), isEmpty), _classnames5)),
|
|
209
210
|
ref: bodyRef,
|
|
210
211
|
onScroll: onBodyScroll
|
|
211
212
|
}, bodyContent)));
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
transition: box-shadow 0.2s;
|
|
122
122
|
content: '';
|
|
123
123
|
pointer-events: none;
|
|
124
|
-
box-shadow: inset 10px 0 8px -8px rgba(
|
|
124
|
+
box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.16);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
transition: box-shadow 0.2s;
|
|
137
137
|
content: '';
|
|
138
138
|
pointer-events: none;
|
|
139
|
-
box-shadow: inset -10px 0 8px -8px rgba(
|
|
139
|
+
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.16);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
|
|
@@ -301,6 +301,10 @@
|
|
|
301
301
|
&.@{ald}scroll-y {
|
|
302
302
|
overflow-y: scroll;
|
|
303
303
|
}
|
|
304
|
+
|
|
305
|
+
&.@{ald}scroll-hidden {
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
}
|
|
304
308
|
}
|
|
305
309
|
|
|
306
310
|
.@{ald}empty {
|