Browse Source

Correctif css non scopé + tracking paramètre route battleground

master
Adrien 4 years ago
parent
commit
423459f0f7
3 changed files with 18 additions and 10 deletions
  1. +11
    -6
      src/components/Battleground.vue
  2. +6
    -3
      src/components/BattlegroundSelector.vue
  3. +1
    -1
      src/components/Hello.vue

+ 11
- 6
src/components/Battleground.vue View File

@@ -1,5 +1,10 @@
<template> <template>
<div>Welcome to {{ battleground.name }}</div>
<div class="battleground" v-if="battleground">
<div>Welcome to {{ battleground.name }}</div>
<router-link to="alteracPass">Go to Alterac Pass</router-link>
<router-link to="battlefieldOfEternity">Go to Battlefield Of Eternity</router-link>
<router-link to="/battlegrounds">Back to selector</router-link>
</div>
</template> </template>


<script> <script>
@@ -9,17 +14,17 @@
name: 'Battleground', name: 'Battleground',
data () { data () {
return { return {
battlegroundId: this.$route.params.battlegroundId,
battleground: BATTLEGROUNDS[this.$route.params.battlegroundId]
} }
}, },
computed: { computed: {
battlegroundId () {
return this.$route.params.battlegroundId
},
battleground () { battleground () {
return BATTLEGROUNDS[this.$route.params.battlegroundId] return BATTLEGROUNDS[this.$route.params.battlegroundId]
} }
},
watch: {
$route (to) {
this.battlegroundId = to.params.battlegroundId
}
} }
} }
</script> </script>


+ 6
- 3
src/components/BattlegroundSelector.vue View File

@@ -20,9 +20,6 @@
return { return {
maps: MAPS maps: MAPS
} }
},
mounted () {
console.log(MAPS)
} }
} }
</script> </script>
@@ -38,3 +35,9 @@
border-top: solid #5659aa 1px border-top: solid #5659aa 1px
border-left: none border-left: none
</style> </style>

<style lang="sass" scoped>
a
text-decoration: none
color: inherit
</style>

+ 1
- 1
src/components/Hello.vue View File

@@ -33,7 +33,7 @@ export default {
</script> </script>


<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="sass">
<style lang="sass" scoped>
h1, h2 h1, h2
font-weight: normal font-weight: normal




Loading…
Cancel
Save