From dc01d211e6701a47ccb15c25283cfba7432df52b Mon Sep 17 00:00:00 2001 From: Rivery <9858560+xigongdaEricyang@users.noreply.github.com> Date: Thu, 21 Jul 2022 10:49:34 +0800 Subject: [PATCH] fix: time select issue (#110) --- package.json | 2 +- src/App.tsx | 6 ++++++ tsconfig.json | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6a512ea1..0eef3226 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nebula-dashboard", - "version": "1.1.1", + "version": "1.1.2", "description": "nebula-dashboard community version", "author": "vesoft cloud team", "homepage": "", diff --git a/src/App.tsx b/src/App.tsx index 5af290a2..63f27deb 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,6 +10,9 @@ import { Switch, withRouter, } from 'react-router-dom'; +import dayjs from 'dayjs'; +import weekday from "dayjs/plugin/weekday" +import localeData from "dayjs/plugin/localeData" import { handleTrackEvent, trackEvent } from './utils/stat'; import { INTL_LOCALES } from '@/config'; import './App.less'; @@ -18,6 +21,9 @@ import { updateQueryStringParameter } from '@/utils'; import AuthorizedRoute from '@/AuthorizedRoute'; import Login from '@/pages/Login'; +dayjs.extend(weekday) +dayjs.extend(localeData) + // @ts-ignore const MainPage = lazy(() => import('@/pages/MainPage/index')); diff --git a/tsconfig.json b/tsconfig.json index 39af6682..ecdccde9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,7 +26,8 @@ "resolveJsonModule": true, "baseUrl": ".", "paths": { - "@assets/*": ["app/assets/*"] + "@assets/*": ["app/assets/*"], + "@/*": ["src/*"] } } } \ No newline at end of file