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

docs: sync spi docs #3121

Merged
merged 55 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4c5cb22
docs(Icon): update api docs
anlyyao Sep 2, 2024
d5d50df
docs(ActionSheet): sync api docs
anlyyao Sep 2, 2024
973e9cd
docs(Avatar): sync api docs
anlyyao Sep 2, 2024
4729421
docs(BackTop): update api docs
anlyyao Sep 2, 2024
db166e4
docs(Badage): update docs
anlyyao Sep 2, 2024
ec4de1e
docs(Button): update api docs
anlyyao Sep 2, 2024
171143d
docs(Cascader): update docs
anlyyao Sep 2, 2024
2846d29
docs(Cell): sync api docs
anlyyao Sep 2, 2024
210db14
docs(Tag): sync api docs
anlyyao Sep 2, 2024
4296c12
docs(Checkbox): sync docs
anlyyao Sep 2, 2024
bef9212
docs(Col): sync docs
anlyyao Sep 2, 2024
622af08
docs(Collapse): sync api docs
anlyyao Sep 2, 2024
76135c8
docs(Collapse): sync api docs
anlyyao Sep 2, 2024
12290af
docs(DateTimePicker): sync api docs
anlyyao Sep 2, 2024
b78b7da
docs(Divider): sync api docs
anlyyao Sep 2, 2024
337b80d
docs(DrapdownMenu): sync api docs
anlyyao Sep 2, 2024
ba6c073
docs(Empty): sync api docs
anlyyao Sep 3, 2024
34088c1
docs(Footer): sync api docs
anlyyao Sep 3, 2024
005edce
docs(Grid): sync api docs
anlyyao Sep 3, 2024
527edf7
docs(SideBar): sync api docs
liweijie0812 Sep 3, 2024
261aac1
docs(Upload): sync api
liweijie0812 Sep 3, 2024
bba1917
docs(Guide): update md
anlyyao Sep 3, 2024
f5b5579
docs(Image): update api docs
anlyyao Sep 3, 2024
e45d36d
docs(ImageViewer): update md
anlyyao Sep 3, 2024
05b632a
docs(Indexes): sync api docs
anlyyao Sep 3, 2024
5d7ad81
docs(Input): sync api docs
anlyyao Sep 3, 2024
5a263c2
docs(Link): sync api docs
anlyyao Sep 3, 2024
b69bcd8
docs(Loading): update docs
anlyyao Sep 3, 2024
cb66abf
docs(message): sync api docs
anlyyao Sep 3, 2024
9770ec7
docs(NoticeBar): sync api docs
anlyyao Sep 3, 2024
e501c04
docs(Overlay): sync api docs
anlyyao Sep 3, 2024
341470b
docs(Popup): sync api docs
anlyyao Sep 3, 2024
6a78e78
docs(treeSelect): sync api doc
liweijie0812 Sep 3, 2024
c93efeb
docs(Progress): sync api docs
anlyyao Sep 3, 2024
4416003
docs(PulldownRefresh): update docs
anlyyao Sep 3, 2024
45a37d3
feat(radio): update api docs
anlyyao Sep 3, 2024
8e0b103
test: update snapshots
anlyyao Sep 3, 2024
89d019d
docs(Transition): sync api doc
liweijie0812 Sep 3, 2024
9191543
docs(Rate): update api docs
anlyyao Sep 3, 2024
c67073a
docs(Result): update md
anlyyao Sep 3, 2024
b283e80
docs(Search): update docs
anlyyao Sep 3, 2024
d833bf5
docs(Skeleton): update docs
anlyyao Sep 3, 2024
2fb68dc
fix(Slider): remove style props
anlyyao Sep 3, 2024
2d25711
fix(Slider): remove externalClasses props
anlyyao Sep 3, 2024
430976f
docs(Toast): sync api doc
liweijie0812 Sep 3, 2024
d19cfaa
docs(Steps): sync api docs
anlyyao Sep 3, 2024
55816bf
docs(Sticky): sync api docs
anlyyao Sep 3, 2024
33a157c
docs(swiper): update docs
anlyyao Sep 3, 2024
79cf59f
docs(Switch): sync api docs
anlyyao Sep 3, 2024
d4bd862
docs(textarea): sync api
liweijie0812 Sep 3, 2024
78defaa
fix: maxlength default -1
liweijie0812 Sep 3, 2024
ffd7ee2
chore: update snapshot
github-actions[bot] Sep 3, 2024
95dafe0
docs(TabBar): sync api docs
anlyyao Sep 3, 2024
96690f8
docs(Tabs): sync api docs
anlyyao Sep 3, 2024
90e4908
fix: fix conflict
anlyyao Sep 3, 2024
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
10 changes: 9 additions & 1 deletion src/action-sheet/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const props: TdActionSheetProps = {
/** 设置取消按钮的文本 */
cancelText: {
type: String,
value: '取消',
value: '',
},
/** 设置每页展示菜单的数量,仅当 type=grid 时有效 */
count: {
Expand All @@ -29,6 +29,7 @@ const props: TdActionSheetProps = {
/** 菜单项 */
items: {
type: Array,
required: true,
},
/** popupProps透传 */
popupProps: {
Expand All @@ -50,15 +51,22 @@ const props: TdActionSheetProps = {
type: String,
value: 'list',
},
/** 是否使用了自定义导航栏 */
usingCustomNavbar: {
type: Boolean,
value: false,
},
/** 显示与隐藏 */
visible: {
type: Boolean,
value: null,
required: true,
},
/** 显示与隐藏,非受控属性 */
defaultVisible: {
type: Boolean,
value: false,
required: true,
},
};

Expand Down
3 changes: 3 additions & 0 deletions src/action-sheet/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface TdActionSheetProps {
items: {
type: ArrayConstructor;
value?: Array<string | ActionSheetItem>;
required?: boolean;
};
/**
* popupProps透传
Expand Down Expand Up @@ -93,6 +94,7 @@ export interface TdActionSheetProps {
visible: {
type: BooleanConstructor;
value?: boolean;
required?: boolean;
};
/**
* 显示与隐藏,非受控属性
Expand All @@ -101,6 +103,7 @@ export interface TdActionSheetProps {
defaultVisible: {
type: BooleanConstructor;
value?: boolean;
required?: boolean;
};
}

Expand Down
10 changes: 1 addition & 9 deletions src/avatar-group/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
export interface TdAvatarGroupProps {
/**
* 图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上
* @default 'right-up'
* @default 'left-up'
*/
cascading?: {
type: StringConstructor;
Expand All @@ -20,14 +20,6 @@ export interface TdAvatarGroupProps {
type: StringConstructor;
value?: string;
};
/**
* 自定义组件样式
* @default ''
*/
style?: {
type: StringConstructor;
value?: string;
};
/**
* 组件类名,用于设置组件外层元素类名
*/
Expand Down
42 changes: 34 additions & 8 deletions src/avatar/README.en-US.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,65 @@
:: BASE_DOC ::

## API

### Avatar Props

name | type | default | description | required
-- | -- | -- | -- | --
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
alt | String | - | show it when url is not valid | N
badge-props | Object | - | Typescript:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/avatar/type.ts) | N
bordered | Boolean | false | \- | N
external-classes | Array | - | `['t-class', 't-class-image', 't-class-icon', 't-class-alt', 't-class-content']` | N
hide-on-load-failed | Boolean | false | hide image when loading image failed | N
icon | String / Object | - | \- | N
image | String | - | images url | N
image-props | Object | - | \- | N
shape | String | circle | shape。optionscircle/round。Typescript:`ShapeEnum ` `type ShapeEnum = 'circle' \| 'round'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/avatar/type.ts) | N
image-props | Object | - | Typescript:`ImageProps`,[Image API Documents](./image?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/avatar/type.ts) | N
shape | String | circle | shape。options: circle/round。Typescript:`ShapeEnum ` `type ShapeEnum = 'circle' \| 'round'`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/avatar/type.ts) | N
size | String | medium | size | N

### Avatar Events

name | params | description
-- | -- | --
error | \- | trigger on image load failed
error | - | trigger on image load failed
### Avatar External Classes

className | Description
-- | --
t-class | \-
t-class-alt | \-
t-class-content | \-
t-class-icon | \-
t-class-image | \-


### 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-miniprogram/tree/develop/src/avatar-group/type.ts) | N
collapse-avatar | String / Slot | - | \- | N
external-classes | Array | - | `['t-class', 't-class-image', 't-class-content']` | N
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
cascading | String | 'left-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-miniprogram/tree/develop/src/avatar-group/type.ts) | N
collapse-avatar | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
max | Number | - | \- | N
size | String | medium | size | N

### AvatarGroup Events

name | params | description
-- | -- | --
collapsed-item-click | - | \-
### AvatarGroup External Classes

className | Description
-- | --
t-class | \-
t-class-content | \-
t-class-image | \-

### CSS Variables

The component provides the following CSS variables, which can be used to customize styles.
Name | Default Value | Description
-- | -- | --
Expand All @@ -57,4 +83,4 @@ Name | Default Value | Description
--td-avatar-small-width | 80rpx | -
--td-avatar-text-large-font-size | 16px | -
--td-avatar-text-medium-font-size | @font-size-base | -
--td-avatar-text-small-font-size | @font-size-s | -
--td-avatar-text-small-font-size | @font-size-s | -
45 changes: 29 additions & 16 deletions src/avatar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,52 +61,65 @@ isComponent: true
{{ size }}

## API

### Avatar Props

名称 | 类型 | 默认值 | 说明 | 必传
名称 | 类型 | 默认值 | 描述 | 必传
-- | -- | -- | -- | --
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
alt | String | - | 头像替换文本,仅当图片加载失败时有效 | N
badge-props | Object | - | 头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字。TS 类型:`BadgeProps`,[Badge API Documents](./badge?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/avatar/type.ts) | N
bordered | Boolean | false | 已废弃。是否显示外边框 | N
hide-on-load-failed | Boolean | false | 加载失败时隐藏图片 | N
icon | String / Object | - | 图标。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon`。 | N
image | String | - | 图片地址 | N
image-props | Object | - | 透传至 Image 组件 | N
image-props | Object | - | 透传至 Image 组件。TS 类型:`ImageProps`,[Image API Documents](./image?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/avatar/type.ts) | N
shape | String | circle | 形状。可选项:circle/round。TS 类型:`ShapeEnum ` `type ShapeEnum = 'circle' \| 'round'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/avatar/type.ts) | N
size | String | medium | 尺寸,示例值:small/medium/large/24px/38px 等 | N

### Avatar Events

名称 | 参数 | 描述
-- | -- | --
error | \- | 图片加载失败时触发
error | - | 图片加载失败时触发
### Avatar External Classes

### Avatar 外部样式类
类名 | 说明
-- | --
类名 | 描述
-- | --
t-class | 根节点样式类
t-class-image | 图片样式类
t-class-icon | 图标样式类
t-class-alt | 替代文本样式类
t-class-content | 内容样式类
t-class-icon | 图标样式类
t-class-image | 图片样式类


### AvatarGroup Props

名称 | 类型 | 默认值 | 说明 | 必传
名称 | 类型 | 默认值 | 描述 | 必传
-- | -- | -- | -- | --
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
cascading | String | 'left-up' | 图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上。可选项:left-up/right-up。TS 类型:`CascadingValue` `type CascadingValue = 'left-up' \| 'right-up'`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/avatar-group/type.ts) | N
collapse-avatar | String / Slot | - | 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多` | N
collapse-avatar | String / Slot | - | 头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
max | Number | - | 能够同时显示的最多头像数量 | N
size | String | medium | 尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size | N

### AvatarGroup 外部样式类
类名 | 说明
-- | --
### AvatarGroup Events

名称 | 参数 | 描述
-- | -- | --
collapsed-item-click | - | 点击头像折叠元素触发
### AvatarGroup External Classes

类名 | 描述
-- | --
t-class | 根节点样式类
t-class-image | 图片样式类
t-class-content | 内容样式类
t-class-image | 图片样式类

### CSS Variables

### CSS 变量
组件提供了下列 CSS 变量,可用于自定义样式。
名称 | 默认值 | 描述
-- | -- | --
Expand All @@ -130,4 +143,4 @@ t-class-content | 内容样式类
--td-avatar-small-width | 80rpx | -
--td-avatar-text-large-font-size | 16px | -
--td-avatar-text-medium-font-size | @font-size-base | -
--td-avatar-text-small-font-size | @font-size-s | -
--td-avatar-text-small-font-size | @font-size-s | -
2 changes: 1 addition & 1 deletion src/avatar/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const props: TdAvatarProps = {
badgeProps: {
type: Object,
},
/** 是否显示外边框 */
/** 已废弃。是否显示外边框 */
bordered: {
type: Boolean,
value: false,
Expand Down
13 changes: 3 additions & 10 deletions src/avatar/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* */

import { BadgeProps } from '../badge/index';
import { ImageProps } from '../image/index';

export interface TdAvatarProps {
/**
Expand All @@ -23,21 +24,13 @@ export interface TdAvatarProps {
value?: BadgeProps;
};
/**
* 是否显示外边框
* 已废弃。是否显示外边框
* @default false
*/
bordered?: {
type: BooleanConstructor;
value?: boolean;
};
/**
* 自定义组件样式
* @default ''
*/
style?: {
type: StringConstructor;
value?: string;
};
/**
* 组件类名,用于设置组件外层元素类名
*/
Expand Down Expand Up @@ -73,7 +66,7 @@ export interface TdAvatarProps {
*/
imageProps?: {
type: ObjectConstructor;
value?: object;
value?: ImageProps;
};
/**
* 形状
Expand Down
20 changes: 14 additions & 6 deletions src/back-top/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,30 @@

name | type | default | description | required
-- | -- | -- | -- | --
external-classes | Array | - | `['t-class', 't-class-icon', 't-class-text']` | N
visibility-height | Number | 200 | \- | N
scroll-top | Number | 0 | \- | N
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
fixed | Boolean | true | \- | N
icon | String / Boolean / Object / Slot | - | \- | N
icon | String / Boolean / Object / Slot | true | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
scroll-top | Number | 0 | \- | N
text | String | '' | \- | N
theme | String | round | options:round/half-round/round-dark/half-round-dark | N
theme | String | round | options: round/half-round/round-dark/half-round-dark | N
visibility-height | Number | 200 | \- | N

### BackTop Events

name | params | description
-- | -- | --
to-top | \- | \-
### BackTop External Classes

className | Description
-- | --
t-class | \-
t-class-icon | \-
t-class-text | \-

### CSS Variables

The component provides the following CSS variables, which can be used to customize styles.
Name | Default Value | Description
-- | -- | --
Expand All @@ -30,4 +38,4 @@ Name | Default Value | Description
--td-back-top-round-border-radius | @radius-circle | -
--td-back-top-round-color | @font-gray-1 | -
--td-back-top-round-dark-bg-color | @gray-color-14 | -
--td-back-top-round-dark-color | @font-white-1 | -
--td-back-top-round-dark-color | @font-white-1 | -
23 changes: 13 additions & 10 deletions src/back-top/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,35 @@ isComponent: true
{{ base }}

## API

### BackTop Props

名称 | 类型 | 默认值 | 说明 | 必传
名称 | 类型 | 默认值 | 描述 | 必传
-- | -- | -- | -- | --
external-classes | Array | - | 组件类名,分别用于设置外层元素、图标、文本内容等元素类名。`['t-class', 't-class-icon', 't-class-text']` | N
visibility-height | Number | 200 | 滚动高度达到此参数值才出现 | N
scroll-top | Number | 0 | 页面滚动距离 | N
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
fixed | Boolean | true | 是否绝对定位固定到屏幕右下方 | N
icon | String / Boolean / Object / Slot | true | 图标。值为 `false` 表示不显示图标。不传表示使用默认图标 `'backtop'` | N
icon | String / Boolean / Object / Slot | true | 图标。值为 `false` 表示不显示图标。不传表示使用默认图标 `'backtop'`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
scroll-top | Number | 0 | 页面滚动距离 | N
text | String | '' | 文案 | N
theme | String | round | 预设的样式类型。可选项:round/half-round/round-dark/half-round-dark | N
visibility-height | Number | 200 | 滚动高度达到此参数值才出现 | N

### BackTop Events

名称 | 参数 | 描述
-- | -- | --
to-top | \- | 点击触发
### BackTop External Classes

### BackTop 外部样式类
类名 | 说明
-- | --
类名 | 描述
-- | --
t-class | 根节点样式类
t-class-icon | 图标样式类
t-class-text | 文本样式类

### CSS 变量
### CSS Variables

组件提供了下列 CSS 变量,可用于自定义样式。
名称 | 默认值 | 描述
-- | -- | --
Expand All @@ -66,4 +69,4 @@ t-class-text | 文本样式类
--td-back-top-round-border-radius | @radius-circle | -
--td-back-top-round-color | @font-gray-1 | -
--td-back-top-round-dark-bg-color | @gray-color-14 | -
--td-back-top-round-dark-color | @font-white-1 | -
--td-back-top-round-dark-color | @font-white-1 | -
Loading
Loading