Skip to content

Commit 2be2ff8

Browse files
committed
Released on 20170318.
1 parent 9c11b57 commit 2be2ff8

File tree

4 files changed

+25
-33
lines changed

4 files changed

+25
-33
lines changed

dist/mvvm.js

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
2-
* mvvm.js v1.3.9 (c) 2017 TANG
2+
* mvvm.js v1.4.0 (c) 2017 TANG
33
* Released under the MIT license
4-
* Sat Jan 14 2017 17:21:50 GMT+0800 (CST)
4+
* Sat Mar 18 2017 16:26:31 GMT+0800 (CST)
55
*/
66
(function (global, factory) {
77
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -1630,8 +1630,7 @@
16301630
vel.parse = function () {
16311631
// 不能在 vfor 中使用
16321632
if (!this.scope) {
1633-
var register = this.desc.expression;
1634-
this.vm.$regEles[register] = this.el;
1633+
this.vm.$regEles[this.desc.expression] = this.el;
16351634
} else {
16361635
warn('v-el can not be used inside v-for! Consider use v-custom to handle v-for element.');
16371636
}
@@ -2864,15 +2863,14 @@
28642863
}
28652864

28662865
/**
2867-
* 保证 func 在 delay 时间内只触发一次
2868-
* @param {Function} func
2869-
* @param {Number} delay
2870-
* @return {TimeoutId}
2866+
* 保证 func 在上次执行后的 delay 时间内不会被触发第二次
2867+
* @param {Function} func
2868+
* @param {Number} delay
28712869
*/
2872-
var beginTime;
2870+
var beginTime = 0;
28732871
function debounceDelay (func, delay) {
28742872
beginTime = Date.now();
2875-
return setTimeout(function () {
2873+
setTimeout(function () {
28762874
if (Date.now() - beginTime >= delay) {
28772875
func.call(func);
28782876
}
@@ -2948,9 +2946,7 @@
29482946
/* istanbul ignore next */
29492947
if (isMsie9) {
29502948
this.on('cut', function () {
2951-
var this$1 = this;
2952-
2953-
debounceDelay(function () { return setModelValue(this$1.value); });
2949+
setModelValue(this.value);
29542950
});
29552951

29562952
this.on('keyup', function (e) {

0 commit comments

Comments
 (0)