From abb7b4c6134651e9ebba2c3b1520861af095f11a Mon Sep 17 00:00:00 2001 From: callmeyan Date: Wed, 22 May 2024 15:57:04 +0800 Subject: [PATCH] remove lazy load feat --- index.html | 26 +++++++++++++++++++++++++- package.json | 2 +- src/assets/index.less | 5 ++++- src/routes/index.tsx | 9 +++++---- src/routes/layout/main-layout.tsx | 2 +- 5 files changed, 36 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 1aeaede..7a1d1bd 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,33 @@ Payment System + -
+
+
+
+
+
Resources loading...
+
+
+
diff --git a/package.json b/package.json index 33fe3e9..300942d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dev": "vite --host", "build": "tsc && vite build", "build-test": "tsc && vite build --mode=test", - "build-docker": "", + "build-docker:latest": "docker build -t payment-front:latest .", "clean-build": "rm -rf dist", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" diff --git a/src/assets/index.less b/src/assets/index.less index 08414e4..af1f219 100644 --- a/src/assets/index.less +++ b/src/assets/index.less @@ -57,14 +57,17 @@ } .main-bg-container { background: url(./images/auth/bg.jpg); + background-attachment: fixed; .main-content{ display: flex; align-items:center; justify-content: center; background: rgba(255, 255, 255, 0.07); backdrop-filter: blur(2px); - width: 100vw; height: 100vh; + overflow: auto; + box-sizing: border-box; + padding: 50px 0; } } diff --git a/src/routes/index.tsx b/src/routes/index.tsx index c40f07e..2a53507 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -1,5 +1,5 @@ import {createBrowserRouter, Navigate, RouteObject, RouterProvider,} from "react-router-dom"; -import {lazy, Suspense, useMemo,} from "react"; +import {Suspense, useMemo,} from "react"; import {useTranslation} from "react-i18next"; import { LocaleProvider } from '@douyinfe/semi-ui'; @@ -16,9 +16,10 @@ import MainLayout from "@/routes/layout/main-layout.tsx"; import Loader from "@/components/loader.tsx"; -const ManualIndex = lazy(() => import("@/pages/manual/index.tsx")); -const BillQuery = lazy(() => import("@/pages/bill/query.tsx")); -const BillReconciliation = lazy(() => import("@/pages/bill/reconciliation.tsx")); + +import ManualIndex from "@/pages/manual/index.tsx"; +import BillQuery from "@/pages/bill/query.tsx"; +import BillReconciliation from "@/pages/bill/reconciliation.tsx"; const routes: RouteObject[] = [ diff --git a/src/routes/layout/main-layout.tsx b/src/routes/layout/main-layout.tsx index f68bc10..7daa9fe 100644 --- a/src/routes/layout/main-layout.tsx +++ b/src/routes/layout/main-layout.tsx @@ -4,7 +4,7 @@ import styled from "@emotion/styled"; import {I18nSwitcher} from "@/i18n"; const I18nContainer = styled.div({ - position: 'absolute', + position: 'fixed', top: 10, right: 10 })