有遇到过这样的情况的吗?输出两个对象,视图输出三个为何这是!
<block v-for="(item, key) in areaCity" :key="key">
<view :class="cityKey > 0 && cityKey == key ? 'area-list-item text-red' : 'area-list-item'" :data-key="key" @tap="chooseCity">
<text class="area">{{item.name}}</text>
<icon size="12" color="red" type="success_no_circle" v-if="cityKey > 0 && cityKey == key"></icon>
</view>
</block>
视图代码!
this.provinceKey = e.currentTarget.dataset.key;
this.areaCity = this.areaData[this.provinceKey].children;
逻辑代码