react-zmage
react-zmage copied to clipboard
通过函数调用的方式来调用的时候无法传入style属性
// Zmage.browsing({ src: item.img, alt: 'hello', style: { with: '200px' } });
相反,使用set的时候ok
Zmage.browsing({
set: [
{
// 图片 Url
src: item.img,
// 图片占位文字
alt: '图片的占位文字,作为图片的标题, 请尽量保持简短',
// 图片样式
style: { width: '200px' },
// 图片类名
className: 'testClassName',
},
],
});
谢谢反馈, 不过不建议这样修改图片尺寸, 添加边框或者圆角倒是可以 修改尺寸的话我也不知道以后会产生什么异常....