AccountsList.vue 863 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <template>
  2. <div class="accounts-list">
  3. <div class="account" v-for="(account, accountIndex) in accounts">
  4. Account
  5. <button
  6. @click="editAccount(accountIndex)"
  7. >
  8. Edit account
  9. </button>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. data: function() {
  16. return {
  17. };
  18. },
  19. methods: {
  20. },
  21. props: {
  22. accounts: Array
  23. },
  24. mounted() {
  25. },
  26. methods: {
  27. editAccount(index) {
  28. console.log(this.accounts[index]);
  29. }
  30. /*addEntry() {
  31. let emptyEntry = [];
  32. this.fieldTypes.forEach((fieldType) => {
  33. emptyEntry.push(null);
  34. });
  35. this.entries.push(emptyEntry);
  36. },
  37. removeEntry(index) {
  38. this.entries.splice(index, 1);
  39. },
  40. toggleCheckbox(entryIndex, fieldIndex) {
  41. this.$set(this.entries[entryIndex], fieldIndex, !this.entries[entryIndex][fieldIndex]);
  42. }*/
  43. }
  44. };
  45. </script>
  46. <style lang="scss" scoped>
  47. </style>