WSpace 间距组件
间距组件,基于 WinDesignNext WSpace 封装,用于设置组件之间的间距。
基础用法
使用示例
水平间距
json
{
"id": "space_001",
"component": "WSpace",
"direction": "horizontal",
"size": "large",
"children": ["button_001", "button_002"]
}Props API
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
id | string | - | 组件唯一标识(必填) |
component | string | WSpace | 组件类型(必填) |
direction | string | 'horizontal' | 排列方向 |
size | string | number | array | 'default' | 间距大小 |
alignment | string | 'center' | 对齐方式 |
wrap | boolean | false | 是否换行 |
fill | boolean | false | 是否填充容器 |
fillRatio | number | 100 | 填充比例 |
spacer | object | string | number | - | 自定义间隔元素 |
class | string | object | array | - | 自定义类名 |
style | string | array | object | - | 自定义样式 |
children | string[] | - | 子组件 ID 列表 |
path 支持说明
该组件属性均为静态配置,不支持 path 绑定。动态变更请使用 updateDataModel 或 updateProp。
详见 path 数据绑定速查。