宽度差计算

This commit is contained in:
wanghaoo 2018-11-19 23:35:33 +08:00
parent 4170955482
commit 479401e84a
1 changed files with 2 additions and 1 deletions

View File

@ -217,7 +217,8 @@ class Table extends Component {
this.contentWidth = this.contentDomWidth;//默认与容器宽度一样
this.domWidthDiff = this.contentDomWidth - this.computeWidth;
if (typeof (setWidthParam) == 'string' && setWidthParam.indexOf('%')) {
this.contentWidth = this.contentWidth * parseInt(setWidthParam) / 100
this.contentWidth = this.contentWidth * parseInt(setWidthParam) / 100;
this.domWidthDiff = this.contentDomWidth - this.contentWidth;
}
}