|
@@ -111,6 +111,24 @@
|
|
|
path: '/point/pointsetting'
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ //路由切换提示
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
+ let step = this.$refs.step
|
|
|
+ let flag = step.hasOwnProperty('noSaveData') ? step.noSaveData() : false
|
|
|
+ if(flag){
|
|
|
+ next()
|
|
|
+ }else{
|
|
|
+ this.$confirm('存在数据未保存, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ next()
|
|
|
+ }).catch(() => {
|
|
|
+ next(false)
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|