【无标题】

// xxx.ets
@Entry
@Component
struct MouseEventExample {
@State hoverText: string = ‘no hover’
@State mouseText: string = ‘MouseText’
@State changevalue: string = ‘’
@State submitvalue: string = ‘’
@State color: Color = Color.Blue
@State text: string = ‘’
controller: SearchController = new SearchController()
build() {
Column({ space:20 }) {
Search({value: ‘’, placeholder: ‘Type to search’, controller: this.controller})
.searchButton(‘Search’)
.width(‘100%’)
.height(35)
.backgroundColor(Color.White)
.placeholderColor(Color.Grey)
.placeholderFont({ size: 20, weight: 10, family: ‘serif’, style: FontStyle.Normal })
.onSubmit((value: string) => {
this.submitvalue = value
})
.onChange((value: string) => {
this.changevalue = value
})
.margin({ top: 30 })
Text(‘This is the setting of textOverflow to none text content This is the setting of textOverflow to none text content.’)
.textOverflow({ overflow: TextOverflow.None })
.fontSize(12).border({ width: 1 }).padding(10)

  TextInput({ placeholder: 'input your word' })
    .placeholderColor("rgb(0,0,225)")
    .placeholderFont({ size: 30, weight: 100, family: 'cursive', style: FontStyle.Italic })
    .caretColor(Color.Blue)
    .height(50)
    .fontSize(30)
    .fontWeight(FontWeight.Bold)
    .fontFamily("sans-serif")
    .fontStyle(FontStyle.Normal)
    .fontColor(Color.Red)
    .onChange((value: string) => {
      this.text = value
    })

  Hyperlink('https://ost.51cto.com/person/posts/15589203', '鸿蒙开发之南拳北腿') { // Hyperlink接口
    Text('鸿蒙开发ArkUI最佳实践')
      .fontSize(20)
      .fontWeight(Number(FontWeight.Bold))
      .borderColor(Color.Orange)
      .borderWidth(1)
  }.color(Color.Orange)

  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(300).height(100).borderWidth(1).borderColor(Color.Black).align(Alignment.Start)

  ColumnSplit() {
    Text('1').width('100%').height(40).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
    Text('2').width('100%').height(40).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
    Text('3').width('100%').height(40).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
    Text('4').width('100%').height(40).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
    Text('5').width('100%').height(40).backgroundColor(0xF5DEB3).textAlign(TextAlign.Center)
  }
  .resizeable(true)
  .width(300).height(300).borderWidth(1).borderColor(Color.Black).align(Alignment.Top)
}.padding({ top: 20 }).width('100%')

}
}
/*
// xxx.ets
@Entry
@Component
struct TextInputExample1 {

build() {
Column() {
TextInput({ placeholder: ‘input your word’ })
.placeholderColor(“rgb(0,0,225)”)
.placeholderFont({ size: 30, weight: 100, family: ‘cursive’, style: FontStyle.Italic })
.caretColor(Color.Blue)
.height(50)
.fontSize(30)
.fontWeight(FontWeight.Bold)
.fontFamily(“sans-serif”)
.fontStyle(FontStyle.Normal)
.fontColor(Color.Red)
.onChange((value: string) => {
this.text = value
})
Text(this.text).width(‘90%’)
}
}
}
*/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值