RelativeContainer 组件使用中,如何设置auto,自适应自组件高度?咨询场景描述:https://developer.huawei.com/consumer/cn/doc/harmonyos-references/ts-universal-attributes-size-0000001774280842
RelativeContainer支持宽高自适应子组件,将其宽高设置为auto即可,但限制是当width设置auto时,如果水平方向上子组件以容器作为锚点,则auto不生效,垂直方向上同理,具体使用方法请参考文档:https://developer.huawei.com/consumer/cn/doc/harmonyos-references/ts-container-relativecontainer-0000001820880933https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/arkts-layout-development-relative-layout-0000001820999749
RelativeContainer支持宽高自适应子组件,将其宽高设置为auto即可,但限制是当width设置auto时,如果水平方向上子组件以容器作为锚点,则auto不生效,垂直方向上同理,具体使用方法请参考文档:
https://developer.huawei.com/consumer/cn/doc/harmonyos-references/ts-container-relativecontainer-0000001820880933
https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/arkts-layout-development-relative-layout-0000001820999749