Commit 15014302 by lijiabin

【需求 20331】 perf: 优化返回组件按钮

parent 14c314af
......@@ -23,9 +23,14 @@
</template>
<script setup lang="ts">
const { backHomePage = false } = defineProps<{
backHomePage?: boolean
}>()
const router = useRouter()
const handleBack = () => {
if (backHomePage) return router.push('/')
if (window.history.length > 1) {
router.back()
} else {
......
<template>
<div class="min-h-screen bg-gray-50 rounded-lg relative">
<BackButton />
<BackButton backHomePage />
<!-- 顶部背景区域 -->
<div class="box relative h-200px bg-gradient-to-r from-purple-400 via-pink-300 to-blue-300">
<!-- 顶部操作按钮 -->
......
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