mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 11:44:19 +00:00
Pobieranie danych z API zamiast lokalnie
This commit is contained in:
+4
-5
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user