如何吧vue-resource 再次封装到一个js文件里面 如:
let Ajax = {
Vue.http.get(url,data).then(
// ...代码
return data
)
}
然后在别的地方直接调用 如:
save(){
this.Ajax.get(url,data);
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号