可以给Tabs设置height('auto')。参考示例如下:
@Entry
@Component
struct Index {
build() {
Column() {
Tabs() {
TabContent() {
Row() {
Text('hello')
}
.width('100%')
}
}
.height('auto')
.barBackgroundColor(Color.Orange)
.barHeight(0)
}
.height('100%')
.width('100%')
}
}