onesight-charts 0.2.4 → 0.2.6
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.
|
@@ -29,7 +29,9 @@ function HorizontalBar(props) {
|
|
|
29
29
|
_props$color = props.color,
|
|
30
30
|
color = _props$color === void 0 ? '#1da9a0' : _props$color,
|
|
31
31
|
_props$clickFlag = props.clickFlag,
|
|
32
|
-
clickFlag = _props$clickFlag === void 0 ? true : _props$clickFlag
|
|
32
|
+
clickFlag = _props$clickFlag === void 0 ? true : _props$clickFlag,
|
|
33
|
+
_props$callbackGetPag = props.callbackGetPage,
|
|
34
|
+
callbackGetPage = _props$callbackGetPag === void 0 ? function () {} : _props$callbackGetPag;
|
|
33
35
|
|
|
34
36
|
// 总数页码数
|
|
35
37
|
var _useState = useState(0),
|
|
@@ -80,6 +82,7 @@ function HorizontalBar(props) {
|
|
|
80
82
|
}
|
|
81
83
|
item.rate = rate;
|
|
82
84
|
});
|
|
85
|
+
callbackGetPage(currentPage);
|
|
83
86
|
setBarData(splice_data);
|
|
84
87
|
}, [currentPage, JSON.stringify(data)]);
|
|
85
88
|
var handlePopoverMouseEnter = function handlePopoverMouseEnter(index) {
|
package/es/index.d.ts
CHANGED
|
@@ -49,7 +49,9 @@ function HorizontalBar(props) {
|
|
|
49
49
|
tooltipOnlyShowPer = false,
|
|
50
50
|
showProportion = false,
|
|
51
51
|
color = "#1da9a0",
|
|
52
|
-
clickFlag = true
|
|
52
|
+
clickFlag = true,
|
|
53
|
+
callbackGetPage = () => {
|
|
54
|
+
}
|
|
53
55
|
} = props;
|
|
54
56
|
const [total, setTotal] = (0, import_react.useState)(0);
|
|
55
57
|
const [hoveredIndex, setHoveredIndex] = (0, import_react.useState)(null);
|
|
@@ -82,6 +84,7 @@ function HorizontalBar(props) {
|
|
|
82
84
|
}
|
|
83
85
|
item.rate = rate;
|
|
84
86
|
});
|
|
87
|
+
callbackGetPage(currentPage);
|
|
85
88
|
setBarData(splice_data);
|
|
86
89
|
}, [currentPage, JSON.stringify(data)]);
|
|
87
90
|
const handlePopoverMouseEnter = (index) => {
|
package/lib/index.d.ts
CHANGED