鍍金池/ 問(wèn)答/ HTML問(wèn)答
夢(mèng)囈 回答

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

clipboard.png
我這樣沒(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分支

clipboard.png

希望我的回答對(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ù)覽地址

拮據(jù) 回答

webpack-dev-server回退到2.7.1試試?

安淺陌 回答

個(gè)人理解是,toString.callObject.prototype.toString.call相比,只是寫(xiě)法更簡(jiǎn)便,因?yàn)?code>toString和Object.prototype.toString其實(shí)指向同一個(gè)方法:

clipboard.png

這兩個(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)"})
卟乖 回答

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'
}