element-ui 分页 更好的示例

默认的示例太简单,提供如下示例:

    <!-- 分页 -->
    <el-pagination
      :current-page="page"
      :page-size="limit"
      :total="total"
      style="padding: 30px 0; text-align: center;"
      layout="total, prev, pager, next, jumper"
      @current-change="fetchData"
    />

其中fetchData是自定义的方法,并且可以自动接收到参数:当前页current

posted @ 2020-11-13 17:03  yx袁祥  阅读(124)  评论(0)    收藏  举报