iview [Bug Report]Setting Table width use string something wrong

jecbmhm3  于 4个月前  发布在  其他
关注(0)|答案(1)|浏览(53)

Environment

mac vue2.5.17

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} ),
]),
},

x7yiwoj4

x7yiwoj41#

你的data是对象啊 要求不是数组类型吗

相关问题