Commit d45e0829 by lijiabin

【需求 20331】 perf: 全部页面加入返回按钮

parent 031a28de
......@@ -8,7 +8,7 @@ import ExchangeYabiRecordDialog from './components/exchangeYabiRecordDilaog.vue'
import type { AuctionItemDto } from '@/api'
import { useYaBiStore } from '@/stores'
import { storeToRefs } from 'pinia'
import BackButton from '@/components/common/BackButton/index.vue'
const yabiStore = useYaBiStore()
const { yabiData } = storeToRefs(yabiStore)
......@@ -197,7 +197,8 @@ const onBid = async (item: AuctionItemDto) => {
}
</script>
<template>
<div>
<div class="relative">
<BackButton />
<div class="flex gap-6">
<div class="flex-3/4 min-w-0">
<div class="bg-white/90 backdrop-blur-sm rounded-2xl p-6 shadow-lg border border-white/60">
......
......@@ -60,6 +60,10 @@ export default defineComponent(() => {
const activeMenu = computed(() => route.path)
const handleBackFront = () => {
router.push('/')
}
const findTitle = (menuList: MenuItem[], path: string): string | undefined => {
for (const item of menuList) {
if (item.path === path) {
......@@ -126,7 +130,13 @@ export default defineComponent(() => {
<div class="header-left">
<h1 class="header-title">{currentTitle.value}</h1>
</div>
<div class="header-right"></div>
<div class="header-right">
{/* 返回企业文化前台 */}
<el-button type="primary" plain size="small" onClick={handleBackFront}>
返回企业文化前台
</el-button>
</div>
</header>
<main class="content-main">
......
<template>
<div ref="searchPageRef" class="bg-white/90">
<div ref="searchPageRef" class="bg-white/90 relative">
<BackButton />
<div>
<!-- 搜索栏 -->
<div class="p-4">
<div class="flex items-center gap-2 justify-between">
<el-button link @click="router.back()" class="text-gray-600 hover:text-primary">
<el-icon class="mr-1">
<IEpArrowLeft />
</el-icon>
返回
</el-button>
<div class="flex items-center gap-2 justify-end">
<div class="w-auto flex items-center gap-2">
<el-input
v-model="searchParams.title"
......@@ -72,7 +66,7 @@
v-for="item in list"
:key="item.articleId"
class="flex gap-4 p-4 rounded-lg hover:bg-gray-50 transition-colors cursor-pointer"
@click="handleClick(item)"
@click="jumpToArticleDetailPage({ type: item.type, id: item.articleId })"
>
<!-- 封面图 -->
<div
......@@ -181,9 +175,8 @@ import { articleTypeListOptions } from '@/constants'
import { getColumnListViewMore } from '@/api'
import { usePageSearch, useScrollTop, useNavigation } from '@/hooks'
import dayjs from 'dayjs'
import type { SearchMoreColumnItemDto } from '@/api'
import BackButton from '@/components/common/BackButton/index.vue'
const router = useRouter()
const route = useRoute()
const searchPageRef = ref<HTMLElement | null>(null)
const { handleBackTop } = useScrollTop(searchPageRef)
......@@ -218,10 +211,6 @@ const handleSearch = () => {
refresh()
}
const handleClick = (item: SearchMoreColumnItemDto) => {
jumpToArticleDetailPage({ type: item.type, id: item.articleId })
}
onActivated(() => {})
</script>
......
<template>
<div class="min-h-screen bg-gray-50 rounded-lg">
<div class="min-h-screen bg-gray-50 rounded-lg relative">
<BackButton />
<!-- 顶部背景区域 -->
<div
class="box relative h-150px bg-gradient-to-r from-purple-400 via-pink-300 to-blue-300"
......@@ -99,7 +100,7 @@ import dayjs from 'dayjs'
import { usePageSearch, useNavigation } from '@/hooks'
import { articleTypeListOptions } from '@/constants'
import type { OtherUserInfoDto } from '@/api/otherUserPage/types'
import BackButton from '@/components/common/BackButton/index.vue'
const route = useRoute()
const { jumpToArticleDetailPage } = useNavigation()
const { list, total, searchParams, goToPage, changePageSize } = usePageSearch(
......
<template>
<div>
<div class="relative">
<BackButton />
<div class="flex gap-6">
<!-- 左侧:商品列表区域 -->
<div class="flex-3/4 min-w-0">
......@@ -241,6 +242,8 @@ import ExchangeGoodsRecordDialog from './components/exchangeGoodsRecordDilaog.vu
import ExchangeYabiRecordDialog from './components/exchangeYabiRecordDilaog.vue'
import { useYaBiStore } from '@/stores'
import { storeToRefs } from 'pinia'
import BackButton from '@/components/common/BackButton/index.vue'
const yabiStore = useYaBiStore()
const { yabiData } = storeToRefs(yabiStore)
......
<template>
<div class="min-h-screen bg-gradient-to-br">
<div class="max-w-4xl mx-auto">
<div class="max-w-4xl mx-auto relative">
<!-- 主表单卡片 -->
<BackButton />
<div class="bg-white rounded-lg shadow-lg p-8">
<el-form ref="formRef" :model="form" label-position="top" :rules="rules">
<!-- 标题输入 -->
......@@ -128,6 +130,8 @@ import { selectDepOrUser } from '@/utils'
import { useUserStore } from '@/stores'
import { storeToRefs } from 'pinia'
import type { ISelectDept } from '@/utils/wxUtil'
import BackButton from '@/components/common/BackButton/index.vue'
const router = useRouter()
const userStore = useUserStore()
const { userInfo } = storeToRefs(userStore)
......
<template>
<div class="min-h-screen">
<div class="min-h-screen relative">
<el-form :model="form" :rules="rules" ref="formRef" label-position="top">
<div class="max-w-6xl mx-auto grid gap-6">
<div class="max-w-6xl mx-auto grid gap-6 relative">
<!-- 左侧主要内容 -->
<BackButton />
<div class="col-span-8 space-y-6">
<!-- 视频上传区域 -->
<div
......@@ -351,6 +353,7 @@ import type { TagItemDto, AddOrUpdateVideoDto } from '@/api'
import { useVideoStore, useUserStore } from '@/stores'
import { storeToRefs } from 'pinia'
import { selectDepOrUser } from '@/utils'
import BackButton from '@/components/common/BackButton/index.vue'
const videoStore = useVideoStore()
const { videoList } = storeToRefs(videoStore)
......
<template>
<div ref="searchPageRef" class="bg-white/90">
<div ref="searchPageRef" class="bg-white/90 relative">
<BackButton />
<div>
<!-- 搜索栏 -->
<div class="p-4">
<div class="flex items-center gap-2 justify-between">
<el-button link @click="router.back()" class="text-gray-600 hover:text-primary">
<el-icon class="mr-1">
<IEpArrowLeft />
</el-icon>
返回
</el-button>
<div class="flex items-center gap-2 justify-end">
<div class="w-auto flex items-center gap-2">
<el-input
v-model="searchParams.title"
......@@ -210,9 +204,9 @@ import { articleTypeListOptions } from '@/constants'
import { getArticleList } from '@/api/article'
import { usePageSearch, useScrollTop, useNavigation } from '@/hooks'
import { ArticleTypeEnum } from '@/constants'
import BackButton from '@/components/common/BackButton/index.vue'
import dayjs from 'dayjs'
const router = useRouter()
const route = useRoute()
const searchPageRef = ref<HTMLElement | null>(null)
const { handleBackTop } = useScrollTop(searchPageRef)
......
<template>
<div class="min-h-screen bg-gray-50 rounded-lg">
<div class="min-h-screen bg-gray-50 rounded-lg relative">
<BackButton />
<!-- 顶部背景区域 -->
<div class="box relative h-200px bg-gradient-to-r from-purple-400 via-pink-300 to-blue-300">
<!-- 顶部操作按钮 -->
......@@ -165,7 +166,7 @@ import type { RouteLocationNormalizedLoadedGeneric } from 'vue-router'
import type { TabPaneName } from 'element-plus'
import { IS_REAL_KEY } from '@/constants/symbolKey'
import { useOnlineTimeStore, useUserStore } from '@/stores'
import BackButton from '@/components/common/BackButton/index.vue'
const { showOnlineTime } = storeToRefs(useOnlineTimeStore())
const router = useRouter()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment