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

鍍金池/ 問答/ HTML問答
陪我終 回答
"010203".match(/\d{2}/g);

或者

"010203".split(/\B(?=(?:\d{2})+\b)/);

或者

"010203".split(/\B(?=0)/);
厭惡我 回答

比如同樣是mp4h264h265就不一樣。
具體的瀏覽器編碼支持可以參考下面這個(gè)表。
https://en.wikipedia.org/wiki...

局外人 回答

通過url傳參把,把需要的參數(shù)拼到iframe鏈接后面,彈窗里的頁面再取下就完事了

傻叼 回答

你用的是 測試版本的BABEL 包嗎

一看就是你,我直接給你看代碼吧

圖片描述

圖片描述

iconPath設(shè)置的是顯示的圖標(biāo),selectedIconPath是選中顯示的圖標(biāo)

孤客 回答

不知道我有沒有理解對,看看這個(gè)stickUp插件是不是你要的效果
http://lirancohen.github.io/s...

半心人 回答
function getTop(ele){
    var top=0;//設(shè)定初始值
    function getEleTop(ele){
        top+=ele.offsetTop; //top儲存ele的offsetTop
        if(ele.tagName.toLowerCase()=='body'){  //如果ele現(xiàn)在是body,就返回top值
            return top;
        }else{
            // 這里沒有return出去
            return getEleTop(ele.offsetParent); //否則,就繼續(xù)調(diào)用這個(gè)函數(shù),獲得ele的定位父元素的offsetTop
        }
    }
    return getEleTop(ele);
}
初念 回答

你用最新的 v3.1.0 就可以了

主要改動還是:https://github.com/iview/ivie...

核心還是 input 事件:

@input="change"

之前的版本都是在 change 方法里面有:

直接把

if (event.type == 'input' && val < min) return;
if (val > max) {
    this.setValue(max);
} else if (val < min) {
    this.setValue(min);
} else {
    this.setValue(val);
}

改成了:這里不處理輸入值和大小判斷,以及小于最小值時(shí)候的那個(gè) return

this.setValue(val);
笑浮塵 回答

前一個(gè)代碼有誤吧?for循環(huán)里寫成了i而不是a,所以每次循環(huán)并沒有保留上一次,到最后就只有“天安門 ”了
后一個(gè),用for循環(huán)每次增加分詞時(shí)也都加上了空格,所以末尾會多一個(gè)空格。
優(yōu)美的方式:
我不知道jieba分詞返回的(即這里的cw變量)是不是list,如果是的話,直接:

' '.join(cw)

即可

傻丟丟 回答

采用第2中。
一對一的聊天是這兩貨開個(gè)獨(dú)立的聊天室,服務(wù)端進(jìn)行中轉(zhuǎn)
A發(fā)消息給服務(wù)端,服務(wù)端廣播給聊天室,因?yàn)榱奶焓抑挥蠥,B,所以達(dá)到了飼料的效果

JSON.stringify()

undefined、任意的函數(shù)以及 symbol 值,在序列化過程中會被忽略(出現(xiàn)在非數(shù)組對象的屬性值中時(shí))或者被轉(zhuǎn)換成 null(出現(xiàn)在數(shù)組中時(shí))。

https://developer.mozilla.org...

涼薄 回答

這個(gè)沒有任何區(qū)別啊

const p1=new Promise(function(resolve,reject){
    setTimeout(()=>reject(new Error('fail')),3000);
});
const p2=new Promise(function(resolve,reject){
    //setTimeout(()=>resolve(p1),1000);
    resolve(p1);
});

p2.then(result=>console.log(result))
.catch(error=>console.log(error));

console.log("p2===p1 =>"+(p2===p1));

p2和p1是2個(gè)不同的promise

getJSON('/post/1.json').then(function(post){
    return getJSON(post.commentURL);
}).then(function(comments){
    //some code
}).catch(function(error){
    //
});

==>

var getJSONPromise0=getJSON('/post/1.json');

var getJSONPromise1=getJSONPromise0.then(function(post){
    return getJSON(post.commentURL);
});
var getJSONPromise2=getJSONPromise1.then(function(comments){
    //some code
});

var getJSONPromise3=getJSONPromise2.catch(function(error){
    //
    console.log(error);
});

一共是4個(gè)promise

=====補(bǔ)充回答====
我們看看Promise
new Promise( /* executor */ function(resolve, reject) { ... } );
這個(gè)是Prmoise的構(gòu)造函數(shù)

