Skip to content

Commit 3bebbb2

Browse files
committed
fix: dropdown position incorrect caused by window size change #184
1 parent d969043 commit 3bebbb2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

components/align/Align.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export default {
2727
monitorBufferTime: PropTypes.number.def(50),
2828
monitorWindowResize: PropTypes.bool.def(false),
2929
disabled: PropTypes.bool.def(false),
30-
visible: PropTypes.bool.def(false),
3130
},
3231
data () {
3332
this.aligned = false
@@ -50,7 +49,7 @@ export default {
5049
const prevProps = this.prevProps
5150
const props = this.$props
5251
let reAlign = false
53-
if (!props.disabled && props.visible) {
52+
if (!props.disabled) {
5453
const source = this.$el
5554
const sourceRect = source ? source.getBoundingClientRect() : null
5655

components/trigger/Popup.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ export default {
256256
key='popup'
257257
ref='alignInstance'
258258
monitorWindowResize
259+
disabled={!visible}
259260
align={align}
260261
onAlign={this.onAlign}
261-
visible={visible}
262262
>
263263
<PopupInner
264264
{...popupInnerProps}

0 commit comments

Comments
 (0)