Perf workflow (#1492)

* perf: handle edge check

* search model

* feat: plugin input can render all input; fix: plugin default value

* fix ts

* feat: plugin input support required
This commit is contained in:
Archer
2024-05-15 16:17:43 +08:00
committed by GitHub
parent cd876251b7
commit 8386f707cd
36 changed files with 256 additions and 160 deletions

View File

@@ -0,0 +1,36 @@
import {
NumberInput,
NumberIncrementStepper,
NumberInputField,
NumberInputStepper,
NumberDecrementStepper,
NumberInputProps
} from '@chakra-ui/react';
import React from 'react';
type Props = Omit<NumberInputProps, 'onChange'> & {
onChange: (e: number | '') => any;
};
const MyNumberInput = (props: Props) => {
return (
<NumberInput
{...props}
onChange={(e) => {
if (isNaN(Number(e))) {
props?.onChange('');
} else {
props?.onChange(Number(e));
}
}}
>
<NumberInputField />
<NumberInputStepper>
<NumberIncrementStepper />
<NumberDecrementStepper />
</NumberInputStepper>
</NumberInput>
);
};
export default MyNumberInput;

View File

@@ -67,7 +67,7 @@ const MyRightDrawer = ({
<DrawerCloseButton position={'relative'} fontSize={'sm'} top={0} right={0} />
</Flex>
<DrawerBody>
<DrawerBody overflow={'unset'} px={props?.px}>
{children}
<Loading loading={isLoading} fixed={false} />
</DrawerBody>