scrollbar - 如何使用 Angular 2 在 ng2-smart-table 中为表体应用滚动
问题描述
我正在使用具有 19 列的 ng2-smart-table,它超出了仪表板的框架。所以我需要将水平滚动应用于表格主体。
我在我的 Angular 2 项目中使用 ng2-smart-table
:host /deep/ table {
width: 1200px !important;
overflow-x: scroll;
}
我没有得到表格的水平滚动
解决方案
试试这个代码:
<div class="col-md-12" style = "overflow-x: scroll;">
<div class="smart-table-container" style = "width: 2000px;">
<ng2-smart-table [settings]="settings" [source]="source"></ng2-smart-table>
</div>
</div>
推荐阅读
- python - 如何共享 python 和 selenium exe 文件
- core-data - Xcode 12.1 中的 CoreData 错误
- ruby-on-rails - 当我认为应该找到兼容版本时,bundler 找不到
- python - 当我从数据库/模型中删除有两个类的对象时,如何让 Django Admin 删除文件?
- javascript - 我的课程数据没有从操作中获取到存储,刷新页面后它不再在 redux 中看到
- prolog - 在prolog中读取城市距离的csv文件?
- java - Spring Dispatcher-Servlet 未启动
- matlab - 如何在不使用 cat(3,R,G,B) 函数的情况下连接 3 个 RGB 通道
- vue.js - 如何从 v-btn onclick 方法传递参考按钮?
- reactjs - 拥有多个 React 应用程序