鍍金池/ 問答/ HTML問答
陪我終 回答

有可能是請求頭 或者 請求類型的 問題 , stream請求類型有三種: post(json) post(text) get這些格式,
我的github
我之前有簡單寫了個例子 你可以參考一下

clipboard.png

孤酒 回答

你的hello word 33333什么的是不是寫在state里的

艷骨 回答

Web app?如果你是指h5單頁的話,vux還是可以的,風格不一樣罷了,如果你指的是Pc 單頁就不推薦用這套ui了,雖然也能用,不過畢竟針對不一樣,可以試一下iview或element

命于你 回答

startsWith的mdn,這個你的看看,ie根本就沒事實現這個方法,你既然使用了babel-polyfill,那么你應該是看不到startsWith這個方法的,所以應該是沒有被轉譯,想想引得babel-polyfill是否正確,考慮使用mdn提供的轉譯再寫一遍。

/*! http://mths.be/startswith v0.2.0 by @mathias */
if (!String.prototype.startsWith) {
  (function() {
    'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
    var defineProperty = (function() {
      // IE 8 only supports `Object.defineProperty` on DOM elements
      try {
        var object = {};
        var $defineProperty = Object.defineProperty;
        var result = $defineProperty(object, object, object) && $defineProperty;
      } catch(error) {}
      return result;
    }());
    var toString = {}.toString;
    var startsWith = function(search) {
      if (this == null) {
        throw TypeError();
      }
      var string = String(this);
      if (search && toString.call(search) == '[object RegExp]') {
        throw TypeError();
      }
      var stringLength = string.length;
      var searchString = String(search);
      var searchLength = searchString.length;
      var position = arguments.length > 1 ? arguments[1] : undefined;
      // `ToInteger`
      var pos = position ? Number(position) : 0;
      if (pos != pos) { // better `isNaN`
        pos = 0;
      }
      var start = Math.min(Math.max(pos, 0), stringLength);
      // Avoid the `indexOf` call if no match is possible
      if (searchLength + start > stringLength) {
        return false;
      }
      var index = -1;
      while (++index < searchLength) {
        if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
          return false;
        }
      }
      return true;
    };
    if (defineProperty) {
      defineProperty(String.prototype, 'startsWith', {
        'value': startsWith,
        'configurable': true,
        'writable': true
      });
    } else {
      String.prototype.startsWith = startsWith;
    }
  }());
}
夏木 回答

不知道你的是不是用vue-cli構建的項目。我當時也有報錯,是把config目錄下的index.js的assetsPublicPath由'/'改為了'./'就可以了。
clipboard.png
你試下行不行。

笨小蛋 回答

封裝的文件是不是在單獨的 js 文件中,你可能需要把 router 引進去才能用 router.push

import {router} from '@/router/index'

router/index.js

import Vue from 'vue'
import iView from 'iview'
import VueRouter from 'vue-router'
import Cookies from 'js-cookie'
import { routers } from './router'

Vue.use(VueRouter)

const RouterConfig = {
  mode: 'history',
  routes: routers
}

export const router = new VueRouter(RouterConfig)

你需要的是 new VueRouter 后的這個對象。

扯不斷 回答

一般state的狀態(tài) 要通過getter 以模塊的命名空間獲取

import { mapGetters } from 'vuex

// vue組件
computed:{
   ...mapGetters({
        a: 'a/a'
   })
}
淡墨 回答

localhost:800還是localhost:8000呢?
還有我不太理解為什么把第二個的secure設為true,從代碼上來看,你只是鏈接到了http的接口呀

念舊 回答

看人家返回給你的是什么內容了,如果是blob,這樣

jsFileDownload (filename, data, mime) {
    let blob = new Blob([data], {type: mime || 'application/octet-stream'})
    if (typeof window.navigator.msSaveBlob !== 'undefined') {
      window.navigator.msSaveBlob(blob, filename)
    } else {
      var blobURL = window.URL.createObjectURL(blob)
      var tempLink = document.createElement('a')
      tempLink.style.display = 'none'
      tempLink.href = blobURL
      tempLink.setAttribute('download', filename)
      if (typeof tempLink.download === 'undefined') {
        tempLink.setAttribute('target', '_blank')
      }
      document.body.appendChild(tempLink)
      tempLink.click()
      document.body.removeChild(tempLink)
      window.URL.revokeObjectURL(blobURL)
    }
  }

如果是url,那就很簡單了,沒必要我寫了

枕邊人 回答

nameTextStyle.padding 可以控制其位置,多看看 echarts 文檔

yAxis: {
    type: 'value',
    name: '數量',
    nameTextStyle: {
        padding: [0, 0, -50, 50]
    }
}
陌南塵 回答

不通過 input標簽上傳文件,前端應該是不能讀取excel文件的。
你通過XLSX.js解析excel文件,得到的不就是一個數組嘛。所以剛開始你沒必要讀取excel文件,可以事先把這個excel文件先轉成數組,直接使用。

忘了我 回答

FileReader不是能將圖片轉成base64么,你比較一下,新增加的圖片的base64是否和之前的重復(我不大清楚相同圖片生成兩次的base64有差異,照理說應該是一樣的)

咕嚕嚕 回答

我找到答案了,是我的錯。我取出的時候應該:

this.$route.params.is_used這樣取出.

紓惘 回答

eslint是代碼規(guī)范監(jiān)測工具,新手不建議用,容易各種報錯,打擊自信心。就你這行的意思,讓你用===代替==。