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

鍍金池/ 問答
女流氓 回答

Promise
之前直接開啟loading狀態(tài)
resolve
后關(guān)閉loading

監(jiān)控用戶點(diǎn)擊另存為不是
oncontextmenu嗎

傻丟丟 回答

.el-scrollbar__wrap{overflow-x: hidden;}有用的,不要寫在<style scoped></style>,自己另外寫css引入文件。

懶豬 回答

add 成功后 $("#id").val("");

心上人 回答

你這樣寫,每次點(diǎn)擊都會(huì)new出來一個(gè)audio吧

嫑吢丕 回答

這個(gè)問題被我在官網(wǎng)上證實(shí)了,就是一個(gè)bug,解決辦法是換成list
https://blog.csdn.net/ITermen...

我以為 回答

$("#foods").find("option:selected").attr("foodsid");

執(zhí)念 回答

express 又不是要求你一定要用模板,你完全可以讓 express 只輸出數(shù)據(jù)。

至于其他框架,可以看看 koa,雖然它也是 express 開發(fā)團(tuán)隊(duì)寫的。

clipboard.png

幫他補(bǔ)充一點(diǎn)兒:這個(gè)笑臉不錯(cuò)。
簡單看下express開發(fā),直接用express寫rest api就行了,超級(jí)簡單。如果不熟悉express提供的web模板,那就不用了,自己弄個(gè)熟悉的前端框架,寫好web端后build,直接放到public文件夾下即可。localhost:3000就能直接訪問到web。

傲嬌范 回答

你這已經(jīng)是線性時(shí)間復(fù)雜度了,再低的話除非是對(duì)數(shù)時(shí)間

賤人曾 回答

自己已經(jīng)解決了問題
模板
數(shù)據(jù)
方法

把方法不寫在computed里,寫在methods里面,因?yàn)閏omputed里面是需要實(shí)時(shí)更新的東西,比如輸入商品價(jià)格和實(shí)時(shí)計(jì)算總價(jià)。

涼心人 回答

小哥哥,你的a標(biāo)簽里面的target應(yīng)該是到iframe中才可以的,換成myIframe就可以了

喵小咪 回答

router是一個(gè)總的狀態(tài)管理,route是向router注冊(cè)路由與頁面關(guān)系的一個(gè)組件,NavLink是對(duì)router產(chǎn)生的 context.router 利用的一個(gè)組件。router只接受一個(gè)內(nèi)容區(qū)

  <Router>
        <div>
            <div className='head'>
                <Nav/>
            </div>
            <div className='body'>
                  <Route exact path="/" component={A} />
                  <Route  path="/b" component={B} />
                  <Route  path="/c" component={C} />
            </div>
        </div>   
    </Router>

可以這樣寫

孤客 回答

1、利用progress-stream獲取上傳進(jìn)度

如果只是想在服務(wù)端獲取上傳進(jìn)度,可以試下如下代碼。注意,這個(gè)模塊跟express、multer并不是強(qiáng)綁定關(guān)系,可以獨(dú)立使用。

var fs = require('fs');
var express = require('express');
var multer  = require('multer');
var progressStream = require('progress-stream');

var app = express();
var upload = multer({ dest: 'upload/' });

app.post('/upload', function (req, res, next) {
    // 創(chuàng)建progress stream的實(shí)例
    var progress = progressStream({length: '0'}); // 注意這里 length 設(shè)置為 '0'
    req.pipe(progress);
    progress.headers = req.headers;
    
    // 獲取上傳文件的真實(shí)長度(針對(duì) multipart)
    progress.on('length', function nowIKnowMyLength (actualLength) {
        console.log('actualLength: %s', actualLength);
        progress.setLength(actualLength);
    });

    // 獲取上傳進(jìn)度
    progress.on('progress', function (obj) {        
        console.log('progress: %s', obj.percentage);
    });

    // 實(shí)際上傳文件
    upload.single('logo')(progress, res, next);
});

app.post('/upload', function (req, res, next) {
    res.send({ret_code: '0'});
});

app.get('/form', function(req, res, next){
    var form = fs.readFileSync('./form.html', {encoding: 'utf8'});
    res.send(form);
});

app.listen(3000);

2、獲取上傳文件的真實(shí)大小

multipart類型,需要監(jiān)聽length來獲取文件真實(shí)大小。(官方文檔里是通過conviction事件,其實(shí)是有問題的)

    // 獲取上傳文件的真實(shí)長度(針對(duì) multipart)
    progress.on('length', function nowIKnowMyLength (actualLength) {
        console.log('actualLength: %s', actualLength);
        progress.setLength(actualLength);
    });

3、關(guān)于progress-stream獲取真實(shí)文件大小的bug?

針對(duì)multipart文件上傳,progress-stream 實(shí)例子初始化時(shí),參數(shù)length需要傳遞非數(shù)值類型,不然你獲取到的進(jìn)度要一直是0,最后就直接跳到100。

至于為什么會(huì)這樣,應(yīng)該是 progress-steram 模塊的bug,看下模塊的源碼。當(dāng)length是number類型時(shí),代碼直接跳過,因此你length一直被認(rèn)為是0。

    tr.on('pipe', function(stream) {
        if (typeof length === 'number') return;
        // Support http module
        if (stream.readable && !stream.writable && stream.headers) {
            return onlength(parseInt(stream.headers['content-length'] || 0));
        }

        // Support streams with a length property
        if (typeof stream.length === 'number') {
            return onlength(stream.length);
        }

        // Support request module
        stream.on('response', function(res) {
            if (!res || !res.headers) return;
            if (res.headers['content-encoding'] === 'gzip') return;
            if (res.headers['content-length']) {
                return onlength(parseInt(res.headers['content-length']));
            }
        });
    });

參考鏈接

https://github.com/expressjs/...
https://github.com/freeall/pr...

耍太極 回答

router的path值寫錯(cuò)了,找不到這個(gè)路徑,導(dǎo)致組件內(nèi)容無法掛載.

兔寶寶 回答

emit的時(shí)候要帶上index和value啊,不然父組件不知道是哪個(gè)子組件傳上來的

抱緊我 回答

這里的toString()方法不是這個(gè)實(shí)例obj內(nèi)的方法
是Object原型的方法
Object.prototype.toString()
https://developer.mozilla.org...

陌上花 回答
createSphere: function() {
  var cosTheta = Math.random() * 2 - 1,
    sinTheta = Math.sqrt(1 - cosTheta * cosTheta),
    phi = Math.random() * 2 * Math.PI;

  return {
    x: this.SCATTER_RADIUS * sinTheta * Math.cos(phi),
    y: this.SCATTER_RADIUS * sinTheta * Math.sin(phi),
    z: this.SCATTER_RADIUS * cosTheta,
    hue: Math.round(phi / Math.PI * 30)
  };
},

參數(shù)方程