@aloudata/aloudata-design 2.6.1 → 2.6.3

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;
@@ -19,7 +19,7 @@ export declare function getTableColumns<TDataItem extends object>({ columns, tot
19
19
  render?: ((text: any, record: TDataItem, rowIndex: number) => import("react").ReactNode) | undefined;
20
20
  ellipsis?: boolean | undefined;
21
21
  noPadding?: boolean | undefined;
22
- align?: "center" | "left" | "right" | undefined;
22
+ align?: "left" | "center" | "right" | undefined;
23
23
  fixed?: "left" | "right" | undefined;
24
24
  };
25
25
  }[];
@@ -145,7 +145,7 @@ export function prefixCls(className) {
145
145
  return "".concat(ALD_PREFIX, "-").concat(className);
146
146
  }
147
147
  export function getRowKey(row, rowKey, defaultKey) {
148
- var rowKeyStr = defaultKey || getUUID();
148
+ var rowKeyStr = defaultKey !== null && defaultKey !== void 0 ? defaultKey : getUUID();
149
149
  if (typeof rowKey === 'function') {
150
150
  rowKeyStr = rowKey(row);
151
151
  } else if (rowKey !== undefined) {
@@ -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: any;
15
+ scrollbarWidth: number;
16
16
  };
17
17
  interface IProps {
18
18
  scroll: IScroll;
@@ -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
- }, rows.length === 0 && !loading ? emptyComponent || /*#__PURE__*/React.createElement("div", {
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,
@@ -190,7 +191,7 @@ function Table(props, ref) {
190
191
  style: _objectSpread({
191
192
  width: cell.column.getSize()
192
193
  }, fixedStyle)
193
- }, colIndex === 0 ? /*#__PURE__*/React.createElement(ExpandCell, {
194
+ }, expandableInfo.isExpandable && colIndex === 0 ? /*#__PURE__*/React.createElement(ExpandCell, {
194
195
  expandableInfo: expandableInfo,
195
196
  data: row.original,
196
197
  rowKey: rowKey
@@ -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'), _defineProperty({}, prefixCls('scroll-y'), y !== undefined)),
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(5, 5, 5, 0.06);
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(5, 5, 5, 0.06);
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 {
@@ -117,7 +117,6 @@
117
117
 
118
118
  &.ald-tree-node-selected {
119
119
  background: var(--alias-colors-bg-selected-default, #e8f2fe);
120
- color: var(--alias-colors-text-selected, #126fdd);
121
120
  font-size: 12px;
122
121
  font-weight: 400;
123
122
  line-height: 16px;