You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
961 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Layout 布局
description: 以规则的网格阵列来指导和规范页面中的版面布局以及信息分布,提高界面内布局的一致性,节约成本。
spline: base
isComponent: true
---
## 引入
全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
```json
"usingComponents": {
"t-row": "tdesign-miniprogram/row/row",
"t-col": "tdesign-miniprogram/col/col"
}
```
## 代码演示
### 组件类型
基础
{{ base }}
增加间距
{{ offset }}
## API
### Col Props
名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
offset | String / Number | - | 列的偏移量默认单位px | N
span | String / Number | - | 列的宽度默认单位px | N
### Row Props
名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
gutter | String / Number | - | 列之间的间距默认单位px | N