try {
arr.forEach((item) => {
if (item.groupNo == this.groupNo) {
throw { code: -9, msg: `${this.groupNo}已存在,不能重复添加` };
}
});
} catch (e) {
if (e && e.code === -9) {
return this.$message.error(e.msg);
}
}
前端那些事20240123-前端那些事-avue2 增加重复认证
原创
©著作权归作者所有:来自51CTO博客作者前端导师歌谣的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
前端那些事20240123-前端那些事-新增样式优化
【代码】前端那些事20240123-前端那些事-新增样式优化。
前端 vue.js elementui 上传 上传文件 -
前端那些事20240123-前端那些事-详情输入原来样式
【代码】前端那些事20240123-前端那些事-详情输入原来样式。
前端 vue.js elementui 上传 上传文件