1、设置state变量的值 this.setstate({ [`fileList${index}`]:index }) 2、获取state变量的值this.state[`fileList${index}`]