什么是UI-GRID的默认标题单元格模板?

时间:2014-10-06 23:32:28

标签: angularjs angularjs-directive angular-ui-grid

ng-grid documentation包含默认的标题单元格模板(以及其他默认模板)。

ui-grid的默认标题单元格模板是什么?

1 个答案:

答案 0 :(得分:10)

根据githubs https://github.com/angular-ui/ng-grid/tree/master/src/templates/ui-grid

当前的默认标题单元格模板是

<div ng-class="{ 'sortable': sortable }">
  <!-- <div class="ui-grid-vertical-bar">&nbsp;</div> -->
  <div class="ui-grid-cell-contents" col-index="renderIndex" title="TOOLTIP">
    <span>{{ col.displayName CUSTOM_FILTERS }}</span>

    <span ui-grid-visible="col.sort.direction" ng-class="{ 'ui-grid-icon-up-dir': col.sort.direction == asc, 'ui-grid-icon-down-dir': col.sort.direction == desc, 'ui-grid-icon-blank': !col.sort.direction }">
      &nbsp;
    </span>
  </div>

  <div class="ui-grid-column-menu-button" ng-if="grid.options.enableColumnMenus && !col.isRowHeader  && col.colDef.enableColumnMenu !== false" ng-click="toggleMenu($event)" ng-class="{'ui-grid-column-menu-button-last-col': isLastCol}">
    <i class="ui-grid-icon-angle-down">&nbsp;</i>
  </div>

  <div ui-grid-filter></div>
</div>