11import { IUseListenTriggerInfo } from './use_listen_visual_height' ;
2- import { HTMLAttributes , ReactElement , ReactNode } from 'react' ;
2+ import React , { HTMLAttributes , ReactElement , ReactNode } from 'react' ;
33
44export interface IListDeprecateProps {
5-
65 /**
7- * @description 每个选项包裹的组件,
8- * 也就是绑定在 CommonList 组件上的静态组件
9- * @type {ReactElement[] }
6+ * Child element
107 */
118 children : ReactElement [ ] ;
129
1310 /**
14- * @description 点击每个选项的处理函数
15- * @param {(React.MouseEvent | null) } e
16- * @param {number } index
11+ * click handler
1712 */
1813 onClick ( e : React . MouseEvent | null , index : number ) : void
1914
2015 /**
21- * @description 没有数据时的提示
16+ * Tips when data is empty
2217 */
2318 noDataTip ?: string | ( ( ) => ReactNode )
2419
2520 /**
26- * @description 组件底部区域的选软组件
21+ * Footer components
2722 */
2823 footerComponent ?: ( ) => ReactNode ;
2924
3025 className ?: string ;
3126 style ?: React . CSSProperties
3227
3328 /**
34- * @description 当前正在聚焦的 item 的位置,原本这个参数由组件内部控制,但是在 draft 中,需要维护编辑器自己的 index,因此需要像组件内部传入
35- * @type {number }
29+ * The position of the item currently being focused
3630 */
3731 activeIndex ?: number
3832
39- /**
40- *
41- */
4233 searchProps ?: ISearchProps
4334
4435 triggerInfo ?: IUseListenTriggerInfo ;
@@ -49,16 +40,12 @@ export interface IListDeprecateProps {
4940export interface IListItemProps extends HTMLAttributes < HTMLDivElement > {
5041
5142 /**
52- * @description 当前选项的下标
53- * @type {number }
43+ * Current option index
5444 */
5545 currentIndex : number ;
5646
5747 /**
58- * @description 在选项排序的时候会需要包裹一层其他的组件,但是对于内部不好处理
59- * 所以可以通过这个属性传入一个包裹的函数
60- * @param {* } children
61- * @returns {ReactNode }
48+ * Wrapper component
6249 */
6350 wrapperComponent ?( children : ReactNode ) : ReactNode
6451
@@ -67,32 +54,29 @@ export interface IListItemProps extends HTMLAttributes<HTMLDivElement> {
6754
6855export interface ISearchProps {
6956 /**
70- * @description 给 Input 组件绑定的引用,用来 focus
71- * @type {React.RefObject<IInputRef> }
57+ * Input reference
7258 */
7359 inputRef ?: React . RefObject < HTMLInputElement > ;
7460
7561 /**
76- * @description 自定义输入框的样式
77- * @type {React.CSSProperties }
62+ * Custom inline styles
7863 */
7964 style ?: React . CSSProperties
8065
8166 /**
82- * @description input 的提示语
83- * @type {string }
67+ * Input placeholder
8468 */
8569 placeholder ?: string
8670
8771 /**
88- * @description input 按下 Enter 键的回调函数
89- * @param {() => void } clearKeyword 组件内部传入的处理函数,可以在这里处理一些组件内部的操作
90- * 比如清除输入框内的数据
72+ * @description input enter event callback
73+ * @param {() => void } clearKeyword is the processing function passed in from the component,
74+ * where you can process some operations inside the component
9175 */
9276 onInputEnter ?( clearKeyword : ( ) => void ) : void
9377
9478 /**
95- * @description 输入内容后的回调
79+ * @description Search input callback
9680 * @param {React.ChangeEvent } e
9781 * @param {string } keyword
9882 */
0 commit comments