关于滑动时,左侧导航高亮的问题。现在滑动能实时取到currentIndex,但$index值一直为空。

来源:

晓风莞尔

2016-12-03


http://szimg.mukewang.com/584282e10001754207720105.jpg

http://szimg.mukewang.com/5842832a00015e0703580584.jpg

写回答

1回答

晓风莞尔

提问者

2016-12-03

<li class="menu-item" v-for="(item, index) in goods" v-bind:class="{'current':currentIndex===index}">

<span v-show="item.type>0" class="icon"></span>

<span class="text">{{item.name}}</span>

</li>

酱紫可以.

1
0

Vue.js2.5+cube-ui重构饿了么App(经典再升级)

掌握Vue1.0到2.0再到2.5最全版本应用与迭代,打造极致流畅的WebApp

9868 学习 · 4162 问题

查看课程