vxe-table 实现行高拖拽功能,需要注意更新到最新版本才支持该功能
通过 row-config.resizable 和 row-resize 启用行高拖拽功能;
当需要多列允许触发行高拖拽时,通过 row-resize 指定任意列
<template>
<div>
<vxe-grid v-bind="gridOptions"></vxe-grid>
</div>
</template>
<script>
export default {
data () {
const gridOptions = {
border: true,
rowConfig: {
resizable: true
},
columns: [
{ type: 'seq', width: 70, rowResize: true },
{ field: 'name', title: 'Name' },
{ field: 'sex', title: 'Sex' },
{ field: 'age', title: 'Age' },
{ field: 'time', title: 'Time' },
{ field: 'address', title: 'Address' }
],
data: [
{ id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', age: 28, address: 'test abc' },
{ id: 10002, name: 'Test2', role: 'Test', sex: 'Women', age: 22, address: 'Guangzhou' },
{ id: 10003, name: 'Test3', role: 'PM', sex: 'Man', age: 32, address: 'Shanghai' },
{ id: 10004, name: 'Test4', role: 'Designer', sex: 'Women', age: 24, address: 'Shanghai' }
]
}
return {
gridOptions
}
}
}
</script>
https://gitee.com/x-extends/vxe-table
标签:name,title,vxe,age,sex,field,table,行高 From: https://www.cnblogs.com/qaz666/p/18673793