intern-study icon indicating copy to clipboard operation
intern-study copied to clipboard

分享一波上周使用vue细节2018.06.04

Open deligent-ant opened this issue 6 years ago • 3 comments

#分享一波上周使用vue细节2018.06.04

只是分享了坑,没有详细去说VUE里面的源码实现逻辑(因为也没看哈)

  1. vue style 加不加scoped区别: 当

  2. vue watch是可以深度监听的(默认就是深度监听),也就是没有vue那个this.$set这个问题。ps:记得 这个watch是没有s 不是watchs.

  3. methods方法不能用箭头函数绑定,因为箭头函数声明时候回绑定声明时父级的作用域。ps:vue会给methods等 函数执行时候绑定当前组件的实例

  4. 关于el-element中关于表格 el-table里面那个自定义scope.如果和表单一起使用,那个row绑定 也会改变以前的数值,属于引用绑定

  5. vue的v-for。知道在es6中,有new Map()对象的 for of 循环 ,也就是迭代器。在vue中虽然也有v-for,有 for of和 for in。但是呢 我在使用过程中发现是不能用迭代器的。

deligent-ant avatar Jun 04 '18 07:06 deligent-ant

good

panjizhi avatar Jun 05 '18 02:06 panjizhi

不明觉厉

leecade avatar Jun 06 '18 17:06 leecade

666

catee avatar Jun 14 '18 04:06 catee