refactor: clean up dependencies and enhance component functionality
- Removed unused dependencies related to @dnd-kit from pnpm-lock.yaml. - Updated Vite configuration to set the base path. - Added input styles to the main CSS file. - Enhanced BackgroundImage component to include an overflowHidden prop for better layout control. - Deleted the DraggableItem component as it was no longer needed. - Updated routing to include new Publicity and Content pages, and modified navigation in Menu and NotFound components.
This commit is contained in:
1 parent
29029bb608
commit
2d66abc610
51 files changed
+469
-142
No files matched your search
+13
-4
@@ -1,13 +1,14 @@
|
||||
import { createBrowserRouter, Navigate } from "react-router-dom";
|
||||
import { createHashRouter, Navigate } from "react-router-dom";
|
||||
import Home from "@/pages/Home";
|
||||
import Menu from "@/pages/Menu";
|
||||
import NotFound from "@/pages/NotFound";
|
||||
|
||||
import Publicity from "@/pages/Publicity";
|
||||
import Content from "@/pages/Content";
|
||||
/**
|
||||
* 应用路由配置
|
||||
* 使用 React Router v7 的 createBrowserRouter
|
||||
* 使用 React Router v7 的 createHashRouter
|
||||
*/
|
||||
const router = createBrowserRouter([
|
||||
const router = createHashRouter([
|
||||
{
|
||||
path: "/",
|
||||
element: <Navigate to="/home" replace />,
|
||||
@@ -21,6 +22,14 @@ const router = createBrowserRouter([
|
||||
path: "/menu",
|
||||
element: <Menu />,
|
||||
},
|
||||
{
|
||||
path: "/publicity",
|
||||
element: <Publicity />,
|
||||
},
|
||||
{
|
||||
path: "/content/:id",
|
||||
element: <Content />,
|
||||
},
|
||||
{
|
||||
path: "*",
|
||||
element: <NotFound />,
|
||||
|
||||
Reference in new issue
Block a user