fix(compiler-sfc): fix template usage check edge case for v-on statements
ref: https://github.com/vuejs/vue/issues/12591
This commit is contained in:
@@ -2134,6 +2134,8 @@ function processExp(exp: string, dir?: string): string {
|
||||
if (/ as\s+\w|<.*>|:/.test(exp)) {
|
||||
if (dir === 'slot') {
|
||||
exp = `(${exp})=>{}`
|
||||
} else if (dir === 'on') {
|
||||
exp = `()=>{${exp}}`
|
||||
} else if (dir === 'for') {
|
||||
const inMatch = exp.match(forAliasRE)
|
||||
if (inMatch) {
|
||||
|
||||
Reference in New Issue
Block a user