可悲的是我不明白super()
想要什么
export default class ScriptEditor extends React.Component<IScriptEditorProps, any>
{
constructor()
{
super();
this._showDialog = this._showDialog.bind(this);
this._closeDialog = this._closeDialog.bind(this);
this._cancelDialog = this._cancelDialog.bind(this);
this._onScriptEditorTextChanged =
this._onScriptEditorTextChanged.bind(this);
const uiFabricCSS: string = `
.pzl-bgColor-themeDark, .pzl-bgColor-themeDark--hover:hover {
background-color: "[theme:themeDark, default:#005a9e]";
}
`;
loadStyles(uiFabricCSS);
this.state = {
showDialog: false
};
}
您需要将props
传递给像这样的react类构造函数: