我有以下导航链接:
NavigationLink(destination:
TrendSlider(
title: .constant(title),
col: .constant(self.dataModel.queryColumnSeasonWinPercentageTeam1),
opIndx: self.$dataModel.seasonWinPercentageTeam1OperatorIndxValue,
val: self.$dataModel.seasonWinPercentageTeam1SliderValue,
lBound: .constant(self.dataModel.seasonWinPercentageTeam1Values.first!) ,
uBound: .constant(self.dataModel.seasonWinPercentageTeam1Values.last!),
lRange: self.$dataModel.seasonWinPercentageTeam1RangeSliderLowerValue ,
uRange: self.$dataModel.seasonWinPercentageTeam1RangeSliderUpperValue,
step: .constant(1.0),
displayReadableQuery: $readableQuery
)) {
HStack {
if readableQuery.hasSuffix("IS ANY") {
Text(title)
Spacer()
Text("IS ANY").foregroundColor(Color("TPLightGrey"))
}else{
Text(readableQuery).foregroundColor(Color("TPOrange"))
}
}
}.simultaneousGesture(TapGesture().onEnded{
sendViewSelectionEvent(name: self.title, referral: "Game")
})
如果我离开“.simultaneousGesture ...”,则点击文本元素不会触发 NavigationLink 操作,但该行的其余部分确实有效。
如果我删除 .simultaneousGesture,则可以再次在任何地方点击该行。
漏洞?