async handleSubmit() {
const flag = await this.$refs.form.validate().catch((e) => e)
if (!flag) return
this.loading = true
try {
await queryVipStandardEdit({
...this.form,
})
this.$message.success(this.$t('pls_operate_successful') + '!')
this.close('success', true)
} catch (error) {
this.$message.error(error)
} finally {
this.loading = false
}
},
校验生效了,但是if (!flag) return不管用,依然回走下面方法,哪里写错了
把
catch
去掉就行了