鍍金池/ 問(wèn)答/ HTML問(wèn)答
嘟尛嘴 回答

..., watch: { 'params.limit': function (newValue, oldValue) { }, name: function (newValue, oldValue) { } },

假設(shè)你的ViewModel里面有一個(gè)對(duì)象是 { params: { limit: '' }, name: '' }

哚蕾咪 回答

感覺(jué)應(yīng)該是gradle的問(wèn)題,個(gè)人建議是新建一個(gè)空白的android項(xiàng)目,使用本地的環(huán)境看是否可以跑起來(lái),假如不行,那么就是android開(kāi)發(fā)環(huán)境配置的問(wèn)題,假如可以,再來(lái)看ionic的設(shè)置。

陪我終 回答
function findWhere(list, properties) {
  const propertiesArray = Object.entries(properties)
  return list.find(item => {
    return propertiesArray.every(pair => {
      const key = pair[0]
      const value = pair[1]
      return item[key] && item[key] === value
    })
  })
}

const result = findWhere(shoppinglists, {id: 'clothes', title: 'Clothes'}) // result就是你要的對(duì)象,然后對(duì)其進(jìn)行賦值操作。

說(shuō)一下缺陷。

  1. 只會(huì)返回一個(gè)滿足條件的對(duì)象,如果滿足條件的對(duì)象不止一個(gè),你可以用forEach的方法改寫(xiě)一下。
  2. 如果值是引用類型,則無(wú)法判斷,需要額外的邏輯。
舊酒館 回答

http://www.cnblogs.com/longm/...
計(jì)算白屏?xí)r間

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>白屏</title>
  <script type="text/javascript">
    // 不兼容performance.timing 的瀏覽器,如IE8
    window.pageStartTime = Date.now();
  </script>
  <!-- 頁(yè)面 CSS 資源 -->
  <link rel="stylesheet" href="common.css">
  <link rel="stylesheet" href="page.css">
  <script type="text/javascript">
    // 白屏?xí)r間結(jié)束點(diǎn)
    window.firstPaint = Date.now();
  </script>
</head>
<body>
  <!-- 頁(yè)面內(nèi)容 -->
</body>
</html>

因此白屏?xí)r間則可以這樣計(jì)算出:

可使用 Performance API 時(shí)

白屏?xí)r間 = firstPaint - performance.timing.navigationStart;

首屏?xí)r間
通常計(jì)算首屏的方法有

首屏模塊標(biāo)簽標(biāo)記法
統(tǒng)計(jì)首屏內(nèi)加載最慢的圖片的時(shí)間
自定義首屏內(nèi)容計(jì)算法

1、首屏模塊標(biāo)簽標(biāo)記法

首屏模塊標(biāo)簽標(biāo)記法,通常適用于首屏內(nèi)容不需要通過(guò)拉取數(shù)據(jù)才能生存以及頁(yè)面不考慮圖片等資源加載的情況。我們會(huì)在 HTML 文檔中對(duì)應(yīng)首屏內(nèi)容的標(biāo)簽結(jié)束位置,使用內(nèi)聯(lián)的 JavaScript 代碼記錄當(dāng)前時(shí)間戳。如下所示:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>首屏</title>
  <script type="text/javascript">
    window.pageStartTime = Date.now();
  </script>
  <link rel="stylesheet" href="common.css">
  <link rel="stylesheet" href="page.css">
</head>
<body>
  <!-- 首屏可見(jiàn)模塊1 -->
  <div class="module-1"></div>
  <!-- 首屏可見(jiàn)模塊2 -->
  <div class="module-2"></div>
  <script type="text/javascript">
    window.firstScreen = Date.now();
  </script>
  <!-- 首屏不可見(jiàn)模塊3 -->
  <div class="module-3"></div>
    <!-- 首屏不可見(jiàn)模塊4 -->
  <div class="module-4"></div>
</body>
</html>

時(shí)首屏?xí)r間等于 firstScreen - performance.timing.navigationStart;

事實(shí)上首屏模塊標(biāo)簽標(biāo)記法 在業(yè)務(wù)中的情況比較少,大多數(shù)頁(yè)面都需要通過(guò)接口拉取數(shù)據(jù)才能完整展示,因此我們會(huì)使用 JavaScript 腳本來(lái)判斷首屏頁(yè)面內(nèi)容加載情況。

2、統(tǒng)計(jì)首屏內(nèi)圖片完成加載的時(shí)間

通常我們首屏內(nèi)容加載最慢的就是圖片資源,因此我們會(huì)把首屏內(nèi)加載最慢的圖片的時(shí)間當(dāng)做首屏的時(shí)間。

