zhouhao
2021-04-16 00e69f25a8c153238cc5cbea66b8b296b375348b
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
<!--
 * @Author: 小明丶
 * @Date: 2019-08-19 15:23:17
 * @LastEditors: 小明丶
 * @LastEditTime: 2019-08-22 16:09:23
 * @Description:
 -->
<template>
    <div class="h-100">
        <router-view></router-view>
        <van-loading type="spinner" color="white" class="app-loading" v-show="AppLoading"></van-loading>
    </div>
</template>
 
<script>
    import {
        mapState,
        mapActions,
    } from 'vuex';
 
    export default {
        data() {
            return {
 
            }
        },
        computed:{
            ...mapState(['AppLoading'])
        },
        methods: {
            ...mapActions(['getArea']),
        },
        created() {
            this.getArea();
        },
    }
</script>
 
<style lang="less" scoped>
    .h-100 {
        height: 100%;
    }
 
 
    .app-loading {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: @zIndex-999;
        background-color: rgba(0, 0, 0, 0.5);
        padding: 30px;
        border-radius: 4px;
    }
</style>