1.首先获取所有的学生信息并显示在表格上,进行分页。
后台要求传的参数:
后台接口封装:
element-ui创建数据。必须有HTML表格
编辑
删除 //scope.row代表当前对应行
@size-change="sizeChange"
@current-change="currentChange"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next"
:total="page.totalRecords">
//新增学生信息模态框
确定
取消
//编辑学生信息模态框
确定
取消
export default{
data(){
return{
studentData:[], //所有学生信息数组置空
addstudentForm:false, //新增学生信息模态框
page: {
pageSize: 1