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

鍍金池/ 問答/ HTML問答
執(zhí)念 回答
var mp = prd.products.reduce((obj, item) => {
        if (!obj[item.id]) {
            obj[item.id] = [item]
        } else {
            obj[item.id].push(item)
        }
        return obj
    }, {})
    prd.products = Object.keys(mp).map(id => {
        return mp[id].reduce((state, item) => {
            item.grouped_addons[0].addons.forEach(addon => {
                var item = state.grouped_addons[0].addons.find(a => a.id === addon.id)
                item.qty += addon.qty
            })
            return state
        })
    })
    console.log(prd)
使勁操 回答

就是因為:width=device-width

咕嚕嚕 回答

使用layouts,自定義布局文件,在所有需要header和footer的頁面中使用,layouts: "name".

青檸 回答

可以把第三方庫依賴和你的業(yè)務(wù)代碼在webpack配置entry的時候,分離開來??梢詤⒖?a rel="nofollow noreferrer">官方文檔
以下是我做的一個項目中的部分配置,僅做參考!

  entry: {
    "vendor1": ["event-source-polyfill", "babel-polyfill", "vue", "vue-router", "vue-cookie", "vuex", "axios"],
    "vendor2": ["element-ui"],
    app: 'src/main.js'
  },

找到一篇博客,比較能回答題主的問題,建議題主遇到問題還是先谷歌后百度,實在解決不了了再來提問。

鹿惑 回答

Blob對象不就可以了么?

不討囍 回答

你沒有說具體規(guī)則 根據(jù)你的例子第一次調(diào)用和最后一次調(diào)用參數(shù)是空 所以:

function add(){
  let arr = [];
  return function fn(){
    if(arguments.length>0){
      arr.push(...arguments)
      return fn;
    }
    return arr.reduce((sum,v)=>sum+v);
  }
}

console.log(add()(1,2)(3,4)(7,8,9)())//34
脾氣硬 回答

appendChild 操作后就可以了

念舊 回答

var s1Val=$("#s1 option:selected")val();
var s2Va= s1Val==2 ? $('#s2').val(2) :$('#s2').val($("#s2 option:selected")val())

失心人 回答

經(jīng)測試,toggle 1.8 版本以上就不支持多個函數(shù)切換執(zhí)行了

$('.glyphicon-chevron-up').click(function() {
     $(".hideShow").toggleClass('show-class')
}

換toggleClass來處理下

不討囍 回答
var http = require('http'),
    path = require('path'),
    os = require('os'),
    fs = require('fs');

var Busboy = require('busboy');

http.createServer(function(req, res) {
  if (req.method === 'POST') {
    var busboy = new Busboy({ headers: req.headers });
    busboy.on('file', function(fieldname, file, filename, encoding, mimetype) {
      var saveTo = path.join(os.tmpDir(), path.basename(fieldname));
      file.pipe(fs.createWriteStream(saveTo));//saveTo就是存儲路徑
    });
    busboy.on('finish', function() {
      res.writeHead(200, { 'Connection': 'close' });
      res.end("That's all folks!");
    });
    return req.pipe(busboy);
  }
  res.writeHead(404);
  res.end();
}).listen(8000, function() {
  console.log('Listening for requests');
});

不是已經(jīng)寫了么,busboy才不幫你存呢,你愛存哪存哪。

深記你 回答

<div class="block">

                        <el-row gutter="18">
                            <el-col :span="6">
                                <el-card :body-style="{ padding: '0px' }" class="item">
                                    <div style="padding: 14px;">
                                    </div>
                                </el-card>
                            </el-col>
                            <el-col :span="6" v-for="(o, index) in 8" :key="o">
                                <el-card :body-style="{ padding: '0px' }" class="item">
                                    <img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1530092564397&di=6e8ea66124cce0fc24161c6b53cc84a9&imgtype=0&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01be175a07d04ba801204a0e00c05e.jpg%401280w_1l_2o_100sh.jpg" class="image">
                                    <div style="padding: 14px;">
                                        <span>好吃的漢堡</span>
                                        <div class="bottom clearfix">
                                            <time class="time">2017-08-09</time>
                                            <el-button type="text" class="button">操作按鈕</el-button>
                                        </div>
                                    </div>
                                </el-card>
                            </el-col>
                        </el-row>
                    </div>
擱淺 回答

https://www.ibm.com/developer...
可以參考一下這篇文章。

感覺你講的數(shù)據(jù)庫,redis之類的是由具體的PlatformTransactionManager決定的,比如數(shù)據(jù)庫相關(guān)的事務(wù)管理是由DataSourceTransactionManager實現(xiàn)的。而spring也提供了jpa相關(guān)的數(shù)據(jù)庫事務(wù)管理實現(xiàn)。所以如果redis配置的是支持事務(wù),并且作為數(shù)據(jù)源加入了項目中,它會和別的事務(wù)一樣一起回滾的。

PlatformTransactionManager還有以下多種實現(xiàn)。

clipboard.png

但是至于像數(shù)組操作的這樣的操作,它是不會回滾的。因為首先事務(wù)的概念本身就是針對數(shù)據(jù)庫的操作而產(chǎn)生的,而回滾則是為了確保一組數(shù)據(jù)庫操作能夠同時實現(xiàn)或是同時不實現(xiàn)。比如mysql就會根據(jù)log來執(zhí)行回滾操作。但是數(shù)組并不屬于事務(wù)定義的范圍啊。當(dāng)然啦,你也可以使用動態(tài)代理自己實現(xiàn)數(shù)組回滾這種啦。


膽怯 回答

方法一
安卓可以把參數(shù)傳到h5的鏈接里,用類似?xx=xx&xx=xx的形式拼接。
js解析參數(shù)即可。

方法二
原生app都可以對js的function進行觸發(fā),前端要做的只是將js定義好方法名和參數(shù),交給安卓人員即可。

忘了我 回答

寫個數(shù)組

[
    {
        status:2,
        statusText:'出借中'
    },
    ...
]

然后用v-for循環(huán)出來
或者更簡單

statusTable={
    [2]:'出借中',//如果status是string類型的則是'2':'出借中'
    ...
}

html模版

<span>{statusTable[val.status]}</span>
疚幼 回答

直接塞地址進去就好了,你注意看你得到的url,http://前面多了個blob:

clipboard.png
API中沒寫支持本地資源加載

獨白 回答

webpack是模塊打包,不能直接在html中引用js文件。

舊言 回答

你看看這個
https://zhidao.baidu.com/ques...
https://stackoverflow.com/que...
我覺得你可以先將Uint8ClampedArray轉(zhuǎn)換成普通數(shù)組, 然后再轉(zhuǎn)換成Uint8Array

涼心人 回答

首先你需要一個服務(wù)器;
如果只是靜態(tài)網(wǎng)站的話,可以使用github的演示部署教你如何一步步將項目部署到Github