Let me tell you how to set the distance between components through margin
Example:
Tight connection between top and bottom two buttons
After setting the margin
Spacing is generated
code:
Row(){
Button('刷词条', { type: ButtonType.Capsule, stateEffect: true })
.backgroundColor('#FFFFFF').width('40%').height('5%').fontColor('#000000')
Button('抽词条', { type: ButtonType.Capsule, stateEffect: true })
.backgroundColor('#FFFFFF').width('40%').height('5%').fontColor('#000000')
}.margin({top:'10'})//--------具体顶部10
We need to add the margin attribute to the component UI description