From 9f827e29ec8cd3f9725e5e8a455665ecf27da261 Mon Sep 17 00:00:00 2001 From: oasis <12181600+oasis-cloud@users.noreply.github.com> Date: Mon, 11 Nov 2024 22:00:42 +0800 Subject: [PATCH] fix: radio type (#2735) --- src/packages/radio/radio.taro.tsx | 2 -- src/packages/radio/radio.tsx | 2 -- src/packages/radiogroup/radiogroup.taro.tsx | 8 ++------ 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/packages/radio/radio.taro.tsx b/src/packages/radio/radio.taro.tsx index e494b0feb..1b4b46eb5 100644 --- a/src/packages/radio/radio.taro.tsx +++ b/src/packages/radio/radio.taro.tsx @@ -7,7 +7,6 @@ import { import classNames, { Mapping } from 'classnames' import { ITouchEvent, View } from '@tarojs/components' import RadioContext from '../radiogroup/context' -import RadioGroup from '@/packages/radiogroup/index.taro' import { BasicComponent, ComponentDefaults } from '@/utils/typings' import { usePropsValue } from '@/utils/use-props-value' import { RadioPosition, RadioShape } from '@/packages/radio/types' @@ -156,4 +155,3 @@ export const Radio: FC< } Radio.displayName = 'NutRadio' -Radio.Group = RadioGroup diff --git a/src/packages/radio/radio.tsx b/src/packages/radio/radio.tsx index e4ceb2cfd..5eeab9ba2 100644 --- a/src/packages/radio/radio.tsx +++ b/src/packages/radio/radio.tsx @@ -2,7 +2,6 @@ import React, { FunctionComponent, MouseEventHandler, useContext } from 'react' import { CheckChecked, CheckNormal, CheckDisabled } from '@nutui/icons-react' import classNames from 'classnames' import RadioContext from '../radiogroup/context' -import RadioGroup from '@/packages/radiogroup' import { BasicComponent, ComponentDefaults } from '@/utils/typings' import { usePropsValue } from '@/utils/use-props-value' import { RadioPosition, RadioShape } from '@/packages/radio/types' @@ -149,4 +148,3 @@ export const Radio: FunctionComponent< } Radio.displayName = 'NutRadio' -Radio.Group = RadioGroup diff --git a/src/packages/radiogroup/radiogroup.taro.tsx b/src/packages/radiogroup/radiogroup.taro.tsx index ceabc6927..aaec98a75 100644 --- a/src/packages/radiogroup/radiogroup.taro.tsx +++ b/src/packages/radiogroup/radiogroup.taro.tsx @@ -1,6 +1,7 @@ import React, { useCallback } from 'react' import classNames from 'classnames' import { View } from '@tarojs/components' +import { ViewProps } from '@tarojs/components/types/View' import { RadioGroupDirection, RadioGroupOption, @@ -32,11 +33,7 @@ const defaultProps = { const classPrefix = 'nut-radiogroup' export const RadioGroup = React.forwardRef( - ( - props: Partial & - Omit, 'onChange'>, - ref - ) => { + (props: Partial & Omit, ref) => { const { children, className, @@ -50,7 +47,6 @@ export const RadioGroup = React.forwardRef( disabled, ...rest } = { ...defaultProps, ...props } - const cls = classNames( classPrefix, {