perf(compiler-core): treat v-for with constant exp as a stable fragment (#1394)

This commit is contained in:
HcySunYang
2020-06-18 04:13:14 +08:00
committed by GitHub
parent 8899a90fc4
commit 8a2cf21b71
9 changed files with 125 additions and 24 deletions

View File

@@ -698,13 +698,13 @@ function genVNodeCall(node: VNodeCall, context: CodegenContext) {
dynamicProps,
directives,
isBlock,
isForBlock
disableTracking
} = node
if (directives) {
push(helper(WITH_DIRECTIVES) + `(`)
}
if (isBlock) {
push(`(${helper(OPEN_BLOCK)}(${isForBlock ? `true` : ``}), `)
push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `)
}
if (pure) {
push(PURE_ANNOTATION)