fix: dropdown position incorrect caused by window size change #184
parent
d9690435c7
commit
3bebbb2aab
|
@ -27,7 +27,6 @@ export default {
|
||||||
monitorBufferTime: PropTypes.number.def(50),
|
monitorBufferTime: PropTypes.number.def(50),
|
||||||
monitorWindowResize: PropTypes.bool.def(false),
|
monitorWindowResize: PropTypes.bool.def(false),
|
||||||
disabled: PropTypes.bool.def(false),
|
disabled: PropTypes.bool.def(false),
|
||||||
visible: PropTypes.bool.def(false),
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
this.aligned = false
|
this.aligned = false
|
||||||
|
@ -50,7 +49,7 @@ export default {
|
||||||
const prevProps = this.prevProps
|
const prevProps = this.prevProps
|
||||||
const props = this.$props
|
const props = this.$props
|
||||||
let reAlign = false
|
let reAlign = false
|
||||||
if (!props.disabled && props.visible) {
|
if (!props.disabled) {
|
||||||
const source = this.$el
|
const source = this.$el
|
||||||
const sourceRect = source ? source.getBoundingClientRect() : null
|
const sourceRect = source ? source.getBoundingClientRect() : null
|
||||||
|
|
||||||
|
|
|
@ -256,9 +256,9 @@ export default {
|
||||||
key='popup'
|
key='popup'
|
||||||
ref='alignInstance'
|
ref='alignInstance'
|
||||||
monitorWindowResize
|
monitorWindowResize
|
||||||
|
disabled={!visible}
|
||||||
align={align}
|
align={align}
|
||||||
onAlign={this.onAlign}
|
onAlign={this.onAlign}
|
||||||
visible={visible}
|
|
||||||
>
|
>
|
||||||
<PopupInner
|
<PopupInner
|
||||||
{...popupInnerProps}
|
{...popupInnerProps}
|
||||||
|
|
Loading…
Reference in New Issue