Open cutPicturesMan opened 5 years ago
it seems that it was fixed in 2.5.18-beta-0 but regressed right after in 2.5.18
FYI @nmetulev and @vogtn
Found a workaround thanks to #11292. making a part of the template dynamic makes it work:
<div>
<p v-pre>
<template><span>{{msg}}</span></template>
</p>
{{ '' }}
</div>
the {{ '' }}
outputs nothing but workarounds the problem
Version
2.6.10
Reproduction link
https://jsfiddle.net/vuetest/c5uw870y/3/
Steps to reproduce
1、click jsfiddle link 2、you will see result is {{msg}},is incorrect
What is expected?
render template tag as html element, dom looks like that:
What is actually happening?
template tag disappeared
when v-pre used at the staticRoot, template render correctly, fixed by #8146. see this also: https://jsfiddle.net/vuetest/c5uw870y/5/
when v-pre does not used at the staticRoot, template tag will be skip, source code in
vue/src/compiler/codegen/index.js
is:how to slove this problem:
I'm not familiar with creating pr with test, someone else can help me?