uniapp 小问题解决

901 阅读1分钟
  1. 模块for 循环没加:key时提示 (Emitted value instead of an instance of Error) : component lists rendered with v-for should have explicit keys.

处理方式: :key="index"

        <view class="cell">
            <uni-list>
                <uni-list-item v-for="(item, index) in jingshus" :title="item.zh_title" :key="index" :note="item.zh_byline" @click="goToJuan(item.id)"></uni-list-item>
            </uni-list>
        </view>