bootstrap-treeview 是bootstrap的一个树形插件,他不可以在 bootstrap 高于 3.3.7 版本中使用。   那么,问题就来了,Bootstrap4.0中怎么办啦? 验证后发现,主要是Bootstrap4.0中将一些图标被去除了,设置一下就好 JS
$('#tree').treeview({
            data: html,
            expandIcon: "tree_arrows_right", //设置列表树可展开节点的图标。
            collapseIcon: "tree_arrows_down", //设置列表树可收缩节点的图标。
            levels : 5,
            showTags: true,
            highlightSelected: true,
            highlightSearchResults:false
        });
  CSS
.tree_arrows_down:before{
    content:url("/static/image/sel.jpg"); //图片url根据地址设置
}
.tree_arrows_right:before{
    content:url("/static/image/sel.jpg");
}
  HTML
<div id="tree">div>
   
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