<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                > 問:axios 是什么? 答:是一個基于 promise 的 HTTP 庫,可以用在瀏覽器和 node.js 中。 簡單的講,就是我們在vue的項目中,用axios來代替 ajax 來進行http請求,從服務器獲取數據。 回歸正題,開始在vue-cli 中整合加入 axios 1、通過 npm 安裝 axios ```javascript npm install axios ``` ![](https://img.kancloud.cn/a2/ef/a2efe0356de18fc6f0a10287b7bc909e_1204x292.png) 2、在 `main.js` 中添加 ``` import axios from 'axios' Vue.prototype.$http= axios ``` 這時候如果在其它的組件中,是無法使用 axios 命令的。所以我們將 axios 改寫為 Vue 的原型屬性 ![](https://img.kancloud.cn/1d/bf/1dbfca44da9c1ddd1f29c8dcd36540f6_1240x1046.png) 在 main.js 中添加了這兩行代碼之后,就能直接在組件的 methods 中使用 $http命令 例如 ``` methods: { show() { this.$http({ method: 'get', url: '/user', data: { name: 'virus' } }) } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看