This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="app"> | |
<div class="container"> | |
<div class="main"> | |
<el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox> | |
<virtual-list class="list" :size="30" :remain="6"> | |
<div class="list-item" style="height:30px;" v-for="item in items" :key="item.idx"> | |
<el-checkbox v-model="item.checked" @change="handleCheckItem(item)">table content</el-checkbox> | |
</div> | |
</virtual-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2022-03-02T07:09:57.499Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a.sort(function(a, b) { | |
return Math.random() - 0.5 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function (factory) { | |
var registeredInModuleLoader = false; | |
if (typeof define === 'function' && define.amd) { | |
define(factory); // AMD,requireJS | |
registeredInModuleLoader = true; | |
} | |
if (typeof exports === 'object') { | |
module.exports = factory(); // CMD Node,webpack,bowserfy,seaJS | |
registeredInModuleLoader = true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 处理毫秒级的时间 | |
handleTime: function (times) { | |
var t = new Date(times); | |
return t.getFullYear() + '年' + (t.getMonth() + 1) + '月' + t.getDate() + '日 ' + t.toTimeString().slice(0, 5) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//2.处理毫秒级的时间 | |
$.extend({ | |
handleTime:function(times){ | |
var nowTime = new Date(times), | |
year = nowTime.getFullYear(), | |
month = nowTime.getMonth(), | |
day = nowTime.getDate(); | |
return year+'.'+month+"."+day; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function debounce(dom, event, fn, timeout) { | |
var timeout = timeout || 3; // 默认延迟3s内点击无效 | |
var timer = null; | |
// cornor cases | |
if (!dom || !event || !(event in dom) || typeof fn !== 'function') { | |
return | |
} | |
dom.addEventListener(event, function () { | |
var _this = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function escapeHTML(a) { | |
a = "" + a; | |
return a.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"); | |
; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var lastTime = 0; | |
var vendors = ['webkit', 'moz']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = | |
window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; | |
} | |
if (!window.requestAnimationFrame) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
DOM结构说明: | |
ul.avatar-list | |
li | |
img.avatar | |
li | |
img.avatar | |
*/ | |
.avatar-list > li:nth-child(3n+2) img { | |
border-top-left-radius: 84%; |
NewerOlder