beat-method.vue 744 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!--
  2. <template>
  3. <div class="beat" v-for="i in divisioni" :key="i">
  4. <div class="subdivision" :style="background-color: colore">{{randomColore()}}</div>
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. name: 'beat',
  10. data() {
  11. colore: "#333333",
  12. tono: "332", // mHz
  13. durata: "1", // s
  14. divisioni: "2e" + random(1,8) / 2
  15. },
  16. components: {
  17. },
  18. methods: {
  19. randomColore: function(){
  20. var generatedColor = "red";
  21. this.colore = generatedColor;
  22. }
  23. },
  24. }}
  25. </script>
  26. <style>
  27. .beat{
  28. flex: 1 1 auto;
  29. width: 100%;
  30. height: 100%;
  31. border:1pt solid #333333;
  32. }
  33. .active{
  34. background-color:black;
  35. }
  36. </style>
  37. -->