add Dropdown component

add Dropdown component
This commit is contained in:
梁灏 2016-12-03 23:46:25 +08:00
parent 0f4ccf4486
commit ab8aaf958a
13 changed files with 235 additions and 4 deletions

View file

@ -5,6 +5,12 @@
import Popper from 'popper.js';
export default {
props: {
placement: {
type: String,
default: 'bottom-start'
}
},
data () {
return {
popper: null
@ -20,7 +26,7 @@
this.$nextTick(() => {
this.popper = new Popper(this.$parent.$els.reference, this.$el, {
gpuAcceleration: false,
placement: 'bottom-start',
placement: this.placement,
boundariesPadding: 0,
forceAbsolute: true,
boundariesElement: 'body'