lg_frontend/layouts/default.vue

37 lines
533 B
Vue
Raw Normal View History

2024-08-19 14:26:28 +00:00
<template>
<div>
<nuxt />
</div>
</template>
<script>
import { mapActions, mapState } from 'vuex'
export default {
name: "default",
computed: {
...mapState({
info: state => state.system.info
})
},
created() {
this.getViewData()
},
methods: {
...mapActions('system', ['setInfo']),
async getViewData () {
if (!this.info) {
const { data } = await this.$get('/api/Home/view');
this.setInfo(data)
}
}
}
}
</script>
<style scoped lang="less">
</style>