【问题标题】:angular-ui-grid: plus icon (expandable row) at left side - how to change it to right sideangular-ui-grid:左侧的加号图标(可扩展行)-如何将其更改为右侧
【发布时间】:2016-02-09 12:00:55
【问题描述】:

我正在使用带有 expandrow 功能的 ui-grid ( demo from ui-grid site)。

因为我的语言是RTL所以右侧显示加号图标

我需要加号图标的位置在左侧(架构要求)

知道我该怎么做

谢谢

【问题讨论】:

    标签: angularjs angular-ui-grid right-to-left expandable


    【解决方案1】:

    我在 github 上查看了源代码。

    您应该尝试编辑参数:$scope.gridOptions.rowTemplate

    如果你检查文件@https://raw.githubusercontent.com/angular-ui/bower-ui-grid/master/ui-grid.js,你会看到:

      /**
       * @ngdoc string
       * @name rowTemplate
       * @propertyOf ui.grid.class:GridOptions
       * @description 'ui-grid/ui-grid-row' by default. When provided, this setting uses a
       * custom row template.  Can be set to either the name of a template file:
       * <pre> $scope.gridOptions.rowTemplate = 'row_template.html';</pre>
       * inline html
       * <pre>  $scope.gridOptions.rowTemplate = '<div style="background-color: aquamarine" ng-click="grid.appScope.fnOne(row)" ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ui-grid-cell></div>';</pre>
       * or the id of a precompiled template (TBD how to use this) can be provided.
       * </br>Refer to the custom row template tutorial for more information.
       */
      baseOptions.rowTemplate = baseOptions.rowTemplate || 'ui-grid/ui-grid-row';
    

    【讨论】:

      猜你喜欢
      • 2019-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-02
      • 2018-04-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多