Skip to content

Commit

Permalink
Update compileScript.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 7, 2023
1 parent 70f6e7d commit be73e4e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/compiler-sfc/src/compileScript.ts
Expand Up @@ -1801,7 +1801,7 @@ function resolveTemplateUsageCheckString(sfc: SFCDescriptor, isTS: boolean) {
}
for (let i = 0; i < attrs.length; i++) {
const { name, value } = attrs[i]
if (dirRE.test(name) || name === 'ref') {
if (dirRE.test(name)) {
const baseName = onRE.test(name)
? 'on'
: slotRE.test(name)
Expand All @@ -1815,6 +1815,8 @@ function resolveTemplateUsageCheckString(sfc: SFCDescriptor, isTS: boolean) {
if (value) {
code += `,${processExp(value, isTS, baseName)}`
}
} else if (name === 'ref') {
code += `,${value}`
}
}
},
Expand Down

0 comments on commit be73e4e

Please sign in to comment.