Permalink
Browse files

fix: 节点长度过长时显示省略号

  • Loading branch information...
whizbz11 committed Dec 30, 2016
1 parent 5ca2a70 commit 6be2f4722f4859720285ee56dde80704be195dde
Showing with 25 additions and 10 deletions.
  1. +8 −0 css/tree.css
  2. +5 −3 dist/css/tree.css
  3. +1 −1 dist/css/tree.min.css
  4. +10 −5 dist/js/u-tree.js
  5. +1 −1 dist/js/u-tree.min.js
View
@@ -100,6 +100,14 @@ website: http://code.google.com/p/jquerytree/
line-height: 16px;
margin-right: 2px;
}
.ztree li > a > span:last-child {
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
width: 80%;
}
.ztree li span.button {
line-height: 0;
margin: 0;
View
@@ -194,8 +194,10 @@ website: http://code.google.com/p/jquerytree/
// width: 21px;
// height: 15px;
width: 21px;
height: 21px;
// width: 21px;
// height: 21px;
width: 18px;
height: 18px;
}
.ztree li span.button.root_open {
background-position: -92px -54px;
@@ -441,7 +443,7 @@ ul.ztree.zTreeDragUL {
border-color: #bcbcbc;
}
.ztree li.focusNode span.button.switch {
.ztree li.focusNode>span.button.switch {
color: #FFFFFF;
}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1198,16 +1198,21 @@
// parPaddingLeft=parseInt(setting.treeObj.css('paddingLeft')),
parPaddingLeft=9,
checkboxLength=18,
iconLength=21,
// 第一个图片的宽度
iconLength=18,
pLeft,
fontStyle = [];
if(setting.check.enable){
pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level+1) + 30 +'px';
mLeft = checkboxLength+parPaddingLeft+iconLength*(node.level+1) +'px';
// pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level+1) + 30 +'px';
// 因为a标签前面的图标设置成了absolute,所以忽略前面的宽度即减去21px
pLeft=checkboxLength+parPaddingLeft+iconLength*(node.level) + 30 +'px';
mLeft = checkboxLength+parPaddingLeft+iconLength*(node.level) +'px';
}else{
pLeft=parPaddingLeft+iconLength*(node.level+1)+30+'px';
mLeft=parPaddingLeft+iconLength*(node.level+1)+'px';
pLeft=parPaddingLeft+iconLength*(node.level)+30+'px';
mLeft=parPaddingLeft+iconLength*(node.level)+'px';
}
fontStyle.push('padding-left', ":",pLeft, ";");
fontStyle.push('margin-left', ":", '-'+mLeft, ";");
View

Large diffs are not rendered by default.

Oops, something went wrong.

0 comments on commit 6be2f47

Please sign in to comment.