[Element]关于el-pagination改变layout中的jumper默认文字“前往”

731 阅读1分钟

原代码:

image.png

<el-pagination
      class="account-password-pagination"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[10, 20, 30, 40]"
      :page-size="pageSize"
      layout=" prev, pager, next, sizes, jumper "
      :total="currentTotal"
    >
</el-pagination>
    
    
    data() {
    return {
      currentPage: 1,
      pageSize: 10,
      currentTotal: 30
    };
  },

展示效果(前):

image.png

添加代码:

mounted() {
       document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
  },

展示效果(后)

image.png