前言
在做技术栈为vue + ElementUI的项目(多为后台管理平台)时,经常涉及到数据表格的开发,当然ElementUI中的表格组件已经封装的非常完美,但是在使用el-table时常常还是需要每一列每一列的手动配置,很机械很不想做ne要呕吐🤮>﹏<,所以为了解决这一痛点,最后对表格组件进行了二次封装,尽量达到所有列的可配置化。
表格组件
代码
1 | <template> |
使用
1 | <table-com v-loading="tloading" :tData='tData' :tCols='tCols'> |
配置
1 | this.tCols = [ |