分页的实现(Vue+Element)+输入框关键字筛选
1.这里用的是Element 自带的分页组件
订单列表<-- 分页 -->
序号 创建时间 订单ID 所属用户姓名 所属用户ID 所属用户手机 所属用户层级 订单金额 订单状态 审核状态 收件人 联系电话 收货地址 订单备注 操作 {{ index+1>9?index+1:"0"+(index+1) }} {{cash.createTime}} {{cash.orderId}} {{cash.cilentName}} {{cash.cilentId}} {{cash.cilentPhone}} {{cash.cilentGrade}} ¥{{cash.orderPrice}} {{cash.orderState}} {{cash.auditState}} {{cash.receiver}} {{cash.phone}} {{cash.address}} {{cash.orderRemark}} 查看编辑删除
2.文中标红的字不再是循环数组,名字随意取,在后面搜索关键字部分也标红了。数据多分页效果会更加明显。
3.分页的CSS只是自己修改的部分,如有需要,请自行脑补。对了,补充一句,修改Eleement样式时,先在样式前加 /deep/.最外层类名{......}。
/deep/.el-pagination{ margin-bottom: 30px; margin-top: 30px; float: right; font-size: 20px; color: #333333; margin-right: 55px; font-weight: normal; .el-select .el-input{ width: 126px; height: 36px; } .el-select .el-input .el-input__inner{ height: 100%; font-size: 20px; color: #333333; } .el-pagination__editor.el-input .el-input__inner{ height: 36px; } .btn-prev,.btn-next{ height: 36px; } .btn-prev{ border-radius: 5px 0 0 5px; } .btn-next{ border-radius: 0 5px 5px 0; } .el-pager li{ line-height: 36px; height: 36px; font-size: 20px; } .el-pagination__total{ color: #333333; } button,span:not([class*=suffix]){ height: 36px; line-height: 36px; font-size: 20px; color: #333333; } .el-pagination__editor.el-input{ font-size: 20px; } }
4.如有问题,欢迎指教。
附上效果图一份:
总结
以上所述是小编给大家介绍的Vue 实现分页与输入框关键字筛选功能,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对考高分网网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!



