Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/components/rmrk/Gallery/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
aria-previous-label="Previous page"
aria-page-label="Page"
aria-current-label="Current page"
@change="scrollTop"
>
</b-pagination>
</template>
Expand All @@ -29,7 +30,7 @@ export default class Pagination extends Vue {
@Prop({ default: 20 }) public perPage!: number;
@Prop(Boolean) replace!: boolean;

public mounted() {
public mounted() {
exist(this.$route.query.page, (val) => { this.current = Number(val) });
// console.log('query', this.$route.query)
// if (
Expand All @@ -40,6 +41,12 @@ export default class Pagination extends Vue {
// }
}

public scrollTop() {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
}

get current() {
return this.value
Expand Down