Skip to content
New issue

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

[fix]使用StyleUtils.styleTable方法时,如果不设置tableStyle的width,会报空指针异常 #1168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Bigcoolheads
Copy link

我本来想设置表格的边框以及内容居中,但是却报错空指针异常,经过调试排查发现,StyleUtils.styleTable()方法中,如果tableStyle的width参数为空,则TableTools.setWidth方法中就会出现问题,所以建议在使用StyleUtils.styleTable()方法的时候,对tableStyle.getWidth()进行判空,这样用户不必设置宽度参数,只需关注自己需要的参数即可~
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant