我需要在vue中插入注释.js文件供将来参考,但我在文档中找不到你是如何做到这一点的.
我试过//
、/**/
、{{-- --}}
和{# #}
,但似乎都不管用.
我用的是拉威尔的刀.这就是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>
有人知道如何插入注释和/或如何注释代码吗?