From eab61449ac4647609feed443892c004c36481191 Mon Sep 17 00:00:00 2001 From: callmeyan Date: Wed, 23 Aug 2023 15:10:46 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20dayjs=20=E7=BC=96=E8=AF=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/assets/global.scss | 14 ++++++++++++-- front/pages/Router.tsx | 1 - front/pages/dashboard/index.tsx | 20 +++++++++----------- utils/date.ts | 2 +- vite.config.ts | 2 +- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/front/assets/global.scss b/front/assets/global.scss index bfe910e..8c33a20 100644 --- a/front/assets/global.scss +++ b/front/assets/global.scss @@ -23,29 +23,36 @@ time, mark, audio, video { font: inherit; vertical-align: baseline; } + /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section { display: block; } + /* HTML5 hidden-attribute fix for newer browsers */ *[hidden] { display: none; } + body { line-height: 1; } + menu, ol, ul { list-style: none; } + blockquote, q { quotes: none; } + blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } + table { border-collapse: collapse; border-spacing: 0; @@ -170,14 +177,17 @@ a { } .container { - width: 1000px; max-width: 80%; margin: auto; } .dashboard { - min-height: 100vh; + .page-title { + font-size: 34px; + padding: 20px 0 0; + font-weight: bold; + } } .p-0 { diff --git a/front/pages/Router.tsx b/front/pages/Router.tsx index 48cf6e0..37a3c72 100644 --- a/front/pages/Router.tsx +++ b/front/pages/Router.tsx @@ -41,7 +41,6 @@ const RouteView = () => { }, [userinfo]) return (
-

{loc.pathname}

) } diff --git a/front/pages/dashboard/index.tsx b/front/pages/dashboard/index.tsx index 1880e50..7fe3a3d 100644 --- a/front/pages/dashboard/index.tsx +++ b/front/pages/dashboard/index.tsx @@ -91,7 +91,7 @@ export const DashboardIndex: React.FC = () => { return (
-

Dashboard

+

Dashboard

@@ -114,16 +114,14 @@ export const DashboardIndex: React.FC = () => { ))}
- -
- - + +
} diff --git a/utils/date.ts b/utils/date.ts index 22999dc..0e76f8f 100644 --- a/utils/date.ts +++ b/utils/date.ts @@ -1,4 +1,4 @@ -import * as dayjs from "dayjs"; +import dayjs from "dayjs"; export function formatDate(time?: string | number | Date | dayjs.Dayjs | null, format = 'YYYY-MM-DD HH:mm:ss') { diff --git a/vite.config.ts b/vite.config.ts index 7ae97e1..6388635 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -37,7 +37,7 @@ export default defineConfig(({mode}) => { server: { proxy: { '/api': { - target: "http://localhost:3001", + target: "http://app-report.wx.wm-app.xyz", changeOrigin: true, // rewrite: (path) => path.replace(/^\/api/, ""), }