鸿蒙的组件

border:边框
borderWidth:边框的宽度
borderColor:边框颜色
borderStyle(BorderStyle.Dotted):边框样式
@Entry
@Component
struct Bq2Page {
  @State message: string = 'Hello World';

  build() {
    Column(){
      Text("bq")
        .fontSize(170)
        .fontColor(Color.Gray)

      Column({space:15}){
        Text("欢迎使用 北企管理员端")
          .fontSize(26)
        TextInput({placeholder:"用户名"})
          .borderRadius(0)
          .backgroundColor(Color.White)
          .width("80%")
          .borderWidth(1)//边框的宽度
          .borderColor('#cfcadd')//边框颜色
          .borderStyle(BorderStyle.Dotted)//边框样式

 边框简写

 .border({// 统一样式  边框简写
            width:1,
            color:'#cfcadd',
            style:BorderStyle.Solid

          })

 Checkbox({name:‘isAgree’}):多选框
Row(){
Checkbox({name:'isAgree'})
  Text('阅读并同意携程的').fontSize(12)
  Text('《服务协议》《个人信息保护政策》')
    .fontSize(12)
    .fontColor('#099fde')
}
.width("90%")

 

alignItems(HorizontalAlign.Center):水平居中
.justifyContent(FlexAlign.Center):
Column(){
  Image($rawfile("un_other_login@2x_v6.22.png"))
    .height(25)
}
.height(40)
.width(40)
.border({
  width:1,
  radius:90,
  color:"#ccc",
})
.alignItems(HorizontalAlign.Center)//水平居中
 .justifyContent(FlexAlign.Center)//垂直居中
垂直居中
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值