lichenabson

Results comments of lichenabson

不使用 call apply方法 ``` Function.prototype.bind = function() { const context = arguments[0] || window const argument = Array.from(arguments).splice(1, arguments.length - 1) return (()=>{ context.fn = this context.fn(...argument) delete context.fn })...

我将git reset 到 这次 PR 合并之前, ```npm run dev``` 就恢复正常 https://github.com/youzan/vant/pull/9384 应该是这次 ```分包``` 导致的问题 ![image](https://user-images.githubusercontent.com/20200267/136938412-7652bfbf-c953-4608-945d-4e906fd667da.png)

@shaonialife 更新data中某个数据时,会触发更新page中其他组件中的数据,即使是这个组件不传入值 ![image](https://user-images.githubusercontent.com/20200267/44502516-669a7700-a6c4-11e8-8aa4-2026742c9273.png) ![image](https://user-images.githubusercontent.com/20200267/44502279-5e8e0780-a6c3-11e8-9adc-20d58493b428.png) 看mapvue/index.js中updateDataToMp的方法依旧会更新组件中的数据 ![image](https://user-images.githubusercontent.com/20200267/44502402-f55ac400-a6c3-11e8-8c29-b802cfaf4797.png)

@shaonialife 我这边发现mpvue不止有每次更新都会传输所有数据的问题,还有一个问题,如果页面中有组件话,改变一个独立的值,会多次更新数据,更新数据的次数取决于这个页面上有多少个组件,我会另开一个issue

@kala888 你这个应该不是直接原因, 详情页即使是一个很简单的页面 例如这样 ![image](https://user-images.githubusercontent.com/20200267/44642724-1ee75880-aa00-11e8-88f0-b8ae779125c3.png) 加入mpvue.trace 监控updateDataToMP函数的话,不停的重新进入退出,可以看到update递增式的被触发,如果页面数据复杂或者客户端机型破旧的话的话,就会感知到明显的卡顿 ![image](https://user-images.githubusercontent.com/20200267/44642888-d8dec480-aa00-11e8-917f-368977b521c5.png)

我也发现了这个问题,更新data中的某个数据,页面中的其他组件数据也会被更新,Vue$3.prototype.$updateDataToMP这个方法一直被调用