You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when v-pre does not used at the staticRoot, template tag will be skip, source code in vue/src/compiler/codegen/index.js is:
exportfunctiongenElement(el: ASTElement,state: CodegenState): string{// ...}elseif(el.tag==='template'&&!el.slotTarget&&!state.pre){// template tag run into here, directively render it's children instead of himreturngenChildren(el,state)||'void 0'}// ...
how to slove this problem:
exportfunctiongenElement(el: ASTElement,state: CodegenState): string{if(el.parent){el.pre=el.pre||el.parent.pre;// add this linestate.pre=el.pre;}
I'm not familiar with creating pr with test, someone else can help me?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: