Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【官网】 文档支持国际化 #896

Merged
merged 2 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
feat: 生成英文文档
  • Loading branch information
honkinglin committed May 25, 2022
commit e33f1d47b933bfa6321d5f2157a2d89fcafbe4e7
19 changes: 19 additions & 0 deletions examples/affix/affix.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:: BASE_DOC ::

## API

### Affix Props

name | type | default | description | required
-- | -- | -- | -- | --
container | String / Function | () => (() => window) | Typescript:`ScrollContainer` | N
offsetBottom | Number | 0 | \- | N
offsetTop | Number | 0 | \- | N
zIndex | Number | - | \- | N
onFixedChange | Function | | TS 类型:`(affixed: boolean, context: { top: number }) => void`<br/> | N

### Affix Events

name | params | description
-- | -- | --
fixed-change | `(affixed: boolean, context: { top: number })` | \-
25 changes: 25 additions & 0 deletions examples/alert/alert.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
:: BASE_DOC ::

## API

### Alert Props

name | type | default | description | required
-- | -- | -- | -- | --
close | String / Boolean / Slot / Function | false | Typescript:`string | boolean | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
default | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
icon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
maxLine | Number | 0 | \- | N
message | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
operation | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
theme | String | info | options:success/info/warning/error | N
title | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
onClose | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/> | N
onClosed | Function | | TS 类型:`(context: { e: TransitionEvent }) => void`<br/> | N

### Alert Events

name | params | description
-- | -- | --
close | `(context: { e: MouseEvent })` | \-
closed | `(context: { e: TransitionEvent })` | \-
38 changes: 38 additions & 0 deletions examples/anchor/anchor.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
:: BASE_DOC ::

## API

### Anchor Props

name | type | default | description | required
-- | -- | -- | -- | --
affixProps | Object | - | Typescript:`AffixProps`,[Affix API Documents](./affix?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/anchor/type.ts) | N
bounds | Number | 5 | \- | N
container | String / Function | () => (() => window) | Typescript:`ScrollContainer` | N
cursor | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
size | String | medium | options:small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
targetOffset | Number | 0 | \- | N
onChange | Function | | TS 类型:`(currentLink: string, prevLink: string) => void`<br/> | N
onClick | Function | | TS 类型:`(link: { href: string; title: string; e: MouseEvent }) => void`<br/> | N

### Anchor Events

name | params | description
-- | -- | --
change | `(currentLink: string, prevLink: string)` | \-
click | `(link: { href: string; title: string; e: MouseEvent })` | \-

### AnchorItem Props

name | type | default | description | required
-- | -- | -- | -- | --
href | String | - | required | Y
target | String | _self | options:_self/_blank/_parent/_top | N
title | String / Slot / Function | '' | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N

### AnchorTarget Props

name | type | default | description | required
-- | -- | -- | -- | --
id | String | - | required | Y
tag | String | div | \- | N
32 changes: 32 additions & 0 deletions examples/avatar/avatar.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
:: BASE_DOC ::

## API

### Avatar Props

name | type | default | description | required
-- | -- | -- | -- | --
alt | String | - | show it when url is not valid | N
hideOnLoadFailed | Boolean | false | hide image when loading image failed | N
icon | Slot / Function | - | use icon to fill。Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
image | String | - | images url | N
shape | String | circle | shape。options:circle/round。Typescript:`ShapeEnum ` `type ShapeEnum = 'circle' | 'round'`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/avatar/type.ts) | N
size | String | - | size | N
onError | Function | | TS 类型:`() => void`<br/>trigger on image load failed | N

### Avatar Events

name | params | description
-- | -- | --
error | \- | trigger on image load failed

### AvatarGroup Props

name | type | default | description | required
-- | -- | -- | -- | --
cascading | String | 'right-up' | multiple images cascading。options:left-up/right-up。Typescript:`CascadingValue` `type CascadingValue = 'left-up' | 'right-up'`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/avatar/type.ts) | N
collapseAvatar | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
max | Number | - | \- | N
placement | String | - | popup placement。options:left/top/bottom/right。Typescript:`MaxOverPlacement` `type MaxOverPlacement = 'left' | 'top' | 'bottom' | 'right'`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/avatar/type.ts) | N
popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/avatar/type.ts) | N
size | String | medium | size | N
18 changes: 18 additions & 0 deletions examples/badge/badge.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
:: BASE_DOC ::

## API

### Badge Props

name | type | default | description | required
-- | -- | -- | -- | --
color | String | - | \- | N
content | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
count | String / Number / Slot / Function | 0 | Typescript:`string | number | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
default | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
dot | Boolean | false | \- | N
maxCount | Number | 99 | \- | N
offset | Array | - | Typescript:`Array<string | number>` | N
shape | String | circle | options:circle/round | N
showZero | Boolean | false | \- | N
size | String | medium | options:small/medium | N
26 changes: 26 additions & 0 deletions examples/breadcrumb/breadcrumb.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
:: BASE_DOC ::

