Browse Source

添加代码格式规范

shaogen1995 1 year ago
parent
commit
4c8e4e631c
8 changed files with 257 additions and 291 deletions
  1. 12 0
      .editorconfig
  2. 11 0
      .prettierrc.js
  3. 39 0
      .vscode/settings.json
  4. 14 40
      README.md
  5. 1 44
      src/assets/styles/base.css
  6. 60 67
      src/assets/styles/base.less
  7. 13 17
      src/components/AuthButton/index.tsx
  8. 107 123
      src/pages/Layout/index.tsx

+ 12 - 0
.editorconfig

@@ -0,0 +1,12 @@
+root = true # 控制配置文件 .editorconfig 是否生效的字段
+ 
+[**] # 匹配全部文件
+indent_style = space # 缩进风格,可选space|tab
+indent_size = 2 # 缩进的空格数
+charset = utf-8 # 设置字符集
+trim_trailing_whitespace = true # 删除一行中的前后空格
+insert_final_newline = true # 设为true表示使文件以一个空白行结尾
+end_of_line = lf
+ 
+[**.md] # 匹配md文件
+trim_trailing_whitespace = false

+ 11 - 0
.prettierrc.js

@@ -0,0 +1,11 @@
+module.exports = {
+  printWidth: 100, // 一行的字符数,如果超过会进行换行
+  tabWidth: 2, // 一个tab代表几个空格数,默认就是2
+  useTabs: false, // 是否启用tab取代空格符缩进,.editorconfig设置空格缩进,所以设置为false
+  semi: false, // 行尾是否使用分号,默认为true
+  singleQuote: true, // 字符串是否使用单引号
+  trailingComma: "none", // 对象或数组末尾是否添加逗号 none| es5| all
+  jsxSingleQuote: true, // 在jsx里是否使用单引号,你看着办
+  bracketSpacing: true, // 对象大括号直接是否有空格,默认为true,效果:{ foo: bar }
+  arrowParens: "avoid", // 箭头函数如果只有一个参数则省略括号
+};

+ 39 - 0
.vscode/settings.json

@@ -0,0 +1,39 @@
+{
+  "search.exclude": {
+    "/node_modules": true,
+    "dist": true,
+    "pnpm-lock.sh": true
+  },
+  "editor.formatOnSave": true,
+  "[javascript]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[javascriptreact]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[typescript]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[typescriptreact]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[json]": {
+    "editor.defaultFormatter": "vscode.json-language-features"
+  },
+  "[html]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[markdown]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[css]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[less]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[scss]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "liveServer.settings.port": 5502
+}

+ 14 - 40
README.md

@@ -1,46 +1,20 @@
-# Getting Started with Create React App
+1.版本类型问题
 
-This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
+找到 import { useDispatch } from "react-redux";
 
-## Available Scripts
+按住 Ctrl 点击 useDispatch 出来 useDispatch.d.ts 类型声明文件
+(路径 node_modules>react-redux>es>hooks>useDispatch.d.ts)
 
-In the project directory, you can run:
+找到最后面的 AnyAction,按住 Ctrl 点击 进入
+(路径 node_modules>redux>index.d.ts)
 
-### `npm start`
+找到
+export interface Action<T = any> {
+type: T
+}
 
-Runs the app in the development mode.\
-Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
+在 type 后面加一个 ? 即=>
 
