Skip to content

Commit 633f9aa

Browse files
committed
refactor(system): 优化通知公告相关页面的回退逻辑
- 修改通知公告添加页面、查看页面以及用户消息查看页面的回退逻辑 - 将原来的 router.back() 和 tabsStore.closeCurrent()替换为直接跳转到指定页面 - 优化用户体验,确保回退后能准确返回到预期的页面
1 parent aaefb7f commit 633f9aa

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/views/system/notice/add/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ const onUpdate = async (id: string) => {
207207
208208
// 返回
209209
const onBack = () => {
210-
router.back()
211210
tabsStore.closeCurrent(route.path)
211+
router.push('/system/notice')
212212
}
213213
214214
// 保存

src/views/system/notice/view/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ const content = computed(() => dataDetail.value?.content)
5252
5353
// 回退
5454
const onBack = () => {
55-
router.back()
5655
tabsStore.closeCurrent(route.path)
56+
router.push('/system/notice')
5757
}
5858
5959
// 打开

src/views/user/message/components/view/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ const [form, resetForm] = useResetReactive({
5959
6060
// 回退
6161
const onBack = () => {
62-
router.back()
6362
tabsStore.closeCurrent(route.path)
63+
router.push({ path: '/user/message', query: { tab: 'notice' } })
6464
}
6565
6666
// 打开

0 commit comments

Comments
 (0)