Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个类似于此https://l-lin.github.io/angular-datatables/#/withFixedHeader的动态角度数据表,表也有水平滚动条。当前修复了不支持滚动的标题数据表插件。知道如何实现吗?
检查数据表的滚动事件并以角度对其进行初始化,
angular.element(document).on('init.dt', function() { document.querySelector('.dataTables_scrollBody').onscroll = function(e) {
// dtInstanceCallback // 再次调用 dtInstance。
} }) 因此,每当在角度数据表中发生滚动事件时,它将重新创建该表,该表又按预期工作。
注意:这使得数据表与角度方式的滚动事件过于兼容:)