@ray-js/components 0.3.31 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Button/props.d.ts +61 -1
- package/lib/Checkbox/props.d.ts +20 -0
- package/lib/CheckboxGroup/props.d.ts +15 -0
- package/lib/DatePicker/index.md +2 -0
- package/lib/DatePicker/props.d.ts +70 -2
- package/lib/Form/props.d.ts +10 -0
- package/lib/Icon/iconfont/iconfont.android.js +1 -1
- package/lib/Icon/iconfont/iconfont.css +196 -193
- package/lib/Icon/iconfont/iconfont.ios.js +1 -1
- package/lib/Icon/iconfont/iconfont.js +9 -9
- package/lib/Icon/iconfont/iconfont.json +1 -1
- package/lib/Icon/iconfont/iconfont.tuya.js +9 -9
- package/lib/Icon/iconfont/iconfont.web.js +9 -9
- package/lib/Icon/iconfont/iconfont.wechat.js +9 -9
- package/lib/Icon/iconfont-rn/iconfont.json +1 -1
- package/lib/Icon/props.d.ts +15 -0
- package/lib/Image/props.d.ts +30 -4
- package/lib/Input/props.d.ts +105 -2
- package/lib/Label/props.d.ts +3 -5
- package/lib/LinearGradient/index.md +2 -1
- package/lib/LinearGradient/props.d.ts +10 -0
- package/lib/Modal/index.md +2 -1
- package/lib/Modal/props.d.ts +35 -0
- package/lib/Motion/index.md +2 -1
- package/lib/Motion/props.d.ts +5 -0
- package/lib/Picker/index.md +2 -0
- package/lib/Picker/props.d.ts +65 -2
- package/lib/PickerView/props.d.ts +30 -3
- package/lib/RadialGradient/index.md +2 -1
- package/lib/RadialGradient/props.d.ts +10 -0
- package/lib/Radio/props.d.ts +20 -0
- package/lib/RadioGroup/props.d.ts +31 -3
- package/lib/ScrollView/props.d.ts +76 -3
- package/lib/Slider/props.d.ts +80 -0
- package/lib/Swiper/props.d.ts +45 -9
- package/lib/Switch/props.d.ts +40 -0
- package/lib/Text/props.d.ts +15 -1
- package/lib/Textarea/index.md +1 -1
- package/lib/Textarea/props.d.ts +60 -2
- package/lib/TimePicker/index.md +2 -0
- package/lib/TimePicker/props.d.ts +55 -2
- package/lib/View/props.d.ts +20 -0
- package/lib/types/index.d.ts +60 -3
- package/package.json +5 -5
|
@@ -186,4 +186,4 @@
|
|
|
186
186
|
"icon-a-cloudmoonboltfill": "M822.162286 525.714286c99.657143-19.931429 159.122286-101.558857 159.122285-155.574857 0-12.873143-5.778286-22.198857-16.384-22.198858-16.384 0-40.521143 20.260571-85.504 20.260572-77.458286 0-126.317714-46.921143-126.317714-118.272 0-43.739429 21.540571-74.898286 21.540572-92.891429 0-10.276571-7.094857-17.042286-19.931429-16.713143-58.514286 2.230857-136.301714 67.803429-154.294857 155.245715 10.934857 10.276571 21.211429 23.771429 29.586286 41.472 105.728 7.387429 187.684571 87.734857 192.182857 188.672zM257.462857 697.344h357.741714c91.611429 0 162.340571-69.741714 162.340572-160.694857 0-91.611429-72.96-160.073143-171.008-160.402286-36.315429-69.449143-102.217143-114.432-186.112-114.432-107.044571 0-197.046857 82.285714-206.665143 189.952-55.954286 16.091429-91.611429 63.341714-91.611429 121.197714 0 73.910857 54.966857 124.379429 135.314286 124.379429z m275.456 117.028571h-66.523428l28.598857-54.674285c3.876571-6.729143 0.950857-12.214857-6.107429-12.214857h-72.96c-8.996571 0-11.885714 3.547429-14.774857 9.984l-42.130286 95.122285c-3.181714 7.716571 0 12.873143 8.374857 12.873143h55.296l-41.801142 101.229714c-1.938286 4.205714-0.950857 7.716571 1.938285 9.033143 3.218286 0.950857 6.436571 0.292571 9.947429-3.218285l144.969143-142.409143c6.765714-6.729143 4.169143-15.725714-4.827429-15.725715z",
|
|
187
187
|
"icon-a-arrowtriangleleftfillandlineverticalandarro": "M512 840.411429c15.104 0 28.269714-11.264 28.269714-26.697143V185.965714c0-15.433143-13.165714-26.989714-28.269714-26.989714-14.774857 0-28.269714 11.556571-28.269714 26.989714V813.714286c0 15.433143 13.165714 26.697143 28.269714 26.697143z m227.254857-147.236572l247.186286-151.04c34.706286-21.211429 35.035429-63.341714 0-84.553143l-247.222857-151.076571c-36.608-22.198857-72.923429-4.169143-72.923429 38.253714v310.162286c0 43.081143 36.937143 59.794286 72.96 38.253714z m-701.696-151.04l246.857143 151.04c36.022857 21.540571 72.96 4.827429 72.96-38.253714V344.758857c0-42.422857-36.315429-60.452571-72.96-38.253714l-246.857143 151.04c-35.328 21.211429-34.706286 63.341714 0 84.553143z",
|
|
188
188
|
"icon-a-checkmarkicloudfill": "M743.424 755.2c100.278857 0 179.346286-73.581714 179.346286-165.522286 0-68.132571-38.875429-128.877714-102.838857-155.574857 0.329143-145.590857-104.484571-250.404571-239.177143-250.404571-85.467429 0-149.76 44.361143-189.952 102.546285C309.174857 264.411429 223.378286 325.156571 220.16 415.817143c-73.618286 13.165714-118.930286 79.396571-118.930286 159.744 0 98.048 85.467429 179.675429 197.997715 179.675428h444.196571z m-254.902857-131.766857c-11.556571 0-20.845714-5.12-28.891429-15.433143l-72.045714-89.051429a33.060571 33.060571 0 0 1-8.045714-21.211428c0-16.384 12.873143-28.598857 28.635428-28.598857 9.984 0 18.322286 4.498286 24.429715 12.873143l54.637714 69.741714 107.702857-178.724572c6.107429-10.276571 15.396571-16.091429 25.380571-16.091428 16.091429 0 29.549714 11.922286 29.549715 27.355428 0 7.387429-3.84 15.104-7.387429 20.882286l-126.317714 202.166857c-6.436571 10.313143-16.384 16.091429-27.648 16.091429z"
|
|
189
|
-
}
|
|
189
|
+
}
|
package/lib/Icon/props.d.ts
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { BaseProps } from '../types';
|
|
2
2
|
import { TouchEventHandler } from '@ray-js/framework-shared';
|
|
3
3
|
export interface IconProps extends BaseProps, TouchEventHandler {
|
|
4
|
+
/**
|
|
5
|
+
* @description.en type
|
|
6
|
+
* @description.zh 图标类型,类型名
|
|
7
|
+
* @default undefined
|
|
8
|
+
*/
|
|
4
9
|
type: IconFontName;
|
|
10
|
+
/**
|
|
11
|
+
* @description.en icon size (px)
|
|
12
|
+
* @description.zh 图标大小,单位 px
|
|
13
|
+
* @default 16
|
|
14
|
+
*/
|
|
5
15
|
size?: number;
|
|
16
|
+
/**
|
|
17
|
+
* @description.en icon color
|
|
18
|
+
* @description.zh 图标颜色
|
|
19
|
+
* @default #333333
|
|
20
|
+
*/
|
|
6
21
|
color?: string;
|
|
7
22
|
}
|
|
8
23
|
export declare const defaultIconProps: IconProps;
|
package/lib/Image/props.d.ts
CHANGED
|
@@ -3,17 +3,43 @@ import { TouchEventHandler } from '@ray-js/framework-shared';
|
|
|
3
3
|
import { GenericEvent as WxEvent } from '@remax/wechat';
|
|
4
4
|
import { ImageLoadEventData as RnLoadEvent } from 'react-native';
|
|
5
5
|
export interface ImageProps extends BaseProps, TouchEventHandler {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* @description.en image source uri
|
|
8
|
+
* @description.zh 图片地址
|
|
9
|
+
* @default undefined
|
|
10
|
+
*/
|
|
7
11
|
src: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description.en mode
|
|
14
|
+
* @description.zh 图片裁剪、缩放的模式,RN 支持部分模式
|
|
15
|
+
* @default 'scaleToFill'
|
|
16
|
+
*/
|
|
8
17
|
mode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom right' | 'bottom left';
|
|
9
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* @description.en Triggered when the image has finished loading
|
|
20
|
+
* @description.zh 当图片载入完毕时触发
|
|
21
|
+
* @default undefined
|
|
22
|
+
*/
|
|
10
23
|
onLoad?: (e: {
|
|
11
|
-
|
|
24
|
+
/**
|
|
25
|
+
* @description.en width
|
|
26
|
+
* @description.zh 宽度
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
12
29
|
width: number;
|
|
30
|
+
/**
|
|
31
|
+
* @description.en height
|
|
32
|
+
* @description.zh 高度
|
|
33
|
+
* @default undefined
|
|
34
|
+
*/
|
|
13
35
|
height: number;
|
|
14
36
|
origin: RnLoadEvent | WxEvent;
|
|
15
37
|
}) => any;
|
|
16
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* @description.en Triggered when an error occurs
|
|
40
|
+
* @description.zh 当错误发生时触发
|
|
41
|
+
* @default undefined
|
|
42
|
+
*/
|
|
17
43
|
onError?: (e: {
|
|
18
44
|
errMsg: string;
|
|
19
45
|
origin: null | WxEvent;
|
package/lib/Input/props.d.ts
CHANGED
|
@@ -3,32 +3,135 @@ import { TextInputChangeEventData as RnInputChangeEvent, NativeSyntheticEvent, T
|
|
|
3
3
|
import { GenericEvent as WxEvent } from '@remax/wechat';
|
|
4
4
|
export declare type InputType = 'text' | 'number' | 'digit' | 'idcard';
|
|
5
5
|
export interface InputProps extends BaseProps {
|
|
6
|
+
/**
|
|
7
|
+
* @description.en content
|
|
8
|
+
* @description.zh 内容
|
|
9
|
+
* @default undefined
|
|
10
|
+
*/
|
|
6
11
|
value?: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description.en type
|
|
14
|
+
* @description.zh 类型
|
|
15
|
+
* @default text
|
|
16
|
+
*/
|
|
7
17
|
type?: InputType;
|
|
18
|
+
/**
|
|
19
|
+
* @description.en is password
|
|
20
|
+
* @description.zh 是否为密码
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
8
23
|
password?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @description.en placeholder
|
|
26
|
+
* @description.zh 占位内容
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
9
29
|
placeholder?: string;
|
|
30
|
+
/**
|
|
31
|
+
* @description.en disabled
|
|
32
|
+
* @description.zh 是否禁用
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
10
35
|
disabled?: boolean;
|
|
11
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* @description.en Maximum input length. When the value is set to -1, the maximum input length is not limited
|
|
38
|
+
* @description.zh 最大输入长度,设置为 -1 的时候不限制最大长度
|
|
39
|
+
* @default undefined
|
|
40
|
+
*/
|
|
12
41
|
maxLength?: number;
|
|
42
|
+
/**
|
|
43
|
+
* @description.en 获Get focus取焦点
|
|
44
|
+
* @description.zh 获取焦点
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
13
47
|
focus?: boolean;
|
|
14
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* @description.en Set the text of the button in the lower right corner of the keyboard, effective only when type='text'
|
|
50
|
+
* @description.zh 设置键盘右下角按钮的文字,仅在type='text'时生效
|
|
51
|
+
* @default done
|
|
52
|
+
*/
|
|
15
53
|
confirmType?: 'send' | 'search' | 'next' | 'go' | 'done';
|
|
54
|
+
/**
|
|
55
|
+
* @description.en Start position of the cursor. This parameter is valid for automatic clustering and must be used with Selection End
|
|
56
|
+
* @description.zh 光标起始位置,自动聚集时有效,需与 selectionEnd 搭配使用
|
|
57
|
+
* @default -1
|
|
58
|
+
*/
|
|
16
59
|
selectionStart?: number;
|
|
60
|
+
/**
|
|
61
|
+
* @description.en End cursor position. This parameter is valid for automatic clustering and must be used with Selection Start
|
|
62
|
+
* @description.zh 光标结束位置,自动聚集时有效,需与 selectionStart 搭配使用
|
|
63
|
+
* @default -1
|
|
64
|
+
*/
|
|
17
65
|
selectionEnd?: number;
|
|
66
|
+
/**
|
|
67
|
+
* @description.en Specifies the cursor position for focus
|
|
68
|
+
* @description.zh 指定 focus 时的光标位置
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
18
71
|
cursor?: number;
|
|
72
|
+
/**
|
|
73
|
+
* @description.en Input events
|
|
74
|
+
* @description.zh 输入事件
|
|
75
|
+
* @default undefined
|
|
76
|
+
*/
|
|
19
77
|
onInput?: (event: {
|
|
78
|
+
/**
|
|
79
|
+
* @description.en type
|
|
80
|
+
* @description.zh 类型
|
|
81
|
+
* @default undefined
|
|
82
|
+
*/
|
|
20
83
|
type: string;
|
|
84
|
+
/**
|
|
85
|
+
* @description.en value
|
|
86
|
+
* @description.zh 价值
|
|
87
|
+
* @default undefined
|
|
88
|
+
*/
|
|
21
89
|
value: string;
|
|
22
90
|
origin: RnInputChangeEvent | WxEvent | Event;
|
|
23
91
|
}) => void;
|
|
92
|
+
/**
|
|
93
|
+
* @description.en onConfirm
|
|
94
|
+
* @description.zh 确认事件
|
|
95
|
+
* @default undefined
|
|
96
|
+
*/
|
|
24
97
|
onConfirm?: (event: any) => void;
|
|
98
|
+
/**
|
|
99
|
+
* @description.en onFocus
|
|
100
|
+
* @description.zh 焦点事件
|
|
101
|
+
* @default undefined
|
|
102
|
+
*/
|
|
25
103
|
onFocus?: (event: {
|
|
104
|
+
/**
|
|
105
|
+
* @description.en type
|
|
106
|
+
* @description.zh 类型
|
|
107
|
+
* @default undefined
|
|
108
|
+
*/
|
|
26
109
|
type: string;
|
|
110
|
+
/**
|
|
111
|
+
* @description.en value
|
|
112
|
+
* @description.zh 价值
|
|
113
|
+
* @default undefined
|
|
114
|
+
*/
|
|
27
115
|
value: string;
|
|
28
116
|
origin: NativeSyntheticEvent<TextInputFocusEventData> | WxEvent | FocusEvent;
|
|
29
117
|
}) => void;
|
|
118
|
+
/**
|
|
119
|
+
* @description.en onBlur
|
|
120
|
+
* @description.zh 丢焦事件
|
|
121
|
+
* @default undefined
|
|
122
|
+
*/
|
|
30
123
|
onBlur?: (event: {
|
|
124
|
+
/**
|
|
125
|
+
* @description.en type
|
|
126
|
+
* @description.zh 类型
|
|
127
|
+
* @default undefined
|
|
128
|
+
*/
|
|
31
129
|
type: string;
|
|
130
|
+
/**
|
|
131
|
+
* @description.en value
|
|
132
|
+
* @description.zh 价值
|
|
133
|
+
* @default undefined
|
|
134
|
+
*/
|
|
32
135
|
value: string;
|
|
33
136
|
origin: NativeSyntheticEvent<TextInputFocusEventData> | WxEvent | FocusEvent;
|
|
34
137
|
}) => void;
|
package/lib/Label/props.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BaseProps } from '../types';
|
|
3
2
|
export interface LabelProps extends BaseProps {
|
|
4
3
|
/**
|
|
5
|
-
* @description.en
|
|
6
|
-
* @description.zh
|
|
7
|
-
* @default
|
|
4
|
+
* @description.en htmlFor
|
|
5
|
+
* @description.zh htmlfor
|
|
6
|
+
* @default undefined
|
|
8
7
|
*/
|
|
9
8
|
htmlFor?: string;
|
|
10
|
-
children?: React.ReactNode;
|
|
11
9
|
}
|
|
@@ -4,6 +4,7 @@ nav:
|
|
|
4
4
|
path: /components
|
|
5
5
|
group:
|
|
6
6
|
title: 视图容器
|
|
7
|
+
hide: true
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# LinearGradient
|
|
@@ -13,7 +14,7 @@ LinearGradient 主要是给子节点提供一个线性渐变的效果。
|
|
|
13
14
|
## 导入
|
|
14
15
|
|
|
15
16
|
```js
|
|
16
|
-
import { LinearGradient } from '@ray-js/components'
|
|
17
|
+
import { LinearGradient } from '@ray-js/components'
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
## 示例代码
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseProps } from '../types';
|
|
3
3
|
export interface LinearGradientProps extends BaseProps {
|
|
4
|
+
/**
|
|
5
|
+
* @description.en width
|
|
6
|
+
* @description.zh 宽度
|
|
7
|
+
* @default 300
|
|
8
|
+
*/
|
|
4
9
|
width: number;
|
|
10
|
+
/**
|
|
11
|
+
* @description.en height
|
|
12
|
+
* @description.zh 高度
|
|
13
|
+
* @default 300
|
|
14
|
+
*/
|
|
5
15
|
height: number;
|
|
6
16
|
/**
|
|
7
17
|
* @description.zh 起始点的x轴坐标
|
package/lib/Modal/index.md
CHANGED
package/lib/Modal/props.d.ts
CHANGED
|
@@ -5,12 +5,47 @@ export interface ITYModalProps extends IModalProps {
|
|
|
5
5
|
children: JSX.Element[];
|
|
6
6
|
}
|
|
7
7
|
export interface IModalProps extends BaseProps {
|
|
8
|
+
/**
|
|
9
|
+
* @description.en Whether to display the dialog box
|
|
10
|
+
* @description.zh 是否显示弹框
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
8
13
|
show: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @description.en Whether a mask is displayed
|
|
16
|
+
* @description.zh 是否显示遮罩
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
9
19
|
overlay?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @description.en Click on the mask to trigger the event
|
|
22
|
+
* @description.zh 点击蒙层触发事件
|
|
23
|
+
* @default undefined
|
|
24
|
+
*/
|
|
10
25
|
onClickOverlay?: (event: {
|
|
26
|
+
/**
|
|
27
|
+
* @description.en type
|
|
28
|
+
* @description.zh 类型
|
|
29
|
+
* @default undefined
|
|
30
|
+
*/
|
|
11
31
|
type: 'clickoverlay';
|
|
12
32
|
}) => void;
|
|
33
|
+
/**
|
|
34
|
+
* @description.en Custom mask layer styles
|
|
35
|
+
* @description.zh 自定义遮罩层样式
|
|
36
|
+
* @default undefined
|
|
37
|
+
*/
|
|
13
38
|
overlayStyle?: React.CSSProperties;
|
|
39
|
+
/**
|
|
40
|
+
* @description.en Custom pop-up layer styles
|
|
41
|
+
* @description.zh 自定义弹出层样式
|
|
42
|
+
* @default undefined
|
|
43
|
+
*/
|
|
14
44
|
customStyle?: React.CSSProperties;
|
|
45
|
+
/**
|
|
46
|
+
* @description.en Pop-up layer pop-up position
|
|
47
|
+
* @description.zh 弹出层弹出位置
|
|
48
|
+
* @default center
|
|
49
|
+
*/
|
|
15
50
|
position?: 'top' | 'center' | 'bottom';
|
|
16
51
|
}
|
package/lib/Motion/index.md
CHANGED
package/lib/Motion/props.d.ts
CHANGED
package/lib/Picker/index.md
CHANGED
package/lib/Picker/props.d.ts
CHANGED
|
@@ -1,31 +1,94 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BaseProps } from '../types';
|
|
3
2
|
import { TouchEventHandler } from '@ray-js/framework-shared';
|
|
4
3
|
declare type ChangeEvent = (e: {
|
|
4
|
+
/**
|
|
5
|
+
* @description.en type
|
|
6
|
+
* @description.zh 类型
|
|
7
|
+
* @default undefined
|
|
8
|
+
*/
|
|
5
9
|
type: 'change';
|
|
10
|
+
/**
|
|
11
|
+
* @description.en value
|
|
12
|
+
* @description.zh value
|
|
13
|
+
* @default undefined
|
|
14
|
+
*/
|
|
6
15
|
value: number | number[];
|
|
7
16
|
origin?: any;
|
|
8
17
|
}) => void;
|
|
9
18
|
declare type CancelEvent = (e: {
|
|
19
|
+
/**
|
|
20
|
+
* @description.en type
|
|
21
|
+
* @description.zh 类型
|
|
22
|
+
* @default undefined
|
|
23
|
+
*/
|
|
10
24
|
type: 'cancel';
|
|
11
25
|
origin: any;
|
|
12
26
|
}) => void;
|
|
13
27
|
declare type ColumnChangeEvent = (e: {
|
|
28
|
+
/**
|
|
29
|
+
* @description.en type
|
|
30
|
+
* @description.zh 类型
|
|
31
|
+
* @default undefined
|
|
32
|
+
*/
|
|
14
33
|
type: 'columnchange';
|
|
34
|
+
/**
|
|
35
|
+
* @description.en value
|
|
36
|
+
* @description.zh value
|
|
37
|
+
* @default undefined
|
|
38
|
+
*/
|
|
15
39
|
value: number;
|
|
16
40
|
column: number;
|
|
17
41
|
origin: any;
|
|
18
42
|
}) => void;
|
|
19
43
|
export interface PickerProps extends BaseProps, TouchEventHandler {
|
|
44
|
+
/**
|
|
45
|
+
* @description.en disabled
|
|
46
|
+
* @description.zh 是否禁用
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
20
49
|
disabled?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* @description.en Option data source
|
|
52
|
+
* @description.zh 选择项数据源
|
|
53
|
+
* @default undefined
|
|
54
|
+
*/
|
|
21
55
|
range: string[] | string[][];
|
|
56
|
+
/**
|
|
57
|
+
* @description.en Indicates the number in the range selected (subscripts start at 0)
|
|
58
|
+
* @description.zh 表示选择了 range 中的第几个(下标从 0 开始)
|
|
59
|
+
* @default 0
|
|
60
|
+
*/
|
|
22
61
|
value?: number[] | number;
|
|
62
|
+
/**
|
|
63
|
+
* @description.en onChange
|
|
64
|
+
* @description.zh 点击触发
|
|
65
|
+
* @default undefined
|
|
66
|
+
*/
|
|
23
67
|
onChange?: ChangeEvent;
|
|
68
|
+
/**
|
|
69
|
+
* @description.en onCancel
|
|
70
|
+
* @description.zh 取消选择时触发
|
|
71
|
+
* @default undefined
|
|
72
|
+
*/
|
|
24
73
|
onCancel?: CancelEvent;
|
|
74
|
+
/**
|
|
75
|
+
* @description.en onColumnChange
|
|
76
|
+
* @description.zh 列改变时触发
|
|
77
|
+
* @default undefined
|
|
78
|
+
*/
|
|
25
79
|
onColumnChange?: ColumnChangeEvent;
|
|
80
|
+
/**
|
|
81
|
+
* @description.en confirmText
|
|
82
|
+
* @description.zh 确认文本
|
|
83
|
+
* @default 确认
|
|
84
|
+
*/
|
|
26
85
|
confirmText?: string;
|
|
86
|
+
/**
|
|
87
|
+
* @description.en cancelText
|
|
88
|
+
* @description.zh 取消文本
|
|
89
|
+
* @default 取消
|
|
90
|
+
*/
|
|
27
91
|
cancelText?: string;
|
|
28
|
-
children?: React.ReactNode | string;
|
|
29
92
|
}
|
|
30
93
|
export declare const IDefaultPickerProps: {
|
|
31
94
|
cancelText: string;
|
|
@@ -1,13 +1,40 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BaseProps } from '../types';
|
|
3
2
|
export interface PickerViewProps extends BaseProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description.en Indicates the number in the range selected (subscripts start at 0)
|
|
5
|
+
* @description.zh 表示选择了 range 中的第几个(下标从 0 开始)
|
|
6
|
+
* @default 0
|
|
7
|
+
*/
|
|
4
8
|
value?: number | number[];
|
|
9
|
+
/**
|
|
10
|
+
* @description.en Selector font size
|
|
11
|
+
* @description.zh 选择器字体大小
|
|
12
|
+
* @default undefined
|
|
13
|
+
*/
|
|
5
14
|
fontSize?: number;
|
|
15
|
+
/**
|
|
16
|
+
* @description.en Option data source
|
|
17
|
+
* @description.zh 选择项数据源
|
|
18
|
+
* @default undefined
|
|
19
|
+
*/
|
|
6
20
|
range?: string[] | string[][];
|
|
21
|
+
/**
|
|
22
|
+
* @description.en onChange
|
|
23
|
+
* @description.zh 选择时触发
|
|
24
|
+
* @default undefined
|
|
25
|
+
*/
|
|
7
26
|
onChange?: (e: {
|
|
27
|
+
/**
|
|
28
|
+
* @description.en type
|
|
29
|
+
* @description.zh 类型
|
|
30
|
+
* @default undefined
|
|
31
|
+
*/
|
|
8
32
|
type: 'change';
|
|
33
|
+
/**
|
|
34
|
+
* @description.en value
|
|
35
|
+
* @description.zh 价值
|
|
36
|
+
* @default undefined
|
|
37
|
+
*/
|
|
9
38
|
value: number | number[];
|
|
10
|
-
origin?: any;
|
|
11
39
|
}) => void;
|
|
12
|
-
children?: React.ReactNode;
|
|
13
40
|
}
|
|
@@ -4,6 +4,7 @@ nav:
|
|
|
4
4
|
path: /components
|
|
5
5
|
group:
|
|
6
6
|
title: 视图容器
|
|
7
|
+
hide: true
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# RadialGradient
|
|
@@ -13,7 +14,7 @@ RadialGradient 为径向渐变,与线性渐变相似,只是它是从一个
|
|
|
13
14
|
## 导入
|
|
14
15
|
|
|
15
16
|
```js
|
|
16
|
-
import { RadialGradient } from '@ray-js/components'
|
|
17
|
+
import { RadialGradient } from '@ray-js/components'
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
## 示例代码
|
|
@@ -5,7 +5,17 @@ interface StopsProps {
|
|
|
5
5
|
stopColor: string;
|
|
6
6
|
}
|
|
7
7
|
export interface RadialGradientProps extends BaseProps {
|
|
8
|
+
/**
|
|
9
|
+
* @description.en width
|
|
10
|
+
* @description.zh 宽度
|
|
11
|
+
* @default undefined
|
|
12
|
+
*/
|
|
8
13
|
width: number;
|
|
14
|
+
/**
|
|
15
|
+
* @description.en height
|
|
16
|
+
* @description.zh 高度
|
|
17
|
+
* @default undefined
|
|
18
|
+
*/
|
|
9
19
|
height: number;
|
|
10
20
|
/**
|
|
11
21
|
* @description.zh 最外侧圆的x轴坐标点
|
package/lib/Radio/props.d.ts
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
import { BaseProps, TouchEventHandler } from '../types';
|
|
2
2
|
export interface RadioProps extends BaseProps, TouchEventHandler {
|
|
3
|
+
/**
|
|
4
|
+
* @description.en Radio id. When the radio is selected, the radio.group change event carries the value of the radio
|
|
5
|
+
* @description.zh radio 标识。当该 radio 选中时,Radio.Group 的 change 事件会携带 radio 的 value
|
|
6
|
+
* @default undefined
|
|
7
|
+
*/
|
|
3
8
|
value?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @description.en Whether it is currently selected can be set to default
|
|
11
|
+
* @description.zh 当前是否选中,可用来设置默认选中
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
4
14
|
checked?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @description.en disabled
|
|
17
|
+
* @description.zh 是否禁用
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
5
20
|
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* @description.en color
|
|
23
|
+
* @description.zh 颜色
|
|
24
|
+
* @default '#007AFF'
|
|
25
|
+
*/
|
|
6
26
|
color?: string;
|
|
7
27
|
}
|
|
@@ -1,16 +1,44 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { BaseProps, TouchEventHandler } from '../types';
|
|
3
2
|
import { RadioProps } from '../Radio/props';
|
|
4
3
|
export declare type RadioGroupOption = RadioProps & {
|
|
5
4
|
label: string;
|
|
6
5
|
};
|
|
7
6
|
export interface RadioGroupProps extends BaseProps, TouchEventHandler {
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @description.en options
|
|
9
|
+
* @description.zh 组项
|
|
10
|
+
* @default undefined
|
|
11
|
+
*/
|
|
12
|
+
options: RadioGroupOption[];
|
|
13
|
+
/**
|
|
14
|
+
* @description.en name
|
|
15
|
+
* @description.zh 姓名
|
|
16
|
+
* @default undefined
|
|
17
|
+
*/
|
|
9
18
|
name?: string;
|
|
19
|
+
/**
|
|
20
|
+
* @description.en disabled
|
|
21
|
+
* @description.zh 是否禁用
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
10
24
|
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @description.en onChange
|
|
27
|
+
* @description.zh 选中项发生改变时触发 change 事件
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
11
30
|
onChange?: (event: {
|
|
31
|
+
/**
|
|
32
|
+
* @description.en type
|
|
33
|
+
* @description.zh 类型
|
|
34
|
+
* @default undefined
|
|
35
|
+
*/
|
|
12
36
|
type: 'change';
|
|
37
|
+
/**
|
|
38
|
+
* @description.en value
|
|
39
|
+
* @description.zh 价值
|
|
40
|
+
* @default undefined
|
|
41
|
+
*/
|
|
13
42
|
value: string[];
|
|
14
43
|
}) => void;
|
|
15
|
-
children?: React.ReactNode;
|
|
16
44
|
}
|