-The page will reload if you make edits.\
-You will also see any lint errors in the console.
-
-### `npm test`
-
-Launches the test runner in the interactive watch mode.\
-See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
-
-### `npm run build`
-
-Builds the app for production to the `build` folder.\
-It correctly bundles React in production mode and optimizes the build for the best performance.
-
-The build is minified and the filenames include the hashes.\
-Your app is ready to be deployed!
-
-See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
-
-### `npm run eject`
-
-**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
-
-If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
-
-Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
-
-You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
-
-## Learn More
-
-You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
-
-To learn React, check out the [React documentation](https://reactjs.org/).
+export interface Action<T = any> {
+type?: T
+}

+ 1 - 44
src/assets/styles/base.css

@@ -39,7 +39,7 @@ textarea {
 }
 /* 主题色 */
 :root {
-  --themeColor: #9F1927;
+  --themeColor: #9f1927;
 }
 a {
   color: var(--themeColor);
@@ -67,49 +67,6 @@ a {
 #root .ant-btn-text.ant-btn-dangerous {
   color: var(--themeColor);
 }
-#root .ant-pagination .ant-pagination-item {
-  border-radius: 50%;
-  border: 1px solid #999;
-  background-color: transparent;
-}
-#root .ant-pagination .ant-pagination-item-active {
-  background-color: var(--themeColor);
-}
-#root .ant-pagination .ant-pagination-item-active a {
-  color: #fff;
-}
-#root .ant-pagination .ant-pagination-item:hover {
-  background-color: var(--themeColor);
-}
-#root .ant-pagination .ant-pagination-item:hover a {
-  color: #fff;
-}
-#root .ant-pagination-prev {
-  border-radius: 50%;
-  border: 1px solid #999;
-}
-#root .ant-pagination-prev:hover {
-  background-color: var(--themeColor);
-}
-#root .ant-pagination-prev:hover button {
-  color: #fff;
-}
-#root .ant-pagination-next {
-  border-radius: 50%;
-  border: 1px solid #999;
-}
-#root .ant-pagination-next:hover {
-  background-color: var(--themeColor);
-}
-#root .ant-pagination-next:hover button {
-  color: #fff;
-}
-#root .ant-pagination-disabled {
-  border: 1px solid #ccc;
-}
-#root .ant-pagination-disabled:hover {
-  background-color: transparent;
-}
 #root .ant-image {
   display: none !important;
 }

+ 60 - 67
src/assets/styles/base.less

@@ -11,7 +11,8 @@ html {
 }
 
 body {
-  font: 1em/1.4 'Microsoft Yahei', 'PingFang SC', 'Avenir', 'Segoe UI', 'Hiragino Sans GB', 'STHeiti', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;
+  font: 1em/1.4 'Microsoft Yahei', 'PingFang SC', 'Avenir', 'Segoe UI', 'Hiragino Sans GB',
+    'STHeiti', 'Microsoft Sans Serif', 'WenQuanYi Micro Hei', sans-serif;
   height: 100%;
   color: #333;
 }
@@ -48,7 +49,7 @@ textarea {
 
 /* 主题色 */
 :root {
-  --themeColor: #9F1927;
+  --themeColor: #9f1927;
 }
 
 a {
@@ -59,7 +60,6 @@ a {
   display: none !important;
 }
 
-
 /* 兼容360浏览器的下拉框 */
 .ant-select-selector {
   position: relative;
@@ -82,68 +82,62 @@ a {
     color: var(--themeColor);
   }
 
-
-
   /* antd分页器样式 */
-  .ant-pagination .ant-pagination-item {
-    border-radius: 50%;
-    border: 1px solid #999;
-    background-color: transparent;
-  }
-
-  .ant-pagination .ant-pagination-item-active {
-    background-color: var(--themeColor);
-  }
-
-
-  .ant-pagination .ant-pagination-item-active a {
-    color: #fff;
-  }
-
-  .ant-pagination .ant-pagination-item:hover {
-    background-color: var(--themeColor);
-  }
-
-  .ant-pagination .ant-pagination-item:hover a {
-    color: #fff;
-  }
-
-  .ant-pagination-prev {
-    border-radius: 50%;
-    border: 1px solid #999;
-  }
-
-  .ant-pagination-prev:hover {
-    background-color: var(--themeColor);
-  }
-
-  .ant-pagination-prev:hover button {
-    color: #fff;
-  }
-
-
-
-  .ant-pagination-next {
-    border-radius: 50%;
-    border: 1px solid #999;
-  }
-
-
-  .ant-pagination-next:hover {
-    background-color: var(--themeColor);
-  }
-
-  .ant-pagination-next:hover button {
-    color: #fff;
-  }
-
-  .ant-pagination-disabled {
-    border: 1px solid #ccc;
-  }
-
-  .ant-pagination-disabled:hover {
-    background-color: transparent;
-  }
+  // .ant-pagination .ant-pagination-item {
+  //   border-radius: 50%;
+  //   border: 1px solid #999;
+  //   background-color: transparent;
+  // }
+
+  // .ant-pagination .ant-pagination-item-active {
+  //   background-color: var(--themeColor);
+  // }
+
+  // .ant-pagination .ant-pagination-item-active a {
+  //   color: #fff;
+  // }
+
+  // .ant-pagination .ant-pagination-item:hover {
+  //   background-color: var(--themeColor);
+  // }
+
+  // .ant-pagination .ant-pagination-item:hover a {
+  //   color: #fff;
+  // }
+
+  // .ant-pagination-prev {
+  //   border-radius: 50%;
+  //   border: 1px solid #999;
+  // }
+
+  // .ant-pagination-prev:hover {
+  //   background-color: var(--themeColor);
+  // }
+
+  // .ant-pagination-prev:hover button {
+  //   color: #fff;
+  // }
+
+  // .ant-pagination-next {
+  //   border-radius: 50%;
+  //   border: 1px solid #999;
+  // }
+
+  // .ant-pagination-next:hover {
+  //   background-color: var(--themeColor);
+  // }
+
+  // .ant-pagination-next:hover button {
+  //   color: #fff;
+  // }
+
+  // .ant-pagination-disabled {
+  //   border: 1px solid #ccc;
+  // }
+
+  // .ant-pagination-disabled:hover {
+  //   background-color: transparent;
+  // }
 
   /* antd图片预览组件 */
   .ant-image {
@@ -151,9 +145,8 @@ a {
   }
 }
 
-
 /* 找不到页面 */
 .noFindPage {
   opacity: 0;
-  transition: opacity .5s;
-}
+  transition: opacity 0.5s;
+}

+ 13 - 17
src/components/AuthButton/index.tsx

@@ -1,28 +1,24 @@
-import React, { ReactNode } from "react";
-import { Button, ButtonProps } from "antd";
-import { useSelector } from "react-redux";
-import { RootState } from "@/store";
+import React, { ReactNode } from 'react'
+import { Button, ButtonProps } from 'antd'
+import { useSelector } from 'react-redux'
+import { RootState } from '@/store'
 
 // 定义一个接口继承,过滤重复的字段id
-type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
+type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
 
 // 过滤接口 ButtonProps 里面的字段id,使用自己定义的 id
-interface Props extends Omit<ButtonProps, "id"> {
-  children: ReactNode;
-  id: number;
-  [x: string]: any;
+interface Props extends Omit<ButtonProps, 'id'> {
+  children: ReactNode
+  id: number
+  [x: string]: any
 }
 
 function AuthButton({ children, id, ...rest }: Props) {
-  const buttonArr = useSelector(
-    (state: RootState) => state.loginStore.authButtonArr
-  );
+  const buttonArr = useSelector((state: RootState) => state.loginStore.authButtonArr)
 
-  return buttonArr.some((v: any) => v.id === id) ? (
-    <Button {...rest}>{children}</Button>
-  ) : null;
+  return buttonArr.some((v: any) => v.id === id) ? <Button {...rest}>{children}</Button> : null
 }
 
-const MemoAuthButton = React.memo(AuthButton);
+const MemoAuthButton = React.memo(AuthButton)
 
-export default MemoAuthButton;
+export default MemoAuthButton

+ 107 - 123
src/pages/Layout/index.tsx

@@ -1,92 +1,87 @@
-import { getTokenInfo, removeTokenInfo } from "@/utils/storage";
-import styles from "./index.module.scss";
-import classNames from "classnames";
-import { useCallback, useEffect, useMemo, useRef, useState } from "react";
-import { Popconfirm, Button, Modal, Form, Input } from "antd";
-import React from "react";
-import { Route, Switch, useLocation } from "react-router-dom";
-import history from "@/utils/history";
-import SpinLoding from "@/components/SpinLoding";
-import AuthRoute from "@/components/AuthRoute";
-import { Base64 } from "js-base64";
-import encodeStr from "@/utils/pass";
-import {
-  getPowerInfoAPI,
-  getSelectAllAPI,
-  passWordEditAPI,
-} from "@/store/action/login";
-import { useDispatch, useSelector } from "react-redux";
-import { RootState } from "@/store";
-import { MessageFu } from "@/utils/message";
+import { getTokenInfo, removeTokenInfo } from '@/utils/storage'
+import styles from './index.module.scss'
+import classNames from 'classnames'
+import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
+import { Popconfirm, Button, Modal, Form, Input } from 'antd'
+import React from 'react'
+import { Route, Switch, useLocation } from 'react-router-dom'
+import history from '@/utils/history'
+import SpinLoding from '@/components/SpinLoding'
+import AuthRoute from '@/components/AuthRoute'
+import { Base64 } from 'js-base64'
+import encodeStr from '@/utils/pass'
+import { getPowerInfoAPI, getSelectAllAPI, passWordEditAPI } from '@/store/action/login'
+import { useDispatch, useSelector } from 'react-redux'
 
-const NotFound = React.lazy(() => import("../../components/NotFound"));
+import { RootState } from '@/store'
+import { MessageFu } from '@/utils/message'
+
+const NotFound = React.lazy(() => import('../../components/NotFound'))
 
 function Layout() {
-  const dispatch = useDispatch();
+  const dispatch = useDispatch()
 
   const tabListTemp = useMemo(() => {
     return [
       {
         id: 1,
         done: true,
-        Com: React.lazy(() => import("../Home")),
-        path: "/",
-        name: "首页",
+        Com: React.lazy(() => import('../Home')),
+        path: '/',
+        name: '首页'
       },
       {
         id: 2,
         done: false,
-        Com: React.lazy(() => import("../Object")),
-        path: "/object",
-        name: "馆藏管理",
+        Com: React.lazy(() => import('../Object')),
+        path: '/object',
+        name: '馆藏管理'
       },
       {
         id: 3,
         done: true,
-        Com: React.lazy(() => import("../Stores")),
-        path: "/stores",
-        name: "库房管理",
-      },
-    ];
-  }, []);
+        Com: React.lazy(() => import('../Stores')),
+        path: '/stores',
+        name: '库房管理'
+      }
+    ]
+  }, [])
 
-  const [tabList, setTabList] = useState(tabListTemp);
+  const [tabList, setTabList] = useState(tabListTemp)
 
   // 进页面获取权限信息
   const getPowerInfoAPIFu = useCallback(async () => {
-    const res = await getPowerInfoAPI();
-    const tempArr = res.data.filter((v: any) => v.authority);
+    const res = await getPowerInfoAPI()
+    const tempArr = res.data.filter((v: any) => v.authority)
     // 页面权限信息存到仓库
-    dispatch({ type: "login/setAuthPageArr", payload: tempArr });
+    dispatch({ type: 'login/setAuthPageArr', payload: tempArr })
     // 按钮的权限信息存到仓库
-    const buttonArr = [] as any;
+    const buttonArr = [] as any
     tempArr.forEach((v: any) => {
       v.children.forEach((v2: any) => {
-        if (v2.authority) buttonArr.push(v2);
-      });
-    });
-    dispatch({ type: "login/setAuthButtonArr", payload: buttonArr });
-  }, [dispatch]);
+        if (v2.authority) buttonArr.push(v2)
+      })
+    })
+    dispatch({ type: 'login/setAuthButtonArr', payload: buttonArr })
+  }, [dispatch])
 
   // 获取页面权限信息
-  const powerInfo = useSelector(
-    (state: RootState) => state.loginStore.authPageArr
-  );
+  const powerInfo = useSelector((state: RootState) => state.loginStore.authPageArr)
 
   useEffect(() => {
-    getPowerInfoAPIFu();
-  }, [getPowerInfoAPIFu]);
+    getPowerInfoAPIFu()
+  }, [getPowerInfoAPIFu])
 
   useEffect(() => {
-    const temp = getTokenInfo().user.isAdmin;
+    const temp = getTokenInfo().user.isAdmin
     if (temp === 1 && tabListTemp.length <= 3)
       tabListTemp.push({
         id: 4,
         done: true,
-        Com: React.lazy(() => import("../System")),
-        path: "/system",
-        name: "系统管理",
-      });
+        Com: React.lazy(() => import('../System')),
+        path: '/system',
+        name: '系统管理'
+      })
 
     powerInfo.forEach((v: any) => {
       if (
@@ -97,97 +92,90 @@ function Layout() {
         v.id === 500 ||
         v.id === 600
       ) {
-        tabListTemp[1].done = true;
+        tabListTemp[1].done = true
       }
-    });
+    })
 
