Environment
mac vue2.5.17
Reproduction link
https://run.iviewui.com/QIPSMoDI
Steps to reproduce
Setting the width property with string will cause the table to be garbled. The number will not be used. ps: The current column is render.
What is expected?
fix this bug
What is actually happening?
bug
Error example
{
title: '信息',
key: '',
width: '250px',
align: 'left',
render: (h, params) => h('div', {
style: {
position: 'relative',
},
}, [
h('img', {
attrs: {
width: '70px',
height: '70px',
src: 'something'
},
style: {
marginTop: '5px',
},
}),
h('span', {
style: {
display: 'inline-block',
marginLeft: '10px',
position: 'absolute',
width: '150px',
top: '0px',
left: '70px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
},
}, 名称: ${params.row.name}
),
h('span', {
style: {
display: 'inline-block',
marginLeft: '10px',
position: 'absolute',
width: '150px',
top: '20px',
left: '70px',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
},
}, 大小: ${formatSpec(params.row.size)}
),
h('span', {
style: {
display: 'inline-block',
marginLeft: '10px',
position: 'absolute',
top: '60px',
left: '70px',
},
}, 金额: ¥${params.row.amount / 100}
),
]),
},
1条答案
按热度按时间x7yiwoj41#
你的data是对象啊 要求不是数组类型吗