Angular UI Bootstrap Modal - 如何防止用户交互 [英] Angular UI Bootstrap Modal - how to prevent user interaction

查看:29
本文介绍了Angular UI Bootstrap Modal - 如何防止用户交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我当前的用例中,我尝试使用 angular-ui 模态窗口来显示我们在后台进程中执行的计算进度,我们在完成时禁用该进程.

In my current usecase, I am trying to use angular-ui modal window to show the progress of calculations that we do in a background process which we disable on completion.

一切正常.我只想禁止用户点击后台的任何元素.

All works well. I just want to disable user from clicking any of element in background.

知道我们该怎么做吗?

推荐答案

您可以通过以下选项,在打开模态窗口时防止用户关闭窗口:

You can pass the following options, when opening a modal window, to prevent users from closing the window:

  • backdrop: 'static' - top 防止用户在点击背景时关闭模态
  • keyboard: false - 所以用户不能通过按 ESC 来关闭窗口
  • backdrop: 'static' - top prevent users from closing a modal on backdrop click
  • keyboard: false - so users can't close a window by pressing ESC

完整文档在这里:http://angular-ui.github.io/bootstrap/#/modal

这篇关于Angular UI Bootstrap Modal - 如何防止用户交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