Skip to content
This repository was archived by the owner on May 27, 2019. It is now read-only.

Commit 71f9b5a

Browse files
committed
feat(e-commerce): scroll top when page changes
1 parent 18e7631 commit 71f9b5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/e-commerce/src/App.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
'ais-pagination__item--active': 'active',
121121
'ais-pagination__item--disabled': 'disabled'
122122
123-
}"/>
123+
}" v-on:page-change="onPageChange"/>
124124

125125
</div>
126126
</div>
@@ -132,6 +132,11 @@
132132
<script>
133133
export default {
134134
name: 'app',
135+
methods: {
136+
onPageChange() {
137+
window.scrollTo(0,0);
138+
}
139+
}
135140
};
136141
</script>
137142

0 commit comments

Comments
 (0)