import axios from 'axios'
import _ from 'lodash'
methods:{
login:_.debounce(async function(){
try{
const ret=await axios.get('/api/session')
}catch(err){
const {status}=err.response
switch(status){
case 404 :
this.loginMessage='登录失败,请重试!'
break;
}
}
},500)
}
防抖异步模板
最新推荐文章于 2024-05-28 10:54:36 发布