diff --git a/homepage/src/components/Home/Version/FunctionTable.tsx b/homepage/src/components/Home/Version/FunctionTable.tsx
index 834878cf..a7143074 100644
--- a/homepage/src/components/Home/Version/FunctionTable.tsx
+++ b/homepage/src/components/Home/Version/FunctionTable.tsx
@@ -13,7 +13,7 @@ import {
alpha,
Tooltip,
} from "@mui/material";
-import { useState } from "react";
+import React, { useState } from "react";
import ExpandLess from "@mui/icons-material/ExpandLess";
import ExpandMore from "@mui/icons-material/ExpandMore";
import { Icon } from "@/components";
@@ -32,83 +32,124 @@ const Unlimited = () => {
};
const FunctionTable = () => {
- const [open, setOpen] = useState(true);
- const bodyCell = [
- {
- name: "智能语义分析引擎",
- tip: "",
- experience: ,
- basics: ,
- },
- {
- name: "可防护站点数量",
- experience: ,
- basics: ,
- },
- {
- name: "自定义白名单",
- experience: ,
- basics: ,
- },
- {
- name: "自定义黑名单",
- experience: ,
- basics: ,
- },
- {
- name: "反向代理接入",
- experience: ,
- basics: ,
- },
- {
- name: "软件形态",
- experience: ,
- basics: ,
- },
- {
- name: "硬件形态",
- experience: ,
- basics: ,
- },
- {
- name: "智能业务建模",
- experience: ,
- basics: ,
- },
- {
- name: "动态防护",
- experience: ,
- basics: ,
- },
- {
- name: "分布式集群部署",
- experience: ,
- basics: ,
- },
+ const [open, setOpen] = useState(["基本功能", "高级防护能力", "部署形态", "流量接入方式"]);
+
+ const cells = [
{
- name: "SDK 接入",
- experience: ,
- basics: ,
+ title: "基本功能",
+ data: [
+ {
+ name: "可视化 DashBoard",
+ experience: ,
+ basics: ,
+ }, {
+ name: "自定义黑白名单",
+ experience: ,
+ basics: ,
+ }, {
+ name: "自定义防护策略",
+ experience: ,
+ basics: ,
+ }, {
+ name: "可防护站点数量",
+ experience: ,
+ basics: ,
+ }, {
+ name: "可支撑流量大小",
+ experience: ,
+ basics: ,
+ }
+ ]
},
{
- name: "透明代理接入",
- experience: ,
- basics: ,
+ title: "高级防护能力",
+ data: [
+ {
+ name: "智能语义分析引擎",
+ tip: "",
+ experience: ,
+ basics: ,
+ }, {
+ name: "智能业务建模",
+ experience: ,
+ basics: ,
+ }, {
+ name: "动态防护",
+ experience: ,
+ basics: ,
+ }, {
+ name: "API 防护",
+ experience: ,
+ basics: ,
+ }, {
+ name: "Bot 管理",
+ experience: ,
+ basics: ,
+ }, {
+ name: "拟态防护",
+ experience: ,
+ basics: ,
+ },
+ ]
},
{
- name: "透明桥接接入",
- experience: ,
- basics: ,
+ title: "部署形态",
+ data: [
+ {
+ name: "软件形态",
+ experience: ,
+ basics: ,
+ }, {
+ name: "硬件形态",
+ experience: ,
+ basics: ,
+ }, {
+ name: "分布式集群形态",
+ experience: ,
+ basics: ,
+ }, {
+ name: "云原生 K8S 集群形态",
+ experience: ,
+ basics: ,
+ }
+ ]
},
{
- name: "旁路镜像接入",
- experience: ,
- basics: ,
- },
- ];
+ title: "流量接入方式",
+ data: [
+ {
+ name: "反向代理接入",
+ experience: ,
+ basics: ,
+ }, {
+ name: "SDK 接入",
+ experience: ,
+ basics: ,
+ }, {
+ name: "透明代理接入",
+ experience: ,
+ basics: ,
+ }, {
+ name: "透明桥接接入",
+ experience: ,
+ basics: ,
+ }, {
+ name: "旁路镜像接入",
+ experience: ,
+ basics: ,
+ }
+ ]
+ }
+ ]
- const handleClick = () => {
- setOpen(!open);
+ const handleClick = (id: string) => {
+ if (open?.includes(id)) {
+ const udpateOpen = [...open]
+ udpateOpen.splice(open?.indexOf(id), 1)
+ setOpen([...udpateOpen])
+ } else {
+ setOpen((open) => [...open, id])
+ }
};
return (
@@ -162,77 +203,79 @@ const FunctionTable = () => {
-
-
-
- {open ? : }
-
-
-
-
-
+
+ handleClick(data?.title)}
sx={{
- ".MuiTableRow-root": {
- "&:last-of-type": {
- ".MuiTableCell-root": {
- borderBottom: "none",
- },
- },
- },
- ".MuiTableCell-root": {
- pl: "20px !important",
- pr: "8px !important",
- py: "12px !important",
- backgroundColor: "transparent !important",
- color: "#000",
- borderRight: "1px solid",
- borderColor: "rgba(0,0,0,.04)",
- "&:last-of-type": {
- borderRight: "none",
- },
- },
+ backgroundColor: "#EFF1F8",
+ borderRadius: "4px",
+ cursor: "pointer",
+ pl: "20px",
}}
>
-
- {bodyCell.map((item) => (
-
-
-
- {item.name}
-
-
-
+
+
+ {open?.includes(data?.title) ? : }
+
+
+
+
+
+
+ {data.data.map((item) => (
+
+
+
+ {item.name}
+
+
+
+
+
-
-
-
-
- {item.experience}
-
-
- {item.basics}
-
-
- ))}
-
-
-
-
+
+
+ {item.experience}
+
+
+ {item.basics}
+
+
+ ))}
+
+
+
+ )}
>
);
};