mirror of https://github.com/vuejs/core.git
fix(compiler-sfc): fix expression check for v-on with object literal value (#6652)
fix #6650 fix #6674
This commit is contained in:
parent
6c6fe2c0cd
commit
6958ec1b37
|
@ -2135,7 +2135,7 @@ function processExp(exp: string, dir?: string): string {
|
||||||
if (dir === 'slot') {
|
if (dir === 'slot') {
|
||||||
exp = `(${exp})=>{}`
|
exp = `(${exp})=>{}`
|
||||||
} else if (dir === 'on') {
|
} else if (dir === 'on') {
|
||||||
exp = `()=>{${exp}}`
|
exp = `()=>{return ${exp}}`
|
||||||
} else if (dir === 'for') {
|
} else if (dir === 'for') {
|
||||||
const inMatch = exp.match(forAliasRE)
|
const inMatch = exp.match(forAliasRE)
|
||||||
if (inMatch) {
|
if (inMatch) {
|
||||||
|
|
Loading…
Reference in New Issue