-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(Indexes): generate api docs (#419)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
067b85a
commit 6ddba39
Showing
14 changed files
with
185 additions
and
6 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/products/tdesign-mobile-react/src/indexes/defaultProps.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TdIndexesProps } from './type'; | ||
|
||
export const indexesDefaultProps: TdIndexesProps = { sticky: true, stickyOffset: 0 }; |
26 changes: 26 additions & 0 deletions
26
packages/products/tdesign-mobile-react/src/indexes/indexes.en-US.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
|
||
### Indexes Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
className | String | - | className of component | N | ||
style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N | ||
indexList | Array | - | Typescript:`Array<string \| number>` | N | ||
list | Array | [] | `deprecated`。Typescript:`ListItem[] ` `interface ListItem { title: string; index: string; children: { title: string; [key: string]: any} [] }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/indexes/type.ts) | N | ||
sticky | Boolean | true | Typescript:`Boolean` | N | ||
stickyOffset | Number | 0 | \- | N | ||
onChange | Function | | Typescript:`(index: string \| number) => void`<br/> | N | ||
onSelect | Function | | Typescript:`(index: string \| number) => void`<br/> | N | ||
|
||
|
||
### IndexesAnchor Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
className | String | - | className of component | N | ||
style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N | ||
index | String / Number | - | \- | N |
26 changes: 26 additions & 0 deletions
26
packages/products/tdesign-mobile-react/src/indexes/indexes.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
|
||
### Indexes Props | ||
|
||
名称 | 类型 | 默认值 | 描述 | 必传 | ||
-- | -- | -- | -- | -- | ||
className | String | - | 类名 | N | ||
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N | ||
indexList | Array | - | 索引字符列表。不传默认 `A-Z`。TS 类型:`Array<string \| number>` | N | ||
list | Array | [] | 已废弃。索引列表的列表数据。每个元素包含三个子元素,index(string):索引值,例如1,2,3,...或A,B,C等;title(string): 索引标题,可不填将默认设为索引值;children(Array<{title: string}>): 子元素列表,title为子元素的展示文案。TS 类型:`ListItem[] ` `interface ListItem { title: string; index: string; children: { title: string; [key: string]: any} [] }`。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/indexes/type.ts) | N | ||
sticky | Boolean | true | 索引是否吸顶,默认为true。TS 类型:`Boolean` | N | ||
stickyOffset | Number | 0 | 锚点吸顶时与顶部的距离 | N | ||
onChange | Function | | TS 类型:`(index: string \| number) => void`<br/>索引发生变更时触发事件 | N | ||
onSelect | Function | | TS 类型:`(index: string \| number) => void`<br/>点击侧边栏时触发事件 | N | ||
|
||
|
||
### IndexesAnchor Props | ||
|
||
名称 | 类型 | 默认值 | 描述 | 必传 | ||
-- | -- | -- | -- | -- | ||
className | String | - | 类名 | N | ||
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N | ||
index | String / Number | - | 索引字符 | N |
37 changes: 37 additions & 0 deletions
37
packages/products/tdesign-mobile-react/src/indexes/type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
export interface TdIndexesProps { | ||
/** | ||
* 索引字符列表。不传默认 `A-Z` | ||
*/ | ||
indexList?: Array<string | number>; | ||
/** | ||
* 索引是否吸顶,默认为true | ||
* @default true | ||
*/ | ||
sticky?: Boolean; | ||
/** | ||
* 锚点吸顶时与顶部的距离 | ||
* @default 0 | ||
*/ | ||
stickyOffset?: number; | ||
/** | ||
* 索引发生变更时触发事件 | ||
*/ | ||
onChange?: (index: string | number) => void; | ||
/** | ||
* 点击侧边栏时触发事件 | ||
*/ | ||
onSelect?: (index: string | number) => void; | ||
} | ||
|
||
export interface TdIndexesAnchorProps { | ||
/** | ||
* 索引字符 | ||
*/ | ||
index?: string | number; | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/products/tdesign-mobile-vue/src/indexes/indexes-anchor-props.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TdIndexesAnchorProps } from '../indexes/type'; | ||
import { PropType } from 'vue'; | ||
|
||
export default { | ||
/** 索引字符 */ | ||
index: { | ||
type: [String, Number] as PropType<TdIndexesAnchorProps['index']>, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
import { TdIndexesProps } from './type'; | ||
import { PropType } from 'vue'; | ||
|
||
export default { | ||
/** 索引字符列表。不传默认 `A-Z` */ | ||
indexList: { | ||
type: Array as PropType<TdIndexesProps['indexList']>, | ||
}, | ||
/** 索引是否吸顶,默认为true */ | ||
sticky: { | ||
type: Boolean, | ||
default: true, | ||
}, | ||
/** 锚点吸顶时与顶部的距离 */ | ||
stickyOffset: { | ||
type: Number, | ||
default: 0, | ||
}, | ||
/** 索引发生变更时触发事件 */ | ||
onChange: Function as PropType<TdIndexesProps['onChange']>, | ||
/** 点击侧边栏时触发事件 */ | ||
onSelect: Function as PropType<TdIndexesProps['onSelect']>, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC | ||
* */ | ||
|
||
export interface TdIndexesProps { | ||
/** | ||
* 索引字符列表。不传默认 `A-Z` | ||
*/ | ||
indexList?: Array<string | number>; | ||
/** | ||
* 索引是否吸顶,默认为true | ||
* @default true | ||
*/ | ||
sticky?: Boolean; | ||
/** | ||
* 锚点吸顶时与顶部的距离 | ||
* @default 0 | ||
*/ | ||
stickyOffset?: number; | ||
/** | ||
* 索引发生变更时触发事件 | ||
*/ | ||
onChange?: (index: string | number) => void; | ||
/** | ||
* 点击侧边栏时触发事件 | ||
*/ | ||
onSelect?: (index: string | number) => void; | ||
} | ||
|
||
export interface TdIndexesAnchorProps { | ||
/** | ||
* 索引字符 | ||
*/ | ||
index?: string | number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters