在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/ HTML問答
冷咖啡 回答

先說個我的結(jié)論,在使用 ESM 模塊化語法的情況下關(guān)不了,當(dāng)然結(jié)論可能是片面的。
原來碰到過 callee 嚴(yán)格模式不存在的問題,經(jīng)過我使用 loader,plugin 等均無法拿到添加 use strict 字符串的具體時機(jī),然后我就放棄了,transform-remove-strict-mode 也試過無效。

但是有一種方式可以不被添加 use strict 字符串,那就是在你需要使用 "嚴(yán)格模式禁用語法" 的這個 js 文件里不要使用 ESM(import export),而是使用 commonjs 模塊語法,即 requiremodule/export。ESM 規(guī)范中有一條是說使用 ESM 規(guī)范語法會自動進(jìn)入嚴(yán)格模式,所以不確定這個 use strict 是不是 node 加上的,而不是 webpack/babel 的效果。

瘋子范 回答

tabbar的定義呢

奧特蛋 回答

babel可以配置env

{
  "env": {
    "test": {
      "presets": ["env"]
    },
    "production": {
      "presets": [
        ["env",
        {
          "modules": false
        }]
      ]
    }
  },
  "ignore": [
    "dist/*.js"
  ]
}

源自:.babelrc#env-option

然后,可以在npm scripts里配置BABEL_ENV

"scripts": {
  "test": "cross-env BABEL_ENV='test' jest --watchAll --coverage",
  "prettier": "prettier --write --no-semi {.,test}/*.js",
  "build": "cross-env BABEL_ENV='production' rollup -c"
}
鐧簞噯 回答

這不是很清楚了嗎? @storybook/react升級到4.x

瘋浪 回答

'/api' 改成 '/v1', pathRewrite刪除

莫小染 回答

已經(jīng)涼了這個問題?

傻叼 回答

<RadioGroup @on-change="handleChange()" v-if="item.questionType == '單選題'" v-model="answerInfo[index].singlechoice_default" vertical>
</RadioGroup>

method里面handleChange(val)取val

凹凸曼 回答

<navigator/>沒加url

朽鹿 回答

p 標(biāo)簽是不允許嵌入 p 標(biāo)簽內(nèi).

所以你的嵌入層級的 p 在瀏覽器看來是這樣的.

<p> // 第一個 p
    <p>  // 自動為第一個 p 補(bǔ)全關(guān)閉標(biāo)簽, 開始第二個 p
        <p> // 自動為第二個 p 補(bǔ)全關(guān)閉標(biāo)簽, 開始第三個 p
        </p> // 第三個 p 結(jié)束
    </p> // 第四個 p 開始, 為其補(bǔ)充開始標(biāo)簽
</p> // 第五個 p 開始, 為其補(bǔ)充開始標(biāo)簽

結(jié)果就是:

<p></p> // 只有這個滿足 p:first-child
<p></p>
<p></p>
<p></p>
<p></p>
拽很帥 回答

在以往windows ie為主的時代,可以通過檢查控件等方式判斷,但現(xiàn)在H5,都不建議用控件了,所以需要別的方法了。
一般是用特殊協(xié)議檢測法,不過囿于瀏覽器安全控制方面的原因,效果不會完美。

涼汐 回答

問題原因是使用事務(wù)時,缺少 rollback 或 commit,使用以下代碼可穩(wěn)定復(fù)現(xiàn)這個錯誤:

let mysql = require("mysql");

function createConn() {
    return mysql.createConnection({
        host     : '192.168.1.100',
        user     : 'yangqiang',
        password : '123456',
        database : 'node_mysql_demo'
    });
}

function transactionWithoutCommit(conn) {
    conn.beginTransaction(function (err) {
        if (err) {
            throw err;
        }
        conn.query('SELECT * from user where name="jonny"', function (error, results, fields) {
            if (error) {
                return conn.rollback(function () {
                    throw error;
                })
            } else {
                // 缺少 commit,引發(fā)錯誤
            }
        });
    });
}

