wosinkong
wosinkong
  • 发布:2020-08-18 23:26
  • 更新:2020-08-18 23:37
  • 阅读:955

支付宝小程序 v-for 传值获取问题

分类:uni-app
<view class="cart-cart-box-right-choose" v-if="item.Foods_Choose_Id">  
                                        <text class="cart-cart-box-right-choose-tag"  v-for="(that,index) in getChoose(item.Foods_Choose_Id)" :key="index" :data-foodid="item.Id" :data-index="index" @tap="ChooseChange">{{that.Tag}}</text>  
                                    </view>

以上这一部分的VUE代码
v-for的数组是通过getChoose函数(computed和methods都试过了)返回的一个数组
在H5、 APP和微信小程序下都是正常加载的 唯独支付宝小程序无法正常显示 提示getChoose is not a function

getChoose(id){   
                var index = this.choose.findIndex(choose=>choose.id === id)  
                if(index > -1){  
                    return this.choose[index].list  
                }else{  
                    return null  
                }  
            }
2020-08-18 23:26 负责人:无 分享
已邀请:
wosinkong

wosinkong (作者) - 酷爱编程

再不改变我的数据结构前提下,如有解决办法愿意给个小红包表达敬意!

  • Snow430

    请问怎么解决的啊

    2022-03-17 18:16

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