浏览代码

Select: fix an undefined bug (#3015)

杨奕 8 年之前
父节点
当前提交
c77489a44e
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      packages/select/src/select.vue

+ 1 - 0
packages/select/src/select.vue

@@ -480,6 +480,7 @@
 
 
       resetInputHeight() {
       resetInputHeight() {
         this.$nextTick(() => {
         this.$nextTick(() => {
+          if (!this.$refs.reference) return;
           let inputChildNodes = this.$refs.reference.$el.childNodes;
           let inputChildNodes = this.$refs.reference.$el.childNodes;
           let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
           let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
           input.style.height = Math.max(this.$refs.tags.clientHeight + 6, sizeMap[this.size] || 36) + 'px';
           input.style.height = Math.max(this.$refs.tags.clientHeight + 6, sizeMap[this.size] || 36) + 'px';