Skip to content

Commit

Permalink
chore: fix docs (#2877)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored May 4, 2024
1 parent 2a7e8fe commit e0f49a9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/checkbox/checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name | String | - | HTML 元素原生属性 | N
readonly | Boolean | false | 只读状态 | N
value | String / Number / Boolean | - | 多选框的值。TS 类型:`string \| number \| boolean` | N
onChange | Function | | TS 类型:`(checked: boolean, context: { e: ChangeEvent }) => void`<br/>值变化时触发 | N
onClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击时出发,一般用于外层阻止冒泡场景 | N
onClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击时触发,一般用于外层阻止冒泡场景 | N

### CheckboxGroup Props

Expand Down
2 changes: 1 addition & 1 deletion src/checkbox/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface TdCheckboxProps {
*/
onChange?: (checked: boolean, context: { e: ChangeEvent<HTMLInputElement> }) => void;
/**
* 点击时出发,一般用于外层阻止冒泡场景
* 点击时触发,一般用于外层阻止冒泡场景
*/
onClick?: (context: { e: MouseEvent<HTMLLabelElement> }) => void;
}
Expand Down
2 changes: 1 addition & 1 deletion src/radio/radio.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ label | TNode | - | 主文案。TS 类型:`string \| TNode`。[通用类型定
name | String | - | HTML 元素原生属性 | N
value | String / Number / Boolean | undefined | 单选按钮的值。TS 类型:`T` | N
onChange | Function | | TS 类型:`(checked: boolean, context: { e: ChangeEvent }) => void`<br/>选中状态变化时触发 | N
onClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击时出发,一般用于外层阻止冒泡场景 | N
onClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击时触发,一般用于外层阻止冒泡场景 | N

### RadioGroup Props

Expand Down
2 changes: 1 addition & 1 deletion src/radio/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export interface TdRadioProps<T = RadioValue> {
*/
onChange?: (checked: boolean, context: { e: ChangeEvent<HTMLDivElement> }) => void;
/**
* 点击时出发,一般用于外层阻止冒泡场景
* 点击触发,一般用于外层阻止冒泡场景
*/
onClick?: (context: { e: MouseEvent<HTMLLabelElement> }) => void;
}
Expand Down
2 changes: 1 addition & 1 deletion src/select/hooks/usePanelVirtualScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const usePanelVirtualScroll = ({ popupContentRef, scroll, options, size }: Panel
}
const target = e.target as HTMLElement;
const top = target.scrollTop;
// 排除横向滚动出发的纵向虚拟滚动计算
// 排除横向滚动触发的纵向虚拟滚动计算
if (Math.abs(lastScrollY - top) > 5) {
handleVirtualScroll();
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down
2 changes: 1 addition & 1 deletion src/table/BaseTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const BaseTable = forwardRef<BaseTableRef, BaseTableProps>((originalProps, ref)
const onInnerVirtualScroll = (e: WheelEvent<HTMLDivElement>) => {
const target = e.target as HTMLElement;
const top = target.scrollTop;
// 排除横向滚动出发的纵向虚拟滚动计算
// 排除横向滚动触发的纵向虚拟滚动计算
if (lastScrollY !== top) {
virtualConfig.isVirtualScroll && virtualConfig.handleScroll();
} else {
Expand Down

0 comments on commit e0f49a9

Please sign in to comment.