Vue中Mint-ui的Indicator组件 ,登录中提示的使用

经验1: 这计时器中:this指向的是window对象

经验2: Mint-ui中Indicator有时候不显示的问题:要通过类名:mint-indicator-wrapper设置z-index

 1 toLogin() {
 2                 var _this = this;
 3                 Indicator.open({
 4                             text: '登录中...',
 5                             spinnerType: 'fading-circle'
 6                 });
 7                 this.timer = setTimeout(function(){
 8                         console.log(this); // 这里的this指向window对象
 9                         _this.$router.push('/home');
10                         Indicator.close();
11                 }, 2000)  
12             }  
13 css:            
14 .mint-indicator
15         .mint-indicator-wrapper
16             z-index: 2