del(row){var _this = this;this.$confirm('此操作将永久删除, 是否继续?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {_this.$axios.post("http://localhost:8080/drug/deleteDrug",this.$qs.stringify({"id":row.id,"photo":row.photo})).then(function () {_this.$message.success("删除成功");// 为了在删除最后一页的最后一条数据时能成功跳转回最后一页的上一页const totalPage = Math.ceil((_this.total - 1) / _this.pageSize) // 总页数_this.currentPage = _this.currentPage > totalPage ? totalPage : _this.currentPage_this.currentPage = _this.currentPage < 1 ? 1 : _this.currentPage_this.queryDrugList();}).catch(function () {_this.$message.error("删除失败");})})}
200字范文,内容丰富有趣,生活中的好帮手!