<router-link to="'/intro/'+item.id">
<p class="gradual"><span>{{item.name}}</span><br>{{item.name}}</p>
<img class="store_img" :src="item.pic">
</router-link>
Why the connection is written like this #/'/intro/' item.id
How to transfer dynamic values
To be dynamic, the attributes do not add
can be passed in:
(abbreviation ofv-bind:
), it is a static attribute. Whatever is passed is what it is. Otherwise, theexpression
OR
to
===>:to
to is the element attribute you added. :to is an attribute that Vue can recognize and parse, and the content after :to will be executed as an expression.