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
| <!--
| * @Author: 小明丶
| * @Date: 2019-08-19 15:23:17
| * @LastEditors: zxq
| * @LastEditTime: 2022-11-10 09:51:40
| * @Description:
| -->
| <template>
| <div class="h-100">
| <router-view></router-view>
| <!-- <van-loading type="spinner" color="white" class="app-loading" v-show="AppLoading"></van-loading> -->
| <van-loading color="white" class="app-loading" v-show="AppLoading"/>
| </div>
| </template>
|
| <script>
| import Vue from 'vue';
| import { Loading } from 'vant';
|
| Vue.use(Loading);
| 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>
|
|