Skip to main content
版本:v3+

updateLayoutStyle()

API_LEVEL 4.0 开始支持,API 兼容性请参考 API_LEVEL

更新控件节点的布局样式,具体的 layout 对象属性参考 layout 属性配置

类型

(style: LayoutStyle) => void

参数

参数类型说明
styleLayoutStyle包含布局属性的对象,layout 对象

示例

import { createWidget, widget } from '@zos/ui'

const container = createWidget(widget.VIRTUAL_CONTAINER)

// 更新容器布局样式
container.updateLayoutStyle({
display: 'flex',
'flex-direction': 'row',
'justify-content': 'space-between',
'align-items': 'center',
width: '100%',
height: '200px'
})

相关参考