自己收藏的幾篇博客,希望對你有幫助:
https://thief.one/2017/03/01/...
http://www.jianshu.com/p/9d40...
formbody?
你的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由'/'改為了'./'就可以了。
你試下行不行。
封裝的文件是不是在單獨的 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'
})
}
(%[a-z0-9A-Z]+)+
自己解決了。
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文件先轉成數組,直接使用。
建議使用調試工具Charles 或者 spy-debugger 查看具體哪里出了問題
FileReader不是能將圖片轉成base64么,你比較一下,新增加的圖片的base64是否和之前的重復(我不大清楚相同圖片生成兩次的base64有差異,照理說應該是一樣的)
我找到答案了,是我的錯。我取出的時候應該:
this.$route.params.is_used
這樣取出.
你那個庫沒有按照amd規(guī)范來寫
eslint是代碼規(guī)范監(jiān)測工具,新手不建議用,容易各種報錯,打擊自信心。就你這行的意思,讓你用===代替==。
北大青鳥APTECH成立于1999年。依托北京大學優(yōu)質雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數據專業(yè)的國家
北大青鳥中博軟件學院創(chuàng)立于2003年,作為華東區(qū)著名互聯網學院和江蘇省首批服務外包人才培訓基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團創(chuàng)建于1999年,經過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術與教育服務機構,發(fā)展為教育服務業(yè)的綜合性企業(yè)集團,成為集合面授教學培訓、網
達內教育集團成立于2002年,是一家由留學海歸創(chuàng)辦的高端職業(yè)教育培訓機構,是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
浪潮集團項目經理。精通Java與.NET 技術, 熟練的跨平臺面向對象開發(fā)經驗,技術功底深厚。 授課風格 授課風格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
曾工作于聯想擔任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔任項目經理從事移動互聯網管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責任公司從事總經理職務負責iOS教學及管理工作。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網頁制作和網頁游戲開發(fā)。
具有10 年的Java 企業(yè)應用開發(fā)經驗。曾經歷任德國Software AG 技術顧問,美國Dachieve 系統(tǒng)架構師,美國AngelEngineers Inc. 系統(tǒng)架構師。