Here to solve the front-end Vue data with parameters and parameters containing #

Cut the crap on * * code # parameter is the second time update I feel like writing code must dare to write Because when I was in the vue request # had been done But in HTML always feel not achieve them at first I found on the Internet a large parameter contains # approach Are the donkey head wrong horsetail Finally add up This method is EncodeURIComponent also inexplicably implements **

<li class="index_arc_item" v-for="items in dataall">
    <a href="#" class="pic">
        <img class="lazyload" data-original="images/7.jpg" />
    </a>
    <h4 class="title"><a :href="'/acticleshow/'+encodeURIComponent(items.dataname)">{{items.dataname}}</a></h4>
    <div class="date_hits">
        <span>{{items.author}}</span>
        <span>{{items.datatime}}</span>
        <span><a href="">{{items.dataclassify}}</a></span>
        <p class="hits"><i class="Hui-iconfont" title="Clicks">&#xe6c1; </i>276° < / p > < pclass="commonts"><i class="Hui-iconfont" title="Clicks">&#xe622; </i> <spanclass="cy_cmt_count">20</span></p>
    </div>
    <div class="desc">{{items.databrief}}</div>
</li>
Copy the code

My idea here is that when the front-end VUE performs v-for rendering data, it takes some current data of the Vue and then passes the href parameter to the back end, and the back end performs corresponding operations according to the transmitted parameters The logic of my site is mostly in front of href: it’s very easy to confuse the @href with the: href syntax using the Thymeleaf template

Promote a personal learning databasewww.aolanghs.com