show card desc on chooser
This commit is contained in:
parent
f0d51aa464
commit
7ccbacfb63
@ -2,8 +2,9 @@
|
|||||||
<div id="overlay" class="center-stuff">
|
<div id="overlay" class="center-stuff">
|
||||||
<h1>{{text}}</h1>
|
<h1>{{text}}</h1>
|
||||||
<div>
|
<div>
|
||||||
<Card v-for="c in cards" v-bind:key="c" :card="c" @click.native="select(c)"/>
|
<Card v-for="c in cards" v-bind:key="c" :card="c" @click.native="select(c)" @mouseover.native="showDesc(c)" @mouseleave.native="desc=''"/>
|
||||||
</div>
|
</div>
|
||||||
|
<p v-if="desc" style="bottom:20%;position:absolute;margin:16pt;">{{desc}}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -20,6 +21,14 @@ export default {
|
|||||||
select: Function,
|
select: Function,
|
||||||
text: String,
|
text: String,
|
||||||
},
|
},
|
||||||
|
data: () => ({
|
||||||
|
desc: ''
|
||||||
|
}),
|
||||||
|
methods: {
|
||||||
|
showDesc(card) {
|
||||||
|
this.desc = card.desc
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user