W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
將子組件橫向布局,并在每個(gè)子組件之間插入一根縱向的分割線。
該組件從API Version 7開始支持。后續(xù)版本如有新增內(nèi)容,則采用上角標(biāo)單獨(dú)標(biāo)記該內(nèi)容的起始版本。
名稱 | 參數(shù)類型 | 描述 |
---|---|---|
resizeable | boolean | 分割線是否可拖拽,默認(rèn)為false。 |
RowSplit的分割線最小能拖動到剛好包含子組件。
在真機(jī)中查看拖動效果,預(yù)覽器中不支持拖動。
不支持clip、margin通用屬性。
- // xxx.ets
- @Entry
- @Component
- struct RowSplitExample {
- build() {
- Column() {
- Text('The second line can be dragged').fontSize(9).fontColor(0xCCCCCC).width('90%')
- RowSplit() {
- Text('1').width('10%').height(100).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
- Text('2').width('10%').height(100).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
- Text('3').width('10%').height(100).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
- Text('4').width('10%').height(100).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
- Text('5').width('10%').height(100).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
- }
- .resizeable(true) // 可拖動
- .width('90%').height(100)
- }.width('100%').margin({ top: 5 })
- }
- }
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: