@fairys/taro-tools-simple-form 0.0.1 → 0.0.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/package.json
CHANGED
|
@@ -9,6 +9,8 @@ export interface FairysTaroCascaderProps
|
|
|
9
9
|
labelInValue?: boolean;
|
|
10
10
|
value?: (string | number | CascaderOption)[];
|
|
11
11
|
onChange?: (value: (string | number | CascaderOption)[], pathNodes: CascaderOption[]) => void;
|
|
12
|
+
bodyClassName?: string;
|
|
13
|
+
bodyStyle?: React.CSSProperties;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
export const FairysTaroCascaderBase = (props: FairysTaroCascaderProps) => {
|
|
@@ -21,6 +23,8 @@ export const FairysTaroCascaderBase = (props: FairysTaroCascaderProps) => {
|
|
|
21
23
|
labelInValue = true,
|
|
22
24
|
options,
|
|
23
25
|
optionKey,
|
|
26
|
+
bodyClassName,
|
|
27
|
+
bodyStyle,
|
|
24
28
|
...rest
|
|
25
29
|
} = props;
|
|
26
30
|
const [visible, setVisible] = useState(false);
|
|
@@ -101,6 +105,8 @@ export const FairysTaroCascaderBase = (props: FairysTaroCascaderProps) => {
|
|
|
101
105
|
</Text>
|
|
102
106
|
<Cascader
|
|
103
107
|
{...rest}
|
|
108
|
+
className={`fairys-taro-cascader-body fairystaroform__text-left ${bodyClassName || ''}`}
|
|
109
|
+
style={bodyStyle}
|
|
104
110
|
optionKey={optionKey}
|
|
105
111
|
options={options}
|
|
106
112
|
value={_value}
|
|
@@ -7,10 +7,12 @@ export interface FairysTaroPickerProps extends Omit<Partial<TaroPickerProps>, 'v
|
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
value?: PickerOptions;
|
|
9
9
|
onChange?: (value: PickerOptions) => void;
|
|
10
|
+
bodyClassName?: string;
|
|
11
|
+
bodyStyle?: React.CSSProperties;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export const FairysTaroPickerBase = (props: FairysTaroPickerProps) => {
|
|
13
|
-
const { placeholder = '请选择', className, style, value, onChange, ...rest } = props;
|
|
15
|
+
const { placeholder = '请选择', bodyClassName, bodyStyle, className, style, value, onChange, ...rest } = props;
|
|
14
16
|
|
|
15
17
|
const [visible, setVisible] = useState(false);
|
|
16
18
|
|
|
@@ -42,6 +44,8 @@ export const FairysTaroPickerBase = (props: FairysTaroPickerProps) => {
|
|
|
42
44
|
</Text>
|
|
43
45
|
<Picker
|
|
44
46
|
{...rest}
|
|
47
|
+
className={`fairys-taro-picker-body fairystaroform__text-left ${bodyClassName || ''}`}
|
|
48
|
+
style={bodyStyle}
|
|
45
49
|
value={_value}
|
|
46
50
|
visible={visible}
|
|
47
51
|
onClose={() => setVisible(false)}
|