函数组件Hook+Ts 选项卡
ts代码:
import { useState} from "react";
import './Tab.less'
interface iButtonList {
ID: string
text: string
}
export default function Fn() {
const [ButtonList] = useState
{
ID: 'bt1',
text: '按钮一'
},
{
ID: 'bt2',
text: '按钮二'
},
{
ID: 'bt3',
text: '按钮三'
},
])
const [ContentList] = useState
{
共有 0 条评论