mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
c8c4b6efa3
* 文档优化 * 文档细节调整,删除示例的 height 设置,使用自动撑开 * sdk 使用完整例子,因为新版没发布 * 修复官网语言不正确问题 * 增加 icon 调整颜色及大小的例子 * 修复文字错误 * 补充 each 的文档 * 修复 zh-CN 大写问题
53 lines
1.5 KiB
Markdown
Executable File
53 lines
1.5 KiB
Markdown
Executable File
---
|
|
title: HBox 布局
|
|
description:
|
|
type: 0
|
|
group: ⚙ 组件
|
|
menuName: HBox
|
|
icon:
|
|
order: 48
|
|
---
|
|
|
|
## 基本用法
|
|
|
|
```schema: scope="body"
|
|
[
|
|
{
|
|
"type": "hbox",
|
|
"className": "b-a bg-dark lter",
|
|
"columns": [
|
|
{
|
|
"type": "plain",
|
|
"text": "Col A",
|
|
"columnClassName": "wrapper-xs b-r"
|
|
},
|
|
|
|
"Col B"
|
|
]
|
|
},
|
|
|
|
{
|
|
"type": "hbox",
|
|
"className": "b-a m-t bg-dark lter",
|
|
"columns": [
|
|
{
|
|
"type": "plain",
|
|
"text": "w-md",
|
|
"columnClassName": "w-md wrapper-xs bg-primary b-r"
|
|
},
|
|
"..."
|
|
]
|
|
}
|
|
]
|
|
```
|
|
|
|
## 属性表
|
|
|
|
| 属性名 | 类型 | 默认值 | 说明 |
|
|
| -------------------------- | --------------------------------- | -------------- | -------------------- |
|
|
| type | `string` | `"hbox"` | 指定为 HBox 渲染器 |
|
|
| className | `string` | | 外层 Dom 的类名 |
|
|
| columns | `Array` | | 列集合 |
|
|
| columns[x] | [SchemaNode](../types/schemanode) | | 成员可以是其他渲染器 |
|
|
| columns[x].columnClassName | `string` | `"wrapper-xs"` | 列上类名 |
|