From 2bdeed1432a7f9eaf6c37caa7734c5a34a706d53 Mon Sep 17 00:00:00 2001 From: lyn <76365499@qq.com> Date: Sat, 11 Nov 2023 09:31:38 +0800 Subject: [PATCH] typo: fix docs ant Rect is spelled as React (#7082) --- components/input/__tests__/Search.test.js | 2 +- components/menu/index.en-US.md | 2 +- components/menu/index.zh-CN.md | 2 +- components/segmented/src/MotionThumb.tsx | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/input/__tests__/Search.test.js b/components/input/__tests__/Search.test.js index 51462171c..9a3200e14 100644 --- a/components/input/__tests__/Search.test.js +++ b/components/input/__tests__/Search.test.js @@ -35,7 +35,7 @@ describe('Input.Search', () => { expect(wrapper.html()).toMatchSnapshot(); }); }); - it('should support ReactNode suffix without error', () => { + it('should support VueNode suffix without error', () => { const fn = () => { mount({ render() { diff --git a/components/menu/index.en-US.md b/components/menu/index.en-US.md index c23249800..a7c86149e 100644 --- a/components/menu/index.en-US.md +++ b/components/menu/index.en-US.md @@ -105,7 +105,7 @@ const groupItem = { | Param | Description | Type | Default value | Version | | -------- | ---------------------- | --------------------------------- | ------------- | ------- | | children | Sub-menu items | [MenuItemType\[\]](#MenuItemType) | - | | -| label | The title of the group | ReactNode | - | | +| label | The title of the group | VueNode | - | | #### MenuDividerType diff --git a/components/menu/index.zh-CN.md b/components/menu/index.zh-CN.md index 044bea256..c4ec22f12 100644 --- a/components/menu/index.zh-CN.md +++ b/components/menu/index.zh-CN.md @@ -105,7 +105,7 @@ const groupItem = { | 参数 | 说明 | 类型 | 默认值 | 版本 | | -------- | ------------ | --------------------------------- | ------ | ---- | | children | 分组的菜单项 | [MenuItemType\[\]](#MenuItemType) | - | | -| label | 分组标题 | ReactNode | - | | +| label | 分组标题 | VueNode | - | | #### MenuDividerType diff --git a/components/segmented/src/MotionThumb.tsx b/components/segmented/src/MotionThumb.tsx index 046881926..2f59f87a0 100644 --- a/components/segmented/src/MotionThumb.tsx +++ b/components/segmented/src/MotionThumb.tsx @@ -4,7 +4,7 @@ import { onBeforeUnmount, nextTick, Transition, watch, defineComponent, computed import { anyType } from '../../_util/type'; import type { SegmentedValue } from './segmented'; -type ThumbReact = { +type ThumbRect = { left: number; right: number; width: number; @@ -20,7 +20,7 @@ export interface MotionThumbInterface { direction?: 'ltr' | 'rtl'; } -const calcThumbStyle = (targetElement: HTMLElement | null | undefined): ThumbReact => +const calcThumbStyle = (targetElement: HTMLElement | null | undefined): ThumbRect => targetElement ? { left: targetElement.offsetLeft, @@ -58,8 +58,8 @@ const MotionThumb = defineComponent({ return ele?.offsetParent && ele; }; - const prevStyle = ref(null); - const nextStyle = ref(null); + const prevStyle = ref(null); + const nextStyle = ref(null); watch( () => props.value,