mirror of https://github.com/ElemeFE/element
				
				
				
			* Fix overwritten warn in Vue 2.1.8, fixed #2040 * Fix dropdown-menu * Fix placement again * fix testpull/2058/head
							parent
							
								
									ea9e5ed462
								
							
						
					
					
						commit
						47e75ad051
					
				| 
						 | 
				
			
			@ -202,7 +202,6 @@ export default {
 | 
			
		|||
      default: 'left'
 | 
			
		||||
    },
 | 
			
		||||
    value: {},
 | 
			
		||||
    haveTrigger: {},
 | 
			
		||||
    pickerOptions: {}
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,9 +26,9 @@
 | 
			
		|||
      this.referenceElm = this.$parent.$el;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    computed: {
 | 
			
		||||
      placement() {
 | 
			
		||||
        return `bottom-${this.$parent.menuAlign}`;
 | 
			
		||||
    watch: {
 | 
			
		||||
      '$parent.menuAlign'(val) {
 | 
			
		||||
        this.currentPlacement = `bottom-${val}`;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,7 +33,6 @@
 | 
			
		|||
      return {
 | 
			
		||||
        classMap: {},
 | 
			
		||||
        colorMap: {},
 | 
			
		||||
        classes: null,
 | 
			
		||||
        pointerAtLeftHalf: false,
 | 
			
		||||
        currentValue: this.value,
 | 
			
		||||
        hoverIndex: -1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -46,7 +46,8 @@ export default {
 | 
			
		|||
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      showPopper: false
 | 
			
		||||
      showPopper: false,
 | 
			
		||||
      currentPlacement: ''
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -68,7 +69,8 @@ export default {
 | 
			
		|||
  methods: {
 | 
			
		||||
    createPopper() {
 | 
			
		||||
      if (this.$isServer) return;
 | 
			
		||||
      if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.placement)) {
 | 
			
		||||
      this.currentPlacement = this.currentPlacement || this.placement;
 | 
			
		||||
      if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -88,7 +90,7 @@ export default {
 | 
			
		|||
        this.popperJS.destroy();
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      options.placement = this.placement;
 | 
			
		||||
      options.placement = this.currentPlacement;
 | 
			
		||||
      options.offset = this.offset;
 | 
			
		||||
      this.popperJS = new PopperJS(reference, popper, options);
 | 
			
		||||
      this.popperJS.onCreate(_ => {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue