wuyanan

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

@@ -40,7 +40,7 @@ export struct SearchComponent { @@ -40,7 +40,7 @@ export struct SearchComponent {
40 @StorageProp('currentBreakpoint') @Watch("currentChanged") currentBreakpoint: string = 'sm'; 40 @StorageProp('currentBreakpoint') @Watch("currentChanged") currentBreakpoint: string = 'sm';
41 private breakpointSystem = new BreakpointSystem(); 41 private breakpointSystem = new BreakpointSystem();
42 @State percent: number = 1 42 @State percent: number = 1
43 - private commentInputDialogController?: CustomDialogController 43 + private voiceInputDialogController?: CustomDialogController
44 44
45 currentChanged() { 45 currentChanged() {
46 if (this.currentBreakpoint == "md" || this.currentBreakpoint == "lg") { 46 if (this.currentBreakpoint == "md" || this.currentBreakpoint == "lg") {
@@ -419,16 +419,16 @@ export struct SearchComponent { @@ -419,16 +419,16 @@ export struct SearchComponent {
419 419
420 VoiceRecoginizer.checkPemmission(getContext(this) as common.UIAbilityContext) 420 VoiceRecoginizer.checkPemmission(getContext(this) as common.UIAbilityContext)
421 421
422 - this.commentInputDialogController = new CustomDialogController({ 422 + this.voiceInputDialogController = new CustomDialogController({
423 builder: VoiceSearchCustomDialog ( 423 builder: VoiceSearchCustomDialog (
424 { onSearchBtnClick:((content:string) => { 424 { onSearchBtnClick:((content:string) => {
425 - this.commentInputDialogController?.close()  
426 this.searchText = content 425 this.searchText = content
427 if (StringUtils.isNotEmpty(this.searchText)) { 426 if (StringUtils.isNotEmpty(this.searchText)) {
428 SearcherAboutDataModel.putSearchHistoryData(this.searchText) 427 SearcherAboutDataModel.putSearchHistoryData(this.searchText)
429 this.getSearchHistoryData() 428 this.getSearchHistoryData()
430 this.getSearchInputResData(this.searchText) 429 this.getSearchInputResData(this.searchText)
431 } 430 }
  431 + this.voiceInputDialogController?.close()
432 }) 432 })
433 } 433 }
434 ), 434 ),
@@ -436,8 +436,8 @@ export struct SearchComponent { @@ -436,8 +436,8 @@ export struct SearchComponent {
436 alignment: DialogAlignment.Bottom, 436 alignment: DialogAlignment.Bottom,
437 customStyle: true, 437 customStyle: true,
438 backgroundColor: "#50000000", 438 backgroundColor: "#50000000",
439 - }).open()  
440 - 439 + })
  440 + this.voiceInputDialogController.open()
441 } 441 }
442 442
443 getSearchResultCountData() { 443 getSearchResultCountData() {