shineout 2.0.3 → 2.0.5-beta.1
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/css/Select/Props.d.ts +1 -1
- package/css/Table/SimpleTable.d.ts +1 -0
- package/css/Table/SimpleTable.js +19 -1
- package/css/index.js +1 -1
- package/dist/shineout.js +942 -776
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/es/Select/Props.d.ts +1 -1
- package/es/Table/SimpleTable.d.ts +1 -0
- package/es/Table/SimpleTable.js +20 -1
- package/es/index.js +1 -1
- package/lib/Select/Props.d.ts +1 -1
- package/lib/Table/SimpleTable.d.ts +1 -0
- package/lib/Table/SimpleTable.js +19 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/css/Select/Props.d.ts
CHANGED
|
@@ -485,7 +485,7 @@ export interface GroupProps<Item, Value> extends Omit<BaseSelectProps<Item, Valu
|
|
|
485
485
|
*/
|
|
486
486
|
groupKey: string;
|
|
487
487
|
}
|
|
488
|
-
export declare type GetFilterProps<Props, Item> = Omit<Props, 'filterText' | 'result' | 'innerData' | 'onFilter' | 'data' | 'inputText' | 'inputable'> & {
|
|
488
|
+
export declare type GetFilterProps<Props, Item> = Omit<Props, 'filterText' | 'result' | 'innerData' | 'onFilter' | 'data' | 'inputText' | 'inputable' | 'getResultByValue'> & {
|
|
489
489
|
/**
|
|
490
490
|
* @en Options data
|
|
491
491
|
* @cn 筛选后是否展示命中节点的后代节点
|
|
@@ -16,6 +16,7 @@ declare class SimpleTable<DataItem, Value> extends PureComponent<SimpleTableProp
|
|
|
16
16
|
header: HTMLDivElement;
|
|
17
17
|
footer: HTMLDivElement;
|
|
18
18
|
lastColGroup: number[];
|
|
19
|
+
cyclicCounter: number;
|
|
19
20
|
constructor(props: SimpleTableProps<DataItem, Value>);
|
|
20
21
|
componentDidMount(): void;
|
|
21
22
|
componentDidUpdate(prevProps: SimpleTableProps<DataItem, Value>): void;
|
package/css/Table/SimpleTable.js
CHANGED
|
@@ -58,6 +58,7 @@ function (_PureComponent) {
|
|
|
58
58
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "header", void 0);
|
|
59
59
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "footer", void 0);
|
|
60
60
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "lastColGroup", void 0);
|
|
61
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), "cyclicCounter", void 0);
|
|
61
62
|
_this.state = {
|
|
62
63
|
colgroup: undefined,
|
|
63
64
|
overHeight: false,
|
|
@@ -70,7 +71,10 @@ function (_PureComponent) {
|
|
|
70
71
|
_this.bindFooter = _this.bindElement.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)), 'footer');
|
|
71
72
|
_this.handleScroll = _this.handleScroll.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
72
73
|
_this.handleColgroup = _this.handleColgroup.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
73
|
-
_this.resetColGroup = _this.resetColGroup.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
|
|
74
|
+
_this.resetColGroup = _this.resetColGroup.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this))); // 循环计数器。某些情况[*]下滚动条的出现会导致死循环问题,这里做一个计数器,超过一定次数就不再重置,认定最大 10 次为死循环
|
|
75
|
+
// [*] 横向滚动条的出现可能导致竖向滚动条从有到无。此时需要重新计算表头的宽度,否则会出现表头与表格内容不对齐的问题。纵向滚动条消失后,可能导致横向滚动条宽度足够,纵向滚动条再次出现,又导致横向滚动条消失,如此循环。
|
|
76
|
+
|
|
77
|
+
_this.cyclicCounter = 0;
|
|
74
78
|
return _this;
|
|
75
79
|
}
|
|
76
80
|
|
|
@@ -125,7 +129,17 @@ function (_PureComponent) {
|
|
|
125
129
|
};
|
|
126
130
|
|
|
127
131
|
_proto.scrollCheck = function scrollCheck() {
|
|
132
|
+
var _this2 = this;
|
|
133
|
+
|
|
128
134
|
if (!this.body) return;
|
|
135
|
+
|
|
136
|
+
if (this.cyclicCounter > 10) {
|
|
137
|
+
this.setState({
|
|
138
|
+
overHeight: true
|
|
139
|
+
});
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
|
|
129
143
|
var overHeight = this.body.scrollHeight > this.body.clientHeight;
|
|
130
144
|
var overWidth = this.body.scrollWidth > this.body.clientWidth;
|
|
131
145
|
if (overWidth !== this.state.overWidth) this.setState({
|
|
@@ -134,6 +148,10 @@ function (_PureComponent) {
|
|
|
134
148
|
if (overHeight !== this.state.overHeight) this.setState({
|
|
135
149
|
overHeight: overHeight
|
|
136
150
|
});
|
|
151
|
+
this.cyclicCounter += 1;
|
|
152
|
+
setTimeout(function () {
|
|
153
|
+
_this2.cyclicCounter = 0;
|
|
154
|
+
});
|
|
137
155
|
};
|
|
138
156
|
|
|
139
157
|
_proto.handleSortChange = function handleSortChange(finalOrder, sorter, index, cancelOrder, // 是否是自动触发
|