ES6常用片段

原文链接: http://www.cnblogs.com/thing/p/9371808.html

promise:

--在return里面:

methods:{
      getSellData(){
         return axios.get('/api/seller').then((res=>{
            return Promise.resolve(res)
         }))
      }
}

遍历对象的key:

Object.keys(storeCartList).forEach(itemGroup=>{

转载于:https://www.cnblogs.com/thing/p/9371808.html

猜你喜欢

转载自blog.csdn.net/weixin_30701575/article/details/94783785