Skip to content

Commit 6c65c62

Browse files
committed
fix lint
1 parent 4882c48 commit 6c65c62

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

examples/form.tsx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const errorStyle = {
2121
};
2222

2323
class TreeSelectInput extends Component<{
24-
onChange?: Function;
24+
onChange?: (value: string[]) => void;
2525
style: React.CSSProperties;
2626
}> {
2727
onChange = (value, ...args) => {
@@ -105,11 +105,7 @@ const Demo = () => {
105105
>
106106
{(control, { errors }) => (
107107
<div>
108-
<TreeSelectInput
109-
{...tProps}
110-
{...control}
111-
style={{ width: 300 }}
112-
/>
108+
<TreeSelectInput {...tProps} {...control} style={{ width: 300 }} />
113109

114110
<p style={errorStyle}>{errors.join(',')}</p>
115111
</div>
@@ -122,18 +118,11 @@ const Demo = () => {
122118
<div>
123119
<Field
124120
name="select"
125-
rules={[
126-
{ required: true, type: 'array', message: 'select 需要必填' },
127-
]}
121+
rules={[{ required: true, type: 'array', message: 'select 需要必填' }]}
128122
>
129123
{(control, { errors }) => (
130124
<div>
131-
<Select
132-
style={{ width: 200 }}
133-
{...control}
134-
allowClear
135-
mode="multiple"
136-
>
125+
<Select style={{ width: 200 }} {...control} allowClear mode="multiple">
137126
<Option value="jack">jack</Option>
138127
<Option value="lucy">lucy</Option>
139128
<Option value="disabled" disabled>

src/utils/strategyUtil.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type * as React from 'react';
21
import type { InternalFieldName } from '../TreeSelect';
32
import type { DataEntity } from 'rc-tree/lib/interface';
43
import type { SafeKey } from '../interface';

src/utils/valueUtil.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type * as React from 'react';
21
import type { DataNode, FieldNames, SafeKey } from '../interface';
32
import type { DefaultOptionType, InternalFieldName } from '../TreeSelect';
43

0 commit comments

Comments
 (0)