页面跳转
This commit is contained in:
parent
2dd03a27bf
commit
a06a017aa3
@ -8,10 +8,15 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/my-info/my-info",
|
"path": "pages/my-info/my-info",
|
||||||
"style" :
|
"style": {
|
||||||
{
|
|
||||||
"navigationBarTitleText": "我的"
|
"navigationBarTitleText": "我的"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/test-page/test-page",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "测试页面"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
@ -2,18 +2,16 @@
|
|||||||
<view>
|
<view>
|
||||||
页面内容
|
页面内容
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<button @click="toTestPage">进入测试页面</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
export default {
|
function toTestPage(){
|
||||||
data() {
|
uni.navigateTo({
|
||||||
return {
|
url: '/pages/test-page/test-page',
|
||||||
|
animationDuration: 100
|
||||||
}
|
})
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
19
src/pages/test-page/test-page.vue
Normal file
19
src/pages/test-page/test-page.vue
Normal 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>
|
Loading…
Reference in New Issue
Block a user