import { Connect } from "dob-react" import * as _ from "lodash" import * as React from "react" import * as ReactDOM from "react-dom" import { Input } from "../../components/input/src" import { Select } from "../../components/select/src" import * as Styled from "./index.style" import { Props, State } from "./index.type" const sep = ":" @Connect class MainToolEditorVariable extends React.Component { public static defaultProps = new Props() public state = new State() /** * 组件实例的信息 */ private instanceInfo: InstanceInfo public render() { if (!this.props.stores.ViewportStore.instances.has(this.props.stores.ViewportStore.currentEditInstanceKey)) { return null } this.instanceInfo = this.props.stores.ViewportStore.instances.get(this.props.stores.ViewportStore.currentEditInstanceKey) const options = this.getVariableOptions() let value = null const variable = this.instanceInfo.variables && this.instanceInfo.variables[this.props.realField] if (variable) { value = variable.type + sep + variable.key } return (