关注分享主机优惠活动
国内外VPS云服务器

Springboot+Vue实现了一个添加,删除,检查和修改的小型演示(Springboot完成了简单的添加,删除,修改和搜索操作)

摘要:如果设置了此参数,则查询第一页,如果总数超过总数,则查询最后一页。

源代码下载地址后端

frontend

目录技术堆栈前端和后端目录零件代码page1.vueapplication.vueapplication.ymlmybatis.ymlmybatis.config.config.xmlControll Concontroller Cross-omain cross-ain配置

开发太开发了来自包装工具:webpack

后端开发工具:创意开发框架:Spring Boot + MyBatis软件包工具:mysql

前端和后端目录franderd forthertory directory directory

部分代码page1.vue cancele ok cancele ok ok ake ok ok ak{{scope.row.isbn}}}} {{scope.row.bookname}}} {{scope.row.author}} edit delete .el - input {width:width:35%; } .b1 {float:left; }#page1 {float:left;边距-顶部:20px; }导出默认{create(){const _this = this; axios.defaults.withcredentials = true; this.getData(1)// //后端data // axios.get(“ http:// localhost:8081/books/books/1/4”)。// console.log(resp.data.list)//})}},data(){return {// bidirectional绑定标志:null,dis:null,null,null,TableData:{isbn:{isbn:{isbn:{isbn:“规则:{isbn:[{oild:true,消息:“请输入数字”,触发:“ blur”},,],簿名:[{quirck:true,消息:“请输入书名”,触发:“ Blur”},],作者:[{request:true,message:“请输入作者”,触发:“ canse}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} {adderdialogivisible = true = true; this.flag = 1; this.dis = false this.ruleform.isbn = null; this.ruleform.author = null this.ruleform.bookName = null},save(flag,ruleform){if(flag == 1){//此操作const _this _this = this; //数据验证。 $ refs [Ruleform]验证((有效)=> {if(有效){this.centerdialogvisible = false; // object // function // function // function(desp){} in {} function方法// ersect => this in {} in {} in {} in {} this axios.post(“ http:// localhost:http:// localhost:8081/book/book/book/book book/book book/book book)。消息({消息:“添加保证!”,键入:“成功”})} else {_ this。$ message({消息:“添加了失败!!!”,type:“ error”}}}),_this.getData(1); } else {this.centerdialogvisible = true;返回false。 }}); } else if(flag == 0){//此操作const _this = this; this.dis = true //更改书籍信息时禁用数字输入//数据验证。如果(启用){this.centerdialogvisible = false; console.log(this.ruleform.author + this.ruleform.bookName)//对象axios.post(“ http:// localhost:8081/book/updatebook”,this.ruleform)。 })} else {_ this。 $消息({消息:“书籍修复失败!!!”,type:“ error”})})} else {this.centerdialogvisible = true;返回false。 }}); }},CurrentPage(currentPage){this.getData(currentPage)},getData(currentPage){const _this = this; console.log(currentPage)//后端数据axios.get(“ http:// localhost:8081/books/“+currentpage+”/4“”)。resp.data.total})},handingedit(index,row){this.centerdialogvisible = true this this.flag = 0; this.ruleform.isbn = row.isbn; this.ruleform.author = row.author this.ruleform.bookname = row.bookName this.dis = true},whandledelete(index,row){this。 $确认(“将删除书本记录?axios.post(“ http:// localhost:八8081/book/deletebook/” + row.isbn)。e({消息:“ book delete sure!”,type:“ success”}),this.getData(1); } else {这个。 $消息({message:“ book delete sure !!!”,type:“ error”})})})。捕获(()=> {}); //直接传递对象},onsubmit(){const _tis = this const sel = this.forminline.griginline.region const user = this.forminline.user if(sel ==“ name”){axios.get(“ http:// localhost:8081/book/book/book/book/book/NAM book/NAM book/NAM book/NAMe/“+用户)。 resp.data.total}) }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} 春天: dataSource:url:jdbc:mysql:// localhost:3306/act5?useunicode=true&charaturecoding=utf:8 esername pisbranf:rootpidfaid:rootpisbrenc Pagination Streamlined Parameter, default value is false. If this parameter is set to true, pagenumpages (if the total number exceeds) will reasonably query the last page.以下参数:truemybatis:config -位置:classpath:mybatis - config.xmlserver:端口:8081 mybatis - config.xml doctype配置“ [k4 // mybatis.org/mybatis.org//dtd config 3.0 3.0 3.0 // - config.dtd“>控制器软件包com.controller;

未经允许不得转载:主机频道 » Springboot+Vue实现了一个添加,删除,检查和修改的小型演示(Springboot完成了简单的添加,删除,修改和搜索操作)

相关推荐

评论 抢沙发

评论前必须登录!