大致思路: 定义一个变量,名为hover,通过该变量来判断该块是否处于被hover的状态 onMouseOver:鼠标移上来时 onMouseLeave:鼠标移走时 (就像一个Switch开关,实际上只能代替hover的作用,毕竟内联没有伪类) 解释:store.color是mobx定义的全局变量,在头部有引用,在此将它视为一个颜色就好 const [hoverput, setHoverput] = React.useState(false) function getcolor(hover: boolean) { return hover ? store.color : '' } retur...