About.tsx部分:
import React, { Component } from "react";
import "./about.less";
// redux
import { connect } from "react-redux";
// import { setName, setAge } from "../store/action";
interface Props {
}
interface State {
SelectIndex: number,
BtnList: btn[],
ContList: cont[],
}
interface btn {
id: string, btntext: string
}
interface cont {
id: string, conttext: string
}
class About extends Component<Props, State> {
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
timer?: NodeJS.Timeout
constructor(props: Props) {
super(props)
this.state = {
SelectIndex: 0,
BtnList: [
{ id: "1", btntext: "标题一" },
{ id: "2", btntext: "标题二" },
{ id: "3", btntext: "标题三" }
],