Skip to content

Commit 7329d7d

Browse files
committed
🔧 [radio] fix radio group props support error
1 parent 0bbee7d commit 7329d7d

File tree

4 files changed

+33
-20
lines changed

4 files changed

+33
-20
lines changed

lib/components/base/radio/MRadioGroup.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
*/
99

1010
import { defineComponent, h } from 'vue';
11-
import { RadioGroupProps, RadioProps } from './index';
11+
import { RadioProps } from './index';
12+
import { RadioGroupProps } from './radio-group';
1213
import { radioGroupProps } from './api.ts';
1314
import MRadio from './MRadio.tsx';
1415

lib/components/base/radio/api.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
*/
99

1010
import { MCOPO } from '../../types/props';
11-
import { RadioGroupProps, RadioProps } from './index';
11+
import { RadioProps } from './index';
12+
import { RadioGroupProps } from './radio-group';
1213

1314
export const props: MCOPO<RadioProps> = {
1415
label: { type: [String, Number], default: '' },

lib/components/base/radio/index.d.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*
1212
* 江湖的业务千篇一律,复杂的代码好几百行。
1313
*/
14-
1514
export declare type RadioProps = {
1615
/**
1716
* @description radio label
@@ -57,20 +56,3 @@ export declare type RadioProps = {
5756
export declare type RadioEvents = {
5857
onClick?: (e: MouseEvent, value?: string | number) => void
5958
};
60-
61-
export declare type RadioGroupProps = {
62-
/**
63-
* @description radio group value
64-
* 绑定值
65-
* @type any
66-
* @default ''
67-
*/
68-
modelValue?: any,
69-
/**
70-
* @description radio group name
71-
* 单选框的name值
72-
* @type string | undefined
73-
* @default undefined
74-
*/
75-
name?: string,
76-
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* @description radio api type
3+
* @author 阿怪
4+
* @date 2025/1/21 09:54
5+
* @version v1.0.0
6+
*
7+
* @name m-radio-group
8+
* @docDescription Radio component with shuimo-ui style.
9+
* 水墨组件的单选组件。
10+
* @docUrl https://shuimo.design/radio
11+
*
12+
* 江湖的业务千篇一律,复杂的代码好几百行。
13+
*/
14+
export declare type RadioGroupProps = {
15+
/**
16+
* @description radio group value
17+
* 绑定值
18+
* @type any
19+
* @default ''
20+
*/
21+
modelValue?: any,
22+
/**
23+
* @description radio group name
24+
* 单选框的name值
25+
* @type string | undefined
26+
* @default undefined
27+
*/
28+
name?: string,
29+
};

0 commit comments

Comments
 (0)