refactor(runtime-core): refactor props resolution

Improve performance in optimized mode + tests
This commit is contained in:
Evan You
2020-04-06 17:37:47 -04:00
parent c28a9196b2
commit ec4a4c1e06
14 changed files with 440 additions and 196 deletions

View File

@@ -14,7 +14,7 @@ import {
isVNode
} from './vnode'
import { handleError, ErrorCodes } from './errorHandling'
import { PatchFlags, ShapeFlags, EMPTY_OBJ, isOn } from '@vue/shared'
import { PatchFlags, ShapeFlags, isOn } from '@vue/shared'
import { warn } from './warning'
// mark the current rendering instance for asset resolution (e.g.
@@ -94,7 +94,7 @@ export function renderComponentRoot(
if (
Component.inheritAttrs !== false &&
fallthroughAttrs &&
fallthroughAttrs !== EMPTY_OBJ
Object.keys(fallthroughAttrs).length
) {
if (
root.shapeFlag & ShapeFlags.ELEMENT ||