123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <template>
- <div class="about">
- <el-config-provider :locale="zhCn">
- <v-header />
- <v-sidebar />
- <div class="content-box" :class="{ 'content-collapse': collapse }">
- <v-tags></v-tags>
- <div class="content">
- <router-view />
- </div>
- </div>
- </el-config-provider>
- </div>
- </template>
- <script setup>
- import { ElConfigProvider } from "element-plus";
- import zhCn from "element-plus/lib/locale/lang/zh-cn";
- import { computed, onBeforeMount } from "vue";
- import { useStore } from "vuex";
- import vHeader from "../components/Header.vue";
- import vSidebar from "../components/Sidebar.vue";
- import vTags from "../components/Tags.vue";
- import { fetchStationListAll, fetchBooststation } from "/@/api/api.js";
- const store = useStore();
- const collapse = computed(() => store.state.collapse);
- onBeforeMount(async () => {
- await getStationListAll();
- await getBooststation();
- });
- const getStationListAll = async () => {
- const { data } = await fetchStationListAll();
- store.dispatch("actionsStationListAll", data);
- };
- const getBooststation = async () => {
- const { data } = await fetchBooststation();
- store.dispatch("actionsBooststationList", data);
- };
- </script>
|