Ver código fonte

fix autocomplete dropdown position(#2868) (#2875)

* fix dropdown style

* fix autocomplete dropdown position
baiyaaaaa 8 anos atrás
pai
commit
7f6d698f72

+ 6 - 0
packages/autocomplete/src/autocomplete-suggestions.vue

@@ -66,6 +66,12 @@
       }
     },
 
+    updated() {
+      this.$nextTick(_ => {
+        this.updatePopper();
+      });
+    },
+
     mounted() {
       this.popperElm = this.$el;
       this.referenceElm = this.$parent.$refs.input.$refs.input;

+ 1 - 1
packages/theme-default/src/autocomplete.css

@@ -8,7 +8,7 @@
     display: inline-block;
   }
   @b autocomplete-suggestion {
-    margin: 5px 0 0;
+    margin: 5px 0;
     box-shadow: 0 0 6px 0 rgba(0,0,0,0.04), 0 2px 4px 0 rgba(0,0,0,0.12);
 
     @e wrap {