zollero / el-search-table-pagination

🐶 Combine Form, Table and Pagination components of Element UI together.
MIT License
306 stars 79 forks source link

Support set `el-table` styles via props instead of hardcoding #24

Closed pzgz closed 6 years ago

pzgz commented 6 years ago

Right now, element style of el-table in the component will be here to width: 100%;margin-top:20px;.

Since it's set on element level, so it's not easy to customize the two properties hardcoded via css any longer. I think it's pretty bad idea to hard code these styles here, width is fine, but margin-top is pretty loose for some case. Take me for example, I would like a much more tight distance between form and table.

This commit will add table-style to the component props, and the value of it will be passed to el-table component as style props. The default value has been set to width: 100%;margin-top:20px; for backwards compability.