@hi-ui/table 4.3.2-alpha.0 → 4.3.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @hi-ui/table
|
|
2
2
|
|
|
3
|
+
## 4.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2672](https://github.com/XiaoMi/hiui/pull/2672) [`1ebe27830`](https://github.com/XiaoMi/hiui/commit/1ebe2783098b3a8cd980bd10076d67635463800e) Thanks [@zyprepare](https://github.com/zyprepare)! - build: 升级到 rollup3,重新构建发布组件
|
|
8
|
+
|
|
9
|
+
- [#2671](https://github.com/XiaoMi/hiui/pull/2671) [`6d7909444`](https://github.com/XiaoMi/hiui/commit/6d790944418f36689b34805f858a1268530864b9) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复组件参数类型错误
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`1ebe27830`](https://github.com/XiaoMi/hiui/commit/1ebe2783098b3a8cd980bd10076d67635463800e)]:
|
|
12
|
+
- @hi-ui/core@4.0.6
|
|
13
|
+
- @hi-ui/use-cache@4.0.2
|
|
14
|
+
- @hi-ui/use-check@4.0.3
|
|
15
|
+
- @hi-ui/use-check-state@4.0.2
|
|
16
|
+
- @hi-ui/use-drag-sorter@4.0.2
|
|
17
|
+
- @hi-ui/use-latest@4.0.2
|
|
18
|
+
- @hi-ui/use-toggle@4.0.2
|
|
19
|
+
- @hi-ui/use-uncontrolled-state@4.0.2
|
|
20
|
+
- @hi-ui/use-update-effect@4.0.2
|
|
21
|
+
- @hi-ui/icons@4.0.16
|
|
22
|
+
- @hi-ui/button@4.0.7
|
|
23
|
+
- @hi-ui/checkbox@4.0.6
|
|
24
|
+
- @hi-ui/drawer@4.1.1
|
|
25
|
+
- @hi-ui/empty-state@4.0.5
|
|
26
|
+
- @hi-ui/icon-button@4.0.6
|
|
27
|
+
- @hi-ui/loading@4.1.1
|
|
28
|
+
- @hi-ui/pagination@4.0.12
|
|
29
|
+
- @hi-ui/popper@4.1.1
|
|
30
|
+
- @hi-ui/select@4.2.3
|
|
31
|
+
- @hi-ui/spinner@4.0.6
|
|
32
|
+
- @hi-ui/array-utils@4.0.2
|
|
33
|
+
- @hi-ui/classname@4.0.2
|
|
34
|
+
- @hi-ui/dom-utils@4.0.5
|
|
35
|
+
- @hi-ui/env@4.0.2
|
|
36
|
+
- @hi-ui/func-utils@4.0.2
|
|
37
|
+
- @hi-ui/object-utils@4.0.2
|
|
38
|
+
- @hi-ui/react-utils@4.0.2
|
|
39
|
+
- @hi-ui/times@4.0.2
|
|
40
|
+
- @hi-ui/tree-utils@4.1.2
|
|
41
|
+
- @hi-ui/type-assertion@4.0.2
|
|
42
|
+
|
|
3
43
|
## 4.3.1
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|
|
@@ -61,8 +61,8 @@ var Scrollbar = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
61
61
|
if (containerElement) {
|
|
62
62
|
setPs(new perfectScrollbar_esm["default"](containerElement));
|
|
63
63
|
}
|
|
64
|
-
}, [containerElement]);
|
|
65
|
-
|
|
64
|
+
}, [containerElement]);
|
|
65
|
+
// 轴定制
|
|
66
66
|
React.useEffect(function () {
|
|
67
67
|
if (ps) {
|
|
68
68
|
ps.settings.suppressScrollX = true;
|
|
@@ -75,8 +75,8 @@ var Scrollbar = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
75
75
|
}
|
|
76
76
|
ps.update();
|
|
77
77
|
}
|
|
78
|
-
}, [ps, axes]);
|
|
79
|
-
|
|
78
|
+
}, [ps, axes]);
|
|
79
|
+
// 监听容器以及内容尺寸
|
|
80
80
|
React.useEffect(function () {
|
|
81
81
|
if (ps && wrapperElement && containerElement) {
|
|
82
82
|
var observer = new ResizeObserver(function (entries) {
|
|
@@ -113,12 +113,12 @@ var Scrollbar = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
113
113
|
};
|
|
114
114
|
}, [rest]),
|
|
115
115
|
eventProps = _useMemo.eventProps,
|
|
116
|
-
injectProps = _useMemo.injectProps;
|
|
117
|
-
|
|
116
|
+
injectProps = _useMemo.injectProps;
|
|
117
|
+
// 更新event props引用
|
|
118
118
|
React.useEffect(function () {
|
|
119
119
|
eventPropsRef.current = eventProps;
|
|
120
|
-
}, [eventProps]);
|
|
121
|
-
|
|
120
|
+
}, [eventProps]);
|
|
121
|
+
// 注册监听事件
|
|
122
122
|
React.useEffect(function () {
|
|
123
123
|
if (containerElement) {
|
|
124
124
|
Object.keys(index.ScrollbarEventToPsMap).forEach(function (event) {
|
|
@@ -59,8 +59,8 @@ var Scrollbar = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
59
59
|
if (containerElement) {
|
|
60
60
|
setPs(new PerfectScrollbar(containerElement));
|
|
61
61
|
}
|
|
62
|
-
}, [containerElement]);
|
|
63
|
-
|
|
62
|
+
}, [containerElement]);
|
|
63
|
+
// 轴定制
|
|
64
64
|
useEffect(function () {
|
|
65
65
|
if (ps) {
|
|
66
66
|
ps.settings.suppressScrollX = true;
|
|
@@ -73,8 +73,8 @@ var Scrollbar = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
73
73
|
}
|
|
74
74
|
ps.update();
|
|
75
75
|
}
|
|
76
|
-
}, [ps, axes]);
|
|
77
|
-
|
|
76
|
+
}, [ps, axes]);
|
|
77
|
+
// 监听容器以及内容尺寸
|
|
78
78
|
useEffect(function () {
|
|
79
79
|
if (ps && wrapperElement && containerElement) {
|
|
80
80
|
var observer = new ResizeObserver(function (entries) {
|
|
@@ -111,12 +111,12 @@ var Scrollbar = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
111
111
|
};
|
|
112
112
|
}, [rest]),
|
|
113
113
|
eventProps = _useMemo.eventProps,
|
|
114
|
-
injectProps = _useMemo.injectProps;
|
|
115
|
-
|
|
114
|
+
injectProps = _useMemo.injectProps;
|
|
115
|
+
// 更新event props引用
|
|
116
116
|
useEffect(function () {
|
|
117
117
|
eventPropsRef.current = eventProps;
|
|
118
|
-
}, [eventProps]);
|
|
119
|
-
|
|
118
|
+
}, [eventProps]);
|
|
119
|
+
// 注册监听事件
|
|
120
120
|
useEffect(function () {
|
|
121
121
|
if (containerElement) {
|
|
122
122
|
Object.keys(ScrollbarEventToPsMap).forEach(function (event) {
|
package/lib/types/BaseTable.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { HiBaseHTMLProps } from '@hi-ui/core';
|
|
2
|
+
import { HiBaseHTMLProps, HiBaseSizeEnum } from '@hi-ui/core';
|
|
3
3
|
import { TableExtra, TableColumnItem, TableOnRowReturn } from './types';
|
|
4
4
|
import { UseTableProps } from './use-table';
|
|
5
5
|
import { UseEmbedExpandProps } from './hooks/use-embed-expand';
|
|
@@ -30,7 +30,7 @@ export interface BaseTableProps extends Omit<HiBaseHTMLProps<'div'>, 'onDrop' |
|
|
|
30
30
|
/**
|
|
31
31
|
* 配置表格尺寸
|
|
32
32
|
*/
|
|
33
|
-
size?:
|
|
33
|
+
size?: HiBaseSizeEnum;
|
|
34
34
|
/**
|
|
35
35
|
* 底部吸底
|
|
36
36
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/table",
|
|
3
|
-
"version": "4.3.2
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
|
@@ -43,46 +43,46 @@
|
|
|
43
43
|
"url": "https://github.com/XiaoMi/hiui/issues"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@hi-ui/array-utils": "^4.0.
|
|
47
|
-
"@hi-ui/button": "^4.0.
|
|
48
|
-
"@hi-ui/checkbox": "^4.0.
|
|
49
|
-
"@hi-ui/classname": "^4.0.
|
|
50
|
-
"@hi-ui/dom-utils": "^4.0.
|
|
51
|
-
"@hi-ui/drawer": "^4.
|
|
52
|
-
"@hi-ui/empty-state": "^4.0.
|
|
53
|
-
"@hi-ui/env": "^4.0.
|
|
54
|
-
"@hi-ui/func-utils": "^4.0.
|
|
55
|
-
"@hi-ui/icon-button": "^4.0.
|
|
56
|
-
"@hi-ui/icons": "^4.0.
|
|
57
|
-
"@hi-ui/loading": "^4.1.
|
|
58
|
-
"@hi-ui/object-utils": "^4.0.
|
|
59
|
-
"@hi-ui/pagination": "^4.0.
|
|
60
|
-
"@hi-ui/popper": "^4.1.
|
|
61
|
-
"@hi-ui/react-utils": "^4.0.
|
|
62
|
-
"@hi-ui/select": "^4.2.
|
|
63
|
-
"@hi-ui/spinner": "^4.0.
|
|
64
|
-
"@hi-ui/times": "^4.0.
|
|
65
|
-
"@hi-ui/tree-utils": "^4.1.
|
|
66
|
-
"@hi-ui/type-assertion": "^4.0.
|
|
67
|
-
"@hi-ui/use-cache": "^4.0.
|
|
68
|
-
"@hi-ui/use-check": "^4.0.
|
|
69
|
-
"@hi-ui/use-check-state": "^4.0.
|
|
70
|
-
"@hi-ui/use-drag-sorter": "^4.0.
|
|
71
|
-
"@hi-ui/use-latest": "^4.0.
|
|
72
|
-
"@hi-ui/use-toggle": "^4.0.
|
|
73
|
-
"@hi-ui/use-uncontrolled-state": "^4.0.
|
|
74
|
-
"@hi-ui/use-update-effect": "^4.0.
|
|
46
|
+
"@hi-ui/array-utils": "^4.0.2",
|
|
47
|
+
"@hi-ui/button": "^4.0.7",
|
|
48
|
+
"@hi-ui/checkbox": "^4.0.6",
|
|
49
|
+
"@hi-ui/classname": "^4.0.2",
|
|
50
|
+
"@hi-ui/dom-utils": "^4.0.5",
|
|
51
|
+
"@hi-ui/drawer": "^4.1.1",
|
|
52
|
+
"@hi-ui/empty-state": "^4.0.5",
|
|
53
|
+
"@hi-ui/env": "^4.0.2",
|
|
54
|
+
"@hi-ui/func-utils": "^4.0.2",
|
|
55
|
+
"@hi-ui/icon-button": "^4.0.6",
|
|
56
|
+
"@hi-ui/icons": "^4.0.16",
|
|
57
|
+
"@hi-ui/loading": "^4.1.1",
|
|
58
|
+
"@hi-ui/object-utils": "^4.0.2",
|
|
59
|
+
"@hi-ui/pagination": "^4.0.12",
|
|
60
|
+
"@hi-ui/popper": "^4.1.1",
|
|
61
|
+
"@hi-ui/react-utils": "^4.0.2",
|
|
62
|
+
"@hi-ui/select": "^4.2.3",
|
|
63
|
+
"@hi-ui/spinner": "^4.0.6",
|
|
64
|
+
"@hi-ui/times": "^4.0.2",
|
|
65
|
+
"@hi-ui/tree-utils": "^4.1.2",
|
|
66
|
+
"@hi-ui/type-assertion": "^4.0.2",
|
|
67
|
+
"@hi-ui/use-cache": "^4.0.2",
|
|
68
|
+
"@hi-ui/use-check": "^4.0.3",
|
|
69
|
+
"@hi-ui/use-check-state": "^4.0.2",
|
|
70
|
+
"@hi-ui/use-drag-sorter": "^4.0.2",
|
|
71
|
+
"@hi-ui/use-latest": "^4.0.2",
|
|
72
|
+
"@hi-ui/use-toggle": "^4.0.2",
|
|
73
|
+
"@hi-ui/use-uncontrolled-state": "^4.0.2",
|
|
74
|
+
"@hi-ui/use-update-effect": "^4.0.2",
|
|
75
75
|
"axios": "^1.5.0",
|
|
76
76
|
"react-resizable": "^3.0.4"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@hi-ui/core": ">=4.0.
|
|
79
|
+
"@hi-ui/core": ">=4.0.6",
|
|
80
80
|
"react": ">=16.8.6",
|
|
81
81
|
"react-dom": ">=16.8.6"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@hi-ui/core": "^4.0.
|
|
85
|
-
"@hi-ui/core-css": "^4.1.
|
|
84
|
+
"@hi-ui/core": "^4.0.6",
|
|
85
|
+
"@hi-ui/core-css": "^4.1.3",
|
|
86
86
|
"@types/react-resizable": "^1.7.4",
|
|
87
87
|
"react": "^17.0.1",
|
|
88
88
|
"react-dom": "^17.0.1"
|