RuoYi
2026-01-05 0b09d7c1da7f14f25a1011a6d04ec73171ff05a0
ruoyi-ui/src/views/system/user/index.vue
@@ -546,6 +546,11 @@
    },
    // 提交上传文件
    submitFileForm() {
      const file = this.$refs.upload.uploadFiles
      if (!file || file.length === 0 || !file[0].name.toLowerCase().endsWith('.xls') && !file[0].name.toLowerCase().endsWith('.xlsx')) {
        this.$modal.msgError("请选择后缀为 “xls”或“xlsx”的文件。")
        return
      }
      this.$refs.upload.submit()
    }
  }