避免为Vue.js循环的最后一个元素添加class=""的方法
                
             
            
            
                <p>在vuejs模板中,当循环索引的最后一次迭代时,删除tailwind类。</p>
<p><strong>在模板中</strong></p>
<pre class="brush:php;toolbar:false;">v-for="(service, index) in getAllServices.home_page_services" :key="index"</pre>
<p><strong>在脚本中</strong></p>
<pre class="brush:php;toolbar:false;"><script>
export default {
    mounted() {
        this.$store.dispatch("getHomePageContent")
    },
    computed: {
        getAllServices(){
            return this.$store.getters.getContentFormGetters
        }
    }
}</pre></p>            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
         
        
        
     
i can solve it
:class="{ 'lg:border-r-2 lg:border-blue-650': index < getAllServices.home_page_services.length - 1 }"