Blazor Server-如何处理用户比SignalR更快的情况?
我有一个复杂的Blazor Server应用程序,并且遇到了用户与表单交互的情况,并且当服务器试图通过SignalR操纵DOM时,用户设法以表单进行其他操作。 当我调试应用程序或在LAN中使用PC时,它可以正常工作,因为它非常快。 但是,当我从手机浏览时,这很明显。
这些情况之一是使用条形码读取器读取条形码。 流量是:
- 用户扫描条形码到文本框中,
- 如果确定或不良情况,请验证条形码
- ,如果用户获取消息,
- 文本框清除了
会发生的情况是,在对其DOM进行任何渲染之前,用户能够扫描其他条形码。
在我看来,必须在本地使用一些JS完成。
任何解决方案的想法都将不胜
感激 Yaron
I have a complex Blazor server app and I run into situations that user interact with the form and while the server is trying to manipulate the DOM via SignalR, the user manage to do other things in the form.
When I debug the app or using PC in the LAN, it works fine because it is very fast.
But when I browse from cell phone it is noticeable.
One of those situations is reading a barcode using barcode reader.
The flow is:
- user scan barcode into textbox
- the barcode is validated
- if OK or Bad the user gets a message
- the textbox cleared
What happen is that the user is able to scan other barcode before any render is being done to its DOM.
It seems to me that it has to be done with some JS locally.
Any solutions ideas would be appreciated
Tx
Yaron
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论