rename biblio to library

This commit is contained in:
axolotle
2021-03-08 16:28:49 +01:00
parent 973b191eaf
commit b097712477
6 changed files with 0 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
<template>
<component-debug :component="this">
<div class="py-3">
<b-button @click="openText">
add text 50
</b-button>
</div>
<component :is="mode" />
<text-card v-for="group in groups" :key="group.id" :id="group.id" />
</component-debug>
</template>
<script>
import { CardList, CardMap, TreeMap, TextCard } from './biblio'
export default {
name: 'Biblio',
components: {
CardList,
CardMap,
TreeMap,
TextCard
},
metaInfo () {
return {
title: this.groups.length ? 'Bibliothèque - ' + this.groups[0].id : 'Bibliothèque',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
]
}
},
props: {
mode: { type: String, required: true },
texts: { type: Array, required: true }
},
computed: {
groups () {
return this.texts.map(text => {
const [id, ...prod] = text
return { id, prod }
})
}
},
methods: {
openText () {
this.$router.push({
query: {
mode: this.mode,
texts: [...this.texts, [50]]
}
})
}
}
}
</script>
<style lang="scss" scoped>
</style>