function transactionWithCommit(conn) {
    conn.beginTransaction(function (err) {
        if (err) {
            throw err;
        }
        conn.query('SELECT * from user where name="jonny"', function (error, results, fields) {
            if (error) {
                return conn.rollback(function () {
                    throw error;
                })
            } else {
                conn.commit(function (err) {
                    if (err) {
                        return conn.rollback(function(){ throw err;})
                    } else {
                        console.log('transaction committed');
                    }
                });
            }
        });
    });
}

function write(conn) {
    conn.query('INSERT INTO user (name) VALUES ("Mei");', function (error, results, fields) {
        if (error) throw error;
        console.log(JSON.stringify(results));
    });
}


var connection = createConn();
connection.connect();

transactionWithoutCommit(connection); // 引發(fā)錯誤
// transactionWithCommit(connection); // 正確的方法
write(connection);
焚音 回答

this.callback 做回調(diào),不傳參數(shù)能拿得到 response ???

脾氣硬 回答

已修正 數(shù)字也轉(zhuǎn)正了
附上https://codepen.io/wanroulin/... 供參考

主要修改的片段為內(nèi)圈旋轉(zhuǎn)角度 及 數(shù)字校正角度

  // scale
        ctx.setTransform(1, 0, 0, 1, Math.floor(W / 2), Math.floor(W / 2));
        ctx.beginPath();
        ctx.lineWidth = 2;
        ctx.strokeStyle = 'rgba(255, 255, 255, .3)';
        // there should be 10 lines
        var stepAngle = (Math.PI * 2) / 10;
        // begin angle
        ctx.rotate(0.7 * Math.PI);
        // draw only 9 of the 10 lines
        for (var i = 0; i < 9; i++) {
            ctx.moveTo(Math.floor(W / 3) - 50, 0);
            ctx.lineTo(Math.floor(W / 3) - 55, 0);
            ctx.rotate(stepAngle);
        }
        ctx.stroke();
        ctx.setTransform(1, 0, 0, 1, 0, 0);

        // scale txt
        ctx.fillStyle = 'rgba(255, 255, 255, .4)';
        ctx.font = "1.5vh play";
        ctx.textAlign = 'center';
        ctx.textBaseline = 'middle';

        var stepAngle = (Math.PI * 2) / 10;
        var currentAngle = 0.20 * Math.PI;

        for (i = 0; i < 9; i++) {
            // move to center, unrotated
            ctx.setTransform(1, 0, 0, 1, Math.floor(W / 2), Math.floor(W / 2));
            // set current rotation
            ctx.rotate(currentAngle)
            // move the context to our text's position
            ctx.translate(0, Math.floor(W / 3) - 65);
            // inverse rotate so we face North
            ctx.rotate(-currentAngle);
            // fill at 0,0
            ctx.fillText(0 + 1 * i, 0, 0);
            // increment currentAngle for next iteration
            currentAngle += stepAngle;
        }
        ctx.setTransform(1, 0, 0, 1, 0, 0);

        ctx.restore();
久舊酒 回答

那你可以保存當(dāng)前選中的index值再一個隱藏input[id="selectIndex"]中,select選中時,存儲選中的index到改隱藏input中,然后提交時,直接通過index,設(shè)置

// 選中時的處理
document.querySelector("#selectIndex").value = 當(dāng)前選中的index的值;
let index = parseInt(document.querySelector("#selectIndex"));
items[index].score = changingScore;

或者存儲選中值到localStorage或sessionStorage中都可以,思路就是存儲、更新維護(hù)一個index值;

情皺 回答

如果自己的服務(wù)器帶寬有限,放在自己服務(wù)器上時請求靜態(tài)資源也是很慢的??梢园鸯o態(tài)文件放到第三方對象存儲服務(wù)上統(tǒng)一管理。比如七牛云cdn,阿里云oss

赱丅呿 回答

data里綁定一個標(biāo)記:

data:{
    visible: false
}
// 點擊的時候
this.visible改為ture,同時video.pause()

html內(nèi)用visible來顯示隱藏
臭榴蓮 回答

我試了一下,沒出現(xiàn)你說的這個情況。。。