标签:json data from rip ons created ios 分割 div
<template> <div class="home"> </div> </template> <script> // @ is an alias to /src import axios from ‘axios‘; export default { // 并发请求:同时多个请求,并统一处理返回值 name: ‘axios2-3‘, created() { //axios.all()数组 //axios.spread()将all()返回的数据进行分割统一处理, axios.all( [ axios.get(‘/data.json‘), axios.get(‘/city.json‘), ] ).then( axios.spread((dataRes, cityRes)=>{ console.log(dataRes, cityRes); }) ) }, } </script>
标签:json data from rip ons created ios 分割 div
原文地址:https://www.cnblogs.com/Harold-Hua/p/11626256.html