## API

### Breadcrumb Props

name | type | default | description | required
-- | -- | -- | -- | --
maxItemWidth | String | undefined | \- | N
options | Array | - | Typescript:`Array<TdBreadcrumbItemProps>` | N
separator | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
theme | String | light | options:light | N

### BreadcrumbItem Props

name | type | default | description | required
-- | -- | -- | -- | --
content | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
default | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
disabled | Boolean | - | \- | N
href | String | - | \- | N
maxWidth | String | undefined | \- | N
replace | Boolean | false | \- | N
router | Object | - | Typescript:`any` | N
target | String | _self | options:_blank/_self/_parent/_top | N
to | String / Object | - | Typescript:`Route` `interface Route { path?: string; name?: string; hash?: string; query?: RouteData; params?: RouteData }` `type RouteData = { [key: string]: string | string[] }`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/breadcrumb/type.ts) | N
6 changes: 3 additions & 3 deletions examples/button/button.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ icon | Slot / Function | - | use it to set left icon in button。Typescript:`T
loading | Boolean | false | set button to be loading state | N
shape | String | rectangle | button shape。options:rectangle/square/round/circle | N
size | String | medium | a button has three size。options:small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
theme | String | undefined | button theme。options:default/primary/danger/warning/success | N
theme | String | - | button theme。options:default/primary/danger/warning/success | N
type | String | button | type of button element in html。options:submit/reset/button | N
variant | String | base | variant of button。options:base/outline/dashed/text | N
onClick | Function | | `(e: MouseEvent<HTMLButtonElement>) => {}` | N
onClick | Function | | TS 类型:`(e: MouseEvent) => void`<br/> | N

### Button Events

name | params | description
-- | -- | --
click | `(e: MouseEvent<HTMLButtonElement>)` | -
click | `(e: MouseEvent)` | \-
62 changes: 62 additions & 0 deletions examples/calendar/calendar.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
:: BASE_DOC ::

## API

### Calendar Props

name | type | default | description | required
-- | -- | -- | -- | --
cell | String / Slot / Function | - | Typescript:`string | TNode<CalendarCell>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
cellAppend | String / Slot / Function | - | Typescript:`string | TNode<CalendarCell>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
controllerConfig | Boolean / Object | - | Typescript:`boolean | CalendarController` | N
fillWithZero | Boolean | - | \- | N
firstDayOfWeek | Number | - | options:1/2/3/4/5/6/7 | N
format | String | 'YYYY-MM-DD' | \- | N
head | String / Slot / Function | - | Typescript:`string | TNode<ControllerOptions>`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
isShowWeekendDefault | Boolean | true | \- | N
mode | String | month | options:month/year | N
month | String / Number | - | \- | N
preventCellContextmenu | Boolean | false | \- | N
range | Array | - | Typescript:`Array<CalendarValue>` | N
theme | String | full | options:full/card | N
value | String / Date | - | Typescript:`CalendarValue` `type CalendarValue = string | Date`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N
week | Array / Slot / Function | - | Typescript:`Array<string> | TNode<CalendarWeek>` `interface CalendarWeek { day: WeekDay }` `type WeekDay = 1 | 2 | 3 | 4 | 5 | 6 | 7`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N
year | String / Number | - | \- | N
onCellClick | Function | | TS 类型:`(options: { cell: CalendarCell; e: MouseEvent }) => void`<br/> | N
onCellDoubleClick | Function | | TS 类型:`(options: { cell: CalendarCell; e: MouseEvent }) => void`<br/> | N
onCellRightClick | Function | | TS 类型:`(options: { cell: CalendarCell; e: MouseEvent }) => void`<br/> | N
onControllerChange | Function | | TS 类型:`(options: ControllerOptions) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts)。<br/>`interface ControllerOptions { filterDate: Date; formattedFilterDate: string; mode: string; isShowWeekend: boolean }`<br/> | N
onMonthChange | Function | | TS 类型:`(options: { month: string; year: string }) => void`<br/> | N

