防止报width为NAN问题
This commit is contained in:
parent
e374da6180
commit
7d2f11b4fa
|
@ -11187,9 +11187,9 @@
|
|||
}
|
||||
cols = cols.concat(leafColumns.map(function (c, i, arr) {
|
||||
var width = c.width;
|
||||
if (typeof width == 'string' && width.indexOf('%') > -1) {
|
||||
if (typeof width == 'string' && width.indexOf('%') > -1 && self.contentWidth) {
|
||||
width = parseInt(self.contentWidth * parseInt(width) / 100);
|
||||
} else {
|
||||
} else if (width) {
|
||||
width = parseInt(width);
|
||||
}
|
||||
if (lastShowIndex == i) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -546,9 +546,9 @@ class Table extends Component {
|
|||
}
|
||||
cols = cols.concat(leafColumns.map((c, i, arr) => {
|
||||
let width = c.width;
|
||||
if(typeof(width)=='string' && width.indexOf('%')>-1){
|
||||
if(typeof(width)=='string' && width.indexOf('%')>-1 && self.contentWidth){
|
||||
width = parseInt(self.contentWidth * parseInt(width) /100);
|
||||
}else{
|
||||
}else if(width){
|
||||
width = parseInt(width);
|
||||
}
|
||||
if (lastShowIndex == i) {
|
||||
|
|
Loading…
Reference in New Issue