diff --git a/package-lock.json b/package-lock.json index e1dc4cf..a44e472 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "haina-dashboard", - "version": "0.1.0", + "version": "2.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "haina-dashboard", - "version": "0.1.0", + "version": "2.1.1", "dependencies": { "@ant-design/charts": "^1.4.2", "@ant-design/pro-components": "^2.6.16", diff --git a/package.json b/package.json index d87a310..2eb0eea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "haina-dashboard", - "version": "0.1.0", + "version": "2.1.1", "private": true, "dependencies": { "@ant-design/charts": "^1.4.2", diff --git a/src/App.jsx b/src/App.jsx index 7900f94..0c6e608 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -33,13 +33,13 @@ import Sale from './views/Sale'; import Sale_sub from './views/Sale_sub'; import Sale_KPI from './views/Sale_KPI'; import Logo from './logo.png'; -import { stores_Context } from './config'; import { observer } from 'mobx-react'; import ExchangeRate from './charts/ExchangeRate'; import KPI from './views/KPI'; import Distribution from './views/Distribution'; import Detail from './views/Detail'; import Welcome from './views/Welcome'; +import { stores_Context, APP_VERSION } from './config'; const App = () => { const { Content, Footer, Sider } = Layout; @@ -219,7 +219,7 @@ const App = () => { > {auth_store.user.name} ({auth_store.user.userid})
- Hainatravel Dashboard ©2022 Created by IT + Hainatravel Dashboard v{APP_VERSION} ©2022 Created by IT diff --git a/src/config.js b/src/config.js index 5fdeb46..b342d42 100644 --- a/src/config.js +++ b/src/config.js @@ -1,5 +1,7 @@ import React from "react"; +import packageInfo from './../package.json'; +export const APP_VERSION = packageInfo.version; export const stores_Context = React.createContext(); export const DATE_FORMAT = "YYYY-MM-DD"; export const SMALL_DATETIME_FORMAT = 'YYYY-MM-DD 23:59:00'; diff --git a/src/views/Welcome.jsx b/src/views/Welcome.jsx index 19ff3da..39f6137 100644 --- a/src/views/Welcome.jsx +++ b/src/views/Welcome.jsx @@ -1,6 +1,6 @@ import { useContext } from 'react'; import { observer } from "mobx-react"; -import { stores_Context } from '../config'; +import { stores_Context, APP_VERSION } from '../config'; import { Table } from 'antd'; import { SlackOutlined, @@ -16,9 +16,8 @@ export default observer((props) => { <>
-
- 欢迎 -
+
欢迎!
+
当前版本: v{APP_VERSION}