add weather reload button for dev
parent
54ed1b27fd
commit
f4eae5a164
@ -1,28 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container
|
<v-container fluid grid-list-md pa-2>
|
||||||
fluid
|
<v-card class="mx-auto my-12" max-width="400" elevation="24">
|
||||||
grid-list-md
|
<!--<v-img class="device-screen-image" :aspect-ratio="16/9" src="/fs/screen.bmp"></v-img>-->
|
||||||
pa-2
|
</v-card>
|
||||||
>
|
<v-btn class="ma-2" :loading="isLoading" color="secondary" @click="updateData">load weather data</v-btn>
|
||||||
<v-card
|
</v-container>
|
||||||
class="mx-auto my-12"
|
|
||||||
max-width="400"
|
|
||||||
elevation="24"
|
|
||||||
>
|
|
||||||
<v-img class="device-screen-image" :aspect-ratio="16/9" src="/fs/screen.bmp"></v-img>
|
|
||||||
</v-card>
|
|
||||||
|
|
||||||
</v-container>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
//import api from '../api/core'
|
import apiDevice from "@/api/device";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data: () => ({
|
||||||
|
isLoading: false
|
||||||
|
}),
|
||||||
|
methods: {
|
||||||
|
updateData() {
|
||||||
|
this.isLoading = true;
|
||||||
|
|
||||||
export default {
|
apiDevice.updateWeather(() => {
|
||||||
name: "Dashboard",
|
this.isLoading = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue