fix: calc scrollheight dynamically for tabs change

This commit is contained in:
jialin
2025-11-10 20:40:15 +08:00
parent 285e274818
commit 9eb1dba4a1
14 changed files with 283 additions and 77 deletions
+4 -15
View File
@@ -4,33 +4,22 @@ import { useIntl } from '@umijs/max';
import { Form } from 'antd';
import React from 'react';
import { DeployFormKeyMap } from '../config';
import { useCatalogFormContext, useFormContext } from '../config/form-context';
import { useFormContext } from '../config/form-context';
import { FormData } from '../config/types';
/**
* It can access some props from CatalogFormContext
*/
const CatalogForm: React.FC = () => {
const intl = useIntl();
const formCtx = useFormContext();
const catalogFormCtx = useCatalogFormContext();
const { getRuleMessage } = useAppUtils();
const { formKey } = formCtx;
const {
sizeOptions,
quantizationOptions,
onSizeChange,
onQuantizationChange
} = catalogFormCtx;
if (formKey !== DeployFormKeyMap.CATALOG) {
return null;
}
const handleSizeChange = (val: any) => {
onSizeChange?.(val);
};
const handleOnQuantizationChange = (val: any) => {
onQuantizationChange?.(val);
};
return (
<>
<Form.Item<FormData>