簡單寫了個方法:
resetTree (oldTree) {
let newTree = oldTree.map(item => {
if (item.children) {
return {
...item,
title: item.name,
children: this.resetTree(item.children)
}
} else {
return {
...item,
title: item.name
}
}
})
return newTree
}
為什么不用v-for 循環(huán)呢?
done
是回調(diào)函數(shù),意思是告訴調(diào)用你的人(passport
)你已經(jīng)執(zhí)行完你要執(zhí)行的內(nèi)容了,讓它繼續(xù)跑它的邏輯。
一般是以done(err,data)
的形式回調(diào)。
用戶的唯一標(biāo)識 是openid或者uid 你這樣區(qū)分是對的。
{
"name": "xxxxxx",
"version": "11111",
"description": "xxxxxxx",
"author": xxxxx",
"private": true,
"scripts": {
"dev": "node server.js",
"start": "node server.js",
"build": "node build.js "
},
"dependencies": {
},
"devDependencies": {
"webpack": "^2.6.1",
}
}
生產(chǎn)環(huán)境和生成環(huán)境的區(qū)別在于,根據(jù)命令行的輸入打包不一樣的,如npm run dev或npm run build,開發(fā)包有提示,報(bào)錯,但是生產(chǎn)環(huán)境會把獲取壓縮的文件,減少文件大小,如果生產(chǎn)環(huán)境沒有,會默認(rèn)讀取開發(fā)環(huán)境的包
oplog只會記錄變化的部分,沒有選項(xiàng)可以選擇不同的模式。Change stream是基于oplog的,所以其實(shí)它也只能給到變化的部分。Full Document模式給你的是經(jīng)過查詢之后得到的大多數(shù)節(jié)點(diǎn)上提交過的這個文件的版本。如果有其他操作夾在更新和這次讀取之間,你得到的可能會是后一次更新之后的文檔。這點(diǎn)在文檔里有描述:Look Full Document for Update Operations
If there are one or more majority-committed operations that modified the updated document after the update operation but before the lookup, the full document returned may differ significantly from the document at the time of the update operation.
不知道你的具體場景是什么,知道具體場景可能還可以進(jìn)一步探討其他解決方案。
render: (text, record, index) => {}
文檔定義:
render 生成復(fù)雜數(shù)據(jù)的渲染函數(shù),參數(shù)分別為當(dāng)前行的值,當(dāng)前行數(shù)據(jù),行索引,@return里面可以設(shè)置表格行/列合并
復(fù)雜操作用render
其實(shí)是我沒有import image.....
如果說你想要在瀏覽器端獲取這個真實(shí)地址,也就是重定向之后的那個url,好像沒什么辦法可以拿到,反正我想不到辦法可以取到location的值(瀏覽器端的情況下)。
首先你可以知道,這個接口返回的如果直接就是圖片文件的話,那很簡單,真實(shí)地址就是:http://tu.hanximeng.com/api.php
但是你請求這個接口,看一下http響應(yīng)的內(nèi)容就知道,這個接口返回了一個指向真實(shí)圖片地址的重定向。
而瀏覽器對于302狀態(tài)碼會自動再發(fā)起一次請求去請求這個定義在響應(yīng)頭location字段里的url
所以,如果拋開瀏覽器這個環(huán)境去請求這個接口,就可以直接獲取響應(yīng)頭里的location值了,比如你用node啦、php啦等等后端語言去對這個接口發(fā)起一次http請求,就可以直接去獲取圖片真實(shí)地址了,因?yàn)槟J(rèn)它們不會像瀏覽器一樣直接強(qiáng)制重定向~
netstat -ano|findstr 4000
查詢 4000 端口被占用的PID;taskkill /pid 3015
不需要使用:filtered-value
<el-table-column v-for="game in gameList" :label="game.gameNameCn" :filtered-value="[game]">
<template v-if="scope.row.gameList.some(item=>item.gameId ===scope.column.filteredValue[0].gameId)">
可以直接改為
<el-table-column v-for="game in gameList" :label="game.gameNameCn">
<template v-if="scope.row.gameList.some(item=>item.gameId === game.gameId)">
使用:filtered-value屬性解決了我的問題
<el-table-column v-for="game in gameList" :label="game.gameNameCn" :filtered-value="[game]">
<template v-if="scope.row.gameList.some(item=>item.gameId === scope.column.filteredValue[0].gameId)">
直接執(zhí)行 npm link
即可,會自動注冊命令。
先刪除電腦里C::Users{賬戶}下的.npmrc文件..
再重新跑一遍cnpm install -g vue-cli
如果是服務(wù)端渲染的項(xiàng)目,則所有的內(nèi)容都會打包到war或者jar包內(nèi),如果是war則放置在tomcat的webapp文件中,tomcat會自動進(jìn)行解壓,如果是jar,比如springboot打包成jar,則直接java -jar xxx.jar
即可啟動項(xiàng)目。
你這樣的話,你的請求放在beforeRouteEnter鉤子中,在進(jìn)入路由之前獲取數(shù)據(jù)。
我只能說不建議用中文路徑,當(dāng)然如果目前為止沒出什么問題用用也無妨。
寫英文 'microsoft yahei' 試試
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。