Sencha:防止在 Sheet.hide 之后取消屏蔽

发布于 2025-01-06 08:31:39 字数 297 浏览 3 评论 0原文

我在关闭工作表后执行 AJAX 调用。问题是,当幻灯片转换完成时,Sencha 会取消对正文的屏蔽,但 AJAX 请求可能仍在运行。我怎样才能防止揭露?

doSearch: function() {
    this.hide();

    // the controller handles this and tells the store to
    // load the data from an AJAX proxy
    this.fireEvent('search', ...);
}

谢谢。

I am performing a AJAX call after dismissing a Sheet. The problem is that when the slide transition finishes, Sencha unmasks the body, but AJAX request may still be running. How can I prevent the unmasking?

doSearch: function() {
    this.hide();

    // the controller handles this and tells the store to
    // load the data from an AJAX proxy
    this.fireEvent('search', ...);
}

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满身野味 2025-01-13 08:31:39

不幸的是,没有简单的方法可以做到这一点。它深深地融入到布局系统中,试图阻止它会导致一堆屏蔽问题。

如果您使用的是 Sencha Touch 2,在 doSearch 方法中,您可以在隐藏工作表后立即遮盖容器,因此看起来遮罩从未消失。

this.getParent().setMasked(true);

当 AJAX 回调完成时:

this.getParent().setMasked(false);

如果您想屏蔽整个屏幕,您还可以屏蔽视口:

Ext.Viewport.setMasked(true);

There is no easy way of doing this unfortunately. It is deeply hooked into the layout system and trying to prevent it will result in a bunch of masking issues.

If you are using Sencha Touch 2, in your doSearch method, you could mask the the container immediately after hiding the sheet, so it looks like the mask has never disappeared.

this.getParent().setMasked(true);

And when the AJAX callback has finished:

this.getParent().setMasked(false);

You can also mask the viewport if you want to mask the entire screen:

Ext.Viewport.setMasked(true);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文