页面跳转

This commit is contained in:
shikong 2024-10-16 16:35:36 +08:00
parent 2dd03a27bf
commit a06a017aa3
Signed by: Shikong
GPG Key ID: BD85FF18B373C341
3 changed files with 37 additions and 15 deletions

View File

@ -7,10 +7,15 @@
}
},
{
"path" : "pages/my-info/my-info",
"style" :
{
"navigationBarTitleText" : "我的"
"path": "pages/my-info/my-info",
"style": {
"navigationBarTitleText": "我的"
}
},
{
"path": "pages/test-page/test-page",
"style": {
"navigationBarTitleText": "测试页面"
}
}
],

View File

@ -2,19 +2,17 @@
<view>
页面内容
</view>
<button @click="toTestPage">进入测试页面</button>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
<script setup>
function toTestPage(){
uni.navigateTo({
url: '/pages/test-page/test-page',
animationDuration: 100
})
}
</script>
<style>

View File

@ -0,0 +1,19 @@
<template>
<view>
测试
</view>
<button @tap="back">返回上一页</button>
</template>
<script setup>
function back() {
uni.navigateBack({
animationDuration: 100
})
}
</script>
<style scoped lang="scss">
</style>