fix: dropdown position incorrect caused by window size change #184

This commit is contained in:
tangjinzhou 2018-09-13 12:19:03 +08:00
parent d9690435c7
commit 3bebbb2aab
2 changed files with 2 additions and 3 deletions

View File

@ -27,7 +27,6 @@ export default {
monitorBufferTime: PropTypes.number.def(50),
monitorWindowResize: PropTypes.bool.def(false),
disabled: PropTypes.bool.def(false),
visible: PropTypes.bool.def(false),
},
data () {
this.aligned = false
@ -50,7 +49,7 @@ export default {
const prevProps = this.prevProps
const props = this.$props
let reAlign = false
if (!props.disabled && props.visible) {
if (!props.disabled) {
const source = this.$el
const sourceRect = source ? source.getBoundingClientRect() : null

View File

@ -256,9 +256,9 @@ export default {
key='popup'
ref='alignInstance'
monitorWindowResize
disabled={!visible}
align={align}
onAlign={this.onAlign}
visible={visible}
>
<PopupInner
{...popupInnerProps}