react-zmage icon indicating copy to clipboard operation
react-zmage copied to clipboard

通过函数调用的方式来调用的时候无法传入style属性

Open rdmclin2 opened this issue 4 years ago • 1 comments

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

rdmclin2 avatar Nov 05 '19 09:11 rdmclin2

谢谢反馈, 不过不建议这样修改图片尺寸, 添加边框或者圆角倒是可以 修改尺寸的话我也不知道以后会产生什么异常....

Caldis avatar Jan 07 '20 16:01 Caldis