支持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
+3
View File
@@ -1,3 +1,4 @@
import Vue from 'vue';
import { EventEmitter, extend, bindEvents, removeEvents } from './utils';
function Input(host, options) {
@@ -24,6 +25,7 @@ Input.prototype = Object.create(new EventEmitter());
extend(Input.prototype, {
bind: function(host) {
if (Vue.prototype.$isServer) return;
bindEvents(host, 'touchstart mousedown', this.onTouchStart);
if (this.options.listenMoving) {
bindEvents(window, 'touchmove mousemove', this.onTouchMove);
@@ -104,6 +106,7 @@ extend(Input.prototype, {
},
destroy: function() {
if (Vue.prototype.$isServer) return;
removeEvents(this.host, 'touchstart mousedown', this.onTouchStart);
if (this.options.listenMoving) {
removeEvents(window, 'touchmove mousemove', this.onTouchMove);