wangliang_wd

feat:优化搜索组件

... ... @@ -312,7 +312,7 @@ export struct SearchComponent {
.layoutWeight(1)
.height(`${this.calcHeight(69)}lpx`)
.backgroundColor($r('app.color.color_transparent'))
.textFont({ size: `${this.calcHeight(27)}lpx`, weight: 400 })// .defaultFocus(true)
.textFont({ size: `${this.calcHeight(30)}lpx`, weight: 400 })// .defaultFocus(true)
.id("searchId")
.searchIcon({
size: 0
... ... @@ -320,7 +320,7 @@ export struct SearchComponent {
.cancelButton({
style: CancelButtonStyle.INVISIBLE
})
.caretStyle({ color: Color.Pink })
.caretStyle({ color: $r('app.color.main_red') })
///监听搜索框变化
.onTextSelectionChange((selectionStart: number) =>{
this.searchTextNum = selectionStart;
... ...