Skip to content

Commit

Permalink
docs: sync spi docs (#3121)
Browse files Browse the repository at this point in the history
* docs(Icon): update api docs

* docs(ActionSheet): sync api docs

* docs(Avatar): sync api docs

* docs(BackTop): update api docs

* docs(Badage): update docs

* docs(Button): update api docs

* docs(Cascader): update docs

* docs(Cell): sync api docs

* docs(Tag): sync api docs

* docs(Checkbox): sync docs

* docs(Col): sync docs

* docs(Collapse): sync api docs

* docs(Collapse): sync api docs

* docs(DateTimePicker): sync api docs

* docs(Divider): sync api docs

* docs(DrapdownMenu): sync api docs

* docs(Empty): sync api docs

* docs(Footer): sync api docs

* docs(Grid): sync api docs

* docs(SideBar): sync api docs

* docs(Upload): sync api

* docs(Guide): update md

* docs(Image): update api docs

* docs(ImageViewer): update md

* docs(Indexes): sync api docs

* docs(Input): sync api docs

* docs(Link): sync api docs

* docs(Loading): update docs

* docs(message): sync api docs

* docs(NoticeBar): sync api docs

* docs(Overlay): sync api docs

* docs(Popup): sync api docs

* docs(treeSelect): sync api doc

* docs(Progress): sync api docs

* docs(PulldownRefresh): update docs

* feat(radio): update api docs

* test: update snapshots

* docs(Transition): sync api doc

* docs(Rate): update api docs

* docs(Result): update md

* docs(Search): update docs

* docs(Skeleton): update docs

* fix(Slider): remove style props

* fix(Slider): remove externalClasses props

* docs(Toast): sync api doc

* docs(Steps): sync api docs

* docs(Sticky): sync api docs

* docs(swiper): update docs

* docs(Switch): sync api docs

* docs(textarea): sync api

* fix: maxlength default -1

* chore: update snapshot

* docs(TabBar): sync api docs

* docs(Tabs): sync api docs

* fix: fix conflict

---------

Co-authored-by: 黎伟杰 <674416404@qq.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 4, 2024
1 parent b4293d7 commit 326eb05
Show file tree
Hide file tree
Showing 189 changed files with 2,264 additions and 2,310 deletions.
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

0 comments on commit 326eb05

Please sign in to comment.