fengxh

Results 7 comments of fengxh

``` function sortColor(str) { const arr = str.split(""); const map = { "黄": 1, "红": 2, "蓝": 3 }; arr.sort((cl1, cl2) => map[cl1] - map[cl2]); console.log(arr); return arr.join(""); } ```

``` function toString() { return Array.prototype.join.call(arguments, "-"); } function findBetween(from, to) { const date1 = new Date(from), date2 = new Date(to); const oneDay = 24 * 60 * 60 *...

``` const reverseResult = []; const reverseSort = arr => { console.log("begin: ", arr, reverseResult); if (reverseResult.length) { reverseResult.unshift(reverseResult.pop()); } if (arr.length) { reverseResult.unshift(arr.pop()); console.log("end: ", arr, reverseResult); if (arr.length)...

``` const transform = entry => { const result = {}; for (let prop in entry) { if (entry.hasOwnProperty(prop)) { if (~prop.indexOf(".")) { const arr = prop.split("."); let curr =...

``` const _toString = Object.prototype.toString; const looseEqual = (a, b) => { if (a === b) { return true; } const typeA = _toString.call(a); const typeB = _toString.call(b); if (typeA...

在win10系统chrome/edge,在编辑/新增几次后稳定出现卡顿问题,mac就不会出现该问题 一些自己的原因导致element-ui不好升级版本,头痛

Yeah, my keynote here is to optimize appending children logic using `document.createDocumentFragment`, specifically this part ``` for (var i = 0, j = childNodes.length; i < j; i++) domNode.appendChild(childNodes[i]); //...