繁体   English   中英

如何在 react-bootstrap-table2 的边框上设置图标

[英]How can be an icon set on the border of the react-bootstrap-table2

试图在 react-bootstrap-table 行的末尾添加一个简单的点,但没有运气。 我的图标位于该行的最后一列。

图标设置在虚拟字段中 blueDotFormatter 的 div 中

   {
        dataField: 'blueDot',
        isDummyField: true,
        formatter: blueDotFormatter,
        headerStyle: (colum, colIndex) => {
            return {
                width: '1%',
                paddingRight: '0',
                marginRight: '0'
            };
        }

td 的样式始终覆盖我的样式,我无法将图标直接设置在行的边框上。

const blueDotFormatter = () => {

    return (
        <div className={"blue-dot blue-dot-"}>
            <img alt="image" src={blueDotIcon}/>
        </div>
    )
};

是否可以?

如果有人正在寻找 - 将宽度设置为 0.8% 甚至 0.89% 会使图像进入边框。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM