XChinux:其实,你将配置文件写成.js文件,也可以,QML容易用。
(2019-05-16 16:24) 
TabBar {
id: tabBar
spacing: 0
Layout.fillHeight: true
Layout.fillWidth: true
background: CMRectangle {
topLeftRadius: Scaled.metric(5)
topRightRadius: Scaled.metric(5)
color: CMColors.backgroundMiddle
}
Repeater {
model: contentNodeLoader.item ? contentNodeLoader.item.tabsList : []
CMTabButton {
text: modelData
height: tabBar.height
width: Scaled.metric(200)
leftBorder: false
rightBorder: checked ? false : true
fontPointSize: Theme.headerFontSize
checkedColor: CMColors.accent
opacity: 0.
//onClicked:{tabBar.removeItem(tabBar.itemAt(tabindex))}
Component.onCompleted: { opacity = 1. }
Behavior on opacity { OpacityAnimator { duration: 200 } }
}
}
onCurrentIndexChanged: {
contentNodeLoader.requestTabActivating(currentIndex)
}
}
}
}