Pobieranie danych z API zamiast lokalnie

This commit is contained in:
2022-11-27 15:28:56 +01:00
parent e6d22234b2
commit ff93e4cc32
11 changed files with 70 additions and 2121 deletions
+4 -5
View File
@@ -65,14 +65,13 @@ export default defineComponent({
data: () => ({
VERSION: packageInfo.version,
store: useStore(),
}),
setup() {
const store = useStore();
async created() {
const stockData = await (await fetch('https://spythere.github.io/api/stockData.json')).json();
return {
store,
};
this.store.stockData = stockData;
},
});
</script>