From d7c62d716112fae1bbc71d4f4e0b577e524bd70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E9=98=B3?= <3311118881@qq.com> Date: Thu, 15 Aug 2024 15:28:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/Cate.ts | 2 +- src/api/Comment.ts | 2 +- src/api/File.ts | 2 +- src/api/Project.ts | 2 +- src/api/Rss.ts | 2 +- src/api/Swiper.ts | 2 +- src/api/Tag.ts | 2 +- src/api/User.ts | 2 +- src/api/Web.ts | 2 +- src/components/Chat/ChatCard.tsx | 2 +- src/components/Header/DropdownComment.tsx | 2 +- src/components/Tables/TableOne.tsx | 2 +- src/components/Tables/TableThree.tsx | 2 +- src/components/Tables/TableTwo.tsx | 2 +- src/pages/Article/index.tsx | 4 ++-- src/pages/Cate/index.tsx | 2 +- src/pages/Comment/index.tsx | 2 +- src/pages/Create/components/PublishForm/index.tsx | 4 ++-- src/pages/Dashboard/ECommerce.tsx | 2 +- src/pages/Rss/index.tsx | 2 +- src/pages/Setup/components/Layout/index.tsx | 2 +- src/pages/Setup/components/My/index.tsx | 2 +- src/pages/Setup/components/System/index.tsx | 2 +- src/pages/Setup/components/Web/index.tsx | 2 +- src/pages/Swiper/index.tsx | 2 +- src/pages/Web/index.tsx | 2 +- src/stores/modules/user.ts | 2 +- src/types/{Article.d.ts => app/article.d.ts} | 0 src/types/{ => app}/brand.d.ts | 0 src/types/{ => app}/cate.d.ts | 0 src/types/{ => app}/chat.d.ts | 0 src/types/{Comment.d.ts => app/comment.d.ts} | 0 src/types/{File.d.ts => app/file.d.ts} | 0 src/types/{ => app}/lib.d.ts | 0 src/types/{ => app}/package.d.ts | 0 src/types/{ => app}/product.d.ts | 0 src/types/{ => app}/project.d.ts | 0 src/types/{ => app}/rss.d.ts | 0 src/types/{Swiper.d.ts => app/swiper.d.ts} | 0 src/types/{Tag.d.ts => app/tag.d.ts} | 0 src/types/{ => app}/user.d.ts | 0 src/types/{ => app}/web.d.ts | 0 tsconfig.json | 2 +- 43 files changed, 30 insertions(+), 30 deletions(-) rename src/types/{Article.d.ts => app/article.d.ts} (100%) rename src/types/{ => app}/brand.d.ts (100%) rename src/types/{ => app}/cate.d.ts (100%) rename src/types/{ => app}/chat.d.ts (100%) rename src/types/{Comment.d.ts => app/comment.d.ts} (100%) rename src/types/{File.d.ts => app/file.d.ts} (100%) rename src/types/{ => app}/lib.d.ts (100%) rename src/types/{ => app}/package.d.ts (100%) rename src/types/{ => app}/product.d.ts (100%) rename src/types/{ => app}/project.d.ts (100%) rename src/types/{ => app}/rss.d.ts (100%) rename src/types/{Swiper.d.ts => app/swiper.d.ts} (100%) rename src/types/{Tag.d.ts => app/tag.d.ts} (100%) rename src/types/{ => app}/user.d.ts (100%) rename src/types/{ => app}/web.d.ts (100%) diff --git a/src/api/Cate.ts b/src/api/Cate.ts index 3402193..50c120e 100644 --- a/src/api/Cate.ts +++ b/src/api/Cate.ts @@ -1,5 +1,5 @@ import Request from '@/utils/request' -import { Cate } from '@/types/cate' +import { Cate } from '@/types/app/cate' // 新增分类 export const addCateDataAPI = (data: Cate) => Request("POST", "/cate", data) diff --git a/src/api/Comment.ts b/src/api/Comment.ts index c587f6d..eaf848a 100644 --- a/src/api/Comment.ts +++ b/src/api/Comment.ts @@ -1,5 +1,5 @@ import Request from '@/utils/request' -import { Comment } from '@/types/comment' +import { Comment } from '@/types/app/comment' // 新增评论 export const addCommentDataAPI = (data: Comment) => Request("POST", "/comment", data) diff --git a/src/api/File.ts b/src/api/File.ts index c256f02..b093833 100644 --- a/src/api/File.ts +++ b/src/api/File.ts @@ -1,5 +1,5 @@ import Request from '@/utils/request' -import { File } from '@/types/file' +import { File } from '@/types/app/file' // 删除文件 export const delFileDataAPI = (data: string[]) => Request("DELETE", "/file", { files: data }) diff --git a/src/api/Project.ts b/src/api/Project.ts index 79d99e6..51e8969 100644 --- a/src/api/Project.ts +++ b/src/api/Project.ts @@ -1,5 +1,5 @@ import Request from '@/utils/request' -import { System, Web, Layout } from '@/types/project' +import { System, Web, Layout } from '@/types/app/project' // 获取系统配置信息 export const getSystemDataAPI = () => Request("GET", "/project/system") diff --git a/src/api/Rss.ts b/src/api/Rss.ts index 809fdad..62cdcb4 100644 --- a/src/api/Rss.ts +++ b/src/api/Rss.ts @@ -1,5 +1,5 @@ import Request from '@/utils/request' -import { Rss } from '@/types/rss'; +import { Rss } from '@/types/app/rss'; // 获取订阅数据列表 export const getRssListAPI = (pagination?: Page) => { diff --git a/src/api/Swiper.ts b/src/api/Swiper.ts index c5ec885..1897131 100644 --- a/src/api/Swiper.ts +++ b/src/api/Swiper.ts @@ -1,5 +1,5 @@ import Request from '@/utils/request' -import { Swiper } from '@/types/swiper' +import { Swiper } from '@/types/app/swiper' // 新增轮播图 export const addSwiperDataAPI = (data: Swiper) => Request("POST", "/swiper", data) diff --git a/src/api/Tag.ts b/src/api/Tag.ts index 0841bd5..0c0beea 100644 --- a/src/api/Tag.ts +++ b/src/api/Tag.ts @@ -1,5 +1,5 @@ import Request from '@/utils/request' -import { Tag } from '@/types/tag' +import { Tag } from '@/types/app/tag' // 新增标签 export const addTagDataAPI = (data: Tag) => Request("POST", "/tag", data) diff --git a/src/api/User.ts b/src/api/User.ts index f002c0a..afc43b1 100644 --- a/src/api/User.ts +++ b/src/api/User.ts @@ -1,5 +1,5 @@ import Request from '@/utils/request' -import { account, EditUser, Login, User, UserInfo } from '@/types/user' +import { account, EditUser, Login, User, UserInfo } from '@/types/app/user' // 登录 export const loginDataAPI = (data: Login) => Request("POST", "/user/login", data) diff --git a/src/api/Web.ts b/src/api/Web.ts index 93cb5c4..2398a96 100644 --- a/src/api/Web.ts +++ b/src/api/Web.ts @@ -1,5 +1,5 @@ import Request from '@/utils/request' -import { Web, LinkType } from '@/types/web' +import { Web, LinkType } from '@/types/app/web' // 新增网站 export const addLinkDataAPI = (data: Web) => Request("POST", "/link", data) diff --git a/src/components/Chat/ChatCard.tsx b/src/components/Chat/ChatCard.tsx index 1d3f994..1c9cc77 100644 --- a/src/components/Chat/ChatCard.tsx +++ b/src/components/Chat/ChatCard.tsx @@ -1,5 +1,5 @@ import { Link } from 'react-router-dom'; -import { Chat } from '../../types/chat'; +import { Chat } from '../../types/app/chat'; import UserOne from '../../images/user/user-01.png'; import UserTwo from '../../images/user/user-02.png'; import UserThree from '../../images/user/user-03.png'; diff --git a/src/components/Header/DropdownComment.tsx b/src/components/Header/DropdownComment.tsx index ab0764d..40c8649 100644 --- a/src/components/Header/DropdownComment.tsx +++ b/src/components/Header/DropdownComment.tsx @@ -3,7 +3,7 @@ import { Link } from 'react-router-dom'; import ClickOutside from '../ClickOutside'; import { getCommentListAPI } from '@/api/Comment' -import { Comment } from '@/types/comment'; +import { Comment } from '@/types/app/comment'; import dayjs from 'dayjs' import RandomAvatar from '@/components/RandomAvatar' diff --git a/src/components/Tables/TableOne.tsx b/src/components/Tables/TableOne.tsx index cf6bcf1..5619a5d 100644 --- a/src/components/Tables/TableOne.tsx +++ b/src/components/Tables/TableOne.tsx @@ -1,4 +1,4 @@ -import { BRAND } from '../../types/brand'; +import { BRAND } from '../../types/app/brand'; import BrandOne from '../../images/brand/brand-01.svg'; import BrandTwo from '../../images/brand/brand-02.svg'; import BrandThree from '../../images/brand/brand-03.svg'; diff --git a/src/components/Tables/TableThree.tsx b/src/components/Tables/TableThree.tsx index 4cdaeb7..aaa18d1 100644 --- a/src/components/Tables/TableThree.tsx +++ b/src/components/Tables/TableThree.tsx @@ -1,4 +1,4 @@ -import { Package } from '../../types/package'; +import { Package } from '../../types/app/package'; const packageData: Package[] = [ { diff --git a/src/components/Tables/TableTwo.tsx b/src/components/Tables/TableTwo.tsx index 3778001..92734b5 100644 --- a/src/components/Tables/TableTwo.tsx +++ b/src/components/Tables/TableTwo.tsx @@ -1,4 +1,4 @@ -import { Product } from '../../types/product'; +import { Product } from '../../types/app/product'; import ProductOne from '../../images/product/product-01.png'; import ProductTwo from '../../images/product/product-02.png'; import ProductThree from '../../images/product/product-03.png'; diff --git a/src/pages/Article/index.tsx b/src/pages/Article/index.tsx index 3f6ec0f..878203a 100644 --- a/src/pages/Article/index.tsx +++ b/src/pages/Article/index.tsx @@ -5,8 +5,8 @@ import dayjs from 'dayjs'; import type { Article } from '@/types/article'; import { titleSty } from '@/styles/sty' import Title from '@/components/Title'; -import type { Tag as ArticleTag } from '@/types/tag'; -import type { Cate } from '@/types/cate'; +import type { Tag as ArticleTag } from '@/types/app/tag'; +import type { Cate } from '@/types/app/cate'; import { Link } from 'react-router-dom'; const Article: React.FC = () => { diff --git a/src/pages/Cate/index.tsx b/src/pages/Cate/index.tsx index 59d5078..812a023 100644 --- a/src/pages/Cate/index.tsx +++ b/src/pages/Cate/index.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { Cate } from '@/types/cate'; +import { Cate } from '@/types/app/cate'; import { addCateDataAPI, delCateDataAPI, editCateDataAPI, getCateDataAPI, getCateListAPI } from '@/api/Cate'; import { DownOutlined } from '@ant-design/icons'; import { Form, Input, Button, Tree, Modal, Spin, Dropdown, Card, MenuProps, Popconfirm, message } from 'antd'; diff --git a/src/pages/Comment/index.tsx b/src/pages/Comment/index.tsx index ea80384..62e40f6 100644 --- a/src/pages/Comment/index.tsx +++ b/src/pages/Comment/index.tsx @@ -6,7 +6,7 @@ import dayjs from 'dayjs'; import { ColumnsType } from 'antd/es/table'; import { titleSty } from '@/styles/sty'; import Title from '@/components/Title'; -import { Comment } from '@/types/comment' +import { Comment } from '@/types/app/comment' const CommentPage = () => { const [loading, setLoading] = useState(false); diff --git a/src/pages/Create/components/PublishForm/index.tsx b/src/pages/Create/components/PublishForm/index.tsx index b80d2e9..62e6628 100644 --- a/src/pages/Create/components/PublishForm/index.tsx +++ b/src/pages/Create/components/PublishForm/index.tsx @@ -5,8 +5,8 @@ import { RuleObject } from "antd/es/form"; import { addArticleDataAPI, editArticleDataAPI } from '@/api/Article' import { getCateListAPI } from '@/api/Cate' import { getTagListAPI } from '@/api/Tag' -import { Cate } from "@/types/cate"; -import { Tag } from "@/types/tag"; +import { Cate } from "@/types/app/cate"; +import { Tag } from "@/types/app/tag"; import dayjs from 'dayjs'; import "./index.scss" import { Article } from "@/types/article"; diff --git a/src/pages/Dashboard/ECommerce.tsx b/src/pages/Dashboard/ECommerce.tsx index c197af9..67198d1 100644 --- a/src/pages/Dashboard/ECommerce.tsx +++ b/src/pages/Dashboard/ECommerce.tsx @@ -7,7 +7,7 @@ import MapOne from '../../components/Maps/MapOne'; import TableOne from '../../components/Tables/TableOne'; import { getSystemDataAPI } from '@/api/Project'; -import { System } from '@/types/project'; +import { System } from '@/types/app/project'; import HeaderInfo from './components/HeaderInfo'; import { Card } from 'antd'; diff --git a/src/pages/Rss/index.tsx b/src/pages/Rss/index.tsx index a062a25..72b7753 100644 --- a/src/pages/Rss/index.tsx +++ b/src/pages/Rss/index.tsx @@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'; import { Avatar, Card, List, Space, Spin } from 'antd'; import Title from '@/components/Title'; import { getRssListAPI } from '@/api/Rss'; -import { Rss } from '@/types/rss'; +import { Rss } from '@/types/app/rss'; import { BiCategory } from "react-icons/bi"; import { LuTimer } from "react-icons/lu"; import dayjs from 'dayjs'; diff --git a/src/pages/Setup/components/Layout/index.tsx b/src/pages/Setup/components/Layout/index.tsx index 5f049be..cddefed 100644 --- a/src/pages/Setup/components/Layout/index.tsx +++ b/src/pages/Setup/components/Layout/index.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'; import { notification, Divider, Input, Alert, Button, Spin } from 'antd'; import { PictureOutlined, LoadingOutlined } from '@ant-design/icons'; import { editLayoutDataAPI, getLayoutDataAPI } from '@/api/Project'; -import { Layout } from '@/types/project'; +import { Layout } from '@/types/app/project'; const LayoutPage = () => { const [loading, setLoading] = useState(false); diff --git a/src/pages/Setup/components/My/index.tsx b/src/pages/Setup/components/My/index.tsx index 20a51ac..5f38709 100644 --- a/src/pages/Setup/components/My/index.tsx +++ b/src/pages/Setup/components/My/index.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from "react"; import { Form, Input, Button, message } from "antd"; import { useUserStore } from "@/stores"; // 假设你有一个状态管理库类似于pinia import { editUserDataAPI, getUserDataAPI } from "@/api/User"; -import { User } from "@/types/user"; +import { User } from "@/types/app/user"; interface UserForm { name: string; diff --git a/src/pages/Setup/components/System/index.tsx b/src/pages/Setup/components/System/index.tsx index 4ba634e..aba8d69 100644 --- a/src/pages/Setup/components/System/index.tsx +++ b/src/pages/Setup/components/System/index.tsx @@ -2,7 +2,7 @@ import { useState, useRef } from 'react'; import { Form, Input, Button, notification, Modal } from 'antd'; import { useUserStore } from '@/stores'; import { editAdminPassAPI } from '@/api/User'; -import { EditUser } from '@/types/user' +import { EditUser } from '@/types/app/user' const { confirm } = Modal; diff --git a/src/pages/Setup/components/Web/index.tsx b/src/pages/Setup/components/Web/index.tsx index 99a035a..4e0dc58 100644 --- a/src/pages/Setup/components/Web/index.tsx +++ b/src/pages/Setup/components/Web/index.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; import { Form, Input, Button, message } from 'antd'; import { getWebDataAPI, editWebDataAPI } from '@/api/Project'; -import { Web } from '@/types/project' +import { Web } from '@/types/app/project' const WebPage = () => { const [form] = Form.useForm(); diff --git a/src/pages/Swiper/index.tsx b/src/pages/Swiper/index.tsx index eab0997..0cc8129 100644 --- a/src/pages/Swiper/index.tsx +++ b/src/pages/Swiper/index.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from 'react'; import { Table, Button, Modal, Form, Input, Tabs, Card, Popconfirm, message } from 'antd'; import { getSwiperListAPI, addSwiperDataAPI, editSwiperDataAPI, delSwiperDataAPI } from '@/api/Swiper'; -import { Swiper } from '@/types/swiper'; +import { Swiper } from '@/types/app/swiper'; import Title from '@/components/Title'; import { ColumnsType } from 'antd/es/table'; diff --git a/src/pages/Web/index.tsx b/src/pages/Web/index.tsx index 67c18a2..64e5137 100644 --- a/src/pages/Web/index.tsx +++ b/src/pages/Web/index.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from 'react'; import { Tabs, Input, Button, Form, Spin, Empty, Card, Popconfirm, Select, message } from 'antd'; import { SearchOutlined } from '@ant-design/icons'; import { getLinkListAPI, addLinkDataAPI, editLinkDataAPI, delLinkDataAPI, getLinkTypeListAPI } from '@/api/Web'; -import { LinkType, Web } from '@/types/web'; +import { LinkType, Web } from '@/types/app/web'; import Title from '@/components/Title'; import './index.scss'; import { RuleObject } from 'antd/es/form'; diff --git a/src/stores/modules/user.ts b/src/stores/modules/user.ts index 503a602..e7028de 100644 --- a/src/stores/modules/user.ts +++ b/src/stores/modules/user.ts @@ -1,4 +1,4 @@ -import { User } from '@/types/user'; +import { User } from '@/types/app/user'; import { create } from 'zustand'; import { persist } from 'zustand/middleware'; diff --git a/src/types/Article.d.ts b/src/types/app/article.d.ts similarity index 100% rename from src/types/Article.d.ts rename to src/types/app/article.d.ts diff --git a/src/types/brand.d.ts b/src/types/app/brand.d.ts similarity index 100% rename from src/types/brand.d.ts rename to src/types/app/brand.d.ts diff --git a/src/types/cate.d.ts b/src/types/app/cate.d.ts similarity index 100% rename from src/types/cate.d.ts rename to src/types/app/cate.d.ts diff --git a/src/types/chat.d.ts b/src/types/app/chat.d.ts similarity index 100% rename from src/types/chat.d.ts rename to src/types/app/chat.d.ts diff --git a/src/types/Comment.d.ts b/src/types/app/comment.d.ts similarity index 100% rename from src/types/Comment.d.ts rename to src/types/app/comment.d.ts diff --git a/src/types/File.d.ts b/src/types/app/file.d.ts similarity index 100% rename from src/types/File.d.ts rename to src/types/app/file.d.ts diff --git a/src/types/lib.d.ts b/src/types/app/lib.d.ts similarity index 100% rename from src/types/lib.d.ts rename to src/types/app/lib.d.ts diff --git a/src/types/package.d.ts b/src/types/app/package.d.ts similarity index 100% rename from src/types/package.d.ts rename to src/types/app/package.d.ts diff --git a/src/types/product.d.ts b/src/types/app/product.d.ts similarity index 100% rename from src/types/product.d.ts rename to src/types/app/product.d.ts diff --git a/src/types/project.d.ts b/src/types/app/project.d.ts similarity index 100% rename from src/types/project.d.ts rename to src/types/app/project.d.ts diff --git a/src/types/rss.d.ts b/src/types/app/rss.d.ts similarity index 100% rename from src/types/rss.d.ts rename to src/types/app/rss.d.ts diff --git a/src/types/Swiper.d.ts b/src/types/app/swiper.d.ts similarity index 100% rename from src/types/Swiper.d.ts rename to src/types/app/swiper.d.ts diff --git a/src/types/Tag.d.ts b/src/types/app/tag.d.ts similarity index 100% rename from src/types/Tag.d.ts rename to src/types/app/tag.d.ts diff --git a/src/types/user.d.ts b/src/types/app/user.d.ts similarity index 100% rename from src/types/user.d.ts rename to src/types/app/user.d.ts diff --git a/src/types/web.d.ts b/src/types/app/web.d.ts similarity index 100% rename from src/types/web.d.ts rename to src/types/app/web.d.ts diff --git a/tsconfig.json b/tsconfig.json index 62a30fc..9afeda9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,6 +24,6 @@ "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, - "include": ["src", "src/types/lib.d.ts"], + "include": ["src", "src/types/app/lib.d.ts"], "references": [{ "path": "./tsconfig.node.json" }] }