模板与样式完整代码
< vxe-table:data = " tableData" height = " auto" align = " center" border resizable stripe round row-id = " id" :row-config = " { isCurrent: true, isHover: true }" :scroll-y = " { enabled: true, gt: 10 }" :show-overflow = " true" :sort-config = " { trigger: 'cell' }" > < vxe-columntype = " seq" width = " 60" title = " 序号" > </ vxe-column> < vxe-columnfield = " name" title = " Name" sortable > </ vxe-column> < vxe-columnfield = " sex" title = " Sex" > </ vxe-column> < vxe-columnfield = " age" title = " Age" > </ vxe-column> < vxe-columnfield = " address" title = " Address" show-overflow > </ vxe-column> </ vxe-table>
<style lang="scss" scoped>
$color : #c0eae7;
:deep(.vxe-table--render-default.border--full) { .vxe-table--border-line { border : 1px solid $color; } .vxe-header--column { background-image : linear-gradient ( $color, $color) , linear-gradient ( $color, $color) ; height : 32px; padding : 0px !important ; font-size : 12px; color : #444444; font-weight : bold; background-color : #c2efeb; .vxe-resizable { right : -8px; } .vxe-resizable.is--line:before { background-color : $color; } } .vxe-table--header-wrapper { .vxe-table--header-border-line { border-bottom : 0px; } } .vxe-body--column { background-image : linear-gradient ( $color, $color) , linear-gradient ( $color, $color) ; height : 32px; padding : 0px !important ; font-size : 12px; color : #444444; } .vxe-body--row.row--stripe { background-color : #f0fffe; }
}
</style>