import React from 'react'
import BaseWin from './baseWindow'
class Win extends BaseWin{
constructor(props){
super(props);
this.state ={
...this.props
};
console.log(this.name);
this.common();
}
getData(){
return this.state;
}
render(){
this.state.node.model.set({name:'zhongxia', age:17})
return(
<div className="pop-dialog">
<h2>弹框1</h2>
<form>
<label htmlFor="">用户名:</label><input value={this.state.name} type="text"/>
<label htmlFor="">密码:</label><input type="password" value={this.state.password}/>
</form>
</div>
);
}
}
export default Win;
import React from 'react'
/**
* 所有弹框的基类
*/
class BaseWin extends React.Component{
constructor(props){
super(props);
this.name ='zhongxia';
this.state ={};
}
common(){
alert('this is a common function!')
}
}
export default BaseWin;

this.state.node是undefined, 传入的props有这个node参数吗?