Fix a bug with toggle method

When calling hide on invisible modal with scroll set to true (though it's meaningless), the v--modal-block-scroll class will be added to body and block the UI.
This commit is contained in:
jjyyxx
2018-02-01 11:03:10 +08:00
committed by GitHub
parent 659a21a605
commit ecd4e2b470

View File

@@ -440,6 +440,7 @@ export default {
*/
toggle(state, params) {
const { reset, scrollable, visible } = this
if (visible === state) return
const beforeEventName = visible ? 'before-close' : 'before-open'
if (beforeEventName === 'before-open') {