抓捕BUG记录
new Date() 传参
Chrome中,new Date() 方法可以传入一个字符串"20161"作为参数,但是IE却不识别。
但是如果这么用:new Date(2016, 1) ,即可实现兼容。
参考:Javascript Invalid Date Error in Internet Explorer
Weex开发
执行 dom.scrollToElement 时使用了参数 { animated: false } ,此时 Bindingx.bind 中的y值会不准确
dom.scrollToElement($refs.ele, { animated:false })
Bindingx中的y值会变得不准确。
Bindingx.bind({ eventType: 'scroll', anchor: list, props: [ { element: topHead, property: 'opacity', expression: `min(200,y)/200` // 透明 => 不透明 } ] }, (e) => { // 通过打印e可以发现其中的y返回值会不准确,导致动画失效 })
该问题仅在Android端复现。Bindingx.bind在页面初始化时就需绑定。