支持SSR、升级Vue版本和增加新的icon (#40)

* search component add new style

* update vue version and support ssr

* unit test

* add new icon

* new icon
This commit is contained in:
张敏
2017-06-15 19:46:56 +08:00
committed by Yao
parent 857da3a5ee
commit 0f5972e75e
59 changed files with 370 additions and 204 deletions
+18 -11
View File
@@ -1,4 +1,4 @@
'use strict';
import Vue from 'vue';
var extend = Object.assign.bind(Object);
@@ -37,17 +37,24 @@ EventEmitter.prototype = {
}
};
const requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame ||
function(callback, element) {
return window.setTimeout(callback, 1000 / 60);
};
const isSupportRequestAnimationFrame = !Vue.prototype.$isServer &&
(window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.msRequestAnimationFrame);
const isSupportCancelAnimationFrame = !Vue.prototype.$isServer &&
(window.cancelAnimationFrame ||
window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame ||
window.msCancelAnimationFrame);
const cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame ||
window.webkitCancelAnimationFrame || window.msRequestAnimationFrame ||
function(id) {
clearTimeout(id);
};
const requestAnimationFrame = isSupportRequestAnimationFrame || function(callback, element) {
return window.setTimeout(callback, 1000 / 60);
};
const cancelAnimationFrame = isSupportCancelAnimationFrame || function(id) {
clearTimeout(id);
};
const bindEvents = (elem, eventNames, fn) => {
eventNames = eventNames.split(/\s+/);