diff --git a/packages/plugin-variable-bind-dialog/src/index.tsx b/packages/plugin-variable-bind-dialog/src/index.tsx index eea0a2288..1ea9fc466 100644 --- a/packages/plugin-variable-bind-dialog/src/index.tsx +++ b/packages/plugin-variable-bind-dialog/src/index.tsx @@ -27,7 +27,6 @@ export default class VariableBindDialog extends Component { state = { visiable: false, - selectedVariableName: '', variableContext: '', }; @@ -54,7 +53,7 @@ export default class VariableBindDialog extends Component { initEventName = () => { const { bindEventName } = this.state; let eventName = bindEventName; - this.eventList.map((item) => { + this.eventList.forEach((item) => { if (item.name === eventName) { eventName = `${eventName}_new`; } @@ -73,7 +72,6 @@ export default class VariableBindDialog extends Component { onSelectItem = (variableName: string) => { this.setState({ - selectedVariableName: variableName, variableContext: variableName, }); @@ -111,7 +109,7 @@ export default class VariableBindDialog extends Component { }; render() { - const { selectedEventName, eventName, visiable, variableContext } = this.state; + const { visiable, variableContext } = this.state; return (