取消动画,处理关闭界面相机预览残留问题

This commit is contained in:
zxj
2025-07-08 17:41:25 +08:00
parent 4501b6d5fc
commit de80a26c2c
5 changed files with 36 additions and 9 deletions
@@ -1,5 +1,8 @@
package com.sw.inbound.ui
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
@@ -115,16 +118,26 @@ private fun NavHost(
LoginScreen(modifier = Modifier, navController)
}
// 采购单入库
composable(Screen.PurchaseOrder.route) {
composable(
Screen.PurchaseOrder.route,
enterTransition = { fadeIn(animationSpec = tween(0)) }, // 无进入动画
exitTransition = { fadeOut(animationSpec = tween(0)) } // 无退出动画
) {
PurchaseOrderScreen(modifier = Modifier.fillMaxSize(), navController)
}
// 自采单
composable(Screen.SelfProcurement.route) {
composable(
Screen.SelfProcurement.route,
enterTransition = { fadeIn(animationSpec = tween(0)) }, // 无进入动画
exitTransition = { fadeOut(animationSpec = tween(0)) } // 无退出动画
) {
SelfProcurementScreen(modifier = Modifier, navController)
}
// 收货
composable(
Screen.ReceiptProduct.route,
enterTransition = { fadeIn(animationSpec = tween(0)) }, // 无进入动画
exitTransition = { fadeOut(animationSpec = tween(0)) }, // 无退出动画
arguments = listOf(
navArgument(name = "id", builder = { type = NavType.IntType }),
navArgument(name = "supplierId", builder = { type = NavType.IntType })