Skip to content
Snippets Groups Projects
Commit 7cda6e6f authored by permcu's avatar permcu
Browse files

Parameterize coursebook loading component

parent fa983695
No related branches found
No related tags found
2 merge requests!355Implement infinite scrolling and by date navigation for coursebook,!350Resolve "Add simple course book list"
......@@ -45,6 +45,9 @@
</template>
<template #loading>
<coursebook-loader
:number-of-days="10"
:number-of-docs="5"
/>
</template>
<template #no-data>
......@@ -220,7 +223,9 @@ export default {
});
},
setDate(date) {
this.$router.replace({ hash: date })
if (!(this.$route.hash.substring(1) === date)) {
this.$router.replace({ hash: date })
}
},
fixScrollPos(height, top) {
console.log('fix @', top, document.documentElement.scrollTop, height, document.documentElement.scrollHeight);
......
<template>
<div>
<v-list-item v-for="i in 10" :key="'i-' + i">
<v-list-item v-for="i in numberOfDays" :key="'i-' + i">
<v-list-item-content>
<v-list-item-title>
<v-skeleton-loader type="heading" />
</v-list-item-title>
<v-list max-width="100%">
<v-list-item v-for="j in 5" :key="'j-' + j">
<v-list-item v-for="j in numberOfDocs" :key="'j-' + j">
<DocumentationLoader />
</v-list-item>
</v-list>
......@@ -20,5 +20,17 @@ import DocumentationLoader from "./documentation/DocumentationLoader.vue";
export default {
name: "CoursebookLoader",
components: { DocumentationLoader },
props: {
numberOfDays: {
type: Number,
required: false,
default: 1
},
numberOfDocs: {
type: Number,
required: false,
default: 1
},
},
};
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment