antd-vue 表头,超出显示省略号...

就是title可以用函数返回

···

const obj = {
key: key,
dataIndex: key,
// title: data,
title: (val) => {
const style = {
maxWidth: '200px',
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer'
}
return (

{data}

)
},
align: 'center'
}

···

posted @ 2021-03-26 15:47  山村码农  阅读(1286)  评论(0)    收藏  举报