【问题标题】:Material-UI Table pagination translationMaterial-UI 表格分页翻译
【发布时间】:2019-08-26 14:21:51
【问题描述】:

我正在尝试翻译材质 ui 表的表分页。来自 MUI 的人说这是有可能的(issue)。

那么有人知道如何从显示的行标签${from}-${to} of ${count}

转换为of

【问题讨论】:

    标签: material-ui


    【解决方案1】:

    可以设置TablePagination的'labelDisplayedRows'

    <TablePagination
      ...
      labelDisplayedRows={
        ({ from, to, count }) => {
          return '' + from + '-' + to + ' из ' + count
        }
      }
    />
    

    文档中的更多属性:https://material-ui.com/ru/api/table-pagination/

    【讨论】:

      猜你喜欢
      • 2021-01-27
      • 1970-01-01
      • 2021-11-19
      • 2016-11-13
      • 2021-08-07
      • 1970-01-01
      • 2020-05-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多