20191125
1.Vue全家桶定義
2.路由怎麼定義使用的;路由的導航前衛有哪幾種
3.http請求get 與post的不同,post請求的參數放到哪裏(請求頭的消息體中)
4.Vuex有哪個部分組成;action與mutataions有什麼不同;action是怎麼改變state中的值(commit);
5.組件中怎麼傳值(父傳子,子傳父,兄弟傳值eventBus,通過ref屬性得到組件)
6.ref可以定義到普通便籤上可以獲得DOM 嗎?(可以)
7.es6中promise.all()的使用場景
8.es6中的...擴展符當改變的新的對象中的屬性值,會改變舊的對象中的屬性值嗎?
... 是一種淺拷貝,基本類型修改不會改變舊的對象中的屬性值,但是如果是對象中的屬性值爲一個對象的話會同時被修改
7.css中絕對定位,浮動,彈性盒子的應用
8.axios中怎麼增加一個自定義頭的傳輸;
axios.get(urlString,
{
headers: {
'Authorization': 'Bearer ' + token,
"Cookie" : 'sessionId=' + sessionId + '; recId=' + recId,
...
},
params: {
param1: string,
param2: string
},
...
}
)
.then(res => fn)
.catch(e => fn)
axios.post(urlString,
{
data: data,
...
},
{
headers: {
'Authorization': 'Bearer ' + token,
"Cookie" : 'sessionId=' + sessionId + '; recId=' + recId,
...
}
}
)
.then(res => fn)
.catch(e => fn)
9.axios怎麼傳輸本地的cookies;(在main.js中設置 axios.defaults.withCredentials = true)
axios.defaults.withCredentials = true; //配置爲true
axios.post('http://localhost:3000/tpzdz/vote/all', {
openid: 'oJ0mVw4QrfS603gFa_uAFDADH2Uc',
date: '2018-11-21'
}).then(function (response) {
console.log(response)
})
10.谷歌瀏覽器本地跨域問題設定
在快捷鍵中右鍵選擇屬性,在目標裏後增加--disable-web-security --user-data-dir=D:\chromedev
11.axios跨域設置
config文件夾下的index.js下對dev環境進行配置
proxyTable: {
"/api": {
target: "https://xxx.xxx.com/", //設置你調用的接口域名和端口號
changeOrigin: true, //跨域
pathRewrite: {
"^/api": "/"
}
}
},
繼續努力
20191127
1.新建一個vue實例觸發哪幾個生命週期
2.ES6中的解析賦值使用
3.null與undefine的本質區別
Undefined類型只有一個值,即undefined。當聲明的變量還未被初始化時,變量的默認值爲undefined。
Null類型也只有一個值,即null。null用來表示尚未存在的對象,常用來表示函數企圖返回一個不存在的對象。
alert(typeof undefined); //output "undefined"
alert(typeof null); //output "object"
alert(null == undefined); //output "true"
ert(null === undefined); //output "false"
alert(typeof null == typeof undefined); //output "false"
4.深拷貝的實現方式(Json.parse(Json.stringify(obj)),JS的function)
5.線程與進程的區別
6.vue的計算屬性與watch的區別
7.vue中created與mounted的生命週期有什麼不同,發起請求在哪一個生命週期好?
8.vue的組件傳值方式有哪幾種
9.數組的slice(),concat方法可以進行深拷貝嗎?
slice和concat這兩個方法,僅適用於對不包含引用對象的一維數組的深拷貝