Skip to content

Commit

Permalink
style(projects): optimized code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ohh-889 committed Sep 1, 2024
1 parent b8daf7c commit 28d68fc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
20 changes: 12 additions & 8 deletions src/pages/manage/user/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Button, Card, Popconfirm, Table, Tag } from 'antd';
import { Suspense, lazy } from 'react';
import { fetchGetUserList } from '@/service/api';
import { enableStatusRecord, userGenderRecord } from '@/constants/business';
import TableHeaderOperation from '@/components/advanced/TableHeaderOperation';
import UserSearch from './modules/UserSearch';
import UserOperateDrawer from './modules/UserOperateDrawer';

const UserOperateDrawer = lazy(() => import('./modules/UserOperateDrawer'));

const tagMap: Record<Api.Common.EnableStatus, string> = {
1: 'success',
Expand Down Expand Up @@ -201,13 +203,15 @@ export function Component() {
dataSource={data}
columns={columns}
/>
<UserOperateDrawer
open={drawerVisible}
rowData={editingData}
submitted={run}
operateType={operateType}
closeDrawer={closeDrawer}
/>
<Suspense>
<UserOperateDrawer
open={drawerVisible}
rowData={editingData}
submitted={run}
operateType={operateType}
closeDrawer={closeDrawer}
/>
</Suspense>
</Card>
</div>
);
Expand Down
6 changes: 5 additions & 1 deletion src/plugins/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ export function setupAppVersionNotification() {
}

async function getHtmlBuildTime() {
const res = await fetch(`/index.html?time=${Date.now()}`);
const res = await fetch(`/index.html?time=${Date.now()}`, {
headers: {
'Cache-Control': 'no-cache'
}
});

const html = await res.text();

Expand Down

0 comments on commit 28d68fc

Please sign in to comment.