Browse Source

[*]优化下拉组件弹出位置

Lianjy 4 years ago
parent
commit
33ffb9844f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      magic-editor/src/console/src/components/common/magic-select.vue

+ 2 - 2
magic-editor/src/console/src/components/common/magic-select.vue

@@ -40,10 +40,10 @@ export default {
   },
   methods: {
     showList(){
-      this.marginTop = - this.getMarginTop(this.$refs.container, 0)+ 'px';
+      this.marginTop = - this.getMarginTop(this.$refs.container, 0) - 1 + 'px';
       this.visible = true;
       this.$nextTick(()=>{
-        this.marginLeft = -(window.pageXOffset) + 'px';
+        this.marginLeft = -(window.pageXOffset + 1) + 'px';
         this.width = this.$refs.container.clientWidth + 'px';
         let height = this.$refs.selectList.offsetHeight;
         let top = this.$refs.selectList.offsetTop;