|
[YonStudio]
v-show 导致内容丢失
[复制链接]
<view class="course-item" v-for="(item, index) in list">
<view class="course-item-title" @click="openCourse(index)">
<text class="course-title_text">{{ item.stageName }}</text>
<image :class="stageArray[index] ? 'arrow_icons' : 'arrow_icon'" src="../../image/icon/arrow.png"></image>
</view>
<view v-show="stageArray[index]">
<view class="course-item-stage" v-for="(_item, _index) in item.lists">
<text class="course-title_text">{{ _item.name }}</text>
<text>{{ _item.isFinish ? '已完成' : '未完成' }}</text>
<view class="stage-options">
<text class="stage-options_text">测试</text>
<text class="stage-options_text">测试</text>
<text class="stage-options_text">测试</text>
</view>
</view>
</view>
</view>
这是一段简易的代码 实现出来是一个折叠面板
第一次折叠没有问题,折叠第二个面板时,第一个面板内的{{ _item.name }}会消失,剩余元素还在
|
|