Explorar o código

修改上传报错

cuixq %!s(int64=3) %!d(string=hai) anos
pai
achega
2c778d5a2a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      front-vue/src/views/system/user/index.vue

+ 1 - 1
front-vue/src/views/system/user/index.vue

@@ -1494,7 +1494,7 @@ export default {
     },
     //上传前校验
     beforeAvatarUpload(file) {
-      var testmsg = files.name.substring(files.name.lastIndexOf(".") + 1);
+      var testmsg = file.name.substring(file.name.lastIndexOf(".") + 1);
             const extension = testmsg === "jpg";
             const extension2 = testmsg === "jpeg";
             const extension3 = testmsg === "png";