由于某种原因,Vue没有为我呈现{{post.title}}
、{{ post.content }}
括号。内容是空的(请看下面呈现的html ),但是v-bind:href="post.url"
出于某种原因工作。我是Vue.js的新手,现在真的困了一天。背景:这段代码是Vue即时搜索我的Jekyll博客。
<div v-if="articles" class="large-12 columns">
<article v-for="post in itemsSearched" class="article-summary">
<header>
<h2><a v-bind:href="post.url">{{post.title}}</a></h2>
</header>
<p>{{ post.content }}</p>
<div class="large-12 column">
<a class="read-more" v-bind:href="post.url">Read More...</a>
<div class="middle_line"></div>
</div>
</article>
</div>
呈现的
<article class="article-summary">
<header>
<h2><a href="/jekyll-update/2017/05/23/welcome-to-jekyll.html"></a></h2>
</header>
<p></p>
<div class="large-12 column">
<a href="/jekyll-update/2017/05/23/welcome-to-jekyll.html" class="read-more">Read More...</a>
<div class="middle_line"></div>
</div>
</article>
发布于 2017-05-24 19:03:14
发布于 2017-05-24 19:42:19
请改用v-text
或v-html
。在vue 2.0中,Vue-config-delimiters
被废弃,delimiters
仅在完整构建中是可维护的。[]:https://v2.vuejs.org/v2/guide/migration.html#Vue-config-delimiters-replaced
https://stackoverflow.com/questions/44171373
复制相似问题