diff --git a/JetpackMvvm/src/main/java/me/hgj/jetpackmvvm/base/fragment/BaseVmFragment.kt b/JetpackMvvm/src/main/java/me/hgj/jetpackmvvm/base/fragment/BaseVmFragment.kt index af95d8c..d754a13 100644 --- a/JetpackMvvm/src/main/java/me/hgj/jetpackmvvm/base/fragment/BaseVmFragment.kt +++ b/JetpackMvvm/src/main/java/me/hgj/jetpackmvvm/base/fragment/BaseVmFragment.kt @@ -126,7 +126,11 @@ abstract class BaseVmFragment : Fragment() { */ private fun registorDefUIChange() { mViewModel.loadingChange.showDialog.observe(viewLifecycleOwner, Observer { - showLoading() + showLoading( + if (it.isEmpty()) { + "请求网络中..." + } else it + ) }) mViewModel.loadingChange.dismissDialog.observe(viewLifecycleOwner, Observer { dismissLoading() @@ -150,4 +154,4 @@ abstract class BaseVmFragment : Fragment() { } } -} \ No newline at end of file +}