您正在使用 M3 (androidx.compose.material3
) 的 Card
组件,并且 elevation
属性需要一个 CardElevation
对象:
类似这样:
类似这样:
Card(
shape = RoundedCornerShape(20.dp),
elevation = CardDefaults.cardElevation(
defaultElevation = 10.dp
)
)
Card(elevation = CardDefaults.cardElevation(
defaultElevation = 10.dp))
import androidx.compose.material3.Card