Skip to content
New issue

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

refreshAppUI是连着页面中的数据,controller 中的网络请求的数据全部都刷新? #11

Open
Leewinner1 opened this issue Sep 25, 2024 · 1 comment

Comments

@Leewinner1
Copy link

原理是否类似 先 get.delete再加载 get.put? 然后使用一个 rx 变量来触发刷新?
例子:我在 a 页面,商品的价格是 1600,现在 从 a 页面进入 b 页面,在 b 页面修改了商品价格 1500,现在返回 a 页面,a 页面的商品价格也要刷新能使用 refreshAppUI 来触发刷新吗?

@Kxmrg
Copy link
Owner

Kxmrg commented Sep 26, 2024

建议您看看源码比较清楚。demo中所有的GetxController都混入了BaseControllerMixin,所有混入BaseControllerMixin的控制器都必须复写builderId,这个id对应的就是GetView中最外层的GetBuilder的id。也就是说在Controller中调用updateUi就会刷新整个GetView,也就是重构整个页面。而refreshAppUI是刷新所有混入了BaseControllerMixin的页面。Rx变量对应的是Obx,与这套逻辑无关。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants