4***@qq.com
4***@qq.com
  • 发布:2021-03-24 11:43
  • 更新:2021-03-24 11:43
  • 阅读:1674

使用uviewUI的u-popup,微信小程序中无法渲染数组中的值,H5没有问题

分类:uni-app
<view style="bottom: var(--window-bottom); height: 100%;">  
      <u-popup v-model="show" mode="top" border-radius="14" height="100%" closeable style="bottom: var(--window-bottom); height: 100%;">  
        <p class="itemQuestion">{{this.list[this.itemIndex].name}}</p>  
        <scroll-view scroll-y="true" style="height: 85%;">  
          <view>  
            <view class="item-list" v-for="(item, index) in this.list[this.itemIndex].children" :key="item.id" @click="editItem(index)">  
              {{item.name}}  
            </view>  
          </view>  
        </scroll-view>  
        <u-button class="addBtn" type="success">记录</u-button>  
      </u-popup>  
      <u-popup v-model="showEdit" mode="top" border-radius="14" height="80%" closeable>  
        {{this.list[this.itemIndex].children[logIndex].name}}  
        <div id="vditor"></div>  
      </u-popup>  
    </view>  
data() {  
    return {  
      list: [{"id": 1,"name": "今天和谁相遇了?","children": [{"id": 1,"name": "今天和张三一起吃了个饭"},{"id": 2,"name": "李四来找我了"}]},{"id": 2,"name": "今天最大的收获是什么?","children": []}]  
    }  
  },

2021-03-24 11:43 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复