Browse Source

Dokončení projektu (počítaní cihel + hmotnost)

master
Lukáš Helcl 4 years ago
parent
commit
a3b227ee72
  1. 14508
      package-lock.json
  2. 9
      src/components/stavebniny.vue

14508
package-lock.json

File diff suppressed because it is too large

9
src/components/stavebniny.vue

@ -15,7 +15,7 @@
</div> </div>
<div class="col-4"> <div class="col-4">
<label> Hmotnost </label> <label> Hmotnost </label>
60 kg
{{ komin * hmotnost_cihly}} kg
</div> </div>
</div> </div>
</div> </div>
@ -28,14 +28,15 @@ export default {
name: 'stavebniny', name: 'stavebniny',
data: function() { data: function() {
return { return {
komin: [],
komin: (0),
pocet_cihel: [1, 2, 3, 4, 5,], pocet_cihel: [1, 2, 3, 4, 5,],
hmotnost_cihly: (12),
} }
}, },
methods:{ methods:{
prilozitCihlu: function(item) { prilozitCihlu: function(item) {
this.pocet_cihel.slice(this.pocet_cihel.indexOF(item), 1);
this.komin.push("cihla"+item);
this.pocet_cihel.splice(this.pocet_cihel.indexOf(item), 1);
this.komin++
} }
}, },

Loading…
Cancel
Save