/* * @Author: lusx * @Date: 2020-03-12 15:33:18 * @Last Modified by: lusx * @Last Modified time: 2020-04-21 14:57:29 */ import React from 'react'; import { Row } from "antd"; import { WeaRichText, WeaNewScroll } from "ecCom"; import { ckConfig, bottomBarRight, bottomBarConfig } from "./config.js"; import { toJS } from "mobx" export default class Edit extends React.Component { render() { const { visibleDialog, exchangeList={}, showRich, showRichfun, richPlaceholder, setIsCreate, canSubmit } = this.props; const barConfig = visibleDialog ? "complex" : "simple"; if (showRich || visibleDialog) { const { transfStr, richChange, richSubmitfun, showDialogfun, richid, loading, value } = this.props; return (
(this.richtext = richtext)} ckConfig={ckConfig(visibleDialog)} bottomBarConfig={bottomBarConfig({ exchangeList, type: barConfig }, this.showDialogfun)} bottomBarRight={!visibleDialog && bottomBarRight(richSubmitfun,loading, (bool) => showRichfun(bool))} onChange={(text) => richChange(text)} onToolsChange={(name, ids, list, type) => transfStr(name, ids, list, type, 'create')} value={value} />
) } else { return (
{ if(canSubmit){ showRichfun(true); setIsCreate(true); } }}>  {richPlaceholder}
) } } showDialogfun = () => { const { showDialogfun, showRichfun } = this.props; showDialogfun(true); showRichfun(false); } }