File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 2
2
ComponentInternalInstance ,
3
3
FunctionalComponent ,
4
4
Data ,
5
- getComponentName
5
+ getComponentName ,
6
+ ConcreteComponent
6
7
} from './component'
7
8
import {
8
9
VNode ,
@@ -133,8 +134,18 @@ export function renderComponentRoot(
133
134
}
134
135
135
136
if ( fallthroughAttrs && inheritAttrs !== false ) {
137
+ const { shapeFlag, type, props } = root
138
+
139
+ if ( shapeFlag & ShapeFlags . COMPONENT && props ) {
140
+ Object . keys ( fallthroughAttrs ) . forEach ( key => {
141
+ if ( key in props ) {
142
+ const propsDef = ( type as ConcreteComponent ) . props
143
+ if ( propsDef && key in propsDef ) delete fallthroughAttrs ! [ key ]
144
+ }
145
+ } )
146
+ }
147
+
136
148
const keys = Object . keys ( fallthroughAttrs )
137
- const { shapeFlag } = root
138
149
if ( keys . length ) {
139
150
if ( shapeFlag & ( ShapeFlags . ELEMENT | ShapeFlags . COMPONENT ) ) {
140
151
if ( propsOptions && keys . some ( isModelListener ) ) {
You can’t perform that action at this time.
0 commit comments