【问题标题】:bootstrap-table - responsive settings引导表 - 响应式设置
【发布时间】:2021-06-17 06:19:28
【问题描述】:

在 bootstrap 5.0.1 中使用 bootstrap-table。

有没有办法:

  1. 更改引导表进入响应模式的断点?当我点击引导程序的 md 断点时,我希望显示水平滚动条。

  2. 在显示水平滚动条时保留列宽?现在,列宽正在压缩,但无论断点如何,我都想保持我设置的宽度。

                             <table class="m-auto"
                                                 data-toggle="table"
                                                 data-pagination="true"
                                                 data-search="true">
    
                             <thead>
                             <tr>
                                 <th data-field="id" data-width="100" data-width-unit="px"
                                         data-sortable="true" data-field="id">#</th>
                                 <th data-field="col-02" data-width="200" data-width-unit="px">COL 02 - 20</th>
                                 <th data-field="col-03" data-width="200" data-width-unit="px">COL 03 - 20</th>
                                 <th data-field="col-04" data-width="200" data-width-unit="px">COL 04 - 30</th>
                                 <th data-field="col-05" data-width="300" data-width-unit="px">COL 05 - 10</th>
                                 <th data-field="col-06" data-width="300" data-width-unit="px">COL 06 - 10</th>
                             </tr>
                             </thead>
    

【问题讨论】:

    标签: responsive bootstrap-table


    【解决方案1】:

    您可以通过覆盖它的 scss 来更改引导程序。但是你确定你应该在需要的时候使用引导程序。您可以轻松地为 html 表格设置样式,使其看起来像引导程序。如果你不喜欢它的断点和压缩,那又有什么意义呢?

    【讨论】:

    • 使用引导程序的决定与我的问题无关。通常,引导程序具有断点选项(在组件类中或可见实用程序中)-更改滚动条启动的断点既合理又在引导程序的用例范围内-我一直在使用其他类...
    猜你喜欢
    • 2019-06-28
    • 1970-01-01
    • 2019-01-03
    • 2013-08-27
    • 2015-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-16
    相关资源
    最近更新 更多