【问题标题】:Bootstrap Table Icons Not Showing引导表图标未显示
【发布时间】:2020-10-01 05:51:13
【问题描述】:

我正在利用引导程序 4.5.2 版创建引导表(1.18 版)

除了表格图标没有显示外,一切似乎都正常工作 - 但是它们所代表的表格控制功能正在工作(即打印按钮仍然有效)

我在想我缺少图标的扩展名?但注意到似乎引用了这一点,并且基于先前版本的引导程序和引导表 DID 工作的先前迭代。

下面是我的扩展导入和我的表格设置,以及两张显示带有工作按钮的 mia 图标的照片。

<!-- Style sheets -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">

<!-- JQUERY -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>

<!-- BOOTSTRAP -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>

<!-- BOOTSTRAP TABLE EXTENSIONS -->
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.0/dist/bootstrap-table.min.css">
<script src="https://unpkg.com/bootstrap-table@1.18.0/dist/bootstrap-table.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/bootstrap-table@1.18.0/dist/extensions/filter-control/bootstrap-table-filter-control.css">
<script src="https://unpkg.com/bootstrap-table@1.18.0/dist/extensions/filter-control/bootstrap-table-filter-control.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.18.0/dist/extensions/multiple-sort/bootstrap-table-multiple-sort.js"></script>
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.0/dist/extensions/reorder-rows/bootstrap-table-reorder-rows.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/TableDnD/0.9.1/jquery.tablednd.js" integrity="sha256-d3rtug+Hg1GZPB7Y/yTcRixO/wlI78+2m08tosoRn7A=" crossorigin="anonymous"></script>
<script src="https://unpkg.com/bootstrap-table@1.18.0/dist/extensions/reorder-rows/bootstrap-table-reorder-rows.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.18.0/dist/extensions/print/bootstrap-table-print.js"></script>

表格设置好了

<table id="varTable" class="table table-striped table-condensed table-hover table-sm table-responsive mx-auto"
style='width: 90%; margin-left: 2%; margin-right: 2%' 
data-toggle="varTable"
data-show-columns="true"
data-pagination="true" data-pagination-pre-text="Previous" data-pagination-next-text="Next"
data-page-list="[10, 25, 50, 100, all]"
data-filter-control="true"
data-show-search-clear-button="true"
data-show-multi-sort="true"
data-sort-priority='[{"sortName":"basic.chr.na"},{"sortName":"basic.pos.ba"}]'
data-use-row-attr-func="true"
data-reorderable-rows="true" 
data-show-print="true">
<thead>

想法?

【问题讨论】:

    标签: bootstrap-4 bootstrap-table


    【解决方案1】:

    我遇到了同样的问题。为我解决的问题是手动添加 fontawesome 样式表。

    <link rel="stylesheet" href="https://kit-free.fontawesome.com/releases/latest/css/free.min.css">
    

    【讨论】:

    • 我遇到了同样的问题,您的解决方案完成了这项工作。问题是,为什么没有它就不能工作?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-10
    • 2021-07-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多