这是写的一个tab切换,点击的时候,通过父传子的storyList来改变内容,点击的时候跳转到详情页,返回详情页的时候怎么返回之前选择状态展示对应的内容
<ul class="hw_ul">
<li v-for="(item,index) in hwList" :key="index"
:class="index == rangeCode ? 'act' : ''"
@click="rangeClick(index)">{{item}}
</li>
</ul>
<keep-alive>
<home-content :data="storyList" :thatCode="rangeCode"></home-content>
</keep-alive>
使用vuex保存状态