diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 8c5e8e2e..69530854 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -13,9 +13,9 @@ import config from '@/utils/config'; import { request } from '@/utils/http'; import './index.less'; import vhCheck from 'vh-check'; -import { version, changeLog } from '../version'; +import { version, changeLogLink, changeLog } from '../version'; import { useCtx, useTheme } from '@/utils/hooks'; -import { message, Badge, Typography } from 'antd'; +import { message, Badge, Modal } from 'antd'; export default function (props: any) { const ctx = useCtx(); @@ -88,6 +88,38 @@ export default function (props: any) { } }; + const showNewVersionModal = () => { + Modal.confirm({ + width: 500, + title: ( + <> +
+ {changeLog}
+
+ ),
+ okText: '更新',
+ cancelText: '以后再说',
+ onOk() {
+ console.log('ok');
+ },
+ });
+ };
+
useEffect(() => {
vhCheck();
}, []);
@@ -144,13 +176,9 @@ export default function (props: any) {
title={
<>
控制面板
- {
- alert('yes');
- }}
- >
+