@aloudata/aloudata-design 2.15.1 → 2.15.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.
|
@@ -77,17 +77,6 @@ export default function Radio(props) {
|
|
|
77
77
|
'ald-radio-wrapper-disabled': radioProps.disabled
|
|
78
78
|
});
|
|
79
79
|
};
|
|
80
|
-
var onChange = function onChange(e) {
|
|
81
|
-
var _props$onChange;
|
|
82
|
-
if (groupContext !== null && groupContext !== void 0 && groupContext.onChange) {
|
|
83
|
-
// input事件的value会被toString,所以此处进行一个覆盖
|
|
84
|
-
groupContext.onChange(props.value);
|
|
85
|
-
}
|
|
86
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, e);
|
|
87
|
-
if (_.isEmpty(groupContext)) {
|
|
88
|
-
setChecked(e.target.checked);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
80
|
return /*#__PURE__*/React.createElement("label", {
|
|
92
81
|
className: getWrapperClass(),
|
|
93
82
|
htmlFor: id,
|
|
@@ -101,7 +90,6 @@ export default function Radio(props) {
|
|
|
101
90
|
defaultChecked: checked,
|
|
102
91
|
disabled: radioProps.disabled,
|
|
103
92
|
value: props.value,
|
|
104
|
-
onChange: onChange,
|
|
105
93
|
onClick: function onClick(e) {
|
|
106
94
|
var _props$onClick;
|
|
107
95
|
(_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, e);
|
package/dist/Table/index.js
CHANGED
|
@@ -52,6 +52,10 @@ function Table(props, ref) {
|
|
|
52
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
53
53
|
totalSize = _useState2[0],
|
|
54
54
|
setTotalSize = _useState2[1];
|
|
55
|
+
var _useState3 = useState(null),
|
|
56
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
57
|
+
hoverRowId = _useState4[0],
|
|
58
|
+
setHoverRowId = _useState4[1];
|
|
55
59
|
var y = scroll.y;
|
|
56
60
|
var _useScroll = useScroll({
|
|
57
61
|
totalSize: totalSize,
|
|
@@ -221,11 +225,17 @@ function Table(props, ref) {
|
|
|
221
225
|
var rowNode = /*#__PURE__*/React.createElement("div", {
|
|
222
226
|
key: rowId,
|
|
223
227
|
"data-index": virtual ? rowData.index : rowIndex,
|
|
224
|
-
className: classnames(prefixCls('tr'), (_classnames4 = {}, _defineProperty(_classnames4, prefixCls('row-hover'),
|
|
228
|
+
className: classnames(prefixCls('tr'), (_classnames4 = {}, _defineProperty(_classnames4, prefixCls('row-hover'), hoverRowId === rowId), _defineProperty(_classnames4, prefixCls('no-border-tr'), isShowPagination && rowIndex === rows.length - 1), _classnames4), rowClassName(row.original, rowIndex)),
|
|
225
229
|
ref: function ref(node) {
|
|
226
230
|
return rowVirtualizer.measureElement(node);
|
|
227
231
|
},
|
|
228
232
|
onClick: onClickRow(row.original, rowIndex),
|
|
233
|
+
onMouseEnter: function onMouseEnter() {
|
|
234
|
+
return setHoverRowId(rowId);
|
|
235
|
+
},
|
|
236
|
+
onMouseLeave: function onMouseLeave() {
|
|
237
|
+
return setHoverRowId(null);
|
|
238
|
+
},
|
|
229
239
|
style: virtual ? {
|
|
230
240
|
position: 'absolute',
|
|
231
241
|
transform: "translateY(".concat(rowData.start, "px)")
|
|
@@ -221,14 +221,9 @@
|
|
|
221
221
|
min-height: 96px;
|
|
222
222
|
|
|
223
223
|
.ald-table-tr {
|
|
224
|
-
&.ald-table-row-hover
|
|
225
|
-
cursor: pointer;
|
|
226
|
-
|
|
224
|
+
&.ald-table-row-hover {
|
|
227
225
|
.ald-table-td {
|
|
228
|
-
background-color:
|
|
229
|
-
--alias-colors-bg-interaction-hover,
|
|
230
|
-
rgba(0, 0, 0, 0.05)
|
|
231
|
-
);
|
|
226
|
+
background-color: #f9fafb;
|
|
232
227
|
}
|
|
233
228
|
}
|
|
234
229
|
}
|