由于瀏覽器對(duì)每個(gè)頁(yè)面的 TCP 連接數(shù)有限制,使得并不是所有圖片都能立刻開(kāi)始下載和顯示。因此我們?cè)?DOM樹(shù) 構(gòu)建完成后將會(huì)去遍歷首屏內(nèi)的所有圖片標(biāo)簽,并且監(jiān)聽(tīng)所有圖片標(biāo)簽 onload 事件,最終遍歷圖片標(biāo)簽的加載時(shí)間的最大值,并用這個(gè)最大值減去 navigationStart 即可獲得近似的首屏?xí)r間。

此時(shí)首屏?xí)r間等于 加載最慢的圖片的時(shí)間點(diǎn) - performance.timing.navigationStart;

3、自定義模塊內(nèi)容計(jì)算法

由于統(tǒng)計(jì)首屏內(nèi)圖片完成加載的時(shí)間比較復(fù)雜。因此我們?cè)跇I(yè)務(wù)中通常會(huì)通過(guò)自定義模塊內(nèi)容,來(lái)簡(jiǎn)化計(jì)算首屏?xí)r間。如下面的做法:

忽略圖片等資源加載情況,只考慮頁(yè)面主要 DOM
只考慮首屏的主要模塊,而不是嚴(yán)格意義首屏線以上的所有內(nèi)容

淚染裳 回答

你的意思應(yīng)該是這樣吧
$parent.on('touch', '.child', function() {});
然后你刪除對(duì)應(yīng)dom再添加的時(shí)候事件會(huì)自動(dòng)加上

ajax 就可以,此處以 fetch 為例

fetch("csv.csv")
  .then(v => v.text())
  .then(data => console.log(data))

clipboard.png

貓小柒 回答

@HankBass 兄弟說(shuō)得很對(duì)

總得試試,實(shí)在不行就找會(huì)同樣的公司對(duì)吧^_^
不過(guò)人在他鄉(xiāng),辭職前先存錢(qián)存夠2~3個(gè)月生活費(fèi) / 騎驢找馬

奧特蛋 回答

express@4中并沒(méi)有重現(xiàn)該問(wèn)題,
相同的路由最好合并,如下

app.get('/admin', checkLogin, function (req, res) {
}
哎呦喂 回答

1.首先,你可以直接在服務(wù)器上用babel-node啟動(dòng)app.js試試看。如果能起來(lái)說(shuō)明是forever的問(wèn)題
2.如果不能起來(lái),是不是你的babel-node的版本不對(duì)

愿如初 回答

你看錯(cuò)地了。
看下你的@RequestBody Dict dict對(duì)象數(shù)據(jù)。

HttpServerletRequest#getParameterMap獲取的是你url中queryString中的參數(shù)。如:

demo.com?a=b&c=d&e=f
離殤 回答

swiper的所有基礎(chǔ)演示都在這,我都是復(fù)制官方代碼改的

http://www.swiper.com.cn/demo...

薄荷糖 回答

樣式寫(xiě)在頁(yè)面內(nèi)無(wú)法通過(guò)chrome的調(diào)試來(lái)修改,只能修改頁(yè)面內(nèi)的樣式代碼

吃藕丑 回答

可以蓋一個(gè)遮罩層 absolute v-if來(lái)判斷

大濕胸 回答

1.引擎在處理var語(yǔ)句時(shí),若當(dāng)前作用域內(nèi)存在同名變量,則會(huì)跳過(guò)創(chuàng)立變量步驟,直接進(jìn)行初始化操作。因此在上面已經(jīng)創(chuàng)立tes函數(shù)的情況下,var tes這句話相當(dāng)于沒(méi)有任何作用。

2.原因同1。而且犀牛書(shū)解釋得很清楚了,第二條var bb沒(méi)有初始化器,因此連僅剩的賦值功能也不存在了

你的瞳 回答

一般的做法是把父store通過(guò)子store的構(gòu)造函數(shù),傳給子store使用。

雨蝶 回答
flush public abstract void flush() throws IOExceptionFlush
Flush the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.
The method may be invoked indirectly if the buffer size is exceeded.

Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown.

可能是字符串超出緩存區(qū)了,自己算算,在合適的地方調(diào)用out.flush()吧.

夕顏 回答
function cell(value,row,index){
        if(row.test>=row.y){
            return '<div class="progress progress-striped active"><div class="progress-bar progress-bar-success" style="width:'+value+'" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" >'+value+'</div></div>';
        }else{
            return '<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" >'+value+'</div></div>';
        }
    }
涼心人 回答
// </span>全是后面全是數(shù)字?
// 方案1 
let str = '<span>13818888778</span>1381888778';
let result = /<span>\w*<\/span>(\d*)/.exec(str);
console.log(result[1]); // '1381888778'
// 方案二 字符串截取
str.slice(str.lastIndexOf('</span>')+7, str.length)
// 1381888778
青瓷 回答

this關(guān)鍵字懂嗎