feat(compiler): annotate patchFlags in generated code

This commit is contained in:
Evan You
2019-10-01 17:53:57 -04:00
parent 4021307f4c
commit 4fc963bc5a
7 changed files with 70 additions and 30 deletions

View File

@@ -1230,7 +1230,7 @@ export function createRenderer<
// fast path
const { patchFlag, shapeFlag } = n2
if (patchFlag) {
if (patchFlag & PatchFlags.KEYED) {
if (patchFlag & PatchFlags.KEYED_V_FOR) {
// this could be either fully-keyed or mixed (some keyed some not)
// presence of patchFlag means children are guaranteed to be arrays
patchKeyedChildren(
@@ -1244,7 +1244,7 @@ export function createRenderer<
optimized
)
return
} else if (patchFlag & PatchFlags.UNKEYED) {
} else if (patchFlag & PatchFlags.UNKEYED_V_FOR) {
// unkeyed
patchUnkeyedChildren(
c1 as HostVNode[],