Skip to content

Commit 99dd59a

Browse files
committed
feat: 新增使用自定义动画打开页面示例
1 parent 7075b9b commit 99dd59a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎pages/API/navigator/navigator.vue‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<button @tap="redirectTo">在当前页面打开</button>
99
<button @tap="switchTab">切换到模板选项卡</button>
1010
<button @tap="reLaunch">关闭所有页面,打开首页</button>
11+
<!-- #ifdef APP-PLUS -->
12+
<button @tap="customAnimation">使用自定义动画打开页面</button>
13+
<!-- #endif -->
1114
</view>
1215
</view>
1316
</view>
@@ -42,6 +45,13 @@
4245
uni.reLaunch({
4346
url: '/pages/tabBar/component/component'
4447
});
48+
},
49+
customAnimation(){
50+
uni.navigateTo({
51+
url: 'new-page/new-page?data=使用自定义动画打开页面',
52+
animationType: 'slide-in-bottom',
53+
animationDuration: 200
54+
})
4555
}
4656
}
4757
}

0 commit comments

Comments
 (0)