### Calendar Events

name | params | description
-- | -- | --
cell-click | `(options: { cell: CalendarCell; e: MouseEvent })` | \-
cell-double-click | `(options: { cell: CalendarCell; e: MouseEvent })` | \-
cell-right-click | `(options: { cell: CalendarCell; e: MouseEvent })` | \-
controller-change | `(options: ControllerOptions)` | [see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts)。<br/>`interface ControllerOptions { filterDate: Date; formattedFilterDate: string; mode: string; isShowWeekend: boolean }`<br/>
month-change | `(options: { month: string; year: string })` | \-

### CalendarController

name | type | default | description | required
-- | -- | -- | -- | --
current | Object | - | Typescript:`{ visible?: boolean; currentDayButtonProps?: ButtonProps; currentMonthButtonProps?: ButtonProps }` | N
disabled | Boolean | false | \- | N
mode | Object | - | Typescript:`{ visible?: boolean; radioGroupProps?: RadioGroupProps }`,[Radio API Documents](./radio?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N
month | Object | - | Typescript:`{ visible?: boolean; selectProps?: SelectProps }` | N
weekend | Object | - | Typescript:`{ visible?: boolean; showWeekendButtonProps?: CheckTagProps; hideWeekendButtonProps?: CheckTagProps }`,[Tag API Documents](./tag?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N
year | Object | - | Typescript:`{ visible?: boolean; selectProps?: SelectProps }`,[Select API Documents](./select?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/calendar/type.ts) | N

### CalendarCell

name | type | default | description | required
-- | -- | -- | -- | --
belongTo | Number | - | \- | N
date | Object | - | Typescript:`Date` | N
day | Number | - | \- | N
formattedDate | String | - | \- | N
isCurrent | Boolean | - | \- | N
weekOrder | Number | - | \- | N
`ControllerOptions` | \- | - | \- | N
26 changes: 26 additions & 0 deletions examples/card/card.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
:: BASE_DOC ::

## API

### Card Props

name | type | default | description | required
-- | -- | -- | -- | --
actions | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
avatar | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
bordered | Boolean | true | \- | N
content | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
cover | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
default | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
description | String / Slot / Function | - | card description。Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
footer | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
header | String / Slot / Function | - | Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
headerBordered | Boolean | false | \- | N
hoverShadow | Boolean | false | \- | N
loading | Boolean / Slot / Function | false | Typescript:`boolean | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
shadow | Boolean | false | \- | N
size | String | medium | options:medium/small | N
status | String | - | \- | N
subtitle | String / Slot / Function | - | card subtitle。Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
theme | String | normal | options:normal/poster1/poster2 | N
title | String / Slot / Function | - | card title。Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
Loading