wuyanan

fix |> 修复语音输入,点击搜索后,弹窗未消失问题

... ... @@ -40,7 +40,7 @@ export struct SearchComponent {
@StorageProp('currentBreakpoint') @Watch("currentChanged") currentBreakpoint: string = 'sm';
private breakpointSystem = new BreakpointSystem();
@State percent: number = 1
private commentInputDialogController?: CustomDialogController
private voiceInputDialogController?: CustomDialogController
currentChanged() {
if (this.currentBreakpoint == "md" || this.currentBreakpoint == "lg") {
... ... @@ -419,16 +419,16 @@ export struct SearchComponent {
VoiceRecoginizer.checkPemmission(getContext(this) as common.UIAbilityContext)
this.commentInputDialogController = new CustomDialogController({
this.voiceInputDialogController = new CustomDialogController({
builder: VoiceSearchCustomDialog (
{ onSearchBtnClick:((content:string) => {
this.commentInputDialogController?.close()
this.searchText = content
if (StringUtils.isNotEmpty(this.searchText)) {
SearcherAboutDataModel.putSearchHistoryData(this.searchText)
this.getSearchHistoryData()
this.getSearchInputResData(this.searchText)
}
this.voiceInputDialogController?.close()
})
}
),
... ... @@ -436,8 +436,8 @@ export struct SearchComponent {
alignment: DialogAlignment.Bottom,
customStyle: true,
backgroundColor: "#50000000",
}).open()
})
this.voiceInputDialogController.open()
}
getSearchResultCountData() {
... ...