vue 三級(jí)聯(lián)動(dòng)之前寫(xiě)過(guò)一個(gè)省市區(qū)的,一級(jí)下拉項(xiàng)是初始化時(shí)候獲取的數(shù)據(jù),綁定on-change觸發(fā)請(qǐng)求二級(jí)列表,二級(jí)on-change請(qǐng)求第三級(jí)
如果是富文本的話直接用<p>或br />試試?
let emailContent = `<p>Time:${t}</p><p>Id:${id}</p><p>Content:${content}</p>`
你這樣將/api代理到了本地3000端口,請(qǐng)求端口上的/api接口,就要用/api/api吧。。你試試看
用await的話你的數(shù)據(jù)不應(yīng)該已經(jīng)在this.sliders里面了嗎
如果要用then的話就直接
async getSlider(){
return await getSliders();
}
至于為什么取不到數(shù)據(jù),因?yàn)槟愕牡膶?xiě)法async函數(shù)沒(méi)有返回值,會(huì)resolve一個(gè)undefined作為promise的fulfilled狀態(tài)的value,所以肯定取不到數(shù)據(jù),數(shù)據(jù)已經(jīng)在this.sliders里面了
https://segmentfault.com/a/11... 有需要可以看看這篇了解一下promise
webpackd-dev-server 沒(méi)找到文件,返回 index.html, 試一下 /assets/js/layer/layer.js
我這樣沒(méi)問(wèn)題
應(yīng)該 build/webpack.dev.conf.js 是這幾行代碼的關(guān)系
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
打開(kāi)根目錄下的_config.yml
文件,找到deploy
配置的地方,改成如下配置試試:
deploy:
type: git
repository: git@github.com:lixinblog/lixinblog.github.io.git
branch: master
下面branch
代表的就是分支的意思,一般都是master
分支
希望我的回答對(duì)你有所幫助!
eslint語(yǔ)法校驗(yàn)。npm install eslint --save-dev
然后在webstorm中配置eslint。
就是字面上的意思,要結(jié)合app.js一起看。
app.js
// 獲取用戶信息
wx.getSetting({
success: res => {
if (res.authSetting['scope.userInfo']) {
// 已經(jīng)授權(quán),可以直接調(diào)用 getUserInfo 獲取頭像昵稱,不會(huì)彈框
wx.getUserInfo({
success: res => {
// 可以將 res 發(fā)送給后臺(tái)解碼出 unionId
this.globalData.userInfo = res.userInfo
// 由于 getUserInfo 是網(wǎng)絡(luò)請(qǐng)求,可能會(huì)在 Page.onLoad 之后才返回
// 所以此處加入 callback 以防止這種情況
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
}
})
}
}
})
如果app.js里面的wx.getUserInfo還沒(méi)返回,就給app添加一個(gè)方法userInfoReadyCallback。
再看app.js:
if (this.userInfoReadyCallback) {
this.userInfoReadyCallback(res)
}
wx.getUserInfo回調(diào)里就會(huì)執(zhí)行這個(gè)方法,userInfoReadyCallback使用了箭頭函數(shù),所以this會(huì)指向當(dāng)前頁(yè)。
v-model 會(huì)忽略所有表單元素的 value、checked、selected 特性的初始值而總是將 Vue 實(shí)例的數(shù)據(jù)作為數(shù)據(jù)來(lái)源。你應(yīng)該通過(guò) JavaScript 在組件的 data 選項(xiàng)中聲明初始值。
微信開(kāi)發(fā)團(tuán)隊(duì):呵呵噠,小樣,敢在我面前耍小聰明
可以試一下流程圖插件
echarts.js d3.js
等
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<canvas></canvas>
<script>
window.onload = function () {
const canvas = document.getElementsByTagName('canvas')[0]
const ctx = canvas.getContext("2d");
const w = document.documentElement.clientWidth;
const h = document.documentElement.clientHeight;
canvas.width = w;
canvas.height = h;
let mols = []
function init() {
let mol = new generate_mol(1)
mols.push(mol);
}
function draw(){
canvas.width = canvas.width;
for(var i=0;i<mols.length;i++){
var m = mols[i];
m.draw();
}
}
function generate_mol(mol) {
this.x = w*0.3;
this.y = h*0.3;
// this.vx = Math.random()*-2;
// this.vy = Math.random()*2;
// this.vr = 0.1;
this.r = Math.random()*Math.PI;
this.draw = function() {
// ctx.save();
// ctx.translate(this.x + 20, this.y + 80);
// ctx.rotate(Math.PI * 0.17);
// ctx.translate(-this.x + 20, -this.y - 80);
// ctx.beginPath();
// ctx.moveTo(this.x, this.y + 30);
// ctx.lineTo(this.x - 26, this.y + 45);
// ctx.lineTo(this.x - 26, this.y + 75);
// ctx.lineTo(this.x, this.y + 90);
// ctx.lineTo(this.x + 26, this.y + 75);
// ctx.lineTo(this.x + 26, this.y + 45);
// ctx.lineTo(this.x, this.y + 30);
// ctx.moveTo(this.x - 20, this.y + 47);
// ctx.strokeStyle = "rgba(0,0,0,0.2)";
// ctx.lineWidth = 3;
// ctx.stroke();
// ctx.closePath();
// ctx.restore()
ctx.fillStyle = "rgba(0,0,0,0.5)";
ctx.font = "15px Arial";
ctx.fillText("A", this.x+40 , this.y+80);
ctx.save();
ctx.translate(this.x + 20, this.y + 30);
ctx.rotate(Math.PI * 0.17);
ctx.translate(-this.x + 20, -this.y - 80);
ctx.beginPath();
ctx.moveTo(this.x, this.y + 30);
ctx.lineTo(this.x - 26, this.y + 45);
ctx.lineTo(this.x - 26, this.y + 75);
ctx.lineTo(this.x, this.y + 90);
ctx.lineTo(this.x + 26, this.y + 75);
ctx.lineTo(this.x + 26, this.y + 45);
ctx.lineTo(this.x, this.y + 30);
ctx.moveTo(this.x - 20, this.y + 47);
ctx.strokeStyle = "rgba(0,0,0,0.2)";
ctx.lineWidth = 3;
ctx.stroke();
ctx.fillStyle = "rgba(0,0,0,0.5)";
ctx.font = "15px Arial";
ctx.fillText("B", this.x , this.y+70);
ctx.closePath();
ctx.restore()
ctx.save();
ctx.translate(this.x + 68, this.y + 56);
ctx.rotate(Math.PI * 0.17);
ctx.translate(-this.x + 20, -this.y - 80);
ctx.beginPath();
ctx.moveTo(this.x, this.y + 30);
ctx.lineTo(this.x - 26, this.y + 45);
ctx.lineTo(this.x - 26, this.y + 75);
ctx.lineTo(this.x, this.y + 90);
ctx.lineTo(this.x + 26, this.y + 75);
ctx.lineTo(this.x + 26, this.y + 45);
ctx.lineTo(this.x, this.y + 30);
ctx.moveTo(this.x - 20, this.y + 47);
ctx.strokeStyle = "rgba(0,0,0,0.2)";
ctx.lineWidth = 3;
ctx.stroke();
ctx.closePath();
ctx.restore()
ctx.save();
ctx.translate(this.x + 66, this.y + 110);
ctx.rotate(Math.PI * 0.17);
ctx.translate(-this.x + 20, -this.y - 80);
ctx.beginPath();
ctx.moveTo(this.x, this.y + 30);
ctx.lineTo(this.x - 26, this.y + 45);
ctx.lineTo(this.x - 26, this.y + 75);
ctx.lineTo(this.x, this.y + 90);
ctx.lineTo(this.x + 26, this.y + 75);
ctx.lineTo(this.x + 26, this.y + 45);
ctx.lineTo(this.x, this.y + 30);
ctx.moveTo(this.x - 20, this.y + 47);
ctx.strokeStyle = "rgba(0,0,0,0.2)";
ctx.lineWidth = 3;
ctx.stroke();
ctx.closePath();
ctx.restore()
ctx.save();
ctx.translate(this.x + 20, this.y + 135);
ctx.rotate(Math.PI * 0.17);
ctx.translate(-this.x + 20, -this.y - 80);
ctx.beginPath();
ctx.moveTo(this.x, this.y + 30);
ctx.lineTo(this.x - 26, this.y + 45);
ctx.lineTo(this.x - 26, this.y + 75);
ctx.lineTo(this.x, this.y + 90);
ctx.lineTo(this.x + 26, this.y + 75);
ctx.lineTo(this.x + 26, this.y + 45);
ctx.lineTo(this.x, this.y + 30);
ctx.moveTo(this.x - 20, this.y + 47);
ctx.strokeStyle = "rgba(0,0,0,0.2)";
ctx.lineWidth = 3;
ctx.stroke();
ctx.closePath();
ctx.restore()
//
ctx.save();
ctx.translate(this.x -27,this.y + 108);
ctx.rotate(Math.PI * 0.17);
ctx.translate(-this.x + 20, -this.y - 80);
ctx.beginPath();
ctx.moveTo(this.x, this.y + 30);
ctx.lineTo(this.x - 26, this.y + 45);
ctx.lineTo(this.x - 26, this.y + 75);
ctx.lineTo(this.x, this.y + 90);
ctx.lineTo(this.x + 26, this.y + 75);
ctx.lineTo(this.x + 26, this.y + 45);
ctx.lineTo(this.x, this.y + 30);
ctx.moveTo(this.x - 20, this.y + 47);
ctx.strokeStyle = "rgba(0,0,0,0.2)";
ctx.lineWidth = 3;
ctx.stroke();
ctx.closePath();
ctx.restore()
ctx.save();
ctx.translate(this.x -26, this.y + 56);
ctx.rotate(Math.PI * 0.17);
ctx.translate(-this.x + 20, -this.y - 80);
ctx.beginPath();
ctx.moveTo(this.x, this.y + 30);
ctx.lineTo(this.x - 26, this.y + 45);
ctx.lineTo(this.x - 26, this.y + 75);
ctx.lineTo(this.x, this.y + 90);
ctx.lineTo(this.x + 26, this.y + 75);
ctx.lineTo(this.x + 26, this.y + 45);
ctx.lineTo(this.x, this.y + 30);
ctx.moveTo(this.x - 20, this.y + 47);
ctx.strokeStyle = "rgba(0,0,0,0.2)";
ctx.lineWidth = 3;
ctx.stroke();
ctx.closePath();
ctx.restore()
}
}
init()
draw()
}
</script>
</body>
</html>
沒(méi)畫(huà)好 畫(huà)偏了
應(yīng)該還要加算法 來(lái)生成指定個(gè)數(shù)的
預(yù)覽地址
webpack-dev-server回退到2.7.1試試?
用js 吧。。。
個(gè)人理解是,toString.call
和Object.prototype.toString.call
相比,只是寫(xiě)法更簡(jiǎn)便,因?yàn)?code>toString和Object.prototype.toString
其實(shí)指向同一個(gè)方法:
這兩個(gè)相等的原因:
如果可以使用toString
,那么toString
肯定是window
對(duì)象的方法,window
是一個(gè)對(duì)象;
所有對(duì)象如果有原型的話,最終肯定都會(huì)指向Object.prototype
這個(gè)對(duì)象;
如果window
對(duì)象或者除了最后一個(gè)原型對(duì)象之外的原型對(duì)象沒(méi)有重新定義toString
,那么toString
最終指向的就是Object.prototype.toString
;
經(jīng)過(guò)上面截圖認(rèn)證,這兩個(gè)確實(shí)是一樣的。
可以在按鈕的click事件處理函數(shù)里獲取到表單
this.props.form.validateFields((err, values) => {})
當(dāng)然也可以用
this.props.form.getFieldsValues
來(lái)獲取指定表單 的值
全部用雙引號(hào)或者全部用單引號(hào)
XXXXX.css({"transform": "rotate(" + rotateNum + "deg)"})
沒(méi)代碼言x ???
1.封裝成公共的方法,放到utils里,像樓上說(shuō)的那樣
2.擴(kuò)展vue原型對(duì)象
3.mixins
pyspider 會(huì)自動(dòng)去重,抓過(guò)的連接不會(huì)重新抓取,引用大神的:https://segmentfault.com/q/10...
pyspider說(shuō)明手冊(cè)
http://docs.pyspider.org/en/l...
我改成這樣就好了:
class Handler(BaseHandler):
crawl_config = {
'itag': 'v223'
}
北大青鳥(niǎo)APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國(guó)家
北大青鳥(niǎo)中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過(guò)二十年潛心發(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),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開(kāi)發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dò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ù), 熟練的跨平臺(tái)面向?qū)ο箝_(kāi)發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開(kāi)發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開(kāi)發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開(kāi)發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。