router-link
不满足条件时阻止跳转 $route.fullPath 不进行跳转 <router-link :to="row.enabled ? {path: $route.fullPath} : {path:'/dt-exchange/dt-detail',query:{jobId:row.id,page_no:page_no,desc:form.work_describe}}"></router-link> 如果想要另开窗口的话通过 :target="_blank" 默认是_self 虽然说vue的router-link不支持target属性 但可以解决此问题 满足条件打开新窗口跳转,不满足时不进行跳转 <router-link :to="row.enabled ? {path: $route.fullPath} : {path:'/dt-exchange/dt-detail',query:{jobId:row.id,page_no:page_no,desc:form.work_describe}}" :target="row.enabled ? '_self' : '_blank'"></router-link>