We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当关闭的时候为什么要延迟200ms恢复overflow?
我使用的时候是这个场景 在一个编辑页面,编辑页面需要配置跳转前提示是否保存修改,我在全局的beforeRouterEnter的时候设置弹出框提示,当点确定的时候执行路由跳转,这时候执行路由跳转会销毁当前的vue的实例this,因为this.modal的判断延后了200ms,所以这时候this.modal没有了,必然就无法执行恢复overflow
是我使用的姿势不对?
import MessageBox from 'components/message-box' // ... router.beforeEach((route, redirect, next) => { if (route.matched.some(m => m.meta.needGuard)) { // console.log(router.path + '需要进行权限验证') authInterceptor(route, redirect, next) } else if (redirect.matched.some(m => m.meta.needConfirm) && !route.query.ignoreConfirm) { MessageBox.confirm( '页面未保存,确定离开此页面吗?', '提示', { type: 'warning', cancelButtonText: '留在该页面', confirmButtonText: '确定离开' } ) .then(() => { next() }) .catch(() => { next(false) }) } else { next() } })
The text was updated successfully, but these errors were encountered:
No branches or pull requests
当关闭的时候为什么要延迟200ms恢复overflow?
我使用的时候是这个场景
在一个编辑页面,编辑页面需要配置跳转前提示是否保存修改,我在全局的beforeRouterEnter的时候设置弹出框提示,当点确定的时候执行路由跳转,这时候执行路由跳转会销毁当前的vue的实例this,因为this.modal的判断延后了200ms,所以这时候this.modal没有了,必然就无法执行恢复overflow
是我使用的姿势不对?
The text was updated successfully, but these errors were encountered: