From 4a3809e9593bdce1a0054547725aa10b9cb56441 Mon Sep 17 00:00:00 2001
From: landaiqing <3517283258@qq.com>
Date: Sat, 13 Jul 2024 00:06:43 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8C=85?=
=?UTF-8?q?=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Main/File/components/FileUpload.tsx | 4 ++--
src/components/Main/File/index.tsx | 3 +--
src/components/Main/Home/index.tsx | 1 -
.../Main/Settings/components/AwsSettings.tsx | 2 ++
.../Settings/components/BaiduSettings.tsx | 2 ++
.../Share/components/ShareAdd/ShareAdd.tsx | 2 +-
src/components/Main/Share/index.tsx | 10 ++++------
src/router/useAuth.tsx | 20 +++++++++----------
vite.config.ts | 1 -
9 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/src/components/Main/File/components/FileUpload.tsx b/src/components/Main/File/components/FileUpload.tsx
index ad95a24..f7cbb5f 100644
--- a/src/components/Main/File/components/FileUpload.tsx
+++ b/src/components/Main/File/components/FileUpload.tsx
@@ -13,7 +13,7 @@ const props: any = {
multiple: true,
directory: true,
action: "https://660d2bd96ddfa2943b33731c.mockapi.io/api/upload",
- onChange(info) {
+ onChange(info: any) {
const { status } = info.file;
if (status !== "uploading") {
console.log(info.file, info.fileList);
@@ -24,7 +24,7 @@ const props: any = {
message.error(`${info.file.name} file upload failed.`);
}
},
- onDrop(e) {
+ onDrop(e: any) {
console.log("Dropped files", e.dataTransfer.files);
},
};
diff --git a/src/components/Main/File/index.tsx b/src/components/Main/File/index.tsx
index 801dd2e..b5824fd 100644
--- a/src/components/Main/File/index.tsx
+++ b/src/components/Main/File/index.tsx
@@ -259,7 +259,7 @@ const File: FunctionComponent = () => {
{
}
diff --git a/src/components/Main/Home/index.tsx b/src/components/Main/Home/index.tsx
index edfbca3..7fb9230 100644
--- a/src/components/Main/Home/index.tsx
+++ b/src/components/Main/Home/index.tsx
@@ -1,7 +1,6 @@
/** @format */
import React, { useEffect, useState } from "react";
import { Avatar, Card, Flex, Skeleton, Space, Tag } from "antd";
-import Meta from "antd/es/card/Meta";
import styles from "./index.module.less";
import ReactECharts from "echarts-for-react";
import { ProCard, ProList } from "@ant-design/pro-components";
diff --git a/src/components/Main/Settings/components/AwsSettings.tsx b/src/components/Main/Settings/components/AwsSettings.tsx
index 5c4638d..5bdf5ed 100644
--- a/src/components/Main/Settings/components/AwsSettings.tsx
+++ b/src/components/Main/Settings/components/AwsSettings.tsx
@@ -103,6 +103,8 @@ const columns: ProColumns[] = [
title: "操作",
valueType: "option",
key: "option",
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-expect-error
render: (text: ReactNode, record: AwsOssConfigItem, _, action: any) => [
[] = [
title: "操作",
valueType: "option",
key: "option",
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-expect-error
render: (text: ReactNode, record: BaiduOssConfigItem, _, action: any) => [
{
enable: true,
items: ["ai", "Bold", "Italic", "Underline", "Strike", "code", "comment"],
},
- onChange: async (value) => {
+ onChange: async (value: any) => {
fromRef.current.setFieldsValue({
content: value.getHtml(),
});
diff --git a/src/components/Main/Share/index.tsx b/src/components/Main/Share/index.tsx
index f8baf3b..48837b6 100644
--- a/src/components/Main/Share/index.tsx
+++ b/src/components/Main/Share/index.tsx
@@ -8,15 +8,14 @@ import { useNavigate } from "react-router-dom";
import TextArea from "antd/es/input/TextArea";
import { EyeOutlined, PlusOutlined, UnorderedListOutlined } from "@ant-design/icons";
import pic from "@/assets/images/background.png";
-import pic2 from "@/assets/images/setting.png";
import Meta from "antd/es/card/Meta";
const MainShare: FunctionComponent = () => {
const navigate = useNavigate();
const [open, setOpen] = useState(false);
- const showDrawer = () => {
- setOpen(true);
- };
+ // const showDrawer = () => {
+ // setOpen(true);
+ // };
const onClose = () => {
setOpen(false);
@@ -150,8 +149,7 @@ const MainShare: FunctionComponent = () => {
}
onClick={() => setOpen(true)}
diff --git a/src/router/useAuth.tsx b/src/router/useAuth.tsx
index 62c196d..f39f37c 100644
--- a/src/router/useAuth.tsx
+++ b/src/router/useAuth.tsx
@@ -1,7 +1,7 @@
/** @format */
import matchAuth from "./matchRouter.ts";
import { Navigate, useLocation } from "react-router-dom";
-import { message } from "antd";
+// import { message } from "antd";
import { getStorageFromKey } from "@/utils/localStorage/config.ts";
import React from "react";
export default function AuthRoute(props: { children: React.ReactNode }) {
@@ -32,14 +32,14 @@ export default function AuthRoute(props: { children: React.ReactNode }) {
return ;
}
- if (!isLogin) {
- message
- .open({
- content: "请先登录!",
- type: "warning",
- })
- .then();
- return ;
- }
+ // if (!isLogin) {
+ // message
+ // .open({
+ // content: "请先登录!",
+ // type: "warning",
+ // })
+ // .then();
+ // return ;
+ // }
return props.children;
}
diff --git a/vite.config.ts b/vite.config.ts
index 22e9fa9..28051cf 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -142,7 +142,6 @@ export default defineConfig(({ mode }): any => {
"@ant-design/icons",
"@ant-design/pro-components",
"@ant-design/use-emotion-css",
- "@ant-design/charts",
],
},
},