Skip to content

Instantly share code, notes, and snippets.

View Alex-xd's full-sized avatar
🎯
Focusing

Boyuan Zhang Alex-xd

🎯
Focusing
View GitHub Profile
@Alex-xd
Alex-xd / handleTime.js
Created January 13, 2017 08:33
处理毫秒级时间
// 处理毫秒级的时间
handleTime: function (times) {
var t = new Date(times);
return t.getFullYear() + '年' + (t.getMonth() + 1) + '月' + t.getDate() + '日 ' + t.toTimeString().slice(0, 5)
}
@Alex-xd
Alex-xd / modular-template.js
Created January 17, 2017 13:33
A javscript template for writting a different modular specification library. 兼容各种模块化,优雅退化的模块化组件开发模板。
;(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;
}
a.sort(function(a, b) {
return Math.random() - 0.5
});
@Alex-xd
Alex-xd / cloudSettings
Last active March 2, 2022 07:10
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-03-02T07:09:57.499Z","extensionVersion":"v3.4.3"}
<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>