
5 changed files with 77 additions and 5 deletions
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,54 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div class="row"> |
||||
|
<div class="col-6 brick"> |
||||
|
<img v-on:click="prilozitCihlu(item)" v-for="item in pocet_cihel" :key="item" src="../assets/brick.png" alt=""> |
||||
|
</div> |
||||
|
<div class="col-6 list"> |
||||
|
<div class="row"> |
||||
|
<div class="col-4"> |
||||
|
<label> Počet cihel </label> |
||||
|
{{ komin }} cihli |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<img v-for="item in komin" :key="item" src="../assets/brick.png" alt=""> |
||||
|
</div> |
||||
|
<div class="col-4"> |
||||
|
<label> Hmotnost </label> |
||||
|
60 kg |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'stavebniny', |
||||
|
data: function() { |
||||
|
return { |
||||
|
komin: [], |
||||
|
pocet_cihel: [1, 2, 3, 4, 5,], |
||||
|
} |
||||
|
}, |
||||
|
methods:{ |
||||
|
prilozitCihlu: function(item) { |
||||
|
this.pocet_cihel.slice(this.pocet_cihel.indexOF(item), 1); |
||||
|
this.komin.push("cihla"+item); |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
props: { |
||||
|
pocet: {default: () => 0}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
img { |
||||
|
width: 50px; |
||||
|
height: 50px; |
||||
|
margin: 5px |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue