axios基本語法

axios基本語法 axios特點 axios語法 html設置4個按鈕再js獲取別忘了引入axios //指定默認配置 axios.defaults.baseURL=‘http://localhost:3000’ 發送get請求 axios({ url:’/posts’, //url參數 對象 params:{ id: 1 }, }) .then(a=>{ console.log(a.data)
相關文章
相關標籤/搜索