- 页面直接写入初始数据和在onload中赋值子组件表现不一致,这是什么原因?
//直接赋值 data:{port:{ "uconf": [ [1, 9600, 8, 0, 1, 19, 1, 20, "", 0], [], [] ], "nconf": [ ["mqtt", "117.34.118.44", 1883, 300, "863488058096796", "", "", "866262049424228/downData", "866262049424228/upData;0;866262049424228/controlReply;", 0, 0, 0, 0, "", [1], 0, 0], [], [], [], [], [] ], "mb": [ [2, 1, 21, [1], 1, 0, 0, "", "", "", 0, 500, 0, 5, 3], [ [10, 96, "010300010001"], [ ["a", 1, "H", 1] ] ] ], }} //onload中赋值 onLoad(options) { this.setData({ port:{ "uconf": [ [1, 9600, 8, 0, 1, 19, 1, 20, "", 0], [], [] ], "nconf": [ ["mqtt", "117.34.118.44", 1883, 300, "863488058096796", "", "", "866262049424228/downData", "866262049424228/upData;0;866262049424228/controlReply;", 0, 0, 0, 0, "", [1], 0, 0], [], [], [], [], [] ], "mb": [ [2, 1, 21, [1], 1, 0, 0, "", "", "", 0, 500, 0, 5, 3], [ [10, 96, "010300010001"], [ ["a", 1, "H", 1] ] ] ], } }) } 两种赋值,第二种部分数据没初始化,两种页面表现不一致
2022-12-27 - 清除定时器
页面有个跑马灯效果,跳转然后返回,在虚拟机上轮播正常,在真机上会变快
2018-11-02 - movable-view组件,在不同手机下同一个位置获取的x不一样
[图片] 在iPhone6 下 [图片] 在iPhone7P下 上图为在微信开发者工具里面两种手机模式下,[图片]为所在的位置点, 组件movable-view的x值同为300的效果。我想问下为什么效果不是一致的?属性x值得单位是什么?
2018-10-24