Permalink
Browse files

fix: 优化IE下树的展示

  • Loading branch information...
1 parent 1d5913d commit db173f0bcd49e28ffac85f892f5865d62dbd4744 liuyk committed Dec 29, 2016
Showing with 8 additions and 6 deletions.
  1. +1 −1 css/tree.css
  2. +7 −5 js/treeComp.js
View
@@ -439,7 +439,7 @@ ul.ztree.zTreeDragUL {
}
.ztree li span.button.switch {
- position: relative;
+ position: absolute;
z-index: 1000;
line-height: 21px;
}
View
@@ -1196,16 +1196,18 @@
fontStyle = [];
if(setting.check.enable){
- pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level+1)+'px';
+ pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level+1) + 30 +'px';
+ mLeft = checkboxLength+parPaddingLeft+iconLength*(node.level+1) +'px';
}else{
- pLeft=parPaddingLeft+iconLength*(node.level+1)+'px';
+ pLeft=parPaddingLeft+iconLength*(node.level+1)+30+'px';
+ mLeft=parPaddingLeft+iconLength*(node.level+1)+'px';
}
fontStyle.push('padding-left', ":",pLeft, ";");
- fontStyle.push('margin-left', ":", '-'+pLeft, ";");
+ fontStyle.push('margin-left', ":", '-'+mLeft, ";");
// 将a标签的宽度根据上级100%再加上层级之间的padding值算出
- parDomWidth='calc(100% + '+18*(node.level+1) +'px )';
+ parDomWidth='calc(100% + '+18*(node.level+1) +'px )';
- fontStyle.push('min-width', ":", parDomWidth, ";");
+ fontStyle.push('width', ":", parDomWidth, ";");
for (var f in fontcss) {
fontStyle.push(f, ":", fontcss[f], ";");
}

0 comments on commit db173f0

Please sign in to comment.