@@ -25,8 +25,7 @@ export function* generateElementProps(
25
25
suffix : string ;
26
26
} [ ]
27
27
) : Generator < Code > {
28
- const isIntrinsicElement = node . tagType === CompilerDOM . ElementTypes . ELEMENT || node . tagType === CompilerDOM . ElementTypes . TEMPLATE ;
29
- const canCamelize = node . tagType === CompilerDOM . ElementTypes . COMPONENT ;
28
+ const isComponent = node . tagType === CompilerDOM . ElementTypes . COMPONENT ;
30
29
31
30
for ( const prop of props ) {
32
31
if (
@@ -38,7 +37,7 @@ export function* generateElementProps(
38
37
&& ! prop . arg . loc . source . startsWith ( '[' )
39
38
&& ! prop . arg . loc . source . endsWith ( ']' )
40
39
) {
41
- if ( isIntrinsicElement ) {
40
+ if ( ! isComponent ) {
42
41
yield `...{ ` ;
43
42
yield * generateEventArg ( ctx , prop . arg , true ) ;
44
43
yield `: ` ;
@@ -102,7 +101,7 @@ export function* generateElementProps(
102
101
}
103
102
104
103
const shouldSpread = propName === 'style' || propName === 'class' ;
105
- const shouldCamelize = canCamelize
104
+ const shouldCamelize = isComponent
106
105
&& ( ! prop . arg || ( prop . arg . type === CompilerDOM . NodeTypes . SIMPLE_EXPRESSION && prop . arg . isStatic ) ) // isStatic
107
106
&& hyphenateAttr ( propName ) === propName
108
107
&& ! options . vueCompilerOptions . htmlAttributes . some ( pattern => minimatch ( propName , pattern ) ) ;
@@ -190,7 +189,7 @@ export function* generateElementProps(
190
189
}
191
190
192
191
const shouldSpread = prop . name === 'style' || prop . name === 'class' ;
193
- const shouldCamelize = canCamelize
192
+ const shouldCamelize = isComponent
194
193
&& hyphenateAttr ( prop . name ) === prop . name
195
194
&& ! options . vueCompilerOptions . htmlAttributes . some ( pattern => minimatch ( prop . name , pattern ) ) ;
196
195
0 commit comments