Commit b4af70e4 authored by 李纪文's avatar 李纪文

fix: 在线修改修改

parent 3d65dcec
......@@ -100,6 +100,7 @@ const ConfigurationView = (props) => {
const AuthorFrom = useRef();
const ConfigurationRef = useRef();
const DomRef = useRef();
const TwoRef = useRef();
const ConfigurationViewRef = useCallback((dom) => {
if (DomRef) DomRef.current = !!dom;
setDomFlag(!!dom);
......@@ -857,7 +858,7 @@ const ConfigurationView = (props) => {
}, [noInitial, domFlag]);
useEffect(() => {
twoID = `TDG${Date.now().toString(36)}`;
TwoRef.current = `TDG${Date.now().toString(36)}`;
if (!props.name) {
setDescription('咦~工艺图配置信息不全哦~');
setIsEmpty(true);
......@@ -1552,7 +1553,7 @@ const ConfigurationView = (props) => {
const diagramRender = (jsonStr, chartInfo) => {
myDiagram = goJS(
go.Diagram,
twoID, // must name or refer to the DIV HTML element
TwoRef.current, // must name or refer to the DIV HTML element
{
initialContentAlignment: go.Spot.Center,
contentAlignment: go.Spot.Center,
......@@ -3056,7 +3057,7 @@ const ConfigurationView = (props) => {
return (
<div className={classNames(prefixCls)} ref={ConfigurationRef}>
<div id={twoID} ref={ConfigurationViewRef} className={classNames('configurationView')}>
<div id={TwoRef.current} ref={ConfigurationViewRef} className={classNames('configurationView')}>
{/* <LoadBox spinning={spinning} /> */}
{isEmpty && <Empty theme={'dark'} description={description} />}
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment