Angularは代わりにソフトウェアディスクの改行検索を実装し、検索方法を除きます:
フォームにはaction = "javascript:return true;"が必要です
input / ion-input type = "search"(keyup.enter)= "search()"
測定されたイオン検索バーはinputmode = ""を設定する必要があり、公式ドキュメントinputmode = "search"は信頼できない場合があります!!
例:
< form * ngIf = "data" [formGroup] = "formGroup" action = "javascript:return true;" > < ng-container * ngFor = "let item of data.data.formObj" [ngSwitch] = "item.type" > < ng-container * ngSwitchCase = "'input'" > < ion-item class = "post- item " > < ion-label > {{item.label}} </ ion-label > < ion-input type =" search " [attr.placeholder] = "item.placeHolder [formControlName] =" item.formKey " [(ngModel)] =" item.value " (keyup.enter)=" search() " > </ ion-input > </ ion-item > </ ng-container > </ ng-container > </ form >
< ion- searchbar(keyup.enter)= "search()" inputmode = "" [attr.placeholder] = "item?.placeHolder" [(ngModel)] = "item.value" [formControlName] = "item.formKey " > </ ion-searchbar >