generated from kabaluyot/daks.ts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.vue
52 lines (45 loc) · 1.22 KB
/
index.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
<template>
<v-container class="home__container mx-auto">
<v-row justify="center" align="center">
<v-img src="/icon.png" class="mt-10" contain height="300" width="300" />
</v-row>
</v-container>
</template>
<script lang="ts">
import { Component, Vue, namespace } from 'nuxt-property-decorator'
import { LsKeys } from '~/api/localstorage'
import { AlertInterface } from '~/store/global/state.types'
const GLOBAL_STORE = namespace('global')
@Component({
head() {
return {
title: 'Home',
}
},
})
export default class Index extends Vue {
@GLOBAL_STORE.State('alert') global_alert!: AlertInterface
@GLOBAL_STORE.Action('setAlert')
global_set_alert!: (payload: AlertInterface) => void
mounted(): void {
// print values using runtime config
console.log('APP_NAME', this.$config.appName)
// Alert
this.global_set_alert({
state: true,
message: 'Sample alert message here.',
variant: 'success',
dismiss: true,
timeout: 3000,
})
// store in local storage
console.log(LsKeys.LAST_KNOWN_MESSAGE)
this.$localStorageRepository.SetItem(LsKeys.LAST_KNOWN_MESSAGE, 'Hello')
}
}
</script>
<style scoped>
.home__container {
max-width: 1440px;
}
</style>