error Unnecessary return statement no-useless-return
时间:2021-03-06 14:57:20
收藏:0
阅读:0
语法错误
原本是
addUser() {
this.$refs.addFormRef.validate((valid) => {
if (!valid) return
// 可以发起添加用户的网络请求
})
在return后添加false即可 修改后为
addUser() {
this.$refs.addFormRef.validate((valid) => {
if (!valid) return false
// 可以发起添加用户的网络请求
})
}
评论(0)