ColumnSplit
將子組件縱向布局,并在每個(gè)子組件之間插入一根橫向的分割線。
說(shuō)明:
開(kāi)發(fā)前請(qǐng)熟悉鴻蒙開(kāi)發(fā)指導(dǎo)文檔 :[gitee.com/li-shizhen-skin/harmony-os/blob/master/README.md
]
該組件從API Version 7開(kāi)始支持。后續(xù)版本如有新增內(nèi)容,則采用上角標(biāo)單獨(dú)標(biāo)記該內(nèi)容的起始版本。
子組件
可以包含子組件。
接口
ColumnSplit()
屬性
名稱 | 參數(shù)類型 | 描述 |
---|---|---|
resizeable | boolean | 分割線是否可拖拽,默認(rèn)為false。 |
divider10+ | [ColumnSplitDividerStyle] | null |
ColumnSplitDividerStyle10+對(duì)象說(shuō)明
名稱 | 參數(shù)類型 | 必填 | 描述 |
---|---|---|---|
startMargin | [Dimension] | 否 | 分割線與其上方子組件的距離。 默認(rèn)值:0 |
endMargin | [Dimension] | 否 | 分割線與其下方子組件的距離。 默認(rèn)值:0 |
說(shuō)明:
與RowSplit相同,ColumnSplit的分割線可以改變上下兩邊子組件的高度,子組件可改變高度的范圍取決于子組件的最大最小高度。
HarmonyOS與OpenHarmony鴻蒙文檔籽料:mau123789是v直接拿
支持clip、margin等通用屬性,clip不設(shè)置的時(shí)候默認(rèn)值為true。
示例
// xxx.ets
@Entry
@Component
struct ColumnSplitExample {
build() {
Column(){
Text('The secant line can be dragged').fontSize(9).fontColor(0xCCCCCC).width('90%')
ColumnSplit() {
Text('1').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
Text('2').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
Text('3').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
Text('4').width('100%').height(50).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
Text('5').width('100%').height(50).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
}
.borderWidth(1)
.resizeable(true) // 可拖動(dòng)
.width('90%').height('60%')
}.width('100%')
}
}
審核編輯 黃宇
-
組件
+關(guān)注
關(guān)注
1文章
518瀏覽量
17926 -
鴻蒙
+關(guān)注
關(guān)注
57文章
2392瀏覽量
43059
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
鴻蒙ArkTS容器組件:Scroll
鴻蒙ArkTS容器組件:SideBarContainer
![<b class='flag-5'>鴻蒙</b><b class='flag-5'>ArkTS</b><b class='flag-5'>容器</b><b class='flag-5'>組件</b>:SideBarContainer](https://file1.elecfans.com/web2/M00/EB/95/wKgZomZevfiAZTUiAAAYyNC3ogI340.png)
評(píng)論