1
0
Fork 0
mirror of https://github.com/em-squared/5e-drs.git synced 2025-10-29 20:54:19 +00:00

optimisation d'affichage des tables (monstres, sorts, objets magiques) pour les mobiles

This commit is contained in:
Maxime Moraine 2021-02-11 14:11:45 +01:00
parent 63fb1d4ca5
commit f7750b5034
7 changed files with 81 additions and 9058 deletions

View file

@ -40,6 +40,7 @@
hide-default-footer
show-expand
@click:row="onClickRow"
mobile-breakpoint="0"
>
<template v-slot:expanded-item="{ headers, item }">
@ -97,13 +98,11 @@ export default {
],
page: 1,
pageCount: 0,
headers: [
{ text: "", align: 'center', sortable: false, value: 'isInTreasureChest' },
{ text: "Nom", align: 'start', sortable: true, value: 'title' },
{ text: "Type", align: 'start', sortable: false, value: 'frontmatter.type' },
{ text: "Rareté", align: 'start', sortable: false, value: 'frontmatter.rarity' },
{ text: "Harmonisation", align: 'start', sortable: false, value: 'frontmatter.attunement' },
],
showColumn: {
type: true,
rarity: true,
attunement: true,
}
}
},
@ -115,6 +114,23 @@ export default {
hasAttunement: state => state.magicItemFilters.hasAttunement,
}),
headers() {
let headers = [
{ text: "", align: 'center', sortable: false, value: 'isInTreasureChest' },
{ text: "Nom", align: 'start', sortable: true, value: 'title' },
]
if (this.showColumn.school && this.$vuetify.breakpoint.mdAndUp) {
headers.push({ text: "Type", align: 'start', sortable: false, value: 'frontmatter.type' })
}
if (this.showColumn.castingTime && this.$vuetify.breakpoint.mdAndUp) {
headers.push({ text: "Rareté", align: 'start', sortable: false, value: 'frontmatter.rarity' })
}
if (this.showColumn.duration && this.$vuetify.breakpoint.mdAndUp) {
headers.push({ text: "Harmonisation", align: 'start', sortable: false, value: 'frontmatter.attunement' })
}
return headers
},
selectedTypes() {
let result = []
for (let type of this.types) {