[英]react-bootstrap-table: cannot set a glyphicon on a custom toolbar button
我根据此示例自定义表格的工具栏: http : //allenfang.github.io/react-bootstrap-table/custom.html#insertBtn
我可以看到我的按钮,但看不到我用btnGlyphicon设置的图标。
生成的html是<i class="fa glyphicon glyphicon-edit"></i>
此类中是否都应同时包含fa + glyphicon? 我添加了font-awesome作为依赖项,但仍然看不到该图标。
我想念什么?
任何帮助表示赞赏
import React from 'react'; import { BootstrapTable, TableHeaderColumn, ButtonGroup, Button, InsertButton } from 'react-bootstrap-table'; import './../node_modules/react-bootstrap-table/dist/react-bootstrap-table-all.min.css'; import './../node_modules/bootstrap/dist/css/bootstrap.min.css'; createCustomButtonGroup(props) { return ( <ButtonGroup className='my-custom-class' sizeClass='btn-group-md'> { props.exportCSVBtn } <InsertButton btnText='Info' className='my-custom-class' btnGlyphicon='glyphicon-edit' onClick={ () => this.changeInfoFilter() }/> <InsertButton btnText='Warning' className='my-custom-class' btnGlyphicon='glyphicon-edit' onClick={ () => this.changeWarningFilter() }/> <InsertButton btnText='Error' className='my-custom-class' btnGlyphicon='glyphicon-edit' onClick={ () => this.changeErrorFilter() }/> <InsertButton btnText='Command' className='my-custom-class' btnGlyphicon='glyphicon-edit' onClick={ () => this.changeCommandFilter() }/> </ButtonGroup> ); }
显然这是一个已知问题,引导程序4中没有glyphicons: https ://getbootstrap.com/docs/4.0/migration/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.