分页插件 赞 踩 项目一个需求,需要前端来分页并实现字段模糊匹配,使用以下方法,得以实现 搜索词 table Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。
vue element el-table实现前端搜索分页_element ui table分页 如何查找数据在哪一页
<el-input
v-model="keyword"
placeholder="输入要搜索的内容"
clearable
size="small"
><i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
<el-table
v-loading="loading"
:data="数据.filter(数据 => !搜索词 || 数据.匹配字段.toLowerCase().includes(搜索词.toLowerCase())).slice((页码-1)*页条数,页码*页条数)"
>
<pagination v-show="rightConditionTotal>0" :total="数据.filter(数据 => !搜索词 || 数据.匹配字段.toLowerCase().includes(搜索词.toLowerCase())).slice((页码-1)*页条数,页码*页条数).length" :page.sync="rightConditionPageNum"
:limit.sync="dialogPageSize" layout="total, sizes, prev, pager, next"/>