1. The project uses Vue
2. Use and introduce elementUI
Instructions:
1. Add v-loading in the area that needs loading
<div class="main" v-loading="loading">
内容区域
</div>
2. Define variable loading in data
loading: false,
3. Display the loading effect when calling the interface, and end after returning the data
begin(){
//调用接口
this.loading = true;
if (response.code == 200) {
//成功后隐藏
this.loading = false;
}
}