1.定义组件 新建一个.jsx文件 import React from 'react' export default class MyBtn extends React.Component{ constructor(){ super() this.state