解决手势返回问题
This commit is contained in:
parent
3592ca50a4
commit
f79caf661e
|
|
@ -191,6 +191,18 @@ export default {
|
|||
url: `/pages/YNEduApp/exam/examinationList?params=${JSON.stringify(params)}`
|
||||
})
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
console.log(options)
|
||||
if (options.from == 'backbutton') {
|
||||
// 来自手势返回
|
||||
console.log('手势返回')
|
||||
// 返回为 true 时,不会执行返回操作,可以自定义返回逻辑
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return true
|
||||
}
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -561,7 +561,19 @@ export default {
|
|||
console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onBackPress(options) {
|
||||
console.log(options)
|
||||
if (options.from == 'backbutton') {
|
||||
// 来自手势返回
|
||||
console.log('手势返回')
|
||||
// 返回为 true 时,不会执行返回操作,可以自定义返回逻辑
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return true
|
||||
}
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -213,6 +213,18 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
console.log(options)
|
||||
if (options.from == 'backbutton') {
|
||||
// 来自手势返回
|
||||
console.log('手势返回')
|
||||
// 返回为 true 时,不会执行返回操作,可以自定义返回逻辑
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return true
|
||||
}
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -248,6 +248,18 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
console.log(options)
|
||||
if (options.from == 'backbutton') {
|
||||
// 来自手势返回
|
||||
console.log('手势返回')
|
||||
// 返回为 true 时,不会执行返回操作,可以自定义返回逻辑
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return true
|
||||
}
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -374,6 +374,18 @@ export default {
|
|||
url: '/pages/YNEduApp/learnProj/learnProj'
|
||||
})
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
console.log(options)
|
||||
if (options.from == 'backbutton') {
|
||||
// 来自手势返回
|
||||
console.log('手势返回')
|
||||
// 返回为 true 时,不会执行返回操作,可以自定义返回逻辑
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return true
|
||||
}
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -832,6 +832,18 @@ export default {
|
|||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
console.log(options)
|
||||
if (options.from == 'backbutton') {
|
||||
// 来自手势返回
|
||||
console.log('手势返回')
|
||||
// 返回为 true 时,不会执行返回操作,可以自定义返回逻辑
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return true
|
||||
}
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -132,6 +132,18 @@ export default {
|
|||
url: '/pages/YNEduApp/prac/exercises?params=' + JSON.stringify(params)
|
||||
})
|
||||
}
|
||||
},
|
||||
onBackPress(options) {
|
||||
console.log(options)
|
||||
if (options.from == 'backbutton') {
|
||||
// 来自手势返回
|
||||
console.log('手势返回')
|
||||
// 返回为 true 时,不会执行返回操作,可以自定义返回逻辑
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return true
|
||||
}
|
||||
// 返回为 false 或者不返回时,则执行默认返回操作
|
||||
return false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue