feat: 1.统一右侧抽屉关闭按钮布局 2.统一 UI 组件为 Ant Design 移除 radix-ui、floating-ui 组件 3. 修复 ESLint 文件格式错误的问题
This commit is contained in:
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { useEffectEvent } from '../../../../hooks/common/useEffectEvent';
|
||||
import '../../../console/module-alignment.css';
|
||||
import React, { useState, useEffect, useRef } from 'react';
|
||||
import JSONEditor from '../../../common/ui/JSONEditor';
|
||||
@@ -228,7 +229,7 @@ const EditModelModal = (props) => {
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const onScopeChange = useEffectEvent(() => {
|
||||
if (formApiRef.current) {
|
||||
if (!isEdit) {
|
||||
formApiRef.current.setValues({
|
||||
@@ -237,9 +238,13 @@ const EditModelModal = (props) => {
|
||||
});
|
||||
}
|
||||
}
|
||||
}, [props.editingModel?.id, props.editingModel?.model_name]);
|
||||
});
|
||||
useEffect(
|
||||
() => onScopeChange(),
|
||||
[onScopeChange, props.editingModel?.id, props.editingModel?.model_name],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const onVisibilityChange2 = useEffectEvent(() => {
|
||||
if (props.visiable) {
|
||||
if (isEdit) {
|
||||
loadModel();
|
||||
@@ -252,7 +257,16 @@ const EditModelModal = (props) => {
|
||||
} else {
|
||||
formApiRef.current?.reset();
|
||||
}
|
||||
}, [props.visiable, props.editingModel?.id, props.editingModel?.model_name]);
|
||||
});
|
||||
useEffect(
|
||||
() => onVisibilityChange2(),
|
||||
[
|
||||
onVisibilityChange2,
|
||||
props.visiable,
|
||||
props.editingModel?.id,
|
||||
props.editingModel?.model_name,
|
||||
],
|
||||
);
|
||||
|
||||
const submit = async (values) => {
|
||||
setLoading(true);
|
||||
|
||||
Reference in New Issue
Block a user