The button action will be wrap with a brackets. As already @EmilioPelaez already mention on the comment. Here is the implemented code.
Button(action: {
files.remove(at:files.firstIndex(of: file)!)
}, label: {
Text("Delete")
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…