1.点击子元素,会触发父元素点击事件
2.删除子元素点击事件,保留父元素点击事件,给子元素设置自定义属性
<view class="patient-infor" v-for="(item, index) in patient" :key="index"
@click="checkedData(item, $event)"
>
<view class="details">
<view class="detailsBtn" data-details>
详情
</view>
</view>
</view>
3.点击事件中
let checkedData = (item, $event) => {
let { target } = $event
let { details } = target.dataset
if(details){
console.log("子元素")
}else{
console.log("父元素")
}
}