Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"dependencies": {
"@rc-component/input": "~1.3.0",
"@rc-component/menu": "~1.2.0",
"@rc-component/textarea": "~1.2.0",
"@rc-component/trigger": "^3.0.0",
"@rc-component/util": "^1.3.0",
"clsx": "^2.1.1"
Expand Down
5 changes: 2 additions & 3 deletions src/Mentions.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { clsx } from 'clsx';
import { BaseInput } from '@rc-component/input';
import { BaseInput, TextArea } from '@rc-component/input';
import type { HolderRef } from '@rc-component/input/lib/BaseInput';
import type { CommonInputProps } from '@rc-component/input/lib/interface';
import type { TextAreaProps, TextAreaRef } from '@rc-component/textarea';
import TextArea from '@rc-component/textarea';
import type { TextAreaProps, TextAreaRef } from '@rc-component/input';
Comment on lines +2 to +5

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

为了提高代码可读性并避免冗余的导入语句,可以将 TextAreaPropsTextAreaRef 的类型导入与 @rc-component/input 的值导入合并。

Suggested change
import { BaseInput, TextArea } from '@rc-component/input';
import type { HolderRef } from '@rc-component/input/lib/BaseInput';
import type { CommonInputProps } from '@rc-component/input/lib/interface';
import type { TextAreaProps, TextAreaRef } from '@rc-component/textarea';
import TextArea from '@rc-component/textarea';
import type { TextAreaProps, TextAreaRef } from '@rc-component/input';
import { BaseInput, TextArea, type TextAreaProps, type TextAreaRef } from '@rc-component/input';
import type { HolderRef } from '@rc-component/input/lib/BaseInput';
import type { CommonInputProps } from '@rc-component/input/lib/interface';

import toArray from '@rc-component/util/lib/Children/toArray';
import useControlledState from '@rc-component/util/lib/hooks/useControlledState';
import KeyCode from '@rc-component/util/lib/KeyCode';
Expand Down
Loading