Преглед на файлове

Merge branch 'master' of http://192.168.1.41:3000/maixinrong/Calculation

MaiXinRong преди 5 години
родител
ревизия
9d8f07b6f9
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/public/js/stage_detail.js

+ 1 - 1
app/public/js/stage_detail.js

@@ -574,7 +574,7 @@ $(document).ready(() => {
     $('#upload-img-file').change(function () {
         const file = this.files[0];
         const ext = file.name.toLowerCase().split('.').splice(-1)[0];
-        const imgStr = /\.(jpg|jpeg|png|bmp|BMP|JPG|PNG|JPEG)$/;
+        const imgStr = /(jpg|jpeg|png|bmp|BMP|JPG|PNG|JPEG)$/;
         if (!imgStr.test(ext)) {
             toast('请上传正确的图片格式文件', 'error');
             return