forked from Tokyo-Metro-Gov/covid19
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreference.vue
77 lines (72 loc) · 1.55 KB
/
reference.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<template>
<div>
<page-header
:icon-path="headerItem.iconPath"
:title="headerItem.title"
:updated-at="lastUpdateAsString"
/>
<site-top-upper />
<cards-tab />
</div>
</template>
<script lang="ts">
import { mdiChartTimelineVariant } from '@mdi/js'
import Vue from 'vue'
import { ThisTypedComponentOptionsWithRecordProps } from 'vue/types/options'
import type { MetaInfo } from 'vue-meta'
import PageHeader from '@/components/_shared/PageHeader.vue'
import CardsTab from '@/components/index/CardsTab.vue'
import SiteTopUpper from '@/components/index/SiteTopUpper.vue'
import { Data as IData } from '@/libraries/auto_generated/data_converter/convertData'
type Data = {
headerItem: {
iconPath: string
title: string
}
}
type Methods = {
onScroll: () => void
}
type Computed = {
lastUpdateAsString: string
data: IData
}
type Props = {}
const options: ThisTypedComponentOptionsWithRecordProps<
Vue,
Data,
Methods,
Computed,
Props
> = {
components: {
CardsTab,
PageHeader,
SiteTopUpper,
},
data() {
return {
headerItem: {
iconPath: mdiChartTimelineVariant,
title: this.$t('都内の最新感染動向') as string,
},
}
},
computed: {
lastUpdateAsString() {
return this.data.lastUpdate
},
data() {
return this.$store.state.data
},
},
head(): MetaInfo {
return {
title: `${this.$t('都内の最新感染動向')} : ${this.$t(
'その他 参考指標'
)}` as string,
}
},
}
export default options
</script>