Skip to content

Commit

Permalink
docs: add external-class content (#2186)
Browse files Browse the repository at this point in the history
* docs(Button): add external-class contnet

* docs(Grid): add external-class contnet

* docs(Divider): add external-class content
  • Loading branch information
anlyyao authored Jul 13, 2023
1 parent be7cf15 commit 09b70c5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ block | Boolean | false | 是否为块级元素 | N
content | String / Slot | - | 按钮内容 | N
custom-dataset | Object | - | 自定义 dataset,可通过 event.currentTarget.dataset.custom 获取。TS 类型:`any` | N
disabled | Boolean | false | 禁用状态 | N
external-classes | Array | - | 组件类名。`['t-class', 't-class-icon', 't-class-loading']` | N
ghost | Boolean | false | 是否为幽灵按钮(镂空按钮) | N
icon | String / Object | - | 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon`。 | N
loading | Boolean | false | 是否显示为加载状态 | N
Expand Down Expand Up @@ -106,6 +105,12 @@ bindchooseavatar | Eventhandle | - | 获取用户头像回调,open-type=choose
-- | -- | --
tap | `event` | 点击按钮,当按钮不为加载或禁用状态时触发

### Button 外部样式类
类名 | 说明
-- | --
t-class | 根节点样式类
t-class-icon | 图标样式类
t-class-loading | 加载样式类

### CSS 变量
组件提供了下列 CSS 变量,可用于自定义样式。
Expand Down
6 changes: 5 additions & 1 deletion src/divider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ isComponent: true
align | String | center | 文本位置(仅在水平分割线有效)。可选项:left/right/center | N
content | String / Slot | - | 子元素 | N
dashed | Boolean | false | 是否虚线(仅在水平分割线有效) | N
external-classes | Array | - | 组件类名,分别用于设置 组件外层类名、分隔线类名 等。`['t-class', 't-class-line', 't-class-content']` | N
layout | String | horizontal | 分隔线类型有两种:水平和垂直。可选项:horizontal/vertical | N

### Divider 外部样式类
类名 | 说明
-- | --
t-class | 根节点样式类
t-class-content | 内容样式类

### CSS 变量
组件提供了下列 CSS 变量,可用于自定义样式。
Expand Down
16 changes: 14 additions & 2 deletions src/grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,22 @@ isComponent: true
align | String | center | 内容对齐方式。可选项:left/center | N
border | Boolean / Object | false | 边框,默认不显示。值为 true 则显示默认边框,值类型为 object 则表示自定义边框样式。TS 类型:`boolean \| { color?: string; width?: string; style?: 'solid' \| 'dashed' \| 'dotted' \| 'double' \| 'groove' \| 'inset' \| 'outset' }` | N
column | Number | 4 | 每一行的列数量;为 0 时等于固定大小 | N
external-classes | Array | - | 组件类名,用于设置组件外层元素类名。`['t-class']` | N
gutter | Number | - | 间隔大小 | N
hover | Boolean | false | 是否开启点击反馈 | N
theme | String | default | 宫格的风格。可选项:default/card | N

### Grid 外部样式类
类名 | 说明
-- | --
t-class | 根节点样式类


### GridItem Props

名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
badge-props | Object | null | 透传至 Badge 属性。TS 类型:`BadgeProps`[Badge API Documents](./badge?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/grid-item/type.ts) | N
description | String / Slot | - | 文本以外的更多描述,辅助信息。可以通过 Props 传入文本,也可以自定义标题节点 | N
external-classes | Array | - | 组件类名,分别用于设置组件外层元素、图片、文本、描述等元素类名。`['t-class', 't-class-image', 't-class-text', 't-class-description']` | N
icon | String / Object | - | 图标名称。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon` | N
image | String / Slot | - | 图片,可以是图片地址,也可以自定义图片节点,值为 slot 的时候才能使用插槽 | N
image-props | Object | - | 透传至 Image 组件 | N
Expand All @@ -89,6 +93,14 @@ url | String | - | 点击后的跳转链接 | N
-- | -- | --
click | \- | 点击子项后触发

### GridItem 外部样式类
类名 | 说明
-- | --
t-class | 根节点样式类
t-class-content | 内容样式类
t-class-image | 图片样式类
t-class-text | 文本样式类
t-class-description | 描述样式类


### CSS 变量
Expand Down

0 comments on commit 09b70c5

Please sign in to comment.