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, { useEffect, useState, useRef, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -964,7 +965,7 @@ const EditChannelModal = (props) => {
|
||||
setModelOptions(optionsWithIcon);
|
||||
}, [originModelOptions, inputs.models, t]);
|
||||
|
||||
useEffect(() => {
|
||||
const onScopeChange = useEffectEvent(() => {
|
||||
fetchModels().then();
|
||||
fetchGroups().then();
|
||||
if (!isEdit) {
|
||||
@@ -977,7 +978,8 @@ const EditChannelModal = (props) => {
|
||||
setBasicModels(localModels);
|
||||
setInputs((inputs) => ({ ...inputs, models: localModels }));
|
||||
}
|
||||
}, [props.editingChannel.id]);
|
||||
});
|
||||
useEffect(() => onScopeChange(), [onScopeChange, props.editingChannel.id]);
|
||||
|
||||
useEffect(() => {
|
||||
if (formApiRef.current) {
|
||||
@@ -985,7 +987,7 @@ const EditChannelModal = (props) => {
|
||||
}
|
||||
}, [inputs]);
|
||||
|
||||
useEffect(() => {
|
||||
const onVisibilityChange2 = useEffectEvent(() => {
|
||||
if (props.visible) {
|
||||
if (isEdit) {
|
||||
loadChannel();
|
||||
@@ -1004,7 +1006,11 @@ const EditChannelModal = (props) => {
|
||||
// 关闭后作废在途的兜底数据请求
|
||||
fallbackLoadSeqRef.current += 1;
|
||||
}
|
||||
}, [props.visible, channelId]);
|
||||
});
|
||||
useEffect(
|
||||
() => onVisibilityChange2(),
|
||||
[onVisibilityChange2, props.visible, channelId],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isEdit) {
|
||||
|
||||
Reference in New Issue
Block a user