exportconst state ={"loginInfo":{"userName":'',"userPassword":'',"remember":false},};exportfunction_setval(_this, e){// _this是jsx页面传过来的this,否则使用不了this.setState// e也是jsx页面传参过来的let value = e.target.value;let name = e.target.name;let{ loginInfo }= state
loginInfo[name]= value
_this.setState({
loginInfo
})}
js文件export const state = { "loginInfo": { "userName": '', "userPassword": '', "remember": false },};export function _setval(_this, e) { let value = e.target.value; let name = e.target.name; let { loginInfo } =