From 290e9c2dba4f3dc0dc618495fc9d5d7e80636d76 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Mon, 29 Dec 2025 17:21:07 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=E6=9C=AA=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84=20Subscription=20=E5=92=8C=20Tables=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=20(=E7=AC=AC7=E6=89=B9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除以下未被引用的组件: - SubscriptionModal.js - BasicTable.js / DashboardTableRow.js - SearchTable1.js / SearchTable2.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../Subscription/SubscriptionModal.js | 43 --- src/components/Tables/BasicTable.js | 283 -------------- src/components/Tables/DashboardTableRow.js | 89 ----- src/components/Tables/SearchTable1.js | 307 --------------- src/components/Tables/SearchTable2.js | 352 ------------------ 5 files changed, 1074 deletions(-) delete mode 100644 src/components/Subscription/SubscriptionModal.js delete mode 100755 src/components/Tables/BasicTable.js delete mode 100755 src/components/Tables/DashboardTableRow.js delete mode 100755 src/components/Tables/SearchTable1.js delete mode 100755 src/components/Tables/SearchTable2.js diff --git a/src/components/Subscription/SubscriptionModal.js b/src/components/Subscription/SubscriptionModal.js deleted file mode 100644 index 8dc9d186..00000000 --- a/src/components/Subscription/SubscriptionModal.js +++ /dev/null @@ -1,43 +0,0 @@ -// src/components/Subscription/SubscriptionModal.js -import React from 'react'; -import { - Modal, - ModalOverlay, - ModalContent, - ModalHeader, - ModalBody, - ModalCloseButton, - Icon, - HStack, - Text, - useColorModeValue, -} from '@chakra-ui/react'; -import { Star } from 'lucide-react'; -import PropTypes from 'prop-types'; -import SubscriptionContent from './SubscriptionContent'; -import { GLASS_BLUR } from '@/constants/glassConfig'; - -export default function SubscriptionModal({ isOpen, onClose }) { - return ( - - - - - - - 订阅管理 - - - - - - - - - ); -} - -SubscriptionModal.propTypes = { - isOpen: PropTypes.bool.isRequired, - onClose: PropTypes.func.isRequired, -}; diff --git a/src/components/Tables/BasicTable.js b/src/components/Tables/BasicTable.js deleted file mode 100755 index ea92b582..00000000 --- a/src/components/Tables/BasicTable.js +++ /dev/null @@ -1,283 +0,0 @@ -/*! - -========================================================= -* Argon Dashboard Chakra PRO - v1.0.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/argon-dashboard-chakra-pro -* Copyright 2022 Creative Tim (https://www.creative-tim.com/) - -* Designed and Coded by Simmmple & Creative Tim - -========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -*/ - -import { - Button, - Flex, - Icon, - NumberDecrementStepper, - NumberIncrementStepper, - NumberInput, - NumberInputField, - NumberInputStepper, - Select, - Stack, - Table, - Tbody, - Td, - Text, - Th, - Thead, - Tr, -} from "@chakra-ui/react"; -import React, { useMemo } from "react"; -import { ChevronRight, ChevronLeft, ChevronDown, ChevronUp, ChevronsUpDown } from "lucide-react"; -import { usePagination, useSortBy, useTable } from "react-table"; - -function BasicTable(props) { - const { columnsData, tableData } = props; - const columns = useMemo(() => columnsData, []); - const data = useMemo(() => tableData, []); - - const tableInstance = useTable( - { - columns, - data, - }, - useSortBy, - usePagination - ); - - const { - getTableProps, - getTableBodyProps, - headerGroups, - page, - gotoPage, - pageCount, - prepareRow, - nextPage, - previousPage, - canNextPage, - canPreviousPage, - setPageSize, - - state, - } = tableInstance; - - const createPages = (count) => { - let arrPageCount = []; - - for (let i = 1; i <= count; i++) { - arrPageCount.push(i); - } - - return arrPageCount; - }; - - const { pageIndex, pageSize } = state; - return ( - <> - - - - - entries per page - - - - - {headerGroups.map((headerGroup, index) => ( - - {headerGroup.headers.map((column, index) => ( - - ))} - - ))} - - - {page.map((row, index) => { - prepareRow(row); - return ( - - {row.cells.map((cell, index) => { - return ( - - ); - })} - - ); - })} - -
- - {column.render("Header")} - - -
- {cell.render("Cell")} -
- - - Showing {pageSize * pageIndex + 1} to{" "} - {pageSize * (pageIndex + 1) <= tableData.length - ? pageSize * (pageIndex + 1) - : tableData.length}{" "} - of {tableData.length} entries - - - - {pageSize === 5 ? ( - gotoPage(e)} - > - - - nextPage()} /> - previousPage()} /> - - - ) : ( - createPages(pageCount).map((pageNumber, index) => { - return ( - - ); - }) - )} - - - -
- - ); -} - -export default BasicTable; diff --git a/src/components/Tables/DashboardTableRow.js b/src/components/Tables/DashboardTableRow.js deleted file mode 100755 index 764fb77b..00000000 --- a/src/components/Tables/DashboardTableRow.js +++ /dev/null @@ -1,89 +0,0 @@ -/*! - -========================================================= -* Argon Dashboard Chakra PRO - v1.0.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/argon-dashboard-chakra-pro -* Copyright 2022 Creative Tim (https://www.creative-tim.com/) - -* Designed and Coded by Simmmple & Creative Tim - -========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -*/ - -import { - Avatar, - AvatarGroup, - Flex, - Icon, - Progress, - Td, - Text, - Tr, - useColorModeValue, -} from "@chakra-ui/react"; -import React from "react"; - -function DashboardTableRow(props) { - const { logo, name, members, budget, progression } = props; - const textColor = useColorModeValue("gray.700", "white"); - return ( - - - - - - {name} - - - - - - - {members.map((member, index) => { - return ( - - ); - })} - - - - - {budget} - - - - - {`${progression}%`} - - - - - ); -} - -export default DashboardTableRow; diff --git a/src/components/Tables/SearchTable1.js b/src/components/Tables/SearchTable1.js deleted file mode 100755 index 46e6dbd9..00000000 --- a/src/components/Tables/SearchTable1.js +++ /dev/null @@ -1,307 +0,0 @@ -/*! - -========================================================= -* Argon Dashboard Chakra PRO - v1.0.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/argon-dashboard-chakra-pro -* Copyright 2022 Creative Tim (https://www.creative-tim.com/) - -* Designed and Coded by Simmmple & Creative Tim - -========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -*/ - -import { - Button, - Flex, - Icon, - Input, - NumberDecrementStepper, - NumberIncrementStepper, - NumberInput, - NumberInputField, - NumberInputStepper, - Select, - Stack, - Table, - Tbody, - Td, - Text, - Th, - Thead, - Tr, -} from "@chakra-ui/react"; -import React, { useMemo } from "react"; -import { ChevronRight, ChevronLeft, ChevronDown, ChevronUp, ChevronsUpDown } from "lucide-react"; -import { - useGlobalFilter, - usePagination, - useSortBy, - useTable, -} from "react-table"; - -function SearchTable1(props) { - const { columnsData, tableData } = props; - - const columns = useMemo(() => columnsData, []); - const data = useMemo(() => tableData, []); - - const tableInstance = useTable( - { - columns, - data, - }, - useGlobalFilter, - useSortBy, - usePagination - ); - - const { - getTableProps, - getTableBodyProps, - headerGroups, - page, - gotoPage, - pageCount, - prepareRow, - nextPage, - previousPage, - canNextPage, - canPreviousPage, - setPageSize, - setGlobalFilter, - state, - } = tableInstance; - - const createPages = (count) => { - let arrPageCount = []; - - for (let i = 1; i <= count; i++) { - arrPageCount.push(i); - } - - return arrPageCount; - }; - - const { pageIndex, pageSize, globalFilter } = state; - - return ( - <> - - - - - - entries per page - - - setGlobalFilter(e.target.value)} - /> - - - - {headerGroups.map((headerGroup, index) => ( - - {headerGroup.headers.map((column, index) => ( - - ))} - - ))} - - - {page.map((row, index) => { - prepareRow(row); - return ( - - {row.cells.map((cell, index) => { - return ( - - ); - })} - - ); - })} - -
- - {column.render("Header")} - - -
- {cell.render("Cell")} -
- - - Showing {pageSize * pageIndex + 1} to{" "} - {pageSize * (pageIndex + 1) <= tableData.length - ? pageSize * (pageIndex + 1) - : tableData.length}{" "} - of {tableData.length} entries - - - - {pageSize === 5 ? ( - gotoPage(e)} - > - - - nextPage()} /> - previousPage()} /> - - - ) : ( - createPages(pageCount).map((pageNumber, index) => { - return ( - - ); - }) - )} - - - -
- - ); -} - -export default SearchTable1; diff --git a/src/components/Tables/SearchTable2.js b/src/components/Tables/SearchTable2.js deleted file mode 100755 index 2211c3ca..00000000 --- a/src/components/Tables/SearchTable2.js +++ /dev/null @@ -1,352 +0,0 @@ -/*! - -========================================================= -* Argon Dashboard Chakra PRO - v1.0.0 -========================================================= - -* Product Page: https://www.creative-tim.com/product/argon-dashboard-chakra-pro -* Copyright 2022 Creative Tim (https://www.creative-tim.com/) - -* Designed and Coded by Simmmple & Creative Tim - -========================================================= - -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -*/ - -import { - Avatar, - Box, - Button, - Checkbox, - Flex, - Icon, - Input, - NumberDecrementStepper, - NumberIncrementStepper, - NumberInput, - NumberInputField, - NumberInputStepper, - Stack, - Table, - Tbody, - Td, - Text, - Th, - Thead, - Tr, - useColorModeValue, -} from "@chakra-ui/react"; -import React, { useMemo } from "react"; -import { SearchBar } from "components/Navbars/SearchBar/SearchBar"; -import { RotateCcw, Check, X, CheckCircle, XCircle, Undo2, ChevronRight, ChevronLeft, ChevronDown, ChevronUp, ChevronsUpDown } from "lucide-react"; -import { - useGlobalFilter, - usePagination, - useSortBy, - useTable, -} from "react-table"; - -function SearchTable2(props) { - const { columnsData, tableData } = props; - - const columns = useMemo(() => columnsData, []); - const data = useMemo(() => tableData, []); - - const tableInstance = useTable( - { - columns, - data, - }, - useGlobalFilter, - useSortBy, - usePagination - ); - - const { - getTableProps, - getTableBodyProps, - headerGroups, - page, - gotoPage, - pageCount, - prepareRow, - nextPage, - previousPage, - canNextPage, - canPreviousPage, - setPageSize, - setGlobalFilter, - state, - } = tableInstance; - - const createPages = (count) => { - let arrPageCount = []; - - for (let i = 1; i <= count; i++) { - arrPageCount.push(i); - } - - return arrPageCount; - }; - - const { pageIndex, pageSize, globalFilter } = state; - - return ( - <> - - - setGlobalFilter(e.target.value)} - /> - - - - {headerGroups.map((headerGroup, index) => ( - - {headerGroup.headers.map((column, index) => ( - - ))} - - ))} - - - {page.map((row, index) => { - prepareRow(row); - return ( - - {row.cells.map((cell, index) => { - let data = ""; - if (cell.column.Header === "STATUS") { - data = ( - - - - - {cell.value} - - ); - } else if (cell.column.Header === "ID") { - data = ( - - - {cell.value} - - ); - } else if (cell.column.Header === "DATE") { - data = {cell.value}; - } else if (cell.column.Header === "CUSTOMER") { - data = ( - - - {cell.value} - - ); - } else if (cell.column.Header === "PRODUCT") { - data = {cell.value}; - } else if (cell.column.Header === "REVENUE") { - data = {cell.value}; - } - return ( - - ); - })} - - ); - })} - -
- - {column.render("Header")} - - -
- {data} -
- - - Showing {pageSize * pageIndex + 1} to{" "} - {pageSize * (pageIndex + 1) <= tableData.length - ? pageSize * (pageIndex + 1) - : tableData.length}{" "} - of {tableData.length} entries - - - - {pageSize === 5 ? ( - gotoPage(e)} - > - - - nextPage()} /> - previousPage()} /> - - - ) : ( - createPages(pageCount).map((pageNumber, index) => { - return ( - - ); - }) - )} - - - -
- - ); -} - -export default SearchTable2;