diff --git a/pages/API/navigator/navigator.uvue b/pages/API/navigator/navigator.uvue index 2256e8a18494d7b349a28e702b26c67a088d31ad..0477d3c51370ba7a5e9681b7e6f650f2feda6050 100644 --- a/pages/API/navigator/navigator.uvue +++ b/pages/API/navigator/navigator.uvue @@ -32,7 +32,8 @@ + + @@ -59,7 +60,18 @@ onLoadTime: 0, onShowTime: 0, onReadyTime: 0, - onHideTime: 0, + onHideTime: 0, + animationTypeList: [ + 'slide-in-right', + 'slide-in-left', + 'slide-in-top', + 'slide-in-bottom', + 'pop-in', + 'fade-in', + 'zoom-out', + 'zoom-fade-out', + 'none', + ] } }, onLoad() { @@ -109,7 +121,31 @@ }, navigateTo() { uni.navigateTo({ - url: '/pages/API/navigator/new-page/new-page-1?data=Hello', + url: '/pages/API/navigator/new-page/new-page-1?data=Hello', + animationType: 'fade-in', + animationDuration: 200, + success(result) { + console.log('navigateTo success', result.errMsg) + // 自动化测试 + setLifeCycleNum(state.lifeCycleNum + 1) + }, + fail(error) { + console.log('navigateTo fail', error.errMsg) + // 自动化测试 + setLifeCycleNum(state.lifeCycleNum - 1) + }, + complete(result) { + console.log('navigateTo complete', result.errMsg) + // 自动化测试 + setLifeCycleNum(state.lifeCycleNum + 1) + }, + }) + }, + navigateToAnimationType(animationType: string) { + uni.navigateTo({ + url: '/pages/API/navigator/new-page/new-page-1?data=Hello', + animationType: animationType, + animationDuration: 200, success(result) { console.log('navigateTo success', result.errMsg) // 自动化测试