import React, { useState } from "react"; import { Button } from "antd"; import styles from "./index.less"; import CustomButton from "../../../components/CustomButton";

class Index extends React.Component { constructor(props) { super(props); this.state = { btnList: [ { active: true, id: 1, content: "通用安全基线", }, { active: false, id: 2, content: "共有云安全基线", }, { active: false, id: 3, content: "软件平台安全基线", }, { active: false, id: 4, content: "其他基线", }, ], }; }

render() { return (

已发布基线

{this.state.btnList.map((item) => { return ( ); })}
); } }

export default Index;

把下面代码改成类式组件:import Button Result Typography Card from antd;import React useState from react;import styles from indexless;import CustomButton from componentsCustomButton;const Index ReactFC = =

原文地址: https://www.cveoy.top/t/topic/iyH4 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录