Promise.prototype.then(onFulfilled, onRejected)是then方法的原型定義。

Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler, or to its original settled value if the promise was not handled (i.e. if the relevant handler onFulfilled or onRejected is not a function).

then方法返回一個(gè)新的promise對象,并把onFulfilled和onRejected作為新的Promise對象的完成或拒絕結(jié)果回調(diào)函數(shù)。
如果沒有對應(yīng)的回調(diào)函數(shù),那么將對應(yīng)的值直接作為新的Promise的resolve值

你要問的是onFulfilled函數(shù)有返回非promise,返回promise或不返回值之間的區(qū)別吧:
返回非promise,那么這個(gè)值通過Promise.resolve靜態(tài)方法轉(zhuǎn)成一個(gè)狀態(tài)確定的Promise返回
返回promise,那么這個(gè)新的promise將被返回作為作為后續(xù)then/catch方法的的實(shí)際調(diào)用Promise
不返回,也是返回一個(gè)一個(gè)狀態(tài)確定的Promise,最終的決議值為undefined

你可以簡單的認(rèn)為返回Promise就會把then方法返回的Promise代替了

測試代碼

var tempP;
var p1=new Promise(function(resolve,reject){
    setTimeout(function(){
        resolve("p1");
    },1000);
});

var p2=p1.then(function(data){
    console.log("p2 GOT:"+data);
    //[A]
    /*
    tempP=new Promise(function(resolve,reject){
        setTimeout(function(){
            resolve("return_Promise");
        },1000);
    });
    */
    
    tempP="return_Normal"http://[B]
    //return tempP; //[C]
},function(error){
    console.log("error:"+error);
});

var p3=p2.then(function(data){
    console.log("p3 GOT:"+data);
});

[A]結(jié)果
//p2 GOT:p1
//p3 GOT:return_Promise

[B]結(jié)果
//p2 GOT:p1
//p3 GOT:return_Normal

[C]結(jié)果
//p2 GOT:p1
//p3 GOT:undefined
尤禮 回答

cnpm快在下載速度,yarn快在構(gòu)建速度,吧yarn的倉庫地址改為淘寶鏡像的話就是很好的選擇了

心上人 回答

出現(xiàn)這個(gè)問題應(yīng)該是elementUI Tree為這樣設(shè)計(jì),getCheckKey選中全選和半選結(jié)構(gòu).如果調(diào)用setCheckedKeys方法,即將之前半選狀態(tài)的id也設(shè)置為選中狀態(tài).我是在程序中做處理,遞歸時(shí)只將最子葉的元素傳給前臺即可.

真難過 回答

tr標(biāo)簽被td完全遮蓋住,所以mouseover根本不會降臨到tr上,都是在td上直接觸發(fā)。
實(shí)驗(yàn)中會發(fā)現(xiàn)先觸發(fā)是table,因?yàn)閠able默認(rèn)有邊框或單元格空隙,鼠標(biāo)從外部進(jìn)入table晃過時(shí)先經(jīng)過table的邊框或單元格空隙, 可以通過把table的border和cellspacing設(shè)置為0驗(yàn)證,table將不會被mouseover。

厭遇 回答
  1. 代碼第九行不要使用in,in用于判斷一個(gè)對象有沒有一個(gè)屬性,不能判斷一個(gè)數(shù)組是否包含某個(gè)元素,使用includes代替;
  2. 代碼第10行使用str = str.replace重新給str賦值;
function rot13 (str) {
  var empty = [];
  for (var i = 0; i < str.length; i++) {
    empty.push(str.charCodeAt(i))
  }
  var left = empty.filter(function (x) {return x >= 65 && x <= 77})
  var right = empty.filter(function (y) {return y >= 78 && y <= 90})
  for (var j = 0; j < str.length; j++) {
    if (left.includes(str.charCodeAt(j))) { // 使用includes
      str = str.replace(str[j], String.fromCharCode(str.charCodeAt(j) + 13)) // 重新賦值
    }
  }
  return str
}
萌小萌 回答

那幾個(gè)屬性不能直接放到組件上去,有些屬性是不是合法的的。

報(bào)錯信息里邊已經(jīng)說明了。想要自定義屬性的話,就放data-*來做吧

問題不在這里,而在你使用這些state時(shí)

下墜 回答

python 有全局解釋鎖(GIL),出現(xiàn)這現(xiàn)象是應(yīng)該的。如果希望同時(shí)執(zhí)行,需要用多進(jìn)程模塊(multiprocess)

旖襯 回答

vue渲染方式的問題 沒辦法根本解決,可以試著用ssr渲染頁面的方式試一下