【问题标题】:Material design look for ag-grid材料设计寻找 ag-grid
【发布时间】:2017-09-07 15:36:52
【问题描述】:

如何将材料设计功能用于 agggrid?在我的 angular2 应用程序中,我使用了 ag-grid 并将类名提到为ag-material,并将行高设置为48。但材料设计外观不适用于我的网格。我应该在我的索引中包含任何 CSS 文件还是从 agggrid 包中获取? 这就是我将 ag-material 类应用于网格并在最后覆盖行高的方式。

            <ag-grid-ng2  style="width: 100%; height: 100%;"
                     class="ag-material"
                     [gridOptions]="gridOptions"
                     [columnDefs]="columnDefs"
                     [rowData]="rowData"
                     rowSelection="single"
                     (selectionChanged)="onSelectionChanged()"
                     rowHeight="48">
        </ag-grid-ng2>

有人可以帮我在材料设计中寻找 agggrid 吗?

【问题讨论】:

    标签: ag-grid


    【解决方案1】:

    angular 2 implementation 上的指南说

    您需要将用于 ag-Grid 的 CSS 直接包含在您的 html 页面中,或者在捆绑时作为创建捆绑包的一部分。

    然后它演示了包括所需的样式表:

    <link href="node_modules/ag-grid/styles/ag-grid.css" rel="stylesheet" />
    <link href="node_modules/ag-grid/styles/theme-fresh.css" rel="stylesheet" />
    

    查看github repo,它显示有一个单独的样式表用于您需要包含的材料主题:

    <link href="node_modules/ag-grid/styles/theme-material.css" rel="stylesheet" />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-09-09
      • 1970-01-01
      • 2015-02-05
      • 2015-04-17
      • 1970-01-01
      • 1970-01-01
      • 2015-05-14
      相关资源
      最近更新 更多