We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
作者在源码中将witdh 写死在了160px 导致如果label长度大于160 会被忽略掉,我将你的源码中这段css删除后可以正常显示完成的label了,但是发现当展开三级之后,还是会因为label过长导致样式错位 后来发现您源码中动态改变菜单宽度的代码 // 改变菜单宽度 setPopperWidth() { let width = (160 + 1) * this.casTree.length; document.getElementsByClassName(this.classRef)[0].style.width = width + "px"; }
// 改变菜单宽度 setPopperWidth() { let width = (160 + 1) * this.casTree.length; document.getElementsByClassName(this.classRef)[0].style.width = width + "px"; }
源码中 设置了 .cascader-popper {width:100%}
.cascader-popper {width:100%}
我尝试将这些代码删除,解决了这个问题
不知道作者当初设置这些代码的原因是什么 这里依然是基于160 * 子菜单个数算的,这依然限制了面板的长度,导致错位了,请问作者对这个问题怎么解决
The text was updated successfully, but these errors were encountered:
建议删除 main.vue 中的
setPopperWidth() { let width = (160 + 1) * this.casTree.length; let el = document.getElementsByClassName(this.classRef)[0]; if(el){ el.style.width = width + "px"; } }
.cascader-popper { width: 100%; }
.cascader-menu { width: 160px !important; }
Sorry, something went wrong.
已经修复,可更新使用
No branches or pull requests
作者在源码中将witdh 写死在了160px 导致如果label长度大于160 会被忽略掉,我将你的源码中这段css删除后可以正常显示完成的label了,但是发现当展开三级之后,还是会因为label过长导致样式错位
后来发现您源码中动态改变菜单宽度的代码
// 改变菜单宽度 setPopperWidth() { let width = (160 + 1) * this.casTree.length; document.getElementsByClassName(this.classRef)[0].style.width = width + "px"; }
源码中 设置了
.cascader-popper {width:100%}
我尝试将这些代码删除,解决了这个问题
不知道作者当初设置这些代码的原因是什么
这里依然是基于160 * 子菜单个数算的,这依然限制了面板的长度,导致错位了,请问作者对这个问题怎么解决
The text was updated successfully, but these errors were encountered: