Commit bb38c920 by zhaochengxiang

模型自动翻译问题

parent 5d9edbec
...@@ -55,7 +55,7 @@ const ImportActionHeader = (props) => { ...@@ -55,7 +55,7 @@ const ImportActionHeader = (props) => {
const [ causes, setCauses ] = useState([]); const [ causes, setCauses ] = useState([]);
const [ options, setOptions ] = useState([]); const [ options, setOptions ] = useState([]);
const [ autoTranslate, setAutoTranslate ] = useState((modelerData.name||'')===''); const [ autoTranslate, setAutoTranslate ] = useState(false);
useEffect(() => { useEffect(() => {
...@@ -78,6 +78,12 @@ const ImportActionHeader = (props) => { ...@@ -78,6 +78,12 @@ const ImportActionHeader = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [validateReports]) }, [validateReports])
useEffect(() => {
setAutoTranslate((modelerData.name||'')==='');
}, [modelerData])
const formItemLayout = { const formItemLayout = {
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
......
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