feat: 增加返回顶部按钮

fix: 合同保存成功后关闭对话框
perf: 优化 main.jsx
main
Jimmy Liow 10 months ago
parent a7954e1114
commit ad81a60d55

@ -1,5 +1,4 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import { createRoot } from 'react-dom/client'
import {
createBrowserRouter,
RouterProvider,
@ -42,8 +41,6 @@ import { PERM_ACCOUNT_MANAGEMENT, PERM_ROLE_NEW, PERM_OVERSEA, PERM_AIR_TICKET,
import './i18n'
const { createRoot } = ReactDOM
const initRouter = async () => {
return createBrowserRouter([
{
@ -100,8 +97,11 @@ const initAppliction = async () => {
}
const router = await initRouter()
const root = document.getElementById('root')
if (!root) throw new Error('No root element found')
createRoot(document.getElementById('root')).render(
createRoot(root).render(
//<React.StrictMode>
<ThemeContext.Provider value={{ colorPrimary: '#00b96b', borderRadius: 4 }}>
<RouterProvider

@ -82,7 +82,15 @@ function App() {
algorithm: theme.defaultAlgorithm,
}}>
<AntApp>
<FloatButton icon={<BugOutlined />} onClick={() => uploadLog()} />
<FloatButton.Group
shape='square'
style={{
insetInlineEnd: 94,
}}
>
<FloatButton icon={<BugOutlined />} onClick={() => uploadLog()} />
<FloatButton.BackTop />
</FloatButton.Group>
{contextHolder}
<ErrorBoundary>
<Layout className='min-h-screen'>

@ -22,6 +22,7 @@ export const ContractRemarksModal = () => {
const remarkList = remarksForm.getFieldsValue().remarkList
saveOrUpdateRemark(remarkList)
.then(() => {
setRemarksModalOpen(false)
notification.info({
message: 'Notification',
description: '合同备注保存成功',

Loading…
Cancel
Save