原因: await 关键字仅在 async function 中有效。如果在 async function 函数体外使用 await ,你只会得到一个语法错误。 修改后的代码 this.$refs.formRef.validate(async (varlid) => { if (!varlid) return const result = await this.$http.post('login', this.loginForm) console.log(result)