202011-19 ant design的table组件实现全选功能以及自定义分页 我就废话不多说了,大家还是直接看代码吧~antdesign的table组件实现全选功能以及自定义分页直接附上全部代码以及截图了import'./index.scss';importReactfrom'react';import{Checkbox,Table,Popconfirm}from'antd';classTestComponentextendsComponent{constructor(props){super(props);this.state={visible:false,indeterminate:true,checkAll:false,data:this.getData(),pageSize:10};}s... 继续阅读 >
202010-10 浅谈Mybatis分页插件,自定义分页的坑 场景:PageHelper的默认分页方案是selectcount(0)from(你的sql)table_count由于查询数据比较大时,导致分页查询效率低下。优化:使用自定义的count查询。、废话不多说,对应代码如下:这个时候会使用自定义的countsql进行统计查询。然后一般分页默认使用PageHelper.startPage();作者优化:如果获取的数量大于实际数量,则进行pageNum优化。所以最好建议重载startPage。不进行优化!!!要不然莫名其妙的分页失效。每... 继续阅读 >
202010-10 Mybatis Plus 自定义方法实现分页功能的示例代码 一般物理分页,即通过sql语句分页,都是在sql语句后面添加limit分页语句,在xml文件里传入分页的参数,再多配置一条sql,用于查询总数:<selectid="queryStudentsBySql"parameterType="map"resultMap="studentmapper">select*fromstudentlimit#{currIndex},#{pageSize}</select><selectid="queryStudentsCount"resultType="java.lang.Integer"parameterType="java.util.Map">selectcount(... 继续阅读 >