TextField(
value = Dishcount, onValueChange = { if (it.text.isNotEmpty()) {
val userInput = it.text.toIntOrNull()
userInput?.let { input -> if (input > 0) {
Dishcount = it Dish.count = input
} else {
}
} ?: run { } } else {
}
}, keyboardOptions = KeyboardOptions.Default.copy(
keyboardType = KeyboardType.Number), modifier = Modifier.width(50.dp).fillMaxHeight(), colors = TextFieldDefaults.textFieldColors(backgroundColor = Color.Transparent), textStyle = LocalTextStyle.current.copy(fontSize = 15.sp)
)
尝试过modifier.padding(0.dp)但无法删除它