Stephan Tang
Stephan Tang
这其实是我自己学习 Vue 源码之后自己倒腾的小项目,其实也有一些 bug 的 😂 提示 `scope.alert is not a function` 是因为在语句解析的时候没有把 window 下的全局方法和常量单独匹配,全当做 `data` 对象里面的作用域处理了,之后我可以处理下,现在可以先: ``` model: { alert: function (str) { alert(str) } } ``` 来代替。
你是说根节点使用 v-for 吗?
是的,Vue 最初的 1.x 版本也是不允许在根节点用 v-for 和 v-if 的。
> 如果想通过比较连续两次值是否相等来过滤掉其中一次无意义的更新操作所带来的成本是很大的,因为属性的值可能会是对象、函数、数组等复合对象,要想对它们进行值的比较是很困难的。 用 `===` 比较过滤相同值完全没问题,`getter/setter` 的问题不在这,在于的一点比如如果需要获取 oldValue 的话才是比较费成本的操作。
> but after scrolling couple times it looks as it should This is a very strange and difficult problem to find out, can you try `this.$forceUpdate()` to see if problem...
是不是开启了 Chrome 的开发者工具,并且把“停用缓存”勾上了? 生产环境也不需要后后台配置,相同的 URL 默认会缓存的。
Did you mean render blank(missing item) when scrolling up at the bottom?
@ZelCloud Is your device is MacOS or iOS?
There is space for improvement the v2 performance. Can you put some screenshots about performance reducing?
What's the browser device?