From 632514d36e36982c02f182bbe017183cd777dc3f Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Thu, 7 Oct 2021 15:26:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/index.tsx | 48 ++++++++++++++++++++++++++++++++++--------- src/version.ts | 9 ++++++-- 2 files changed, 45 insertions(+), 12 deletions(-) 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'); - }} - > +