소스 검색

improve: 网络图片判断

From-wh 2 년 전
부모
커밋
77199de43e
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      template/admin/src/components/uploadImg/index.vue

+ 4 - 0
template/admin/src/components/uploadImg/index.vue

@@ -190,6 +190,10 @@ export default {
     },
 
     getImg() {
+      if (!this.webImgUrl) {
+        this.$message.error('请先输入图片地址');
+        return;
+      }
       this.ruleForm.imgList.push({
         url: this.webImgUrl,
       });