-    setTabList(tabListTemp.filter((v) => v.done));
-  }, [powerInfo, tabListTemp]);
+    setTabList(tabListTemp.filter(v => v.done))
+  }, [powerInfo, tabListTemp])
 
-  const location = useLocation();
-  const [path, setPath] = useState("");
+  const location = useLocation()
+  const [path, setPath] = useState('')
 
   useEffect(() => {
-    const arr = location.pathname.split("/");
-    let pathTemp = "/";
-    if (arr[1]) pathTemp = "/" + arr[1];
+    const arr = location.pathname.split('/')
+    let pathTemp = '/'
+    if (arr[1]) pathTemp = '/' + arr[1]
 
-    setPath(pathTemp);
-  }, [location]);
+    setPath(pathTemp)
+  }, [location])
 
   const userInfo = useMemo(() => {
-    return getTokenInfo().user;
-  }, []);
+    return getTokenInfo().user
+  }, [])
 
   // 顶部路由跳转
   const pathCutFu = (path: string) => {
-    history.push(path);
-  };
+    history.push(path)
+  }
 
   // 修改密码相关
-  const [open, setOpen] = useState(false);
+  const [open, setOpen] = useState(false)
 
   // 拿到新密码的输入框的值
-  const oldPasswordValue = useRef("");
+  const oldPasswordValue = useRef('')
 
-  const checkPassWord = (rule: any, value: any = "") => {
-    if (value !== oldPasswordValue.current)
-      return Promise.reject("新密码不一致!");
-    else return Promise.resolve(value);
-  };
+  const checkPassWord = (rule: any, value: any = '') => {
+    if (value !== oldPasswordValue.current) return Promise.reject('新密码不一致!')
+    else return Promise.resolve(value)
+  }
 
   const onFinish = async (values: any) => {
     // 通过校验之后发送请求
-    if (values.oldPassword === values.newPassword)
-      return MessageFu.warning("新旧密码不能相同!");
+    if (values.oldPassword === values.newPassword) return MessageFu.warning('新旧密码不能相同!')
     const obj = {
       oldPassword: encodeStr(Base64.encode(values.oldPassword)),
-      newPassword: encodeStr(Base64.encode(values.newPassword)),
-    };
-    const res: any = await passWordEditAPI(obj);
+      newPassword: encodeStr(Base64.encode(values.newPassword))
+    }
+    const res: any = await passWordEditAPI(obj)
     if (res.code === 0) {
-      MessageFu.success("修改成功!");
-      loginExit();
+      MessageFu.success('修改成功!')
+      loginExit()
     }
