Skip to content

Commit 7b66f45

Browse files
authored
修改列表渲染-数组更新检测-变异方法中example1和2的watch
smoothScroll.animateScroll参数传递错误,执行示例代码时watch方法报错,影响数据修改。
1 parent ed31c55 commit 7b66f45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v2/guide/list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var example1 = new Vue({
4949
},
5050
watch: {
5151
items: function () {
52-
smoothScroll.animateScroll(null, '#example-1')
52+
smoothScroll.animateScroll(document.querySelector('#example-1'))
5353
}
5454
}
5555
})
@@ -99,7 +99,7 @@ var example2 = new Vue({
9999
},
100100
watch: {
101101
items: function () {
102-
smoothScroll.animateScroll(null, '#example-2')
102+
smoothScroll.animateScroll(document.querySelector('#example-2'))
103103
}
104104
}
105105
})

0 commit comments

Comments
 (0)