html52.com
我爱小程序-开发者交流社区

小程序wepy组件传值问题

问题模块 框架类型 问题类型 终端类型 微信版本 基础库版本
框架 小程序 Bug 客户端 8 2.x


Demo 1********************************************

<component-1 :list.sync="listData">
 
//    子组件可以接到 listData 的值
 
</component-1>
 
 
 
<component-1 :list.sync="list.listData">
 
//    子组件接不到listData 的值,
 
//    问题_1:怎么才能直接传递对象中的属性
 
</component-1>
 
 
 
<component-1 :list.sync="[1,2,3]">
 
//    子组件接不到listData 的值,
 
//    问题_2:怎么才能直接写数组传值
 
</component-1>
 

 
data:{
 
    listData:[1,2,3],
 
    list:{
 
        listData:[3,4]
 
    }
 
}




求解,问题中的现象是框架不支持,还是又用了什么非主流的骚语法?





评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付