三个bug

项目场景:

用VScode写vue框架的前端
用idea写后端, 然后实现前后端交互的增删改查


问题描述:

第一个bug:
报错
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.company.dao.IUserDao.addUser

第二个bug: 代理不生效 , 依然访问/api/xxx, 然后报404

module.exports = {
    lintOnSave:false,
    devServer:{
        // 改端口
        port:8081,
        proxy: {
            "/api": {
                target: "http://localhost:8080",
                changeOrigin: true,
                pathRewrite: {
                    "^/api": "/student_web1025"
                }
            }
        }
    }
}

第三个:
报错:vue.runtime.esm.js?2b0e:619 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop’s value. Prop being mutated: “students”

found in

—> at src/components/SelectComponent.vue
at src/pages/Student.vue
at src/pages/Manage.vue
at src/App.vu

  methods: {
    async find(){
     let r =  await dofind(this.studentname);
     console.log(r);
     this.students = r.data;
    }
  },

原因分析:

第一个肯定是xml没写对
第二个我觉得我全写对了, 不知道为啥
第三个看报错得知父类的属性不能直接在子类改, 应该是用$emit调父类方法改


解决方案:

第一个:
Xml里面的id属性没写

第二个: 重启了vue终端服务器就好了…

第三个: 父类写v-model , 然后子类调方法改属性

  methods: {
    async find(){
     let r =  await dofind(this.studentname);
     console.log(r);
    //  this.students = r.data;
    this.$emit("input",r.data)
    }
  },
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值