我需要在 vue.js 文件中插入一条注释以便将来引用,但是我在文档中没有找到如何做到这一点。
我试过 //
、 /**/
、 {{-- --}}
和 {# #}
,但似乎都不管用。
我用的是 Laravel 的刀,这是 sample_file.vue
:
<template>
<div class="media">
<like-button :post="post" v-if="post.likedByCurrentUser === false && "></like-button> {{--I want to comment this but I get an error from the gulp watch: post.canBeLikedByCurrentUser === true--}}
<div class="media-left">
<a href="#">
<img class="media-object" v-bind:src="post.user.avatar" v-bind:title="post.user.name + ' image from Gravatar'">
</a>
</div>
<div class="media-body">
<strong>{{ post.user.name }}</strong>
<p>{{post.body}}</p>
<p>{{post.likeCount}} {{ pluralize('like', post.likeCount) }}</p>
</div>
</div>
</template>
是否有人知道如何插入注释和/或如何注释代码段?