【问题标题】:Bootstrap-table sticky header doesn't move left/right with table content when scrolling滚动时,Bootstrap-table 粘性标题不会随表格内容向左/向右移动
【发布时间】:2020-11-24 03:21:32
【问题描述】:

我的表在左侧和右侧有冻结列。我也有一个粘性标题,但是当我添加 showFooter: true 时,粘性标题在滚动时不会随内容向左/向右移动。当您向左或向右滚动时,您必须停止并向上或向下滚动一点点,以使粘性标题与内容重新对齐。对此有任何修复吗?当我去掉页脚但给表格增加高度时,我遇到了同样的事情。

【问题讨论】:

    标签: bootstrap-table


    【解决方案1】:

    我是引导表的三个核心开发之一。 这是目前的错误,我提交了修复错误的 PR (https://github.com/wenzhixin/bootstrap-table/pull/5235)。

    没有修复的示例:https://live.bootstrap-table.com/code/UtechtDustin/4247
    修复示例:https://live.bootstrap-table.com/code/UtechtDustin/4248

    这意味着您可以等待包含修复的下一个版本,或者您可以手动将修复应用到您的版本(非常简单)。

    【讨论】:

    • 谢谢!不过我看不出代码有什么不同,如何手动应用修复?
    • 我正在使用 unpkg 链接,我尝试用更新文件替换 unpkg 脚本标签,但出现错误 Replaced this 我在那个路径中有文件,但是我得到了这个错误:
    • bootstrap-table-fixed-columns.min.js:10 未捕获的类型错误:在 n (bootstrap-table-fixed-columns.min.js:10) 处没有“new”的情况下无法调用类构造函数在新的 n (bootstrap-table-export.min.js:10) 在 HTMLTableElement. (bootstrap-table.min.js:10) 在 Function.each (jquery.js:384) 在 m.fn.init .each (jquery.js:136) at m.fn.init.t.fn.bootstrapTable (bootstrap-table.min.js:10) at buildTable (script.js:478) at HTMLFormElement. (script. js:164)
    • unpkg.com/bootstrap-table@1.17.1/dist/extensions/sticky-header/… 将是正确的 url,但此版本不包含修复。您必须等待新版本!
    猜你喜欢
    • 1970-01-01
    • 2013-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多