<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
天蓬老师2017-07-06 10:36:47
To be dynamic, the attributes do not add :
(abbreviation of v-bind:
), it is a static attribute. Whatever is passed is what it is. Otherwise, the expression
:to="'/intro/'+item.id"
OR
v-bind:to="'/intro/'+item.id"
怪我咯2017-07-06 10:36:47
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.