advent22/ui/src/components/CalendarDoor.vue

22 lines
422 B
Vue

<template>
<button class="button" @click="on_click">Türken {{ day + 1 }}</button>
</template>
<script lang="ts">
import { Vue, Options } from "vue-class-component";
@Options({
props: {
day: Number,
},
})
export default class extends Vue {
day!: number;
private on_click() {
this.$advent22.api_get_blob(`days/image/${this.day}`, (data) => {
this.$emit("openDoor", data);
});
}
}
</script>