-  };
+  }
 
   // 点击退出登录
   const loginExit = () => {
-    removeTokenInfo();
-    history.push("/login");
-  };
+    removeTokenInfo()
+    history.push('/login')
+  }
 
   // 进来获取所有的下拉列表信息
   useEffect(() => {
-    dispatch(getSelectAllAPI());
-  }, [dispatch]);
+    dispatch(getSelectAllAPI())
+  }, [dispatch])
 
   return (
     <div className={styles.Layout}>
-      <div className="topTitle">
-        <div className="main">
-          <div className="logo"></div>
-          <div className="tabCut">
+      <div className='topTitle'>
+        <div className='main'>
+          <div className='logo'></div>
+          <div className='tabCut'>
             {tabList.map((v: any) => (
               <div
                 onClick={() => pathCutFu(v.path)}
-                className={classNames("row", v.path === path ? "active" : "")}
+                className={classNames('row', v.path === path ? 'active' : '')}
                 key={v.id}
               >
                 {v.name}
               </div>
             ))}
           </div>
-          <div className="user">
+          <div className='user'>
             {userInfo.realName}
-            <div className="userSet">
+            <div className='userSet'>
               <span onClick={() => setOpen(true)}>修改密码</span>
-              <Popconfirm
-                title="确定退出吗?"
-                okText="确定"
-                cancelText="取消"
-                onConfirm={loginExit}
-              >
+              <Popconfirm title='确定退出吗?' okText='确定' cancelText='取消' onConfirm={loginExit}>
                 退出登录
               </Popconfirm>
             </div>
@@ -195,7 +183,7 @@ function Layout() {
         </div>
       </div>
       {/* 二级路由页面 */}
-      <div className="pageMain">
+      <div className='pageMain'>
         <React.Suspense fallback={<SpinLoding />}>
           <Switch>
             {tabList.map((v: any, i: number) => (
@@ -206,7 +194,7 @@ function Layout() {
                 component={v.Com}
               />
             ))}
-            <Route path="*" component={NotFound} />
+            <Route path='*' component={NotFound} />
           </Switch>
         </React.Suspense>
       </div>
@@ -214,59 +202,55 @@ function Layout() {
       <Modal
         destroyOnClose
         open={open}
-        title="修改密码"
+        title='修改密码'
         onCancel={() => setOpen(false)}
         footer={
           [] // 设置footer为空,去掉 取消 确定默认按钮
         }
       >
         <Form
-          name="basic"
+          name='basic'
           labelCol={{ span: 5 }}
           wrapperCol={{ span: 16 }}
           onFinish={onFinish}
-          autoComplete="off"
+          autoComplete='off'
         >
           <Form.Item
-            label="旧密码"
-            name="oldPassword"
-            rules={[{ required: true, message: "不能为空!" }]}
+            label='旧密码'
+            name='oldPassword'
+            rules={[{ required: true, message: '不能为空!' }]}
           >
             <Input.Password maxLength={15} />
           </Form.Item>
 
           <Form.Item
-            label="新密码"
-            name="newPassword"
-            rules={[{ required: true, message: "不能为空!" }]}
+            label='新密码'
+            name='newPassword'
+            rules={[{ required: true, message: '不能为空!' }]}
           >
             <Input.Password
               maxLength={15}
-              onChange={(e) => (oldPasswordValue.current = e.target.value)}
+              onChange={e => (oldPasswordValue.current = e.target.value)}
             />
           </Form.Item>
 
-          <Form.Item
-            label="确定新密码"
-            name="checkPass"
-            rules={[{ validator: checkPassWord }]}
-          >
+          <Form.Item label='确定新密码' name='checkPass' rules={[{ validator: checkPassWord }]}>
             <Input.Password maxLength={15} />
           </Form.Item>
 
           <Form.Item wrapperCol={{ offset: 14, span: 16 }}>
             <Button onClick={() => setOpen(false)}>取消</Button>
             &emsp;
-            <Button type="primary" htmlType="submit">
+            <Button type='primary' htmlType='submit'>
               确定
             </Button>
           </Form.Item>
         </Form>
       </Modal>
     </div>
-  );
+  )
 }
 
-const MemoLayout = React.memo(Layout);
+const MemoLayout = React.memo(Layout)
 
-export default MemoLayout;
+export default MemoLayout