fix(compiler-core): assign patchFlag for template v-if fragment

fix #850
This commit is contained in:
Evan You
2020-03-17 11:36:56 -04:00
parent 3b282e7e3c
commit a1da9c28a0
3 changed files with 9 additions and 6 deletions

View File

@@ -29,6 +29,7 @@ import {
OPEN_BLOCK
} from '../runtimeHelpers'
import { injectProp } from '../utils'
import { PatchFlags, PatchFlagNames } from '@vue/shared'
export const transformIf = createStructuralDirectiveTransform(
/^(if|else|else-if)$/,
@@ -197,7 +198,9 @@ function createChildrenCodegenNode(
helper(FRAGMENT),
createObjectExpression([keyProperty]),
children,
undefined,
`${PatchFlags.STABLE_FRAGMENT} /* ${
PatchFlagNames[PatchFlags.STABLE_FRAGMENT]
} */`,
undefined,
undefined,
true,