Moves common functionality into reusable mixin

This commit is contained in:
Alicia Sykes
2021-12-16 04:53:33 +00:00
parent e0b09d48ee
commit 771e2f3717
13 changed files with 0 additions and 87 deletions

View File

@@ -18,9 +18,6 @@ export default {
chartDom: null,
};
},
mounted() {
this.fetchData();
},
computed: {
/* The stock or share asset symbol to fetch data for */
stock() {
@@ -66,11 +63,6 @@ export default {
},
},
methods: {
/* Extends mixin, and updates data. Called by parent component */
update() {
this.startLoading();
this.fetchData();
},
/* Create new chart, using the crypto data */
generateChart() {
return new Chart(`#${this.chartId}`, {