fix: 懒加载树表场景中,data动态获取需终止treeIndex

This commit is contained in:
izbz wh 2019-06-19 18:01:30 +08:00
parent 0cddb2738f
commit b6cb07f9ac
11 changed files with 79 additions and 83 deletions

View File

@ -153,13 +153,6 @@
.u-loading.u-loading-line.u-loading-line-warning > div { .u-loading.u-loading-line.u-loading-line-warning > div {
background-color: #ff9800; } background-color: #ff9800; }
.u-loading.u-loading-custom > div {
position: absolute;
left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%); }
@keyframes line-scale { @keyframes line-scale {
0% { 0% {
-webkit-transform: scaley(1); -webkit-transform: scaley(1);

View File

@ -335,6 +335,7 @@ function bigData(Table) {
var isTree = _this4.props.isTree; var isTree = _this4.props.isTree;
var isTreeType = isTree ? true : _this4.checkIsTreeType(); var isTreeType = isTree ? true : _this4.checkIsTreeType();
treeTypeIndex = 0;
if (isTreeType) { if (isTreeType) {
data.forEach(function (item, index) { data.forEach(function (item, index) {
_this4.firstLevelKey[index] = _this4.getRowKey(item, index); _this4.firstLevelKey[index] = _this4.getRowKey(item, index);

1
dist/demo.js vendored
View File

@ -212329,6 +212329,7 @@
var isTree = _this4.props.isTree; var isTree = _this4.props.isTree;
var isTreeType = isTree ? true : _this4.checkIsTreeType(); var isTreeType = isTree ? true : _this4.checkIsTreeType();
treeTypeIndex = 0;
if (isTreeType) { if (isTreeType) {
data.forEach(function (item, index) { data.forEach(function (item, index) {
_this4.firstLevelKey[index] = _this4.getRowKey(item, index); _this4.firstLevelKey[index] = _this4.getRowKey(item, index);

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "bee-table", "name": "bee-table",
"version": "2.1.3", "version": "2.1.3-beta.2",
"description": "Table ui component for react", "description": "Table ui component for react",
"keywords": [ "keywords": [
"react", "react",

View File

@ -85,6 +85,7 @@ export default function bigData(Table) {
computeCachedRowParentIndex = data => { computeCachedRowParentIndex = data => {
const {isTree} = this.props; const {isTree} = this.props;
const isTreeType = isTree?true:this.checkIsTreeType(); const isTreeType = isTree?true:this.checkIsTreeType();
treeTypeIndex=0;
if (isTreeType) { if (isTreeType) {
data.forEach((item, index) => { data.forEach((item, index) => {
this.firstLevelKey[index] = this.getRowKey(item, index); this.firstLevelKey[index] = this.getRowKey(item, index);