The snippet of the Code which establish this list:
ScrollView {
LazyVGrid(columns: columns, alignment: .leading, spacing: 8) {
ForEach(viewModel.previews) { item in
PreviewCard(item: item)
.contextMenu(
ContextMenu(menuItems: {
Text("Menu Item 1 (item.size)")
}))
.cornerRadius(7)
.shadow(radius: 3)
.padding(3)
}
}
}
struct PreviewCard: View {
private let item: PreviewPayload
init(item: PreviewPayload) {
self.item = item
}
var body: some View {
ZStack(alignment: .bottomLeading) {
AsyncImage(url: item.preview) { image in
image
.resizable()
.scaledToFill()
} placeholder: {
ProgressView()
}
.frame(width: 100, height: 200)
VStack(alignment: .leading, spacing: 4) {
Text(TextFormatter.formatSize(item.size))
if let date = TextFormatter.formatDate(item.createdDate) {
Text(date)
}
}
.padding()
}
}
}
这里指的是:
对错误项目的审查正在进行。 我很想知道,它是否与LazyVGrid有任何关系,或者我是否失踪?