在使用自定义组件的时候 properties 向外属性使用 dataList 属性名时外部传入数据不生效;
component 的 js:

component 的 wxml:

引用 component 的 js:

引用 component 的 wxml:

视图:

点击后dataList变动,服务器有时接收不到用户向公众号发送的消息-微信小程序教程 ...。但是显示不改变,observer也没有被触发;
如果将 properties 的 dataList 属性名改成 cardList 属性,则会生效;
求解
微信小程序开发相关问题解答;本文来自微信小程序工厂 http://www.xcxgc.com 转载请保留。
微信小程序开发者回答:
L***:
你好,data- 开头的属性在 WXML 中会被视为 dataset 的一部分。
拾***:
竟然忽略了这一点,谢谢解答。
真机支付点击无效果
本文网址:http://www.91bianli.com/kaifazhinan/73732.html