error Unnecessary return statement no-useless-return
时间:2021-03-06 12:56:40
收藏:0
阅读:177

语法错误
原本是
addUser() {
this.$refs.addFormRef.validate((valid) => {
if (!valid) return
// 可以发起添加用户的网络请求
})
在return后添加false即可 修改后为
addUser() {
this.$refs.addFormRef.validate((valid) => {
if (!valid) return false
// 可以发起添加用户的网络请求
})
}
原文:https://www.cnblogs.com/LiQingXin/p/14489724.html
评论(0)