Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html | |
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传! | |
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。 | |
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。 | |
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!! | |
步骤: | |
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z | |
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd |
// Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %> | |
'use strict'; | |
var moment = require('moment'); | |
var LIVERELOAD_PORT = 35729; | |
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT}); | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
:root { | |
background-color: #6374AB; | |
padding: 50px; | |
} | |
ul{ | |
background:yellow; | |
margin:0; |
const addCounter = (list) => { | |
return [...list, 0]; | |
}; | |
const removeCounter = (list, index) => {\ | |
return [ | |
...list.slice(0, index), | |
...list.slice(index + 1) | |
]; | |
}; |
// v3 is shorter than v2, and achieve same goal | |
(()=>{ | |
let Deferred = function(){ | |
let resolver, rejector, | |
promise = new Promise((resolve, reject)=>{ | |
resolver = resolve; | |
rejector = reject; | |
}); | |
promise.resolve = d=>resolver(d); | |
promise.reject = d=>rejector(d); |
When Vue detects data mutation, it asynchronously defer DOM updates to the next "tick" so that multiple mutations trigger only one update cycle. In versions before 2.5, Vue has been deferring updates using what is known as the "Microtask" (as explained in this blog post).
This works fine in most situations, but we discovered an edge case:
Page({ | |
data: { | |
currentDate: new Date().getTime(), | |
minDate: new Date().getTime() | |
}, | |
onInput(event) { | |
this.setData({ | |
currentDate: event.detail, | |
}); |