隐藏弹窗
This commit is contained in:
@@ -27,7 +27,6 @@ import com.sw.inbound.GlobalKey
|
||||
import com.sw.inbound.R
|
||||
import com.sw.inbound.ui.page.HomeScreen
|
||||
import com.sw.inbound.ui.page.PurchaseOrderScreen
|
||||
import com.sw.inbound.ui.weight.GlobalLoading
|
||||
import com.sw.inbound.utils.SPUtil
|
||||
import com.sw.inbound.utils.ToastUtils
|
||||
|
||||
@@ -86,7 +85,7 @@ fun AppScreen(
|
||||
}
|
||||
)
|
||||
ToastUtils.ToastComposable()
|
||||
GlobalLoading() // 全局Loading
|
||||
//GlobalLoading() // 全局Loading
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
package com.sw.inbound.ui.weight
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.material3.CircularProgressIndicator
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.Dialog
|
||||
import androidx.compose.ui.window.DialogProperties
|
||||
import com.sw.inbound.ext.withColor
|
||||
import com.sw.inbound.network.LoadingState
|
||||
import com.sw.inbound.ui.theme.AppTypography
|
||||
|
||||
/**
|
||||
* 全局加载进度
|
||||
*/
|
||||
@Composable
|
||||
fun GlobalLoading() {
|
||||
if (LoadingState.isLoading) {
|
||||
Dialog(
|
||||
onDismissRequest = {},
|
||||
properties = DialogProperties(
|
||||
dismissOnBackPress = false,
|
||||
dismissOnClickOutside = false
|
||||
)
|
||||
) {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center
|
||||
) {
|
||||
CircularProgressIndicator(modifier = Modifier)
|
||||
Spacer(modifier = Modifier.height(20.dp))
|
||||
Text(
|
||||
text = "请稍等...",
|
||||
style = AppTypography.grayTextStyle.withColor(color = Color.White)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//package com.sw.inbound.ui.weight
|
||||
//
|
||||
//import androidx.compose.foundation.layout.Arrangement
|
||||
//import androidx.compose.foundation.layout.Column
|
||||
//import androidx.compose.foundation.layout.Spacer
|
||||
//import androidx.compose.foundation.layout.height
|
||||
//import androidx.compose.material3.CircularProgressIndicator
|
||||
//import androidx.compose.material3.Text
|
||||
//import androidx.compose.runtime.Composable
|
||||
//import androidx.compose.ui.Alignment
|
||||
//import androidx.compose.ui.Modifier
|
||||
//import androidx.compose.ui.graphics.Color
|
||||
//import androidx.compose.ui.unit.dp
|
||||
//import androidx.compose.ui.window.Dialog
|
||||
//import androidx.compose.ui.window.DialogProperties
|
||||
//import com.sw.inbound.ext.withColor
|
||||
//import com.sw.inbound.network.LoadingState
|
||||
//import com.sw.inbound.ui.theme.AppTypography
|
||||
//
|
||||
///**
|
||||
// * 全局加载进度
|
||||
// */
|
||||
//@Composable
|
||||
//fun GlobalLoading() {
|
||||
// if (LoadingState.isLoading) {
|
||||
// Dialog(
|
||||
// onDismissRequest = {},
|
||||
// properties = DialogProperties(
|
||||
// dismissOnBackPress = false,
|
||||
// dismissOnClickOutside = false
|
||||
// )
|
||||
// ) {
|
||||
// Column(
|
||||
// horizontalAlignment = Alignment.CenterHorizontally,
|
||||
// verticalArrangement = Arrangement.Center
|
||||
// ) {
|
||||
// CircularProgressIndicator(modifier = Modifier)
|
||||
// Spacer(modifier = Modifier.height(20.dp))
|
||||
// Text(
|
||||
// text = "请稍等...",
|
||||
// style = AppTypography.grayTextStyle.withColor(color = Color.White)
|
||||
// )
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
Reference in New Issue
Block a user