Commit 98942151 authored by 申中慧's avatar 申中慧

feat: 添加tailwindcss

parent e03076bf
Pipeline #201 failed with stages
......@@ -120,7 +120,8 @@ pnpm run build
- [x] devexpress的国际化
- [x] antd的国际化
- [x] react-inil的国际化
- [x] icon图标处理
- [x] ico图标配置
- [ ] 顶部页签功能
## Vite 打包
......
......@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cpas Cloud</title>
</head>
......
......@@ -39,7 +39,6 @@
"ahooks": "^3.7.5",
"amis": "^1.9.1-beta.17",
"antd": "^4.24.13",
"autoprefixer": "^9",
"axios": "^1.3.4",
"bignumber.js": "^9.1.2",
"bizcharts": "^3.5.3-beta.0",
......@@ -70,7 +69,6 @@
"numbro": "2.1.2",
"omit.js": "^2.0.2",
"pikaday": "1.8.2",
"postcss": "^8.4.21",
"postcss-less": "^6.0.0",
"prop-types": "^15.8.1",
"pubsub-js": "^1.9.4",
......@@ -117,6 +115,7 @@
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vitejs/plugin-react": "^4.0.4",
"autoprefixer": "^9.8.8",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
......@@ -124,10 +123,12 @@
"husky": "^8.0.3",
"lint-staged": "^13.1.2",
"mockjs": "^1.1.0",
"postcss": "^8.4.29",
"prettier": "^2.8.4",
"qs": "^6.11.0",
"stylelint": "^15.2.0",
"stylelint-config-standard": "^30.0.1",
"tailwindcss": "^3.3.3",
"typescript": "^4.9.3",
"vite": "^4.1.0",
"vite-plugin-eslint": "^1.8.1",
......
This diff is collapsed.
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
\ No newline at end of file
......@@ -5,7 +5,7 @@
// @tailwind base;
// @tailwind components;
// @tailwind utilities;
@tailwind utilities;
:root {
--workbench-tabHeight: 35px;
......
import { exportExecl } from '@/utils/index'
import { ProColumns, ProFormInstance, ProTable, ProTableProps } from '@ant-design/pro-components'
import { Button } from 'antd'
import { forwardRef, useRef, useState, useEffect, useImperativeHandle } from 'react'
import type { FC } from 'react'
type IExcelTable = {
columns: ProColumns<any, 'text'>[]
/** 接口请求 */
requestFn: (params: any, sort?: any) => any
/** 导出接口 */
exportExeclReq?: (params: any) => any
/** toolBarRender */
toolBarRenderFn?: (params: any) => any
ref?: any
/** 设置选择的row */
setSelectedRows?: React.Dispatch<React.SetStateAction<any[]>>
/** 自定义导出 */
customExport?: (params: any) => any
/** 额外的勾选属性 */
extraRowSelection?: Record<string, any>
/** 初始值key选择 */
initRowKey?: any[]
/** 自定义state key */
customKeys?: any[]
setCustomKeys?: React.Dispatch<React.SetStateAction<any[]>>
} & ProTableProps<any, any>
const ExcelTable: FC<IExcelTable> = forwardRef((props, formRefMy: any) => {
const {
columns,
requestFn,
exportExeclReq,
toolBarRenderFn,
setSelectedRows,
customExport,
extraRowSelection,
initRowKey,
customKeys,
setCustomKeys,
...otherProps
} = props
const [selectedRowKeys, setSelectedRowKeys] = useState<any>(initRowKey || [])
const formRefin = useRef<ProFormInstance>(null)
const formRef = formRefMy || formRefin
const onSelectChange = (rowKeys: any[], selectedRows: any[]) => {
console.log('selectedRowKeys changed: ', rowKeys, selectedRows)
setSelectedRowKeys(rowKeys)
if (setCustomKeys) {
setCustomKeys(rowKeys)
}
if (setSelectedRows) {
setSelectedRows(selectedRows)
}
}
/** 自定义state key 赋予初始值 */
useEffect(() => {
if (initRowKey && setCustomKeys) {
setCustomKeys(initRowKey)
}
if (initRowKey && setSelectedRows) {
setSelectedRows(
initRowKey?.map(item => ({
id: item
}))
)
}
}, [initRowKey])
const onExport = async () => {
console.log(formRef?.current?.getFieldsValue())
if (customExport) {
customExport({
record: formRef?.current?.getFieldsValue(),
id__in:
(customKeys || selectedRowKeys)?.length > 0
? (customKeys || selectedRowKeys)?.join?.(',')
: undefined
})
} else {
const data = await exportExeclReq?.({
formData: formRef?.current?.getFieldsValue(),
is_export: true,
id__in:
(customKeys || selectedRowKeys)?.length > 0
? (customKeys || selectedRowKeys)?.join?.(',')
: undefined
})
exportExecl(data)
}
}
useImperativeHandle(formRefMy, () => ({
onExport: () => onExport()
}))
return (
<>
<ProTable
columns={columns}
formRef={formRef as any}
request={async (params = {}, sort) => {
const { current: pageNum, pageSize, ...otherParams } = params
const res = await requestFn({ pageNum, pageSize, ...otherParams }, sort)
console.log(res)
if (res?.code === 200) {
return {
total: res?.data?.total,
data: res?.data?.list,
success: true,
page: res?.data?.pageNum
}
}
return {
success: false
}
}}
rowKey="id"
rowSelection={{
// 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
// 注释该行则默认不显示下拉选项
// selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
preserveSelectedRowKeys: true,
selectedRowKeys: customKeys || selectedRowKeys,
onChange: onSelectChange,
...extraRowSelection
}}
search={{
labelWidth: 'auto',
optionRender: (searchConfig, formProps, dom) => [
dom[1],
<Button
key="reset"
onClick={() => {
const keyArr = (searchConfig as any)?.items?.map(
(item: { props: { name: any } }) => [item?.props?.name, undefined]
)
formProps?.form?.setFieldsValue(Object.fromEntries(new Map(keyArr).entries()))
formProps?.form?.submit()
}}
>
重置
</Button>
]
}}
bordered
form={{
// 由于配置了 transform,提交的参与与定义的不同这里需要转化一下
syncToUrl: (values, type) => {
if (type === 'get') {
return {
...values
// created_at: [values.startTime, values.endTime],
}
}
return values
}
}}
pagination={{
pageSize: 20,
showSizeChanger: true,
showQuickJumper: true
}}
dateFormatter="string"
toolBarRender={
toolBarRenderFn || exportExeclReq
? () => [
exportExeclReq && (
<Button key="out" onClick={onExport} type="primary">
导出数据
</Button>
),
...(toolBarRenderFn?.({ rowKeys: customKeys || selectedRowKeys }) || [])
]
: false
}
{...otherProps}
/>
</>
)
})
export default ExcelTable
import { Upload, Image } from 'antd'
import type { UploadProps } from 'antd'
import styles from '../index.module.less'
import { useEffect, useState } from 'react'
import { useAsyncEffect } from 'ahooks'
const FormUploadMy: React.FC<{
isDragger?: boolean
handleUpload: (info: any) => Promise<void>
uploadProps?: UploadProps
isVideo?: boolean
onChangePrercent: (info: any) => void
setUploading: React.Dispatch<React.SetStateAction<boolean>>
disabled?: boolean
/** upload的值 */
onChange?: any
fileList?: any
}> = ({
isDragger,
handleUpload,
uploadProps,
isVideo,
onChange,
setUploading,
disabled,
fileList,
onChangePrercent
}) => {
const [val, setVal] = useState<any[]>()
const [previewVisible, setPreviewVisible] = useState<boolean>(false)
const [previewImage, setPreviewImage] = useState<string>('')
useAsyncEffect(async () => {
if (fileList) {
setVal(
fileList?.map((item: string, index: number) => {
return {
uid: decodeURI(item) + index,
name: decodeURI(item),
status: 'done',
url: item,
file_link: item,
index
}
})
)
}
}, [])
useEffect(() => {
onChange?.(val?.map((item: any) => item?.file_link))
}, [val])
return isDragger ? (
<Upload.Dragger
customRequest={handleUpload}
maxCount={1}
fileList={val}
{...uploadProps}
className={isVideo ? styles.videoUpload : ''}
onChange={info => {
setVal(info?.fileList)
onChangePrercent(info)
}}
onRemove={() => setUploading(false)}
disabled={disabled}
/>
) : (
<>
<Upload
customRequest={handleUpload}
maxCount={1}
fileList={val}
{...uploadProps}
className={isVideo ? styles.videoUpload : ''}
onChange={info => {
setVal(info?.fileList)
onChangePrercent(info)
}}
onPreview={(file: any) => {
setPreviewImage(file?.file_link)
setPreviewVisible(true)
}}
onRemove={() => setUploading(false)}
disabled={disabled}
/>
<Image
style={{ display: 'none' }}
width={200}
preview={{
visible: previewVisible,
onVisibleChange: visible => setPreviewVisible(visible)
}}
src={previewImage}
/>
</>
)
}
export default FormUploadMy
.videoList {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 20px;
color: #1890ff;
cursor: pointer;
.left {
margin-right: 10px;
}
&:hover {
background-color: #f5f5f5;
}
}
import type { FormItemProps, UploadProps } from 'antd'
import { Form, message } from 'antd'
import type { FC } from 'react'
import { useState } from 'react'
import { useUpdate } from 'ahooks'
import { isNil } from 'lodash'
import FormUploadMy from './FormUploadMy'
import { uploadFile } from '@/apis'
type TFormUpload = {
/** FormItem属性 */
formItemProps?: FormItemProps
/** upload属性 */
uploadProps?: UploadProps
/** 必填 */
required?: boolean
/** 是否Dragger */
isDragger: boolean
/** 是否视频上传 */
isVideo?: boolean
disabled?: boolean
/** 文件上传额外处理 */
extraUploadFn?: (obj: any) => void
imgCount?: number
}
const FormUploadNew: FC<TFormUpload> = props => {
const {
formItemProps,
required,
uploadProps,
isDragger,
isVideo,
disabled,
extraUploadFn,
imgCount
} = props
let timer: any = null
const update = useUpdate()
/** 是否上传中 */
const [uploading, setUploading] = useState<boolean>(false)
/** 处理form.item valuePropName问题 */
const normFile = (e: any) => {
if (Array.isArray(e)) {
return e
}
return e && e?.fileList
}
const onChangePrercent = (info: any) => {
const { file } = info
file.percent = 0
if (file?.status === 'uploading') {
timer = setInterval(() => {
if (file.percent === 85 && timer) {
clearInterval(timer)
}
file.percent += 1
update()
}, 5000)
}
if (file?.status === 'done') {
file.percent = 100
}
}
const handleUpload = async (info: any) => {
setUploading(true)
const { file } = info
const formData = new FormData()
formData.append('file', file)
if (extraUploadFn) {
extraUploadFn({ info, formData })
setUploading(false)
info.onSuccess()
return
}
const res = await uploadFile(formData)
if (res?.code === 200) {
file.file_link = res?.data?.url
info.onSuccess()
} else {
info.onError('上传失败')
}
setUploading(false)
}
return (
<Form.Item
valuePropName="fileList"
getValueFromEvent={normFile}
rules={[
{ required: required, message: '请上传' },
() => ({
validator(_, value) {
if (uploadProps?.accept) {
if (!(value?.length > 0)) {
return Promise.resolve()
}
for (const item of value) {
const fileNameArr = item?.split('.')
if (
!uploadProps?.accept?.includes(
fileNameArr?.[fileNameArr?.length - 1]?.toLocaleLowerCase()
)
) {
return Promise.reject(new Error(`请选择${uploadProps?.accept}类型的文件`))
}
}
}
if (required && imgCount && value?.length !== imgCount) {
return Promise.reject(new Error(`请选择${imgCount}张图片`))
}
if (value?.[0]?.error) {
return Promise.reject(new Error(value?.[0]?.error))
}
if (uploading && isNil(uploadProps?.maxCount)) {
return Promise.reject(new Error('文件上传中'))
}
return Promise.resolve()
}
})
]}
required={required}
{...formItemProps}
>
<FormUploadMy
isDragger={isDragger}
handleUpload={handleUpload}
uploadProps={uploadProps}
isVideo={isVideo}
onChangePrercent={onChangePrercent}
setUploading={setUploading}
disabled={disabled}
/>
</Form.Item>
)
}
export default FormUploadNew
import React, { useContext, useState } from 'react'
import { Button } from 'antd'
import { Link, Navigate } from 'react-router-dom'
import { createSessionStorage } from '@/utils/Storage'
import NotFound from '@/components/NotFound'
const Auth = props => {
const { children, permission = true, path } = props
const cpasUserInfo = localStorage.getItem('cpasUserInfo')
console.log('🚀 ~ file: index.tsx:10 ~ Auth ~ curUser:', cpasUserInfo)
if (cpasUserInfo) {
// 有权限返回页面
if (permission) {
return <>{children}</>
}
return (
<NotFound
status="403"
title="403"
subTitle="对不起!暂无该页面访问权限!请联系管理员或更换账号登录"
extra={
<>
<Button type="primary">
<Link to="/login">重新登录</Link>
</Button>
</>
}
/>
)
}
return <Navigate replace to="/login" />
}
export default Auth
import Permission from './Permission'
export default {
Permission
}
import type { RequestConfig, RunTimeLayoutConfig } from 'umi';
import { getLocale, dynamic } from 'umi';
import type { InitState } from './layouts';
import { getRunTimeLayoutConfig, getSysName, loginPath } from './layouts';
import { } from '@ant-design/pro-layout';
import { history } from 'umi';
import RightContent from '@/components/RightContent';
import { reqInterceptor, errorHandler } from './services';
import { getCurProjectInfo } from './services/csService';
import getRTS, { getRTSMenus } from './layouts/runtimeSettings';
import PageTab, { AudTabPage } from '@/components/PageTab';
import MicroPage from '@/components/MicroPage';
import { isRunInFrame, isOpenFromPlatform } from './utils/env';
import WebFrame from '@/pages/web_frame';
import enMessages from 'devextreme/localization/messages/en.json';
import zhMessages from 'devextreme/localization/messages/zh.json';
import { locale, loadMessages } from 'devextreme/localization';
import _ from 'lodash';
import { lazy } from 'react';
import { getIsHideHeader, getIsMicroPage } from './utils/pub';
/** 获取用户信息比较慢的时候会展示一个 loading */
export const initialStateConfig = {
loading: <PageLoading />,
};
// window.setup = (locale) => {
// console.log('setup');
// // const { initialState, loading, error, refresh, setInitialState } = useModel('@@initialState');
// // setInitialState((state) => {
// // return { ...state, abc: 1 };
// // });
// setLocale(locale, true);
// };
/**
* @see https://umijs.org/zh-CN/plugins/plugin-initial-state
* */
export async function getInitialState(): Promise<InitState> {
let menuJsonData: any[];
devLocale();
const rts = await getRTS();
// eslint-disable-next-line prefer-const
menuJsonData = await getRTSMenus();
// 如果是登录页面,不执行
const pathName = history.location.pathname;
let curUser = null
let sessionCur = {
id: '',
zcbfid: '', //组成部分编号 zcbfid
zcbfName: '', //单位名称 customerName
ZcbfID: '', // 组成部分编号 (报告系统使用非驼峰写法字段)
sjxmbh: '', // 审计项目编号 getCurProjectInfo().projectCode
sjnd: '', // 审计年度
userCode: '', //登录用户
userName: '',
dbname: '',
dbName: '',
DBName: ''
};
try {
curUser = JSON.parse(window.localStorage?.getItem('cpasUserInfo') ?? '');
const data = JSON.parse(window.sessionStorage.electronParams).params;
if (data) {
sessionCur = data
}
} catch (error) {
console.log('error 获取storage用户信息', error);
}
const curDataPart = getCurProjectInfo() || {};
console.log('sessionCur', sessionCur);
const curPart = {
...sessionCur,
...curDataPart,
// 历史原因,报告系统迁移过来页面不统一,兼容使用字段
// dbname: sessionCur.dbname, // 202205188806-C00014
// DBName: sessionCur.DBName,
// sjxmbh: curDataPart.projectCode,
XMType: '',
// 测试
dbname: '202205188806-C00014', // 202205188806-C00014
DBName: '202205188806-C00014',
sjxmbh: curDataPart.projectCode,
zcbfid: '202205188806-C00014', //组成部分编号 zcbfid
ZcbfID: '202205188806-C00014', // 组成部分编号 (报告系统使用非驼峰写法字段)
};
console.log('🚀 ~ file: app.tsx:75 ~ getInitialState ~ curPart:', curPart);
// 修改本地session的存值
const electronSession = {
params: curPart,
session: "persist:local"
}
window.sessionStorage.setItem("electronParams", JSON.stringify(electronSession));
if (pathName === '/') history.push('/home');
if (pathName !== loginPath) {
const sysName = getSysName(pathName);
return {
settings: rts,
menuJson: menuJsonData,
curUser: curUser,
sysName,
curPart,
};
}
return {
settings: rts,
curUser: curUser,
menuJson: menuJsonData,
curPart, // 不知道是个啥,先注入
};
}
// ProLayout 支持的api https://procomponents.ant.design/components/layout
export const layout: RunTimeLayoutConfig = ({ initialState }: any) => {
console.log(initialState, 'initialState-----');
AudTabPage.getInstance().initPages(initialState?.sysName);
let layoutConfig = {};
try {
layoutConfig = getRunTimeLayoutConfig(initialState);
} catch (error) {
console.log('error in getRunTimeLayoutConfig function', error);
}
// console.log(layoutConfig);
const inFrameLayout = isRunInFrame ? { hide: true, headerHeight: 0 } : {};
const isHideHeader = getIsHideHeader();
//通过配置url加参数,可以隐藏logo的头 如 "url": "http://localhost:8000?hideHeader=1", //不配置的知表示为显示
const inPlatformLayout = isHideHeader ? { hide: false, headerHeight: 0 } : {};
// const inPlatformLayout = isOpenFromPlatform ? { hide: true, headerHeight: 0 } : {};
console.log('layoutConfig', layoutConfig);
// 是否作为微应用使用,在本项目中即是否嵌套在iframe中
const isMicroPage = getIsMicroPage();
const isMicroPageLayout = isMicroPage
? {
hide: true,
headerHeight: 0,
childrenRender: initialState && initialState?.curUser ? MicroPage : undefined,
}
: {};
return {
...inFrameLayout,
...layoutConfig,
// siderWidth: typeof SIDER_WIDTH !== 'undefined' ? SIDER_WIDTH : 208,
//siderWidth: initialState && initialState.siderWidth === 0 ? 0 : 208,
siderWidth: 180,
// headerHeight: 43, // 48->43解决最外层有滚动条的问题 add by csb 20230221
headerHeight: 0, // 去掉logo,这里直接设置为0. add by szh 20230905
// siderWidth: 0,
childrenRender: initialState && initialState?.curUser ? PageTab : undefined,
rightContentRender: () => <RightContent />,//不要皮肤\登录\等信息
// footerRender: () => <Footer />,
// links: layoutLinks(),
menuHeaderRender: undefined,
// 自定义 403 页面
unAccessible: <div>unAccessible</div>,
...initialState?.settings,
...inPlatformLayout,
...isMicroPageLayout,
};
};
// 后端数据请求配置,具体看 './services/index.ts'
export const request: RequestConfig = {
requestInterceptors: [reqInterceptor],
// responseInterceptors: [resInterceptor],
errorHandler,
};
async function parseMenuRoute(mainRoute: any) {
const initPageByMenuJson = (menuData: any): void => {
for (let i = 0; i < menuData.length; i++) {
const menu = menuData[i];
const icon = menu.icon;
const appName = menu.label;
const appType = menu.type;
const app = menu.componentname || menu.path.substring(menu.path.lastIndexOf('/') + 1);
if (menu.children) {
mainRoute.unshift({
key: menu.path,
path: menu.path,
name: appName,
icon: icon,
closable: app !== 'home',
});
initPageByMenuJson(menu.children);
} else {
// console.log(menu);
if (appType === 'component') {
mainRoute.unshift({
key: menu.path,
path: menu.path,
name: appName,
icon: icon,
closable: app !== 'home',
hide: menu.hide,
component: require(`@/pages/${menu.componentname || app}/index`).default,
// component: lazy(() => import(`@/pages/${menu.componentname || app}/index`)),
// component: asyncComponent(app, `@/pages/${menu.componentname || app}/index`),
});
} else if (appType === 'web') {
mainRoute.unshift({
key: menu.path,
path: menu.path,
name: appName,
icon: icon,
closable: true,
component: <WebFrame url={menu.path} />,
});
}
}
}
};
const menuJson1 = (await getRTSMenus()) as any;
if (menuJson1.length) {
initPageByMenuJson(menuJson1);
}
}
// export async function render(oldRender: any) {
// menuJsonData = (await getRTSMenus()) as any;
// oldRender();
// }
// 原 { routes } 报错,所以使用以下方法
export async function patchRoutes(Routes: any) {
const { routes } = Routes;
// 这个时候的 icon 还是string,所以应该可以在这里修改图标
const mainRoute = routes[0].routes;
const mainIndex = _.findIndex(mainRoute, function (o: any) {
return o.flatMenu;
});
await parseMenuRoute(mainRoute[mainIndex].routes);
AudTabPage.getInstance().setRoutes(routes);
}
function devLocale() {
// dev extreme local setting
loadMessages(enMessages);
loadMessages(zhMessages);
const loca = getLocale();
locale(loca?.slice(0, 2) || 'zh');
}
// 覆写render 比如用于渲染之前做权限校验,
// https://v3.umijs.org/zh-CN/docs/runtime-config#patchroutes-routes-
export function render(oldRender: Function) {
oldRender();
}
// 在初始加载和路由切换时做一些事情。
export function onRouteChange({ routes, matchedRoutes, location, action }) {
// 通过pages和location.pathname对比,执行showPage操作
// audTabpage.showPage(location as unknown as Location);
// 显示 404 页
// if (matchedRoutes.length) {
// document.title = matchedRoutes[matchedRoutes.length - 1].route.title || '';
// }
}
......@@ -123,7 +123,7 @@ const LayoutPage: React.FC = () => {
const m = menus.map(({ icon, children, ...item }) => ({
...item,
icon: icon && IconMap[icon as string],
icon: icon && getIcon(icon),
children: children && loopMenuItem(children)
}))
......
......@@ -6,7 +6,6 @@ import LayoutPage from '@/layout'
import { SmileFilled } from '@ant-design/icons'
import { createSessionStorage } from '@/utils/Storage'
import WrapperRouteComponent from './config'
import { Space } from 'antd'
const NotFound = lazy(() => import('@/pages/404'))
const ChangePassword = lazy(() => import('../pages/user/ChangePd'))
......
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {}
},
plugins: []
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment