| | |
| | | |
| | | import ColorSketch from '@/tabviews/zshare/mutilform/mkColor' |
| | | import NodeForm from './nodeform' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | |
| | | }) |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('mk-x6-dbclick', this.trigger) |
| | | } |
| | | |
| | | UNSAFE_componentWillReceiveProps(nextProps) { |
| | | if (!is(fromJS(this.props.node), fromJS(nextProps.node))) { |
| | | this.setState({ |
| | |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 组件销毁,清除state更新,清除快捷键设置 |
| | | */ |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | |
| | | MKEmitter.removeListener('mk-x6-dbclick', this.trigger) |
| | | } |
| | | |
| | | trigger = () => { |
| | | const { formlist } = this.state |
| | | |
| | | if (!formlist || formlist.findIndex(item => item.type === 'other') === -1) return |
| | | |
| | | this.setState({visible: true}) |
| | | } |
| | | |
| | | getFormList = (node) => { |
| | |
| | | </Form> |
| | | <Modal |
| | | title={mknode && mknode.shape === 'edge' ? '连线编辑' : '节点编辑'} |
| | | wrapClassName="mk-x6-modal" |
| | | visible={visible} |
| | | closable={false} |
| | | maskClosable={false} |
| | | width={1050} |
| | | centered={true} |
| | | onOk={this.confirm} |
| | | onCancel={() => this.setState({visible: false})} |
| | | destroyOnClose |