fix(compiler-sfc): fix expression check for v-on with object literal value (#6652)

fix #6650
fix #6674
This commit is contained in:
Travis 2022-09-27 17:30:10 +08:00 committed by GitHub
parent 6c6fe2c0cd
commit 6958ec1b37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2135,7 +2135,7 @@ function processExp(exp: string, dir?: string): string {
if (dir === 'slot') {
exp = `(${exp})=>{}`
} else if (dir === 'on') {
exp = `()=>{${exp}}`
exp = `()=>{return ${exp}}`
} else if (dir === 'for') {
const inMatch = exp.match(forAliasRE)
if (inMatch) {