Skip to content

Commit

Permalink
docs(grid-item): set the default background color to transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
betavs committed Dec 21, 2023
1 parent a241556 commit c1cfcf6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 48 deletions.
45 changes: 23 additions & 22 deletions src/grid/README.en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:: BASE_DOC ::

## API

### Grid Props

name | type | default | description | required
Expand Down Expand Up @@ -28,28 +29,28 @@ layout | String | vertical | options:vertical/horizontal | N
text | String / Slot | - | \- | N
url | String | - | \- | N


### CSS Variables

The component provides the following CSS variables, which can be used to customize styles.
Name | Default Value | Description
Name | Default Value | Description
-- | -- | --
--td-grid-bg-color | @bg-color-container | -
--td-grid-card-radius | @radius-large | -
--td-grid-item-bg-color | @bg-color-container | -
--td-grid-item-description-color | @font-gray-3 | -
--td-grid-item-description-font-size | 24rpx | -
--td-grid-item-description-line-height | 40rpx | -
--td-grid-item-description-padding-top | 8rpx | -
--td-grid-item-horizontal-text-description-top | 4rpx | -
--td-grid-item-horizontal-text-padding-left | 24rpx | -
--td-grid-item-hover-bg-color | @bg-color-secondarycontainer | -
--td-grid-item-image-middle-width | 80rpx | -
--td-grid-item-image-small-width | 64rpx | -
--td-grid-item-image-width | 96rpx | -
--td-grid-item-padding | 32rpx | -
--td-grid-item-text-color | @font-gray-1 | -
--td-grid-item-text-font-size | 28rpx | -
--td-grid-item-text-line-height | 44rpx | -
--td-grid-item-text-middle-font-size | 24rpx | -
--td-grid-item-text-padding-top | 16rpx | -
--td-grid-item-text-small-font-size | 24rpx | -
--td-grid-bg-color | @bg-color-container | -
--td-grid-card-radius | @radius-large | -
--td-grid-item-bg-color | transparent | -
--td-grid-item-description-color | @font-gray-3 | -
--td-grid-item-description-font-size | 24rpx | -
--td-grid-item-description-line-height | 40rpx | -
--td-grid-item-description-padding-top | 8rpx | -
--td-grid-item-horizontal-text-description-top | 4rpx | -
--td-grid-item-horizontal-text-padding-left | 24rpx | -
--td-grid-item-hover-bg-color | @bg-color-secondarycontainer | -
--td-grid-item-image-middle-width | 80rpx | -
--td-grid-item-image-small-width | 64rpx | -
--td-grid-item-image-width | 96rpx | -
--td-grid-item-padding | 32rpx | -
--td-grid-item-text-color | @font-gray-1 | -
--td-grid-item-text-font-size | 28rpx | -
--td-grid-item-text-line-height | 44rpx | -
--td-grid-item-text-middle-font-size | 24rpx | -
--td-grid-item-text-padding-top | 16rpx | -
--td-grid-item-text-small-font-size | 24rpx | -
55 changes: 29 additions & 26 deletions src/grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ isComponent: true
---

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-97%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-93%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-97%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-94%25-blue" /></span>

## 引入

全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
Expand All @@ -20,6 +21,7 @@ isComponent: true
## 代码演示

### 组件类型

基础宫格

{{ base }}
Expand Down Expand Up @@ -54,8 +56,8 @@ isComponent: true

{{ card }}


## API

### Grid Props

名称 | 类型 | 默认值 | 说明 | 必传
Expand All @@ -68,11 +70,11 @@ hover | Boolean | false | 是否开启点击反馈 | N
theme | String | default | 宫格的风格。可选项:default/card | N

### Grid 外部样式类

类名 | 说明
-- | --
-- | --
t-class | 根节点样式类


### GridItem Props

名称 | 类型 | 默认值 | 说明 | 必传
Expand All @@ -94,36 +96,37 @@ url | String | - | 点击后的跳转链接 | N
click | \- | 点击子项后触发

### GridItem 外部样式类

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


### CSS 变量

组件提供了下列 CSS 变量,可用于自定义样式。
名称 | 默认值 | 描述
名称 | 默认值 | 描述
-- | -- | --
--td-grid-bg-color | @bg-color-container | -
--td-grid-card-radius | @radius-large | -
--td-grid-item-bg-color | @bg-color-container | -
--td-grid-item-description-color | @font-gray-3 | -
--td-grid-item-description-font-size | 24rpx | -
--td-grid-item-description-line-height | 40rpx | -
--td-grid-item-description-padding-top | 8rpx | -
--td-grid-item-horizontal-text-description-top | 4rpx | -
--td-grid-item-horizontal-text-padding-left | 24rpx | -
--td-grid-item-hover-bg-color | @bg-color-secondarycontainer | -
--td-grid-item-image-middle-width | 80rpx | -
--td-grid-item-image-small-width | 64rpx | -
--td-grid-item-image-width | 96rpx | -
--td-grid-item-padding | 32rpx | -
--td-grid-item-text-color | @font-gray-1 | -
--td-grid-item-text-font-size | 28rpx | -
--td-grid-item-text-line-height | 44rpx | -
--td-grid-item-text-middle-font-size | 24rpx | -
--td-grid-item-text-padding-top | 16rpx | -
--td-grid-item-text-small-font-size | 24rpx | -
--td-grid-bg-color | @bg-color-container | -
--td-grid-card-radius | @radius-large | -
--td-grid-item-bg-color | transparent | -
--td-grid-item-description-color | @font-gray-3 | -
--td-grid-item-description-font-size | 24rpx | -
--td-grid-item-description-line-height | 40rpx | -
--td-grid-item-description-padding-top | 8rpx | -
--td-grid-item-horizontal-text-description-top | 4rpx | -
--td-grid-item-horizontal-text-padding-left | 24rpx | -
--td-grid-item-hover-bg-color | @bg-color-secondarycontainer | -
--td-grid-item-image-middle-width | 80rpx | -
--td-grid-item-image-small-width | 64rpx | -
--td-grid-item-image-width | 96rpx | -
--td-grid-item-padding | 32rpx | -
--td-grid-item-text-color | @font-gray-1 | -
--td-grid-item-text-font-size | 28rpx | -
--td-grid-item-text-line-height | 44rpx | -
--td-grid-item-text-middle-font-size | 24rpx | -
--td-grid-item-text-padding-top | 16rpx | -
--td-grid-item-text-small-font-size | 24rpx | -

0 comments on commit c1cfcf6

Please sign in to comment.