Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
jgdl
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-07-04 18:15:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
856961fcde9777e14a48ed02a787cb9fd4ca36b5
856961fc
1 parent
2327c131
fix(页面路由): 修复从我的车辆进入编辑页面的导航标题显示问题
在从我的车辆页面进入编辑页面时,添加type参数并处理导航栏标题显示
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
src/pages/myCar/index.vue
src/pages/sell/index.vue
src/pages/myCar/index.vue
View file @
856961f
...
...
@@ -155,7 +155,7 @@ const goToSell = () => {
*/
const editCar = (carId) => {
Taro.navigateTo({
url: `/pages/sell/index?id=${carId}&mode=edit`
url: `/pages/sell/index?id=${carId}&mode=edit
&type=myCar
`
})
}
...
...
src/pages/sell/index.vue
View file @
856961f
...
...
@@ -3,7 +3,7 @@
<!-- 顶部导航 -->
<nut-config-provider :theme-vars="themeVars">
<nut-sticky top="0">
<nut-navbar v-if="!isAuthMode" :title="isEditMode ? '编辑车源' : '发布车源'" left-show @on-click-back="goBack">
<nut-navbar v-if="!isAuthMode
&& !isMyCarMode
" :title="isEditMode ? '编辑车源' : '发布车源'" left-show @on-click-back="goBack">
<template #left-show>
<RectLeft color="white" />
</template>
...
...
@@ -320,6 +320,7 @@ const instance = Taro.getCurrentInstance()
const { id, mode, type } = instance.router?.params || {}
const isEditMode = ref(mode === 'edit' && id)
const isAuthMode = ref(type === 'auth' && id)
const isMyCarMode = ref(type === 'myCar' && id)
const carId = ref(id || '')
// 文件上传相关
...
...
@@ -855,5 +856,10 @@ onMounted(() => {
title: '发布车源'
});
}
if (isMyCarMode.value) {
wx.setNavigationBarTitle({
title: '编辑车源'
});
}
})
</script>
...
...
Please
register
or
login
to post a comment