Skip to content

Commit a6a9735

Browse files
linkHe12kazupon
authored andcommitted
fix smoothScroll.animateScroll parameter error (vuejs#823)
"List Rendering > Array Change Detection" > You can open the console and play with the previous examples’ items array by calling their mutation methods. For example: example1.items.push({ message: 'Baz' }) ecec `example1.items.push({ message: 'Baz' })` throw error
1 parent 85ca50e commit a6a9735

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)